Information Network 1 Routing (1) Topology Topology 1: 2a (1): a branch of mathematics concerned with those properties of geometric configurations (as point sets) which are unaltered by elastic deformations (as a stretching or twisting) that are homeomorphisms (2): the set of all open subsets of a topological space b: configuration <topology of a molecule> <topology of a magnetic field> (Source: Merriam-Webster Online Dictionary) Youki Kadobayashi NAIST 1 Image: Visualization of global Internet AS topology, Hiroaki Hazeyama 2 Outline Routing system: its function! Introduction to routing! Its function and structure! Types of routing algorithm! Provision of end-to-end reachability! Automatic detection of shortest path! Distribution of traffic! Distance vector routing! Tuple expression of route! Counting to infinity, split horizon! Avoid failing links! Fault isolation! Reflect administrative policies! Link-state routing! Graph expression of route 3 4 Routing system: its structure Gateway Model Revisited! Routing protocol! Discovers neighbor router;! Exchanges topology information;! Exchanges link information Routing software Multiple RIBs compute route RIB: Routing Information Base)! Multiple routing protocols! Multiple RIBs! Consolidate Multiple RIBs into single FIB (FIB: Forwarding Information Base) FIB 5 Input interfaces Output interfaces 6
Types of Routing Algorithm Questions?! Distance vector! Link state! Path vector! Key difference of these algorithms:! Topology representation! Propagation range / frequency / timing of link state! Algorithm for computing shortest path! Design trade-offs:! Scalability! Convergence time! Algorithm simplicity 7 8 Distance vector routing 9 Distance vector routing! 1. assign distance vector to myself 0; for others, assign! 2. send my distance vectors to all neighbor routers! 3. router calculates minimum distance vectors by 1) distance vectors advertised by neighbor routers and 2) distance from myself to individual neighbor router!! DN p.397 10 Problem of distance vector routing Counting to infinity! For the given number of routers N,! Time complexity: O(N 3 )! Traffic: O(N 2 )! Convergence speed is slow, since it sends distance vector periodically In case of newly created route, or dismissed route! Slow convergence speed results in inconsistent and transitional state! Counting to infinity problem A B Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) B thinks: (C, 3) via A B says: (C, 3) A thinks: (C, 4) via B 1 inf C 11 12
Split horizon Limitation of split horizon! Workaround for counting to infinity! Router doesn t send learned information to source router A Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) to everyone except B B 1 inf C A D B 1 inf C Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) to everyone except B D thinks: (C, 3) via A D says: (C, 3) B thinks: (C, 4) via D 13 14 RIP: Routing Information Protocol RFC 2453, RFC 2080 Route representation in RIP! Distance vector routing! RIP-2 (IPv4), RIPng (IPv6)! Used in relatively small network Due to ease of implementation and operation prefix, metric)! 1 <= metric <= 16 can t use large metric, due to counting to infinity problem! Metric 16 means unreachable! Broadcast/Multicast to UDP port 520 15 16 Behavior of RIP Router! Learns route! Sends RIP query packet! Receives RIP response packet! Updates route information! Advertises route information every 30 seconds! with split horizon, triggered update! Deletes route information No route advertisement for 180 sec! metric 16 No route advertisement for another 120 sec! delete route information Routing tricks! Why it works even when 2r > 16?! Divide and conquer! Partitioning into routing domains! Routing between domains (covered in next lecture) 17 18
Questions? Link-state routing 19 20 Link-state routing Dijkstra algorithm Demo : GIDEN! Collect router and link information Digraph: router as a node, link as an arc! Create link state database (LSDB) Network map that collects link state information! Based on LSDB, calculate the shortest path with the Dijkstra s shortest path algorithm! Time complexity: O(N 2 ) Can be further optimized by improved data structure 21!!!!!! 22 Pros and Cons of Link-State Routing OSPF: Open Shortest Path First RFC 2328, 5340! Time complexity: lower than distance vector routing! Traffic: increases in proportion to the number of links and routers! Storage complexity: increases in proportion to the number of links and routers! Convergence time: must be short! Counting to infinity doesn t happen! Flexible configuration of link cost is possible! Link state routing protocol for TCP/IP world! OSPFv2 (IPv4), OSPFv3 (IPv6)! Functions! Recognize neighbor router! Exchange link state information and create LSDB! Calculate shortest path tree (spanning tree)! + Designated Router, Backup Designated Router! + Hierarchical structure by area! + Collaboration with EGP 23 24
OSPF Hello! Discover neighbor router on the same link send Hello packet to 224.0.0.5, ff02::5 (AllSPFRouters)! List of neighbor routers in Hello packet check bidirectional communication select designated router and backup designated router Adjacency formation! Neighbor! Adjacent! Routers don t exchange routing information unless they are adjacent! Formation process:! Hello Neighbor! Synchronize each LSDB! Synchronized! Adjacent! Send Hello packet periodically to detect link down 25 26 Questions? Topology Representation in OSPF! (Link State Advertisement) Type 1: Router Type 2: Network Type 3: Summary (network) Type 4: Summary (AS boundary) Type 5: AS External! common header Validity period and sequence number in header Helps routers to tell if given is fresh 27 28 Topology Representation in OSPF Link State Update! Flooding! Forward received s to other interfaces if given s are fresh! Update LSDB, compute shortest path tree again 29 30
Questions? to RIB LSDB Dijkstra RIB directed graph shortest path tree fragments of directed graph 31 32 to RIB! The following 3 slides:! Example of OSPF network Example of OSPF Network! Derived directed graph Subgraph represented by individual! Shortest path tree; rooted at RT6 Generated by Dijkstra s algorith 33 34 Digraph Shortest path tree; rooted at RT6 35 36
OSPF area! Solution by divide and conquer algorithm! Time complexity: For intra-area link changes, the Dijkstra's Algorithm used in OSPF has a time complexity of O(s*log s), where s is the size of the Area. (X. Xiao et al., Reducing Routing Table Computation Cost in OSPF, INET 99)! Traffic volume (fault isolation)! The following 2 slides:! Example of OSPF area! Partitioned digraph 37 38 Gateway Model Revisited Routing software Multiple RIBs RIP OSPF FIB 39 Input interfaces Output interfaces 40 Questions? Summary! Distance vector routing! Bellman-Ford algorithm! RIP protocol! Link state routing! Dijkstra algorithm! OSPF protocol! Coming in next lecture:! IGP and EGP, hierarchical routing! Path vector routing! Implementation of routing policy 41 42