network layer n.
Skip this Video
Loading SlideShow in 5 Seconds..
Network Layer PowerPoint Presentation
Download Presentation
Network Layer

Network Layer

246 Vues Download Presentation
Télécharger la présentation

Network Layer

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Network Layer

  2. The context

  3. Store and Forward Packet Switching A packet is stored in entirety, checksum recomputed at every hop and forwarded.

  4. 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.

  5. 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)

  6. 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

  7. Implementation of CL Packets are called datagrams and the subnet is called datagram subnet.

  8. Implementation of Connectionless Service Routing within a diagram subnet.

  9. Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet.

  10. Comparison of Virtual-Circuit and Datagram Subnets 5-4

  11. Comparison of Virtual-Circuit and Datagram Subnets 5-4

  12. 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

  13. Equilibrium

  14. Fairness Vs Optimality Conflict between fairness and optimality.

  15. Routing Algorithms : Adaptive or Non-adaptive Non-adaptive : Static Adaptive : Dynamic

  16. 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

  17. The Optimality Principle (a) A subnet. (b) A sink tree for router B.

  18. Shortest Path Routing: Static The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.

  19. 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.

  20. Distance Vector Routing : Dynamic (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

  21. Distance Vector Routing (2) The count-to-infinity problem.

  22. 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.

  23. Discovering the neighbours Send a HELLO packet The other router sends a reply telling who he is

  24. Problem (a) Nine routers and a LAN. (b) A graph model of (a).

  25. Measuring the delay to neighbours Send an ECHO packet The receiver sends it back immediately with a time stamp

  26. Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.

  27. Distributing the Link State Packets Packets are flooded, Seq no.s to check jamming

  28. Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13).

  29. Hierarchical Routing Hierarchical routing.

  30. 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

  31. Reverse path forwarding Approximates the behaviour of Spanning tree algo .. When routers have no knowledge of spanning trees.

  32. Reverse path forwarding Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.

  33. 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.

  34. Multicast Routing in the subnet MR – sending a message to members within a group

  35. 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.

  36. Congestion Control

  37. What is congestion? • Too many packets in a part of the subnet, too many to handle.

  38. 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.

  39. 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.

  40. 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.

  41. Open Loop Solutions • Policy-Decisions at various levels

  42. Congestion Prevention Policies Policies that affect congestion. 5-26

  43. 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

  44. 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

  45. Congestion Control in Virtual-Circuit Subnets • Admission Control : No more new VCs • Allow new VCs but route them around the problem area.

  46. Congestion Control in Virtual-Circuit Subnets • A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. Back

  47. 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.

  48. 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

  49. 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

  50. Internetworking