Netork Layer (part ) y the end of this lecture, you should be able to. xplain the operation of distance vector routing algorithm xplain shortest path routing algorithm escribe the major points of RIP and OSPF Netork service model transport packet from sending to receiving hosts netork layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms forarding: move packets from router s input to appropriate router output call setup: some netork architectures require router call setup along path before data flos Netork layer (part ) Netork service model service abstraction Q: What service model for channel transporting packets from sender to receiver? guaranteed bandidth? preservation of inter-packet timing ( jitter)? loss-free delivery? in-order delivery? congestion feedback to sender? The most important abstraction provided by netork layer:? or?? datagram? virtual circuit Virtual circuits source-to-dest path behaves much like telephone circuit performance-ise netork actions along source-to-dest path call setup, teardon for each call before data can flo each packet carries V identifier (t destination host I) every router on source-dest path maintains state for each passing connection transport-layer connection only involved to end systems link, router resources (bandidth, buffers) may be allocated to V to get circuit-like perf. Netork layer (part ) Netork layer (part )
Virtual circuits: signaling protocols atagram netorks: the Internet model used to setup, maintain teardon V used in TM, frame-relay,. t used in today s Internet call setup at netork layer routers: state about end-to-end connections netork-level concept of connection packets forarded using destination host address packets beteen same source-dest pair may take different paths application transport netork data link. ata flo begins 6. Receive data. all connected. ccept call. Initiate call. incoming call application transport netork data link application transport netork data link. Send data. Receive data application transport netork data link Netork layer (part ) Netork layer (part ) 6 Netork layer service models: atagram or V netork: hy? Netork rchitecture Internet TM TM TM TM Service Model best effort R VR R UR andidth ne constant rate guaranteed rate guaranteed minimum ne Guarantees? Loss Order Timing Internet model being extended: Intserv, iffserv Hybrid models: Multi-protocol label sitching (MPLS) ongestion feedback (inferred via loss) congestion congestion Internet data exchange among computers elastic service, strict timing req. smart end systems (computers) can adapt, perform control, error recovery simple inside netork, complexity at edge many link types different characteristics uniform service difficult TM evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service dumb end systems telephones complexity inside netork Netork layer (part ) Netork layer (part ) 8
Routing Routing lgorithm classification Routing protocol Goal: determine good path (sequence of routers) thru netork from source to dest. Graph abstraction for routing algorithms: graph des are routers graph edges are links link cost: delay, $ cost, or congestion level good path: F typically means minimum cost path other def s possible Global or decentralized information? Global: all routers have complete topology, link cost info link state algorithms ecentralized: router ks ly-connected neighbors, link costs to neighbors iterative process of computation, exchange of info ith neighbors distance vector algorithms Static or dynamic? Static: routes change sloly over time ynamic: routes change more quickly periodic update in response to link cost changes Netork layer (part ) 9 Netork layer (part ) 0 istance Vector Routing lgorithm istance Table: example iterative: continues until des exchange info. self-terminating: signal to stop asynchrous: des need t exchange info/iterate in lock step! distributed: each de communicates only ith directly-attached neighbors istance Table data structure each de has its on ro for each possible destination column for each directly-attached neighbor to de example: in de, for dest. via neighbor : (,) = = distance from to, via as next hop c(,) + min { (,)} (,) (,) (,) 8 c(,) + min { (,)} = = + = c(,) + min { (,)} = = + = loop! = c(,) + min { (,)} = 8+6 = loop! destination () cost to destination via 6 8 9 Netork layer (part ) Netork layer (part )
istance table gives routing table istance Vector Routing: overvie () cost to destination via Outgoing link to use, cost, Iterative, asynchrous: each local iteration caused by: local link cost change message from neighbor: its least cost path change from neighbor ach de: ait for (change in local link cost of msg from neighbor) destination 6 8 9 istance table destination,,, Routing table istributed: each de tifies neighbors only hen its least cost path to any destination changes neighbors then tify their neighbors if necessary recompute distance table if least cost path to any dest has changed, tify neighbors Netork layer (part ) Netork layer (part ) istance Vector lgorithm: t all des, : Initialization: for all adjacent des v: (*,v) = infinity /* the * operator means "for all ros" */ (v,v) = c(,v) for all destinations, y 6 send min (y,) to each neighbor /* over all 's neighbors */ /* (y, ) = distance beteen x and y through */ Netork layer (part ) istance Vector lgorithm (cont.): 8 loop 9 ait (until I see a link cost change to neighbor V 0 or until I receive update from neighbor V) if (c(,v) changes by d) /* change cost to all dest's via neighbor v by d */ /* te: d could be positive or negative */ for all destinations y: (y,v) = (y,v) + d 6 else if (update received from V rt destination ) 8 /* shortest path from V to some has changed */ 9 /* V has sent a ne value for its min V(,) */ 0 /* call this received ne value is "neval" */ for the single destination y: (,V) = c(,v) + neval if e have a ne min (,) for any destination send ne value of min (,) to all neighbors 6 forever Netork layer (part ) 6
istance Vector lgorithm: example istance Vector lgorithm: example (,) = c(,) + min { (,)} = + = 8 (,) = c(,) + min { (,)} = + = Netork layer (part ) Netork layer (part ) 8 istance Vector: link cost changes istance Vector: link cost changes Link cost changes: de detects local link cost change updates distance table (line ) if cost change in least cost path, tify neighbors (lines,) 0 Link cost changes: good nes travels fast bad nes travels slo - count to infinity problem! 60 0 good nes travels fast algorithm terminates algorithm continues on! Netork layer (part ) 9 Netork layer (part ) 0
istance Vector: poisoned reverse Link-State Routing lgorithm If routes through to get to : tells its ( s) distance to is infinite (so on t route to via ) ill this completely solve count to infinity problem? 60 0 algorithm terminates ijkstra s algorithm net topology, link costs kn to all des accomplished via link state broadcast all des have same info computes least cost paths from one de ( source ) to all other des gives routing table for that de iterative: after k iterations, k least cost path to k dest. s Notation: c(i,j): link cost from de i to j. cost infinite if t direct neighbors (v): current value of cost of path from source to dest. V p(v): predecessor de along path from source to v, that is next v N: set of des hose least cost path definitively kn Netork layer (part ) Netork layer (part ) ijsktra s lgorithm ijkstra s algorithm: example Initialization: N = {} for all des v if v adjacent to then (v) = c(,v) 6 else (v) = infinity 8 Loop 9 find t in N such that () is a minimum 0 add to N update (v) for all v adjacent to and t in N: (v) = min( (v), () + c(,v) ) /* ne cost to v is either old cost to v or kn shortest path cost to plus cost from to v */ until all des in N Step 0 start N F (),p(),,, (),p(),,,, (),p(), F (),p() infinity, (F),p(F) infinity infinity,,, Netork layer (part ) Netork layer (part ) 6
ijkstra s algorithm, discussion omparison of LS and V algorithms lgorithm complexity: n des each iteration: need to check all des,, t in N n*(n+)/ comparisons: O(n**) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic +e 0 0 0 e e initially +e 0 +e 0 0 recompute routing 0 +e 0 0 +e recompute +e 0 0 +e e recompute Message complexity LS: ith n des, links, O(n) msgs sent each V: exchange beteen neighbors only convergence time varies Speed of onvergence LS: O(n ) algorithm requires O(n) msgs may have oscillations V: convergence time varies may be routing loops count-to-infinity problem Robustness: hat happens if router malfunctions? LS: de can advertise incorrect link cost each de computes only its on table V: V de can advertise incorrect path cost each de s table used by others error propagate thru netork Netork layer (part ) Netork layer (part ) 6 RIP ( Routing Information Protocol) RIP: xample istance vector algorithm Included in S-UNI istribution in 98 istance metric: # of hops (max = hops) x y z istance vectors: exchanged among neighbors every 0 sec via Response Message (also called advertisement) ach advertisement: list of up to destination nets ithin S estination Netork Next Router Num. of hops to dest. y z x --..... Routing table in Netork layer (part ) Netork layer (part ) 8
RIP: xample est Next hops - - x - - z.... dvertisement from to x y estination Netork Next Router Num. of hops to dest. y z x --..... Routing table in z Netork layer (part ) 9 RIP: Link Failure and Recovery If advertisement heard after 80 sec --> neighbor/link declared dead routes via neighbor invalidated ne advertisements sent to neighbors neighbors in turn send out ne advertisements (if tables changed) link failure info quickly propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 6 hops) Netork layer (part ) 0 RIP Table processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UP packets, periodically repeated UP port number 0 is used to run the daemon RIP Version Message format: routed routed Transprt (UP) netork forarding (IP) table link forarding table Transprt (UP) netork (IP) link Netork layer (part ) Netork layer (part ) 8
RIP Version ommand: Request if set to, Response if set to Version: set to ddress family identifier: originated from the UNI-S netorking code RIP processing: RIP process on reception of a response -- updates its routing table if entry is t present and if received message is t INF, add it, init the metric to received value, set next router to message sender, start timer RIP Version if entry is present ith a larger metric, update the metric to received value, set next router to message sender, start timer if entry is present and next router is message sender, update metric if it differs from stored value, restart the timer Netork layer (part ) Netork layer (part ) OSPF (Open Shortest Path First) OSPF advanced features (t in RIP) open : publicly available Uses Link State algorithm LS packet dissemination Topology map at each de Route computation using ijkstra s algorithm OSPF advertisement carries one entry per neighbor router dvertisements disseminated to entire S (via flooding) arried in OSPF messages directly over IP (rather than TP or UP Security: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths alloed (only one path in RIP) For each link, multiple cost metrics for different TOS (e.g., satellite link cost set lo for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains. Netork layer (part ) Netork layer (part ) 6 9