1 / 46

Part IV Network Layer Protocols

Part IV Network Layer Protocols. Routing IP Protocol Router Architectures. Network Layer Functions. Determine the routes to be taken by datagrams using routing algorithms such as Link State, Distance Vector, Hierarchical Routing, multicast routing

deiter
Télécharger la présentation

Part IV 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. Part IVNetwork Layer Protocols Routing IP Protocol Router Architectures

  2. Network Layer Functions • Determine the routes to be taken by datagrams using routing algorithms such as Link State, Distance Vector, Hierarchical Routing, multicast routing • Switch packets arriving on an input port to the output port specified by the routing algorithms • In case of connection oriented services (ATM), implement Call Setup and Virtual Circuit mechanisms and maintain information related to set-up VCs

  3. Network Layer Functions

  4. Virtual Circuit (VC) Service common route followed by all packets of a connection, thus providing in-order packet delivery to a destination VC phases: VC Set-up: source to destination route is selected, tables entries are inserted indicating the VC numbers and incoming/outgoing ports; resources may be reserved for this connection (eg buffer space) Data Transfer: data packets flow over the selected route, headers indicate the VC numbers VC tear-down: either side can request tear-down, other side is informed, and resources are released Signaling Messages and Signaling Protocol: used to set-up and tear-down VCs

  5. Datagram Service • No connection set-up and tear-down, thus routers do not have to maintain any connection state information • Packets carry source and destination addresses and are switched in a router based on the destination address • packets may follow different end-to-end routes, and thus may arrive out of order

  6. Virtual Circuit Vs. Datagram

  7. Internet Service Model • Internet uses datagram, while ATM uses VC service • Internet provides only one type of datagram service, sometimes called best effort; ie no guarantees regarding in-order delivery, throughput, end to end average delay, jitter, or just plain delivery! • Researchers are currently working to add differentiated services

  8. ATM Service Models • 4 service classes for a user connection: • Constant Bit Rate (CBR): connection looks like a dedicated wire; guarantees bdw and upper bounds on loss rate, delay, jitter; suitable for real-time applications (digitized voice) • Unspecified Bit Rate (UBR): guarantees only in-order delivery; suited for interactive traffic (email, newsgroups) • Available Bit Rate (ABR): guarantees a minimum transmission rate, but if bandwidth is available, user may exceed that rate up to some peak cell rate (suitable for Web browsing) • Variable Bit Rate (VBR): provides guarantees as in CBR, but user can vary cell rate; suitable for compressed video applications

  9. Routing Principles • Routing: delivering a packet to its destination on the best possible path • Routing steps: (a) determine node network address (b) compute/construct the path (c) forward the packet to destination Here, we will focus on (b) - routing alg. for path computation

  10. Routing Alg Requirements • Find path with min delay, cost or other metric • dynamic reconfiguration after failures/changes • adaptive load balancing

  11. Routing Alg Classification • Global routing (eg, Link State): each node knows complete topology (connectivity, link costs etc); it individually computes all routes (“centralized” computation) • Distributed (decentralized) routing (eg, Distance Vector): no node has global topology knowledge. Totally distributed route computation. Gradual computation of routes via exchange of route tables among neighbors • Also static routing (manually edited routing tables) vs dynamic routing (automatically updated tables)

  12. Link State Routing • Each router measures the “costs” (eg, delay, bdw, pkt loss etc.) of its attached links • Periodically (or upon link change/failure) it packs the link costs in a Link State (LS) pkt, and broadcasts the LS pkt to its neighbors • The neighbors will in turn broadcast the LS pkt to their neighbors and so on until all nodes have heard the pkt (propagation via flooding) • Duplicate pkts are detected and dropped based on source ID and unique sequence number

  13. Link State Routing (cont) • At steady state, each router has received the LS updates from all other routers • It can build a complete network topology and link cost map (identical for all routers) • Next, it computes routes from itself to all other nodes in the network (using, for example, Dijkstra’s Alg). It creates a routing table with such routes • Routing tables at different nodes are all consistent since they are based on the same topology/cost data base • LS routing protocol used in OSPF intradomain routing

  14. Dijkstra Shortest Path Alg Notation: • c(i,j) be cost of link (i,j); • D(v) cost of path from source A to v; • p(v) previous node on shortest path from A to v

  15. Dijkstra’s Alg (cont) 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

  16. step N D(B),p(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),p(F) 0 A 2,A 5,A 1,A infty infty 1 AD 2,A 4,D 2,D infty 2 ADE 2,A 3,E 4,E 3 ADEB 3E 4E 4 ADEBC 4E 5 ADEBCF

  17. Dijkstra’s Alg Complexity • Assume the set of nodes is stored as a linear array • To find the node not in N, with min distance from A, it requires O(n) operations • The above step is repeated n times, thus total complexity is O(n) • Using sorted heap instead of linear array, the complexity is reduced to O(n lgn)

  18. Link State oscillatory behavior • Route oscillations may occur if link cost depends on flow and thus on routes.

  19. Distance Vector routing alg • Distance Vector (DV): vector of distances to all destinations • Periodically, each nodes receives from neighbors their respective DVs • It adds to each DV entry the link cost to neighbor • It updates own DV using the min distance (via any of the neighbors) to each destination • It creates Routing Vector: vector of next hops to each destination following min distance path.

  20. DV code Initialization: 2 for all adjacent nodes v: 3 DX(*,v) = infty /* the * operator means "for all rows" */ 4 DX(v,v) = c(X,v) 5 for all destinations, y 6 send minwD(y,w) to each neighbor /* w over all X's neighbors */ 7 8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) 11 12 if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */

  21. DV code (cont’d) 14 /* note: d could be positive or negative */ 15 for all destinations y: DX(y,V) = DX(y,V) + d 16 17 else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */ 19 /* V has sent a new value for its minw DV(Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: DX(Y,V) = c(X,V) + newval 22 23 if we have a new minw DX(Y,w)for any destination Y 24 send new value of minw DX(Y,w) to all neighbors 25 26 forever

  22. Bellman Ford Alg • The algorithm used to compute DVs is the Bellman Ford (B-F) Algorithm • For DV computation, we have used a “decentralized” version of the B-F algorithm • The B-F based DV routing algorithm is used in many network routing protocols: BGP, ISO IDRP, RIP, Novell IPX, original ARPANET, Packet Radio net, etc.

  23. DV table example

  24. DV convergence example

  25. Link cost change: good news

  26. Count-to-infinity problem

  27. Poison Reverse • If node Z uses next node Y to get to X, Z will advertises D(X) = 00 to Y

  28. Poison Reverse (cont) • Note:loops with 3 or more nodes (instead of ping-pong) not detected by Poison Reverse • Solution? Path Vector: advertise not only the distance to destination, but the entire path to destination • Path vector used in internet BGP (interdomain routing)

  29. Link State vs Distance Vector • Message complexity: For each cycle, O(nE) for both LS and DV, where E = # of links However, LS propagates change to ALL nodes; DV only to nodes affected by change • Speed of Convergence: LS updates propagate much faster than DV updates; this is one of the reasons why ARPANET dumped DV for LS in 1979

  30. Link State vs Distance Vector (cont) • Robustness: both LS and DV tolerant of changes/failure; LS better protected against router mulfunctions (wrong path computation); the error remains local in LS; it affects the entire network in DV • QoS support: in LS, complete topology map allows router to compute paths with QoS constraints (Q-OSPF) • Implementation cost: LS requires more memory and more processing

  31. Hierarchical Routing • Routing hierarchy needed for: • Scaling: “flat” routing tables (DV) and topology maps (LS) grow too large. Message and computation O/H excessive • Local autonomy: different organizations (eg, Campus, company, ISP) wish to operate own network and to “hide” internal organization structure

  32. Hierarchical Routing (cont) • Solution: Autonomous Systems (AS) interconnected by gateway routers • Intra-AS routing: varies from AS to AS • Inter-AS routing: same for the entire Internet; it is run by Border Gateways

  33. Intra and inter-AS routing

  34. Gateway router

  35. Intra and inter-AS path

  36. Internet Protocol (IP) • Connectionless datagram service (like US Post Service) • No performance guarantees, not even delivery guarantee • No guarantee of in-order delivery of datagrams • Components of network layer: • IP Protocol • Routing Protocols

  37. Addressing In IP • A host is typically connected via one link/interface to the network • A router is typically connected by more than one link to the network • Machines on the network will have as many addresses as there are links that connect them to the network, thus routers have more than one IP address, while hosts typically have one IP address • IP Address is 32 bit long, expressed (for convenience to humans) in dot-decimal notation; eg 193.32.216.9 • Address space is managed by IANA (Internet Assigned Number Authority), and its regional registries: ARIN (American Registry for Internet Addresses: North and South America and Parts of Africa!), RIPE (Reseaux IP Europeans), APNIC (Asia Pacific Net Info Center) • Address is either entered manually or by a protocol: BOOTP and more recently Dynamic Host Configuration Protocol (DHCP) • Open issue: IP address for mobile host

  38. 223.1.1.4 223.1.3.27 223.1.2.9 Hosts And Router Addresses • Router has three IP addresses • Hosts/router interface on a network (LAN in the example above) share the first three bytes in the address; e.g. 223.1.3 for the rightmost LAN

  39. Addresses In Interconnected Networks This example has three LANs with IP addresses: 223.1.1, 223.1.2, 223.1.3; and three other networks (or subnets) with addresses: 223.1.7, 223.1.8, 223.1.9

  40. Address Classes Or Host/Router Interface

  41. Routing Table In Host A Next Router Dest Net #Hops 223.1.1 223.1.2 223.1.3 -- 223.1.1.4 223.1.1.4 1 2 2 223.1.1.4 223.1.3.27 223.1.2.9 IP Datagram Forwarding • Every IP datagram has an IP header including source and destination IP addresses; Hosts/Routers have routing tables; for example: Routing Table In Router Dest Net Next Router #Hops Interface -- -- 223.1.1.4 1 1 1 1 2 3 223.1.1 223.1.2 223.1.3

  42. IP Datagram Format • Version Number: allows coexistence of more than one version; router forwards the arriving datagram for processing to the appropriate version of IP • Header Length: to accommodate a variable number of Option fields • TOS: type of service, various interpretations • Length: header + data in bytes, 16 bits • Identifier, Flags, Fragmentation Offset: used in Fragmentation, TBD • Time-to-live: to avoid delayed datagrams; count decremented by one after each hop, when reaches zero, datagram is dropped • Protocol: indicates the Transport Layer protocol to which the datagram belongs, at the destination, the appropriate protocol software • Checksum: for header only, if error detected, the datagram is dropped, recomputed at each router • Options: extend IP header when needed; increase processing time variance

  43. IP Datagram Format (Cont.)

  44. IP Datagram Fragmentation • Links along a route may use different link layer protocols, possibly with differing maximum frame size (called Maximum Transfer Unit, or MTU) • A router which receives a datagram on one link, and has to forward on another link with smaller MTU ‘fragments’ the datagram • Each fragment travel to the destination separately, and the original datagram is reassembled as the destination, and its payload passed to the transport layer • Header fields used to support fragmentation: • Identification number: along with source and destination IP addresses, uniquely identify a datagram • Fragmentation Offset: specify the position (in the original datagram) of the first character in the fragment • Flag: 1 => not the last fragment

  45. Fragmentation Example 1st fragment 1480 bytes in the data field of the IP datagram. identification = 777 offset = 0 (meaning the data should be inserted beginning at byte 0) flag = 1 (meaning there is more) 2nd fragment 1480 byte information field identification = 777 offset = 1,480 (meaning the data should be inserted beginning at byte 1,480 flag = 1 (meaning there is more) 3rd fragment 1020 byte (=3980-1480-1480) information field identification = 777 offset = 2,960 (meaning the data should be inserted beginning at byte 2,960) flag = 0 (meaning this is the last fragment)

  46. Internet Control Message Protocol (ICMP) • Use by network nodes to exchange control information such as error messages, and for simple testing operations (eg, ping) • ICMP messages are carried in IP datagrams • Example messages: • echo request (ping) • echo reply (response to ping) • destination host unreachable • destination network unreachable • source quench (congestion control) • TTL expired (sent to source of datagram which was dropped due to TTL) • IP header bad • Traceroute utility uses ICMP messages: send IP datagrams with specific TTL, thus forcing ICMP messages to be returned to sender host

More Related