omputer Networks 9//9 Network Layer Overview Kai Shen Internet rchitecture ottom-up: : electromagnetic signals on the wire : data transfer between neighboring elements encoding, framing, error correction, access control for shared s : host-to-host connectivity routing, addressing : host-host data reliable data, congestion control, flow control : anything you want to do on computer s 9//9 S 7/47 - Fall 9 9//9 S 7/47 - Fall 9 Fundamental Network Layer Function Protocol Layering and Data fundamental function: packet from sending to receiving hosts addressing: uniquely identify each node in the routing: determine a path from source to dest and route packets along the path layer protocols in every host, router Each layer takes data from above adds header information to create new data unit passes new data unit to layer below Ht HnHt Hl HnHt source destination Ht HnHtH Hl HnHt message segment packet frame 9//9 S 7/47 - Fall 9 9//9 S 7/47 - Fall 9 4 S 7/47 - Fall 9
omputer Networks 9//9 Data Flow across Layers Network Service odel data data loss-free delivery? in-order delivery? preservation of inter-packet delay (no jitter)? guaranteed bandwidth? congestion feedback to sender? virtual circuit or packet switching? 9//9 S 7/47 - Fall 9 9//9 S 7/47 - Fall 9 6 Virtual ircuits Packet Switching provide services such as guaranteed bandwidth, jitter-free, in- order delivery, require signaling protocols to setup, maintain, and teardown virtual circuit router maintains state about ongoing connections no call setup at layer routers: no state about end-to-end connections packets forwarded independently from each other packets between same source-dest pair may take different paths. Data flow begins 6. Receive data 4. all connected. ccept call. Initiate call. incoming call. Send data. Receive data 9//9 S 7/47 - Fall 9 7 9//9 S 7/47 - Fall 9 8 S 7/47 - Fall 9
omputer Networks 9//9 Packet Switching vs. Virtual ircuits Routing Principles Packet switching poor service guarantee Virtual circuits elastic service evolved from telephony efficiency guaranteed service robustness flexibility simple core, complexity at edge manage, control, adapt at smart end systems (computers) e.g., human conversation: strict timing, reliability requirements hard to evolve complex core Internet employs packet switching; virtual circuits are more suitable for s with dumb end terminals telephones. Routing protocol Goal: determine good path (sequence of routers) thru from source to dest. Graph abstraction for routing algorithms: graph nodes are hosts or routers graph edges are s cost: delay, $ cost, or congestion level D E F good path: typically means minimum cost path 9//9 S 7/47 - Fall 9 9 9//9 S 7/47 - Fall 9 Routing lgorithm lassification Link-State Routing lgorithm Global information: all routers have complete topology, cost info state algorithm Decentralized: router knows ly-connected neighbors, costs to neighbors exchange of info with neighbors, may take many rounds to converge distance vector algorithm Dijkstra s algorithm Network topology, costs/distances known to all nodes accomplished via state broadcast all nodes have same info The algorithm calculates the shortest paths from one specific node ( source ) to all other nodes asic approach: gradually expands a set N, containing nodes whose shortest paths from the source are known initially N contains only the source itself at every step one more node s shortest path from the source is learned, this node is then added to N eventually N includes every node and the algorithm terminates 9//9 S 7/47 - Fall 9 9//9 S 7/47 - Fall 9 S 7/47 - Fall 9
omputer Networks 9//9 Dijkstra s lgorithm (cont.) Dijkstra s lgorithm: n Example N, containing nodes with known shortest paths Key step: How to expand N to include one more node? -more-hop paths : paths from source to dest. v (not in N) whose intermediaries are all in N D(v) as the distance of the shortest -morehop path to v Is the shortest -more-hop path to v globally shortest? For a node with shortest -more-hop path among all v s not in N, its shortest -morehop path is its globally shortest path N Step 4 D N: set of nodes whose shortest paths are currently known D(v): distance for shortest -morehop path from source to dest. v F p(v): predecessor node along path from source to dest. v E N D(),p(), D(),p(), D(D),p(D), D(E),p(E) infinity D(F),p(F) infinity D, 4,D,D infinity DE,,E DE,E DE DEF 9//9 S 7/47 - Fall 9 9//9 S 7/47 - Fall 9 4 Dijkstra s lgorithm: omplexity Dijkstra s lgorithm: Stability lgorithm complexity: n nodes, e s Each iteration: need to check all nodes, v, not in N n*(n+)/ checks: O(n ) Update -more-hop paths: O(e) Total: O(n +e), or O(n ) Using Fibonacci i heap to find minimum i distance node O(nlogn + e) 9//9 S 7/47 - Fall 9 Oscillations possible: e.g., cost = amount of carried traffic +e D e e initially Solutions: +e D +e +e D +e +e D +e recompute routing recompute recompute asynchronous (random-time) cost collection stable cost metric (independent of routing policy) 9//9 S 7/47 - Fall 9 6 S 7/47 - Fall 9 4
omputer Networks 9//9 Disclaimer Parts of the lecture slides contain original work of James Kurose, Larry Peterson, and Keith Ross. The slides are intended for the sole purpose of instruction of computer s at the University of Rochester. ll copyrighted materials belong to their original owner(s). 9//9 S 7/47 - Fall 9 7 S 7/47 - Fall 9