1 / 101

Computer Networks (Lecture 5: Network Layer Protocols )

Computer Networks (Lecture 5: Network Layer Protocols ). Arzad Kherani (alam@cse.iitd.ac.in) Dept. of Computer Sc. And Engg. Indian Institute of Technology Delhi. Outline. Connection-less vs. connection-oriented data transfer Routing protocol Congestion control IP protocol ICMP protocol.

emmanuel
Download Presentation

Computer Networks (Lecture 5: Network Layer Protocols )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Networks(Lecture 5: Network Layer Protocols ) Arzad Kherani (alam@cse.iitd.ac.in) Dept. of Computer Sc. And Engg. Indian Institute of Technology Delhi Computer Networks, Jan-May 2004

  2. Outline • Connection-less vs. connection-oriented data transfer • Routing protocol • Congestion control • IP protocol • ICMP protocol Computer Networks, Jan-May 2004

  3. The Network Layer • End-to-end data transfer • Addressing • Store-and-forward packet switching • Routing • Congestion control • Interconnection between networks Computer Networks, Jan-May 2004

  4. Packet switching • Store-and-forwarding at intermediate nodes using connection-less or connection-oriented data transfer • Service-provider vs. customer-premise equipment Computer Networks, Jan-May 2004

  5. Datagram Routing • No connection is established • Each packet is forwarded independent of others • Every packet carries a destination address • Intermediate routers maintain (and update) “routing tables” Computer Networks, Jan-May 2004

  6. Routing connections • A connection is established before data transfer can take place • Route is fixed at the tie connection is established • And resources allocated • Connections are also known as virtual circuits Computer Networks, Jan-May 2004

  7. Datagrams vs. virtual circuits Computer Networks, Jan-May 2004

  8. H4 H5 H1 Router2 LAN H6 Router1 H2 LAN Router1 H3 Routing: the problem • Largely concerned with routing datagrams through a subnet • Between a pair of source-destination devices, packets may have to traverse several “subnets” • Routing tables are updated every T seconds Computer Networks, Jan-May 2004

  9. Routing: the problem (2) • Correct • Simple • Robust • Address the problems of changing traffic conditions, changes to topology, failures (both transient and permanent) • Stable • In several cases route computation is an iterative process • In such cases the process must converge • Incremental changes in traffic/topology must result in increment changes in routes (I.e. there are no large swings in routes due to increnetal changes) • Fair • Optimal Computer Networks, Jan-May 2004

  10. Routing: the problem (3) • Fairness vs. Optimality Computer Networks, Jan-May 2004

  11. Routing: the problem (4) • Performance metrics: • Transit delay • Throughput • Number of hops • Security • Delay vs. throughput Computer Networks, Jan-May 2004

  12. Routing algorithms static adaptive others Centralized (based on all info) Decentralized (on incomplete info) Routing protocols: classification • Static routes • Computed off-line • based on certain topology, traffic, performance metric • Not change, unless there is a major network overhaul • Adaptive routing • Routes adapt to changes in topology, traffic • On-line based on current measurements • Based on complete or partial knowledge • Distributed computation vs. centralized computation • Other algorithms • Flooding • Ho-potato Computer Networks, Jan-May 2004

  13. Flooding • An incoming packet is sent on all incoming links • Limit the number of hops to avoid infinite loops • Or, forward packets only once using a packet ID • Or only on selected links (in the right direction) • Useful in case some data is to be “broadcasted” • Terribly expensive in terms of resource utilization • But, results in minimum delay Computer Networks, Jan-May 2004

  14. Static routing • Shortest path routing using Dijkstra algorithm • Where “distance” is either delay, drop rate, or simply number of hops • Results in “rooted” tree with destination as the root Computer Networks, Jan-May 2004

  15. Static routing: Dijkstra algorithm Computer Networks, Jan-May 2004

  16. Adaptive routing • Distance-vector routing • Link-state routing • Others • Hierarchical routing • Standards • OSPF • BGP • MPLS and “traffic engineering” Computer Networks, Jan-May 2004

  17. At node J Distance-vector routing • Also known as Bellman-Ford routing • Used in Arpanet, till 1979 • Each router maintains a routing table, with estimated “distance” to each destination (and updates it periodically) • Each router periodically exchanges this table with its neighbors Computer Networks, Jan-May 2004

  18. At node J Distance-vector routing • Each router measures “distance” on each outgoing link • Using e.g. queue length, round-trip delay • It re-computes the routes as follows: Computer Networks, Jan-May 2004

  19. Distance-vector routing • Several problems with Distance Vector routing: • Poor estimate of delays along each link • Count-to-infinity problem: • Good news spreads fast • Bad news travels slow, very slow Computer Networks, Jan-May 2004

  20. Link State Routing • Every few seconds (or minutes), each router: • Re-discovers the neighborhood (and their addresses) • Estimate delays (or distances) to each of its neighbors • Construct a packet with above information • Send it to all routers in the network • Collate similar information from all routers in the network • Re-compute the “shortest” routes • Possibly using Dijkstra’s algorithm Computer Networks, Jan-May 2004

  21. Two fundamental points • Routing schemes discussed thus far • Belong to “ routes for all source-destination pairs” • As opposed to “on-demand routing”, where a route is determined only if and when needed (as in wire-less networks, MPLS networks) • Belong to schemes where “routing tables” are used to route packets • As opposed to “source-routing”, where each packet carries the route that it must follow Computer Networks, Jan-May 2004

  22. Link State Routing:Neighborhood discovery • Use “hello” packets on each outgoing links • Neighbors respond with an “ack” Computer Networks, Jan-May 2004

  23. Link State Routing:Measuring Distances over Links • Use hello packets, and timers, to estimate delay • Start timer when the “hello” packet is put in the queue • Takes into account “load” • Or, when its transmission is started • Does not take into account “load” Computer Networks, Jan-May 2004

  24. Link State Routing • Format of the link-state packet: • “seq no” helps with flooding the packet to all routers • Age, so that the information can be discarded after a while Computer Networks, Jan-May 2004

  25. Link State Routing • Packet processing: • Re-sequencing of link-state info packets • Ignore packets with “lower” sequence numbers (as “stale”) • What if a packet is lost? • No big deal • Other problems • What if a sequence number is corrupted by noise? And this fact goes undetected • What if a router re-boots? • Each packet has an associated “age” in seconds (say 60 sec) • “age” is decremented every second by intermediate routers, and by the router that caches it • processing starts afresh if age  0 Computer Networks, Jan-May 2004

  26. Link State Routing • Route computation: • Note every router has identical information • Use Dijkstra’s shortest path algorithm • Problems: • Stale information • Incorrect information • Incomplete information • Inconsistent routes  loops Computer Networks, Jan-May 2004

  27. Link State Routing • Standards • IS-IS • Used with variety of protocols, including IP, IPX • OSPF • An Internet RFC Computer Networks, Jan-May 2004

  28. Hierarchical Routing • Essentially solves “scalability” problem for large networks • Considers a network to consist of a connected network of regional networks • Routing is either within the local region, or across regions • Multiple levels of hierarchy ( 2 or more) Computer Networks, Jan-May 2004

  29. Hierarchical Routing • Significant saving in size of routing tables • In example below, entries in table at 1A: • for local destination: 3 (size of local network) • For other regions: 4 (one for every other region) • For a network with say 720 routers organized as 8 regional networks, each consisting of 9 sub-nets, each of which contains 10 routers: • 10 entries, one for each router in its sub-net • 8 entries, one for every other sub-net • 7 entries, one for every other regional network Computer Networks, Jan-May 2004

  30. source Broadcast routing: multi-destination routing • Send n-1 copies, one for every other router • Multi-destination routing (a smarter of sending one copy to every other router) • The source sends a packet, containing list of all n-1 destinations addresses • When a packet arrives at an intermediate router, the router identifies for each destination the “best” route, and then sends a packet on an outgoing line with the packet containing a list of sub-set of destination addresses • Both distance-vector and link-state routing algorithms will provide the necessary information Computer Networks, Jan-May 2004

  31. source Broadcast routing: spanning-tree based • Intelligent form of broadcast, based on a spanning tree rooted-at-source • The problem with this router is: does each router know the spanning tree • Works with link-state routing, but not distance-vector routing Computer Networks, Jan-May 2004

  32. Broadcast routing: reverse path forwarding • Essentially spanning tree based packet broadcast, except that the spanning tree is determined on-the-fly • Simple, efficient Computer Networks, Jan-May 2004

  33. Multicast routing • Spanning tree vs. multicast tree • The latter includes nodes that are required to forward packets to all member nodes • Multi-destination routing to all K-1members • When a packet arrives at an intermediate router, the router identifies for each destination the “best” route, and then sends a packet on an outgoing line with the packet containing a list of sub-set of destination addresses • Both distance-vector and link-state routing algorithms will provide the necessary information Computer Networks, Jan-May 2004

  34. Routing in peer-to-peer ad hoc networks • What is different about routing in ad hoc networks • Routing environment • Wireless, mobile hosts resulting in: • Greater probability of link, node failure • Changing topology • Frequent route changes • Every device is a potential router • Potentially different goals: • Stability of routes • Power consumption Computer Networks, Jan-May 2004

  35. Classification of routing protocols • Multicast routing • Unicast routing • Proactive protocols • Where routes between every pair of nodes are computed a-priori • Examples: distance-vector, link-state rouitng in IP networks • Advantage: reduced latency • Dis-advantage: excessive overhead due to route computation • Reactive protocols • Routes are determined between a pair of devices only when required • As in MPLS networks • Advantage: overhead is minimized • Dis-advantage: Increased latency • Example routing protocols for ad hoc networks • Flooding • Dynamic source routing • AODV • … Computer Networks, Jan-May 2004

  36. [S] S E F B C M L J A G H D K I N Dynamic Source Routing (DSR) • If source S does not have a route to destination D: • It initiates “route discovery” • Or, broadcasts (floods) Route Request (RREQ) • RREQ includes address S as “source address” Computer Networks, Jan-May 2004

  37. [S,E] S E F B [S,B] C M L J A G [S,C] H D K I N Dynamic Source Routing (contd.) • Each node appends own identifier when forwarding RREQ • Issues concerning hidden terminal and of collisions again arise Computer Networks, Jan-May 2004

  38. S E F [S,E,F] B C M L J A G H D K [S,C,G] I N Dynamic Source Routing (contd.) • DSR effectively uses flooding to discover a route to destination Computer Networks, Jan-May 2004

  39. S E F B C M L J A G [S,E,F,J] H D K I N [S,C,G,K] Dynamic Source Routing (contd.) • Route discovery continues till node M has also attempted to find a route to destination D • Final route is say [S, E, F, J, D] Computer Networks, Jan-May 2004

  40. RREP [S,E,F,J,D] S E F B C M L J A G H D K I N Dynamic Source Routing (contd.) • Destination sends a RREP (Route Reply) back to source S, together with route [S, E, F, J, D] • RREP is sent along route obtained by reversing discovered route, viz. [D, J,F, E, S] Computer Networks, Jan-May 2004

  41. Dynamic Source Routing (contd.) • For DSR to succeed, links must be bi-directional: • RREP is sent along route obtained by reversing discovered route • Ensure: • Intermediate node forwards RREQ if it is received on a bi-directional link • Intermediate node forwards RREQ on links that are known to be bi-directional • If links (in general) are not bi-directional then • RREP is sent on a (new) discovered route from D to S • RREP is piggybacked onto RREQ packets for D to S • Links are bi-directional in IEEE 802.11 and in Bluetooth Computer Networks, Jan-May 2004

  42. DATA [S,E,F,J,D] S E F B C M L J A G H D K I N Dynamic Source Routing (contd.) • Processing of RREP: • Source S caches the discovered route for subsequent packets • The route is included in each packet as “source route” Computer Networks, Jan-May 2004

  43. DATA [E,F,J,D] S E F B C M L J A G H D K I N Dynamic Source Routing (contd.) • Intermediate nodes also cache relevant portions of the route for their use Computer Networks, Jan-May 2004

  44. S E F J RREP [S,E,F,J,D] D Route Caching in DSR • All nodes along the discovered route deduce and cache a route by any means: • Given fact that RREP contains route [S, E, F, J, D]: • S has a route to E, F, J as well • E has a route [E, F, J, D] to D • So does E to F and to J, and F to J • Given fact that intermediate nodes need to forward RREP • Nodes D, J, F, E all have a route to S, and to intermediate nodes • Etc. Computer Networks, Jan-May 2004

  45. S E F [S,E,F] B C M L J A G H D K [S,C,G] I N Route Caching in DSR (contd.) • Other nodes not on the discovered path also discover routes: • For example, when node K receives RREQ [S,C,G] for node D, node K learns route [K,G,C,S] to node S Computer Networks, Jan-May 2004

  46. Route Caching in DSR (contd.) • Cached routes are used: • To route packets • To obtain alternate routes when a route in use is broken • speed up recovery • To respond to RREQ if a route is cached  • speed up route discovery • limit propagation of RREQ Computer Networks, Jan-May 2004

  47. route [S,E,F,J,D] S E F B C M L J A G route [C, G, K, D] H D K I N Route Recovery in DSR • Speed up recovery: • If node E fails • S initiates route discovery • Node C responds immediately with RREP [S,C,G,K,D] • S routes data with source route [S,C,G,K,D] Computer Networks, Jan-May 2004

  48. RERR [J-D] S E F B C M L J A G H D K I N Route Recovery in DSR (contd.) • Link failure is detected when node is unable to forward source-routed packet  • notification is sent up-stream • Source S and intermediate nodes remove all routes with broken link as one of the links Computer Networks, Jan-May 2004

  49. Route Caching in DSR (contd.) • Cached routes may become invalid due to changes in topology (or mobility) • Stale, invalid cache pollute neighboring caches • Impact on performance • No route is available • Route is poor • Need to implement policy to “purge” stale/invalid cache entries Computer Networks, Jan-May 2004

  50. DSR: pros and cons • Pros: • On demand routing • Caching speeds up route discovery • Route discovery uses flooding  discovers minimum delay routes • Routing tables are not maintained • Cons: • Requires entire route to be included in packet header • Requires symmetric links • Inherits all problems associated with flooding (too many RREQs, collisions, hidden terminals) • Stale, invalid cache Computer Networks, Jan-May 2004

More Related