Agenda v DNS assignment Q&A v Routing Algorithms distance-vector (what ou invented last Frida) hierarchical routing routing in the Internet Network Laer 4-
Chapter 4 Network Laer A note on the use of these ppt slides: We re making these slides freel available to all (facult, students, readers). The re in PowerPoint form so ou see the animations; and can add, modif, and delete slides (including this one) and slide content to suit our needs. The obviousl represent a lot of work on our part. In return for use, we onl ask the following: v If ou use these slides (e.g., in a class) that ou mention their source (after all, we d like people to use our book!) v If ou post an slides on a www site, that ou note that the are adapted (or perhaps identical to) our slides, and note our copright of this material. Thanks and enjo! JFK/KWR Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesle March 202 All material copright 996-202 J.F Kurose and K.W. Ross, All Rights Reserved Network Laer 4-2
Chapter 4: outline 4. introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Laer 4-3
Distance vector algorithm Bellman-Ford equation (dnamic programming) Note: assumes no negative link costs! let D () := cost of least-cost path to then v D () = min {c(,v) + D v () } cost neighbor v to destination neighbor v min taken over all neighbors v of Network Laer 4-4
Bellman-Ford eample u 2 5 v 2 3 3 w 5 2 clearl, we should have D v () = 5, D () = 3, D w () = 3 B-F equation sas: D u () = min { c(u,v) + D v (), c(u,) + D (), c(u,w) + D w () } = min {2 + 5, + 3, 5 + 3} = 4 node achieving minimum for u becomes net hop in shortest path, used in forwarding table Network Laer 4-5
Distance vector algorithm v D () = estimate of least cost to maintains distance vector D = [D (): є N ] v node : knows each neighbor v: c(,v) maintains a cop of its neighbors distance vectors. For each neighbor v, maintains: D v = [D v (): є N ] Network Laer 4-6
Distance vector algorithm ke idea: v time-to-time, each node sends its own distance vector (= estimates distances) to its neighbors v when receives new DV estimate neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N v under minor, natural conditions, the estimates D () converge to the actual least cost d () Network Laer 4-7
Distance vector algorithm iterative, asnchronous: each local iteration caused b: v local link cost change v DV update message neighbor distributed: v each node notifies neighbors onl when its DV changes neighbors then notif their neighbors if necessar each node: wait for (change in local link cost or msg neighbor) recompute estimates if DV to an dest has changed, notif neighbors Network Laer 4-8
node table 0 2 7 D () = min{c(,) + D (), c(,) + D ()} = min{2+0, 7+} = 2 0 2 3 2 0 7 0 D () = min{c(,) + D (), c(,) + D ()} = min{2+, 7+0} = 3 node table 2 0 2 7 node table 7 0 time Network Laer 4-9
node table node table 0 2 7 D () = min{c(,) + D (), c(,) + D ()} = min{2+0, 7+} = 2 2 0 0 2 0 2 7 2 0 3 2 0 7 0 7 0 0 2 3 2 0 3 0 0 2 3 2 0 3 0 D () = min{c(,) + D (), c(,) + D ()} = min{2+, 7+0} = 3 2 7 node table 7 0 0 2 7 2 0 3 0 0 2 3 2 0 3 0 time Network Laer 4-0
Distance vector: link cost changes link cost changes: v node detects local link cost change v updates routing info, recalculates distance vector v if DV changes, notif neighbors 4 50 good news travels fast t 0 : detects link-cost change, updates its DV, informs its neighbors. t : receives update, updates its table, computes new least, sends its neighbors its DV. t 2 : receives s update, updates its distance table. s least costs do not change, so does not send a message to. Network Laer 4-
Distance vector: link cost changes link cost changes: v node detects local link cost change v updates routing info, recalculates distance vector v if DV changes, notif neighbors 60 4 50 Q: What happens when - cost goes 4 to 60? Network Laer 4-2
Distance vector: link cost changes link cost changes: v node detects local link cost change v bad news travels slowl - count to infinit problem! v 44 iterations before algorithm stabilies: see tet poisoned reverse: v 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) v will this completel solve count to infinit problem? 60 4 50 Network Laer 4-3
Comparison of LS and DV algorithms message compleit v v LS: with n nodes, E links, O(nE) msgs sent DV: echange between neighbors onl convergence time varies speed of convergence v v LS: O(n 2 ) algorithm requires O(nE) msgs ma have oscillations DV: convergence time varies ma be routing loops count-to-infinit problem robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes onl its own table DV: DV node can advertise incorrect path cost each node s table used b others error propagate thru network Network Laer 4-4
Chapter 4: outline 4. introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Laer 4-5
Hierarchical routing our routing stud thus far - idealiation v all routers identical v network flat not true in practice scale: with 600 million destinations: v can t store all dest s in routing tables! v routing table echange would swamp links! administrative autonom v internet = network of networks v each network admin ma want to control routing in its own network Network Laer 4-6
Hierarchical routing v aggregate routers into regions, autonomous sstems (AS) v routers in same AS run same routing protocol intra-as routing protocol routers in different AS can run different intra- AS routing protocol gatewa router: v at edge of its own AS v has link to router in another AS Network Laer 4-7