Store and Forward Packet Switching A packet is stored in entirety, checksum recomputed at every hop and forwarded.
Services provided to the transport layer Services should be independent of the router technology. Transport layer be shielded from the topology of the routers. The network addresses made available to the TL should use a uniform numbering plan, even across LANs and WANs.
Two schools of thought Whether NL provides a CL service to the TL (Internet Community), or Whether It provides a CO service to the TL (telephone companies)
CL VS CO CL : Since subnet is inherently unreliable, host should do the error , flow control, packet ordering etc themselves. CO : subnet must provide reliable service; QoS is imporatnt
Implementation of CL Packets are called datagrams and the subnet is called datagram subnet.
Implementation of Connectionless Service Routing within a diagram subnet.
Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet.
Routing Algorithms : desirable properties Correctness Simplicity Robustness Stability : converge to equilibrium Fairness Optimality : Minimize mean packet delay, maximize throughput – conflicting, since queuing near full capacity implies long delays Minimize the number of hops – improves delays as well as throughput
Fairness Vs Optimality Conflict between fairness and optimality.
Routing Algorithms : Adaptive or Non-adaptive Non-adaptive : Static Adaptive : Dynamic
Routing Algorithms The Optimality Principle Shortest Path Routing Flooding Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast Routing Routing for Mobile Hosts Routing in Ad Hoc Networks
The Optimality Principle (a) A subnet. (b) A sink tree for router B.
Shortest Path Routing: Static The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.
Flooding Problems : Jamming/Congestion Solutions : Hop count in the header Sequence number for every source : discard duplicate packets. Adv: Though not practical for routine routing but useful when a system starts afresh.
Distance Vector Routing : Dynamic (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
Distance Vector Routing (2) The count-to-infinity problem.
Link State Routing Each router must do the following: Discover its neighbors, learn their network address. Measure the delay or cost to each of its neighbors. Construct a packet telling all it has just learned. Send this packet to all other routers. Compute the shortest path to every other router.
Discovering the neighbours Send a HELLO packet The other router sends a reply telling who he is
Problem (a) Nine routers and a LAN. (b) A graph model of (a).
Measuring the delay to neighbours Send an ECHO packet The receiver sends it back immediately with a time stamp
Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
Distributing the Link State Packets Packets are flooded, Seq no.s to check jamming
Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13).
Hierarchical Routing Hierarchical routing.
Broadcasting in point to point subnet Individual packet for each destination Flooding Multidestination routing – each packet has to contain either a list of destinations or a bit map indicating all the destinations. Spanning tree – best in terms of channel utilization – minimum number of copies are generated …. But knowledge of some spanning tree at every router is required ..which is sometimes available (as in LSR) but sometimes not(as in DVR) Reverse path forwarding
Reverse path forwarding Approximates the behaviour of Spanning tree algo .. When routers have no knowledge of spanning trees.
Reverse path forwarding Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.
Reverse path forwarding No knowledge of spanning trees required No bit map etc required Simple and easy to implement No additional CPU time required Not the best … but in practice reasonably efficient.
Multicast Routing in the subnet MR – sending a message to members within a group
Multicast Routing (a) A network. (b) A spanning tree for the leftmost router. (c) A multicast tree for group 1. (d) A multicast tree for group 2.
What is congestion? • Too many packets in a part of the subnet, too many to handle.
Some of the Causes of congestion • Lot of packets arriving at 3-4 lines of a router, all needing the same output line. As a result, a queue will build up on the outgoing line. When the Q is full, packets will start dropping. • Increasing the size of the buffer may help initially but after a certain limit may have adverse effect--- By the time a packet moves up in the Q, it times out and retransmitted increasing the load on the network.
Causes of congestion • Slow processors: If the computational powers of a router are weak, it will take time in book-keeping and processing, again resulting in building up of Qs. • Low bandwidth • In fact, Slow processors and High bandwidth, or • Fast processors but Low Bandwidth • a good combination of fast processors and high bandwidth is required to improve the situation.
Solutions to Congestion • Classified into two categories • Open Loop solutions: Static Solutions, take preventive measures by good design, but no corrections are done once the system is up, that is do not take the current state of the system into account. Adv : simplicity • Closed Loop Solutions: Based on feedback: • a router detects congestion, • pass the information (feedback) to nodes where action can be taken, say the sender, and • adjust the system parameters to fix the problem.
Open Loop Solutions • Policy-Decisions at various levels
Congestion Prevention Policies Policies that affect congestion. 5-26
Open Loop Solutions contd.. • Flow Control --- window size • Acknowledgement policy --- piggyback or not • Out-of-order policy --- Go back N/Selective repeat • Retransmission Policy --- Time out etc
Closed Loop Solutions • Detecting/Predicting congestion: Let ‘u’ be any parameter being monitored say, output line utilization or queue length or buffer utilization; Let ‘a’ be a constant between 0 and 1 • U_new is predicted as folllows: u_new = a * u_old + (1-a)*u_new A value of ‘u’ going above a certain threshold is considered as a situation for congestion • Congestion Control in Virtual-Circuit Subnets • Congestion Control in Datagram Subnets
Congestion Control in Virtual-Circuit Subnets • Admission Control : No more new VCs • Allow new VCs but route them around the problem area.
Congestion Control in Virtual-Circuit Subnets • A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. Back
Congestion Control in Datagram Subnets • Warning Bit is set in the forwarded packet and copied en-route by the destination in the acknowledgement packet. • Choke Packets are sent back to the sender as a feedback. • The corrective measures (slow down the transmission) are taken only at the source, Fig a. • The corrective measures (slow down the forwarding of the packets coming from the source) are taken at every Hop en-route the Choke Packet, Fig b.
Hop-by-Hop Choke Packets (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through. Back
Load Shedding in Datagram Subnet • Throw the packet when nothing else works • Select the packet to be dropped randomly • Select intelligently : For example • In a file transfer, older is better so drop the later ones. Dropping older would cause a gap at the destination and more packets would have to be retransmitted. • In audio/video file: loosing few bits is not important, so dropping older is better, no retransmission may be asked by the destination. • Or, sender may specify the priority