omputer Networks //03 More on Network Routing and Internet Protocol Kai Shen Network Routing Link state routing: ijkstra s algorithm efficient approach to calculate least cost routes all routers need complete topology, link cost info costly (or impossible) to acquire such information in large networks ecentralized routing: router need to knows physically connected neighbors, link costs to neighbors doable by info exchanges between neighbor routers //03 S / - Spring 03 //03 S / - Spring 03 istance Vector Routing istance Vector: n Example 3 routing table (at each host): the next hop for each destination in the network distance vector routing: routing table can be derived from the distance vector at each node distance vectors can be maintained in a decentralized fashion 3 E F //03 S / - Spring 03 3 E 8 (E,,) = c(e,) + shortest(,) = + = (E,,) = c(e,) + shortest(,) = +3 = loop! (E,,) = c(e,) + shortest(,) = 8+6 = istance vector at node E (E,x,y) loop! //03 S / - Spring 03 via first hop x 6 8 9 S / - Spring 03
omputer Networks //03 istance Vector to Routing Table istance Vector Routing: onstructing istance Vector cost to destination via E () Outgoing link to use, cost, istance vector can be built on information about local links and neighbors routing tables! 6 8 9,, t node, each entry (,,) includes: the distance from to neighbor the shortest distance from to, istance vector Routing table //03 S / - Spring 03 //03 S / - Spring 03 6 istance Vector lgorithm: n Example istance Vector lgorithm: n Example (,,) = c(,) + shortest(,) = + = 8 (,,) = c(,) + shortest(,) = + = 3 re we done? //03 S / - Spring 03 //03 S / - Spring 03 8 S / - Spring 03
omputer Networks //03 istance Vector Routing: Maintaining istance Vector istance Vector: Link ost hanges Information: local link cost distance vector rou ng table Recompute caused by: local link cost change message from neighbor: its routing table has changed Notify neighbor: if my own routing table has changed, notify my neighbors Each node: wait for (change in local link cost or msg from neighbor) recompute distance vector if the local routing table has changed, notify neighbors Link cost changes: node detects local link cost change recompute updates local distance vector if cost change in least cost path, notify neighbors 0 algorithm terminates //03 S / - Spring 03 9 //03 S / - Spring 03 0 istance Vector: Link ost hanges istance Vector: Link ost hanges pathological case: recursive distance vector updates applies only to link cost increase bad news settles slowly 60 0 If routes through to get to : tells its ( s) distance to is infinity (so won t route to via ) Will this completely solve the problem of recursive distance vector updates? 60 0 0. U 0. algorithm continues on! algorithm terminates //03 S / - Spring 03 //03 S / - Spring 03 S / - Spring 03 3
omputer Networks //03 Routing Loops omparison of LS and V lgorithms In packet switching networks, each node computes its own routing table independently What if? s next hop to is ; and s next hop to is. Routing loops during recursive distance vector updates unsynchronized information updates in dynamic networks Speed of convergence Link state routing: O(nlogn) algorithm in local computation istance vector routing: convergence time? recursive distance vector updates in a pathological case Robustness: what happens if router malfunctions? Link state routing: node can advertise incorrect link cost istance vector routing: node can advertise incorrect routing table //03 S / - Spring 03 3 //03 S / - Spring 03 The Internet Network Layer IP ddressing: Introduction Network layer Routing protocols RIP, OSPF, GP Transport layer: TP, UP The rest of the IP protocol addressing conventions packet format packet handling conventions Link layer IMP protocol error reporting router signaling physical layer IP address: 3 bit identifier for each host, router interface Interface: connecting point into each data link router typically has multiple interfaces host often has single interface 3... 3... 3... 3... 3...9 3...3 3..3. 3..3. 3... 3..3. 3... = 0 0000000 0000000 0000000 3 //03 S / - Spring 03 //03 S / - Spring 03 6 S / - Spring 03
omputer Networks //03 IP Network and Hierarchical ddressing IP ddresses: Original Standard What s an IP network? can physically reach each other without intervening router (intervening switches?) IP address: network part (high order bits); host part (low order bits) devices with same network part of IP address are in the same IP network 3... 3... 3... 3... 3...9 3... 3...3 3..3. IP network 3..3. 3..3. network consisting of 3 IP networks Given notion of network, let s re examine IP addresses: class -based addressing: class 0network host 0 network host 0 network host 0 multicast address 3 bits.0.0.0 to... 8.0.0.0 to 9... 9.0.0.0 to 3....0.0.0 to 39... //03 S / - Spring 03 //03 S / - Spring 03 8 IP ddressing: IR IP ddress epletion (HP) lass based addressing: inefficient use of address space, address space exhaustion e.g., class network allocated enough addresses for 6K hosts, even if only K hosts in that network IR: classless addressing network portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in network portion of address network part 00000 0000 0000000 00000000 00.3.6.0/3 host part ddress depletion 3 bit address space soon to be used up. Observation: not every host is online at a given time. HP: allow host to dynamically obtain its IP address from network server when it joins network can renew its lease on address in use allows reuse of addresses (only hold address while connected) //03 S / - Spring 03 9 //03 S / - Spring 03 0 S / - Spring 03
omputer Networks //03 IP ddress epletion (NT) IP ddress epletion (NT) Observations: lot of traffic is local rest of Internet local network (e.g., home network) 0.0.0.0/ 0.0.0. lthough IP addresses are few, possible (IPaddr, port) tuples are more abundant and they can identify communication end point 0.0.0. 0.0.0. 38.6.9. 0.0.0.3 ll IP packets leaving local Packets with source or network have same single source NT IP destination in this network address: 38.6.9., have 0.0.0.0/ addresses for different source port numbers source, destination Problem: inbound connection not allowed! //03 S / - Spring 03 //03 S / - Spring 03 isclaimer 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 networks at the University of Rochester. ll copyrighted materials belong to their original owner(s). //03 S / - Spring 03 3 S / - Spring 03 6