Interdomain Routing EECS 122: Lecture 11 Department of Electrical Engineering and Computer Sciences University of California Berkeley
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Review A B C B OSPF RIP IGRP BGP IntraDomain Intradomain Formulate the routing problem as a Shortest Path Problem Link State v/s Distance Vector Both work reasonably well in a well engineered network
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Today Why Hierarchical Routing? Interconnections Addressing Interdomain Routing BGP
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Hierarchical Routing Is a natural way for routing to scale Size Network Administration Governance Allows multiple metrics at different levels of the hierarchy Exploits address aggregation and allocation Inter Domain Routing OSPF RIP IGRP
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F The Importance of Interconnections The internet is an interconnection of unequal networks Interconnection arrangements drive the competitive landscape the robustness of the network End-to-end performance Interconnection is central to all large networks Voice Data Wireless Cable
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Interconnections and Competition How many ISP’s in the 415 area code? That start with A-C: about 200… Just DSL that start with A-C: about 80 In the telephone network How many independent telephone companies in in the US? 3039 commercial companies, 979 co-operatives By controlling interconnection Bell got rid of them Interconnection is now regulated (CLECs)
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Big Picture Large ISP Dial-Up ISP Access Network Small ISP Stub The Internet contains a large number of diverse networks
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Two ways to interconnect IP Networks… Peering The business relationship whereby ISPs reciprocally provide to each other connectivity to each others’ transit customers Transit The business relationship whereby one ISP provides (usually sells) access to all destinations in it’s routing table William B. Norton, “Internet Service Providers and Peering”
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Peering Figure from William B. Norton, “Internet Service Providers and Peering” West and East Peer with USNet but they can’t reach each other
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Transit Figure from William B. Norton, “Internet Service Providers and Peering”
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Benefits of Transit v/s Peering William B. Norton, “Internet Service Providers and Peering”
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Moving from Transit to Peering William B. Norton, “Internet Service Providers and Peering”
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Name of the Game: Reachability Interdomain routing is about implementing policies of reachabilty Routing efficiency and performance is important, but not essential ISPs could be competitors and do not want to share internal network statistics such as load and topology Use Border Gateway Protocol (BGP) Border routers communicate over TCP port 179 A Path Vector Protocol Communicate entire paths: Route Advertisements A Router Can be involved multiple BGP sessions
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F R border router internal router BGP R2R1R3 A AS1 AS2 you can reach net A via me traffic to A table at R1: dest next hop AR2 Share connectivity information across ASes BGP in concept
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F I-BGP and E-BGP R border router internal router R1 AS1 R4 R5 B AS3 E-BGP R2R3 A AS2 announce B IGP: Interior Gateway Protocol. Example: OSPF I-BGP IGP
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP Border Routers from the same AS speak IBGP from different AS’s speak EBGP EBGP and IBGP are essentially the same protocol IBGP can only propagate routes it has learned directly from its EBGP neighbors All routers in the same AS form an IBGP mesh Important to keep IBGP and EBGP in sync
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Sharing routes One router can participate in many BGP sessions. Initially … node advertises ALL routes it wants neighbor to know (could be > 50K routes) Ongoing … only inform neighbor of changes BGP Sessions AS1 AS2 AS3
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Four message types Open: Session establishment id exchange Notification: exception driven information Keep Alive: soft state Update: path vector information
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP Update Message Contains information about New Routes Withdrawn Routes: No longer valid Path Attributes: Attribute information allows policies to be implemented
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Issues How are the routes advertised? Addressing How are routing policies implemented?
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Addressing Every router must be able to forward based on *any* destination IP address One strategy: Have a row for each address There would be 10^8 rows! Better strategy: Have a row for a range of addresses If addresses are assigned at random that wouldn’t work too well MAC addresses Addresses allocation is a big deal.
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Addressing reflects internet hierarchy 32 bits divided into 2 parts: Class A Class B Class C Class-base Addressing network host 0 0 network host network host ~2 million nets 256 hosts
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Class-based addresses did not scale well Example: an organization initially needs 100 addresses Allocate it a class C address Organization grows to need 300 addresses Class B address is allocated. (~64K hosts) That’s overkill -a huge waste Only about 8200 class B addresses! Artificial Address crises
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Current Solution: Classless Internet Domain Routing (CIDR) CIDR allows networks to be assigned on arbitrary bit boundaries. Address ranges can be assigned in chunks of 2 k k=1…32 Idea - use aggregation - provide routing for a large number of customers by advertising one common prefix. This is possible because nature of addressing is hierarchical Summarization reduces the size of routing tables, but maintains connectivity. Aggregation Scalability and survivability of the Internet
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Current Solution: Classless Internet Domain Routing (CIDR) Suppose fifty computers in a network are assigned IP addresses They share the prefix Is this the longest prefix? Range is to How to write X ? Convention: /26 There are 32-27=6 bits for the 50 computers 2 6 = 64 addresses
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Specify a range of addresses by a prefix: X/Y The prefix common to the entire range is the first Y bits of X. X: The first address in the range has prefix X Y: 2 32-Y addresses in the range Example /23 Common prefix is 23 bits: Number of addresses: 2 9 = 512 Prefix aggregation Combine two address ranges /24 and /24 gives /23 Routers match to longest prefix Classless Inter-domain Routing Addresses
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Assigning IP address (Ideally) A host gets its IP address from the IP address block of its organization An organization gets an IP address block from its ISP’s address block An ISP gets its address block from its own provider OR from one of the 3 routing registries: ARIN: American Registry for Internet Numbers RIPE: Reseaux IP Europeens APNIC: Asia Pacific Network Information Center Each Autonomous System (AS) is assigned a 16-bit number (65536 total) Currently 10,000 AS’s in use
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Advertising a Route One router telling another one The prefix IP address of the next hop Path list of AS’s that the announcement has passed through Since announcement propagates from destination, this yields the path No refresh messages required The announcing router will follow the path itself
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP Routing Table Scaling Many small networks Aggregation hides a lot…
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP Update Message Contains information about New Routes Withdrawn Routes: No longer valid Path Attributes: Path Weights Multple Exit Discriminators Local Preferences Etc. Attribute information allows policies to be implemented
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP: A Path-vector protocol ner-routes>show ip bgp BGP table version is , local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i i * i i * i / ? * e / e Every route advertisement contains the entire AS path Generalization of distance vector Can implement policies for choosing best route Can detect loops at an AS level
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Multihoming Two or more interdomain connections between the same AS’s Two or more interdomain connections between a customer and different ISPs A B RIP IGRP IBGP a
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Multiexit Discriminators (MEDs) A B RIP IGRP IBGP x One AS influences the decisions of a neighboring AS AS_A wants to tell AS_B that network x is closer to router 2 than to router 3 Router 2 advertises a smaller MED value for x than Router 3 AS_B prefers the path to x that does not go through 6 and 3 AS_B does not propagate MEDS from AS_A any further
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Routing Process Overview Import Policy Engine Decision process Routes used by router Routes received from neighbors Routes sent to neighbors BGP tableIP routing table Choose best route accept, deny, set preferences forward, not forward set MEDs Export Policy Engine
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Attribute: Local Preference Used to indicate preference among multiple paths for the same prefix anywhere in the Internet. The higher the value the more preferred Exchanged between IBGP peers only. Local to the AS. Often used to select a specific exit point for a particular destination AS4 AS2 AS3 AS /24 BGP table at AS4:
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Choosing best route Choose route with highest LOCAL_PREF Preference-based routing If multiple choices, select route with shortest hop- count If multiple choices for same neighboring AS, choose path with max MED value Choose route based on lowest origin type IGP < EGP < INCOMPLETE Among IGP paths, choose one with lowest cost Finally use router ID to break the tie.
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP Policies Multiple ways to implement a “policy” Decide not propagate advertisements I’m not carrying your traffic Decide not to consider MEDs but use shortest hop Hot potato routing Prepend own AS# multiple times to fool BGP into not thinking AS further away Many others…
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Transit vs. Nontransit AS AS1 ISP1 ISP2 r1 r2 r3 r2 r1 r3 AS1 ISP1 ISP2 r1 r2,r3r2,r1 r3 r2 r1 r3 Transit traffic = traffic whose source and destination are outside the AS Nontransit AS: does not carry transit traffic Transit AS: does carry transit traffic Advertise own routes only Do not propagate routes learned from other AS’s Advertises its own routes PLUS routes learned from other AS’s
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Customer-Transit Problem Small ISP Large ISP r1 r2,r3r2,r1 r3 r2 r1 r3 Assume that the small ISP is a customer of two large ISPs If customer ISP does not obey export rules forwards advertisements from one large ISP to another Carries huge volume of transit traffic between two large ISPs
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F BGP and Performance BGP isn’t designed for policy routing not performance Hot Potato routing is most common but suboptimal Performance isn’t the greatest 20% of internet paths inflated by at least 5 router hops Very susceptible to router misconfiguration Blackholes: announce a route you cannot reach October 1997 one router brought down the internet for 2 hours Flood update messages (don’t store routes, but keep asking your neighbors to clue you in). 3-5 million useless withdrawals! In principle, BGP could diverge Various solutions proposed to limit the set of allowable policies Focuses on avoiding “policy cycles”
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F /1-4/ ,224,733 IP addresses, 2,093,194 IP links, 932,000 destinations, 70% of globally routable network prefixes; 10,999 ASes (84% of ASes), 34,209 peering sessions
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Skitter Legend Plot the AS based on polar co-ordinates (r,θ): r = 1- log (As degree +1 / Max Degree+1) Higher the degree lower the radius Θ = longitude of AS headquarters
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F
February 25, 2003 Abhay Parekh, EE122 S2003:Updated from Stoica EE122 F Summary The Internet is composed of various ASes which use BGP to inter-network themselves The Internet uses classless addressing BGP as a routing protocol Path-vector based Supports route-aggregation Supports preferential routing Uses Import and Export policies BGP is the protocol that “holds” the Internet together