chapter 4 network layer
play

Chapter 4: Network Layer Chapter goals: Overview: understand - PowerPoint PPT Presentation

Chapter 4: Network Layer Chapter goals: Overview: understand principles network layer services behind network layer routing principles: path services: selection routing (path selection) hierarchical routing dealing with scale IP how a


  1. Chapter 4: Network Layer Chapter goals: Overview: understand principles network layer services behind network layer routing principles: path services: selection routing (path selection) hierarchical routing dealing with scale IP how a router works Internet routing protocols advanced topics: IPv6, intra-domain mobility inter-domain instantiation and what’s inside a router? implementation in the Internet IPv6 mobility Network Layer 4-1

  2. Network layer functions transport packet from sending application transport to receiving hosts network data link network network layer protocols in physical data link network network physical data link every host, router data link physical physical network three important functions: data link physical network data link path determination: route physical taken by packets from source network network data link to dest. Routing algorithms data link physical physical forwarding: move packets network application data link from router’s input to transport physical network data link appropriate router output physical call setup: some network architectures require router call setup along path before data flows Network Layer 4-2

  3. Network service model Q: What service model for “channel” transporting The most important packets from sender to abstraction provided receiver? by network layer: ? ? guaranteed bandwidth? virtual circuit preservation of inter-packet service abstraction timing (no jitter)? or ? loss-free delivery? datagram? in-order delivery? congestion feedback to sender? Network Layer 4-3

  4. Virtual circuits “source-to-dest path behaves much like telephone circuit” performance-wise network actions along source-to-dest path call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-dest path maintains “state” for each passing connection transport-layer connection only involved two end systems link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like perf. Network Layer 4-4

  5. Virtual circuits: signaling protocols used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet application application 6. Receive data 5. Data flow begins transport transport 4. Call connected 3. Accept call network network 1. Initiate call data link 2. incoming call data link physical physical Network Layer 4-5

  6. Datagram networks: the Internet model no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets forwarded using destination host address packets between same source-dest pair may take different paths application application transport transport network network 1. Send data data link 2. Receive data data link physical physical Network Layer 4-6

  7. Network layer service models: Guarantees ? Network Service Congestion Bandwidth Loss Architecture Model Order Timing feedback Internet best effort none no no no no (inferred via loss) ATM CBR constant yes yes yes no rate congestion guaranteed yes ATM VBR yes yes no rate congestion guaranteed no ATM ABR yes no yes minimum none no ATM UBR yes no no Internet model being extended: Intserv, Diffserv Chapter 6 Network Layer 4-7

  8. Datagram or VC network: why? Internet ATM data exchange among evolved from telephony computers human conversation: “elastic” service, no strict strict timing, reliability timing req. requirements “smart” end systems need for guaranteed (computers) service can adapt, perform “dumb” end systems control, error recovery telephones simple inside network, complexity inside complexity at “edge” network many link types different characteristics uniform service difficult Network Layer 4-8

  9. Routing Routing protocol 5 Goal: determine “good” path (sequence of routers) thru 3 B C network from source to dest. 5 2 A 2 F 1 3 Graph abstraction for 1 2 D E routing algorithms: 1 graph nodes are routers “good” path: graph edges are typically means minimum physical links cost path other def’s possible link cost: delay, $ cost, or congestion level Network Layer 4-9

  10. Routing Algorithm classification Global or decentralized Static or dynamic? information? Static: Global: routes change slowly all routers have complete over time topology, link cost info Dynamic: “link state” algorithms routes change more Decentralized: quickly router knows physically- periodic update connected neighbors, link costs to neighbors in response to link iterative process of cost changes computation, exchange of info with neighbors “distance vector” algorithms Network Layer 4-10

  11. A Link-State Routing Algorithm Idea: Dijkstra’s algorithm at each iteration increase net topology, link costs known spanning tree by the node to all nodes that has least cost path to it accomplished via “link state broadcast” all nodes have same info 5 computes least cost paths from one node (“source”) to 3 B C 5 2 all other nodes A 2 F 1 gives routing table for 3 1 that node 2 D E 1 iterative: after k iterations, know least cost path to k destinations Network Layer 4-11

  12. A Link-State Routing Algorithm Notation: Examples: c(i,j): link cost from node i c(B,C) = 3 to j. cost infinite if not D(E) = 2 direct neighbors p(B) = A D(v): current value of cost N = { A, B, D, E } of path from source to dest. V 5 p(v): predecessor node 3 B C 5 2 along path from source to v, A 2 F 1 that is next v 3 1 2 N: set of nodes already in D E 1 spanning tree (least cost Network Layer 4-12 path known)

  13. Dijsktra’s Algorithm 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) = infinity 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 Network Layer 4-13

  14. Dijkstra’s algorithm: example D(B),p(B) D(C),p(C) D(D),p(D) D(E),p(E) Step N D(F),p(F) 0 2,A 5,A 1,A infinity,- infinity,- A 2,A 4,D 1,A 2,D infinity,- 1 AD 2 2,A 3,E 1,A 2,D 4,E ADE 3 2,A 3,E 1,A 2,D 4,E ADEB 4 2,A 3,E 1,A 2,D 4,E ADEBC 5 2,A 3,E 1,A 2,D 4,E ADEBCF 5 3 B C 5 2 A 2 F 1 3 1 2 D E 1 Network Layer 4-14

  15. Spanning tree gives routing table D(B),p(B) D(C),p(C) D(D),p(D) D(E),p(E) Step N D(F),p(F) 2,A 3,E 1,A 2,D 4,E ADEBCF Result from Dijkstra’s algorithm Outgoing link Routing table: 5 to use, cost 3 B C B,2 B 5 2 A 2 F 1 D,3 C 3 1 destination 2 D E D,1 D 1 D,2 E D,4 F Network Layer 4-15

  16. Dijkstra’s algorithm performance Algorithm complexity (n nodes and l links) Computation n iterations each iteration: need to check all nodes, w, not in N n*(n+1)/2 comparisons: O(n 2 ) more efficient implementations possible: O(n log n) Messages network topology and link cost known to all nodes each node broadcasts its direct link cost O(l) messages per broadcast announcement O(n l) Network Layer 4-16

  17. Dijkstra’s algorithm discussion Oscillations are possible dynamic link cost e.g., link cost = amount of carried traffic by link c(i,j) != c(j,i) Example: A A A A 1 1+e 2+e 0 2+e 0 2+e 0 D B D D B B D 0 B 0 1+e 1 0 0 1+e 1 e 0 0 0 1 e 1+e 0 C C C C 1 1 e … recompute … recompute … recompute initially routing Network Layer 4-17

  18. Distance Vector Routing Algorithm iterative: Distance Table data structure continues until no nodes each node has its own exchange info. row for each possible destination self-terminating: no column for each directly-attached “signal” to stop neighbor to node asynchronous: example: in node X, for dest. Y via nodes need not neighbor Z: exchange info/iterate in lock step! distance from X to distributed: = X Y, via Z as next hop each node D (Y,Z) Z communicates only with c(X,Z) + min {D (Y,w)} = w directly-attached neighbors Network Layer 4-18

  19. Distance Table: example cost to destination via 1 E B C D () A B D 7 A 2 8 A 1 14 5 1 E D 2 B 7 8 5 destination E D D (C,D) c(E,D) + min {D (C,w)} = w C 6 9 4 = 2+2 = 4 E D D (A,D) c(E,D) + min {D (A,w)} = D 4 11 w 2 = 2+3 = 5 loop! E B D (A,B) c(E,B) + min {D (A,w)} = w = 8+6 = 14 loop! Network Layer 4-19

  20. Distance table gives routing table cost to destination via E Outgoing link D () A B D to use, cost A 1 14 5 A A,1 B 7 8 5 B D,5 destination destination C 6 9 4 C D,4 D 4 11 2 D D,4 Routing table Distance table Network Layer 4-20

Recommend


More recommend