Outline Internet Routing Venkat Padmanabhan Microsoft Research 9 pril 2001 Routing algorithms distance-vector (DV) link-state (LS) Internet Routing border gateway protocol (BGP) BGP convergence paper Venkat Padmanabhan 1 Venkat Padmanabhan 2 DV lgorithm lleviating the Problem Each router maintains a vector of costs to all destinations as well as routing table Initialize neighbors with known cost, others with infinity Periodically send copy of distance vector to neighbors On reception of a vector, determine if path via the neighbor better and if so update routing table If no changes, will converge to shortest paths but changes can create loops (count-to-infinity) Venkat Padmanabhan 3 Split horizon Router never advertises the cost of a destination back to its next hop that s where it learned it from! Solves trivial count-to-infinity problem Poison reverse go even further advertise back infinity why is this useful? Triggered updates count to infinity faster! However, DV protocols are still subject to the same problem with more complicated topologies Venkat Padmanabhan 4 Routing Information Protocol (RIP) Link State Routing DV protocol with hop count as metric Infinity defined to be 16 hops! Limits network size Includes split horizon with poison reverse Routers send vectors every 30 seconds With triggered updates for link failures Time-out in 180 seconds to detect failures RIPv1 (RFC1058), RIPv2 (RFC1388) v2 includes subnet mask, authentication Main advantage: simplicity Same assumptions/goals, but different idea: Tell all routers the topology and have each compute best paths Two phases: Topology dissemination (flooding) Shortest-path calculation (Dijkstra s algorithm) Why? In DV, routers hide their computation, making it difficult to make good decisions upon change With LS, faster convergence and hopefully better stability LS more complex, not as scalable Venkat Padmanabhan 5 Venkat Padmanabhan 6 1
Flooding Each router maintains link state database and periodically sends link state packets (LSPs) to its neighbors Contain [router, neighbors, costs] Each router forwards LSPs not already in its database on all ports except where received Each LSP will travel over the same link at most once in each direction Example LSP generated by at T=0 Nodes become yellow as they receive it T=0 T=1 T=2 T=3 Venkat Padmanabhan 7 Venkat Padmanabhan 8 Link-State Routing Issues Distinguishing between old and new LSPs LSP carry sequence numbers Why is this not an issue for DV? Scalability overhead of flooding, SPF computation use hierarchy (OSPF areas, IGP/EGP split) Metrics LSP can contain multiple metrics Open Shortest Path First (OSPF) Most widely-used Link State protocol today Basic link state algorithms plus many features: uthentication of routing messages Extra hierarchy: partition into routing areas Load balancing: multiple equal cost routes Venkat Padmanabhan 9 Venkat Padmanabhan 10 Routing Metrics Internet Routing Protocols such as OSPF don t specify this RPNET history: Original metric: instantaneous queue length D-SPF (late 70s): delay metric okay under light load (delay dominated by static quantities) oscillations under heavy load HN-SPF (late 80s): normalized hops metric delay used to estimate link utilization link utilization is normalized using a linear transform cost of heavily-loaded link 3*cost of idle link Main concern: scalability size of routing tables volume of routing tables amount of routing computation Tools for scaling address allocation & aggregation hierarchical routing architecture Venkat Padmanabhan 11 Venkat Padmanabhan 12 2
ddress llocation and ggregation IP address indicates topological location unlike flat Ethernet addresses Hosts in a network share a common prefix prefix obtained from IN or ISP e.g., 128.32..Y for Berkeley ddress aggregation only advertise routes to aggregates subnetting supernetting (CIDR) IPv4 ddress Formats Class Class B Class C 7 24 0 Network Host 14 16 1 0 Network Host 21 8 1 1 0 Network Host Venkat Padmanabhan 13 Venkat Padmanabhan 14 Subnetting Subnet Example Split up one network number into multiple physical networks Internal structure isn t propagated Helps allocation efficiency Network number Host number Class B address 111111111111111111111111 00000000 Subnet mask (255.255.255.0) Network number Subnet ID Host ID Subnetted address 128.96.34.15 H1 H3 128.96.33.14 R1 Subnet mask: 255.255.255.128 Subnet number: 128.96.34.0 128.96.34.1 128.96.34.130 Subnet mask: 255.255.255.128 Subnet number: 128.96.34.128 128.96.34.129 R2 128.96.33.1 H2 128.96.34.139 Subnet mask: 255.255.255.0 Subnet number: 128.96.33.0 Venkat Padmanabhan 15 Venkat Padmanabhan 16 CIDR (Supernetting) CIDR Example CIDR: Classless Inter-Domain Routing ggregate advertised network routes e.g., ISP has class C addresses 192.4.16 through 192.4.31 Really like one larger 20 bit address class dvertise as such (network number, prefix length) Reduces size of routing tables But IP forwarding is more involved Based on Longest Matching Prefix operation and Y routes can be aggregated Border gateway (advertises path to 128.32.2/23) Regional network Corporation (128.32.2/24) Corporation Y (128.32.3/24) Venkat Padmanabhan 17 Venkat Padmanabhan 18 3
Hierarchical Routing Several levels of hierarchy Intra-domain versus inter-domain routing break problem down into more manageable pieces IGP: RIP, OSPF EGP: EGP, IDRP, BGP re RIP and OSPF suitable for interdomain routing? Structure of the Internet You at work Peering point Consumer ISP Small corporation Large corporation Backbone service provider Large corporation Consumer ISP You at home Consumer ISP Peering point Venkat Padmanabhan 19 Venkat Padmanabhan 20 Inter-Domain Routing Inter-Domain Routing Network comprised of many utonomous Systems (Ss) each S is assigned a number Kinds of Ss stub S multi-homed S transit S Does the S number have to be unique? 44 23 12 7 1123 321 Border routers summarize and advertise internal routes to external neighbors and vice-versa Border routers apply policy Internal routers can use notion of default routes Core is default-free S1 R1 R3 R2 Border router utonomous system 1 R4 utonomous system 2 Border router R5 R6 S2 Venkat Padmanabhan 21 Venkat Padmanabhan 22 Exterior Gateway Protocol (EGP) First major interdomain routing protocol Constrained Internet to tree structure Stanford BRRNET regional Berkeley PRC NCR NSFNET backbone Westnet regional U UNM UNL MidNet regional KU ISU Border Gateway Protocol (BGP-4) EGP used in the Internet backbone today Features: path vector routing incremental updates (except initially) application of policy operates over reliable transport (TCP) works with CIDR Venkat Padmanabhan 23 Venkat Padmanabhan 24 4
Path Vectors BGP Policies Similar to distance vector, except send entire paths e.g. 321 hears [7,12,44] stronger avoidance of loops multiple BGP speakers per S Shorter paths preferred (modulo policy) Reachability only announcements & withdrawals explicit/implicit withdrawals hard to ensure optimal routing 44 23 12 7 1123 321 Impact of policies which routes to accept and preference which routes to advertise Policies are generally local to an S business considerations cost robustness Venkat Padmanabhan 25 Venkat Padmanabhan 26 BGP Policies: Example Impact of Policies Example #1 ISP 1 C 1 ISP 2 ISP 3 C 2 C 3 ISP 2 may not provide transit service for ISP 1 and ISP 3 ISP 2 may not blindly announce any route it hears from C 2 Venkat Padmanabhan 27 Early Exit / Hot Potato if it s not for you, bail Combination of best local policies not globally best Side-effect: asymmetry Inter-domain connectivity cannot be modeled as a simple directed graph! Venkat Padmanabhan 28 B Impact of Policies: Example #2 Operation over TCP Persistent oscillations Example: (Varadhan et al. 1996) S1 prefers R2 S2 prefers R3 S3 prefers R1 R2 Solution? S2 S1 R1 S3 Venkat Padmanabhan 29 R3 Most routing protocols operate over UDP/IP BGP uses TCP TCP handles error control; reacts to congestion llows for incremental updates Issue: Data vs. Control plane Should routing messages receive a higher priority than data? delayed processing of BGP keep-alive messages can lead to instability Venkat Padmanabhan 30 5
When should we use BGP? Main benefit of BGP is greater control makes sense for multi-homed site, transit network How about a stub network? default/static route will suffice several costs to running BGP and advertising a separate prefix need BGP router additional routing entry in every BGP router instability due to transient faults BGP Convergence Paper by Labovitz, huja, Bose, Jahanian Fast fail-over of Internet routes is a myth can take several minutes BGP maintains an alternate path per neighbor protocol doesn t indicate cause of failure blindly explores all paths upon failure Venkat Padmanabhan 31 Venkat Padmanabhan 32 Experimental Observations Tup & Tshort converge faster than Tdown & Tlong No correlation between convergence latency and geographic distance topology is the key (# of alternate paths) No correlation between convergence latency and congestion previous study on routing instability had demonstrated correlation BGP Convergence Model Complete graph: O((n-1)!) time Reason: monotonically increasing rather than strictly increasing path lengths Basic problem: nodes advertise new paths as soon as they receive updates Venkat Padmanabhan 33 Venkat Padmanabhan 34 Doing better Doing still better Synchronizing updates at most one announce per destination during a MinRoutedver interval ensures that each round only considers paths longer than that in previous rounds O(max length path) Loop detection receiver-side as well as sender-side BGP-CT cause tag indicates the reason that a route was withdrawn can tell if an alternate route is also affected by a failure O(shortest path through the network) Venkat Padmanabhan 35 Venkat Padmanabhan 36 6