Lecture : istance-vector Routing S : omputer Networks hris Kanich Quiz TOMORROW Lecture Overview istance vector ssume each router knows its own address and cost to reach each of its directly connected neighbors ellman-ford algorithm istributed route computation using only neighbor s info Mitigating loops Split horizon and posion reverse S Lecture : istance-vector Routing ellman-ford lgorithm efine distances at each X d x (y) = cost of least-cost path from X to Y Update distances based on neighbors d x (y) = min {c(x,v) + d v (y)} over all neighbors V u v x 5 w s y t z d u (z) = min{c(u,v) + d v (z), c(u,w) + d w (z)} S Lecture : istance-vector Routing
istance Vector lgorithm Iterative, asynchronous: each local iteration caused by: Local link cost change istance vector update message from neighbor ach : wait for (change in local link cost or message from neighbor) istributed: ach notifies neighbors only when its V changes Neighbors then notify their neighbors if necessary recompute estimates if distance to any destination has changed, notify neighbors S Lecture : istance-vector Routing Step-by-Step c(x,v) = cost for direct link from x to v Node x maintains costs of direct links c(x,v) x (y) = estimate of least cost from x to y Node x maintains distance vector x = [ x (y): y є N ] Node x maintains its neighbors distance vectors For each neighbor v, x maintains v = [ v (y): y є N ] ach v periodically sends v to its neighbors nd neighbors update their own distance vectors x (y) min v {c(x,v) + v (y)} for each y N S Lecture : istance-vector Routing 5 xample: Initial State istance to Node 0 0 0 0 0 S Lecture : istance-vector Routing 6
sends vector to I m from, 0 from and from istance to Node 0 0 0 0 0 is away, +<, so best path to is S Lecture : istance-vector Routing sends vector to I m from, 0 from, from & from is away, +< so best path to is istance to Node 0 0 0 0 0 S Lecture : istance-vector Routing sends vector to is away, +< so is 5 away, +< so is away istance to Node 0 5 0 0 0 0 I m from, from, from, from & 0 from S Lecture : istance-vector Routing 9
until onvergence istance to Node 0 6 5 6 0 5 5 0 0 5 0 S Lecture : istance-vector Routing 0 Node s distance vectors Next hop est 9 6 0 0 5 S Lecture : istance-vector Routing Handling Link Failure marks distance to as, and tells marks distance to as, and tells and and recompute routes and tell, and etc until converge Info at istance to Node 0 0 0 5 0 0 0 5 0 S Lecture : istance-vector Routing
5 ounting to Infinity istance to Update 5 Update tc S Lecture : istance-vector Routing Why so High? Updates don t contain enough information an t totally order bad news above good news accepts s path to that is implicitly through! side: this also causes delays in convergence even when it doesn t count to infinity S Lecture : istance-vector Routing Mitigation Strategies Hold downs s metric increases, delay propagating information Limitation: elays convergence Loop avoidance Full path information in route advertisement xplicit queries for loops Split horizon Never advertise a destination through its next hop» doesn t advertise to Poison reverse: Send negative information when advertising a destination through its next hop» advertises to with a metric of» Limitation: Only works for loop s of size S Lecture : istance-vector Routing 5
6 Poison Reverse xample If Z routes through Y to get to X: Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) 60 X Y 50 Z S Lecture : istance-vector Routing 6 Split Horizon Limitations tells & that is unreachable computes new route through Tells that is unreachable (poison reverse) Tells it has path of cost (split horizon doesn t apply) computes new route through tells that is now reachable tc S Lecture : istance-vector Routing Routing Information Protocol V protocol with hop count as metric Infinity value is 6 hops; limits network size Includes split horizon with poison reverse Routers send vectors every 0 seconds With triggered updates for link failures Time-out in 0 seconds to detect failures RIPv specified in RF05 www.ietf.org/rfc/rfc05.txt RIPv (adds authentication etc.) in RF www.ietf.org/rfc/rfc.txt S Lecture : istance-vector Routing
Link-state vs. istance-vector Message complexity LS: with n s, links, O(n) messages sent V: exchange between neighbors only Speed of onvergence LS: relatively fast V: convergence time varies May be routing loops ount-to-infinity problem Robustness: what happens if router malfunctions? LS: Node can advertise incorrect link cost ach computes only its own table V: Node can advertise incorrect path cost ach s table used by others (error propagates) S Lecture : istance-vector Routing 9 Routing so far Shortest-path routing Metric-based, using link weights Routers share a common view of path goodness s such, commonly used inside an organization RIP and OSPF are mostly used as intradomain protocols ut the Internet is a network of networks How to stitch the many networks together? When networks may not have common goals and may not want to share information S Lecture : istance-vector Routing 0 For next time Read h...- in P& Keep moving on Project S Lecture : istance-vector Routing