Spring 2006CS 3321 Interdomain Routing
Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical Address Space –class C with 2 hosts (2/255 = 0.78% efficient) –class B with 256 hosts (256/65535 = 0.39% efficient) Demand for Class B the problem. So why not just assign 2 class C’s for a 50% efficiency rate? Still Too Many Networks –routing tables do not scale –route propagation protocols do not scale
Spring 2006CS 3323 Internet Structure Recent Past NSFNET backbone Stanford BARRNET regional Berkeley P ARC NCAR UA UNM Westnet regional UNL KU ISU MidNet regional …
Spring 2006CS 3324 Internet Structure Autonomous system (AS) –Administered Independently of other ASs –Want to be able to control various ways in which network is configured, used, etc. Select their own intranetwork routing protocol Perhaps select own link metrics, etc. Advantageous because it provides finer hierarchy –Good for scalability
Spring 2006CS 3325 Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part Subnets visible only within site Network numberHost number Class B address Subnet mask ( ) Subnetted address Network numberHost IDSubnet ID
Spring 2006CS 3326 Subnet Mask Written in dotted quad notation (like IP addresses) Exactly one mask per subnet (all hosts on given subnet have same subnet mask) Subnet number of host (or of subnet) = bitwise AND of subnet mask and IP address
Spring 2006CS 3327 Subnetting (cont) To send IP packet: –Host performs bitwise AND of its subnet mask with destination IP address –If result is same subnet number as sending host, then destination is on same subnet, so forward directly (Note: Arp unaffected) –Else send packet to a router to be forwarded to another subnet New routing table entries: replaces
Spring 2006CS 3328 Subnet Example Forwarding table at router R1 Subnet Number Subnet Mask Next Hop interface interface R2 Subnet mask: Subnet number: H1 R Subnet mask: Subnet number: R2 H Subnet mask: Subnet number: H3
Spring 2006CS 3329 Forwarding Algorithm D = destination IP address for each entry (SubnetNum, SubnetMask, NextHop) D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to D else deliver datagram to NextHop Use a default router if nothing matches Not necessary for all 1s in subnet mask to be contiguous Can put multiple subnets on one physical network(?!) Subnets not visible from the rest of the Internet
Spring 2006CS The Key It’s important to remember that both subnetting and supernetting are attempts to help make routing scale –Even for an AS like U of R, subnetting can help shrink routing tables, though this isn’t really a serious issue here –Supernetting is really intended to make Internet routing scale – it benefits primarily the internet service providers and backbone routers, where the real scale problems exist.
Spring 2006CS Supernetting (CIDR) What we’re shooting for: backbone 3185* 31* 319* 3172* 317* 3174* * * 534* 51* 52* 5* 76* 748* 73* 7*
Spring 2006CS Supernetting (CIDR) Called CIDR: Classless Inter-Domain Routing Assign block of contiguous network numbers to nearby networks (in same AS or using same ISP) –Aggregates routes: single entry for many networks –E.g. Class B addresses have same top 20 bits, so a single 20 bit network address gets packets to correct AS. Restrict block sizes to powers of 2 Represent network numbers with (length, value) pair All routers must understand CIDR addressing
Spring 2006CS Supernetting (CIDR) Assign block of contiguous network numbers to nearby networks Called CIDR: Classless Inter-Domain Routing Represent blocks with a single pair (first_network_address, count) Restrict block sizes to powers of 2
Spring 2006CS Interdomain Routing Much more difficult than intradomain routing –Scale: Internet backbone router has 50,000+ prefixes –Impossible to calculate path costs: Different ASs mean different link-state metrics which may not be comparable. Focus is on reachability, not optimality, and this is plenty difficult all by itself –Trust: If you trust another AS, you trust their routing advertisements and their network system configuration info. –Need for flexibility: “Use provider A only for these addresses”, “Use AS X in preference to AS Y”, etc.
Spring 2006CS Route Propagation Know a smarter router –hosts know local router (on same physical network) –local routers know how to get to border router (and to each other) –Regional ISP routers know how to get to its customers, and also to a border (gateway) router to a backbone provider –Backbone (core) routers know everything (or at least how to get what they need)
Spring 2006CS Route Propagation Two-level route propagation hierarchy –interior gateway protocol (each AS selects its own) Also called intradomain routing –exterior gateway protocol (Internet-wide standard) Also called interdomain routing –Note again efficiency of default routes (AS need only know inside AS and how to get out of AS)
Spring 2006CS EGP: Exterior Gateway Protocol Overview –designed for tree-structured Internet –This and other limitations caused it to be replaced by BGP Protocol messages –neighbor acquisition: one router requests that another be its peer; peers exchange reachability information –neighbor reachability: one router periodically tests if the another is still reachable; exchange HELLO/ACK messages; uses a k-out-of-n rule –routing updates: peers periodically exchange their routing tables (distance-vector)
Spring 2006CS Internet Structure Today Backbone service provider Peering point Peering point Large corporation Small corporation “ Consumer ” ISP “Consumer” ISP “ Consumer” ISP transit ASs stub AS multihomed AS
Spring 2006CS BGP-4: Border Gateway Protocol Concept of AS Types –stub AS: has a single connection to one other AS carries local traffic only –multihomed AS: has connections to more than one AS refuses to carry transit traffic –transit AS: has connections to more than one AS carries both transit and local traffic
Spring 2006CS BGP-4: Border Gateway Protocol Each AS has (aside from possibly 16 bit ID): –one or more border routers (need not be same as the BGP speaker) –one BGP speaker that advertises (to other BGP speakers): local networks other reachable networks (transit AS only) gives complete path information (neither DVR nor link-state, though closer to DVR) –Avoids loops
Spring 2006CS BGP-4: Border Gateway Protocol Border routers
Spring 2006CS BGP Example Speaker for AS2 advertises reachability to P and Q –network , , , and , can be reached directly from AS2 Speaker for backbone advertises –networks , , , and can be reached along the path (AS1, AS2). Speaker can cancel previously advertised paths Backbone network (AS 1) Regional provider A (AS 2) Regional provider B (AS 3) Customer P (AS 4) Customer Q (AS 5) Customer R (AS 6) Customer S (AS 7) Transit networks stubs
Spring 2006CS Avoiding Loops Because of full path info, this scenario can be avoided: AS 2 AS 1 AS 3 AS 1 learns it can reach Network through AS 2, it advertises this to AS 3, who in turn advertises it back to AS 2. If AS 2 decides that it should send packets for through AS 3, we’ve got a loop.
Spring 2006CS Final BGP Notes BGP was designed to work with CIDR, so the “network” numbers that are passed around are really variable length prefixes, as used in CIDR –Typically written /19 and the like Number of nodes participating in BGP is on order of number of Ass (much smaller than number of networks) Finding good interdomain route amounts to finding path to the right border router, and there are only a few of these per AS Complexity of intradomain routing is on order of number of networks in the particular AS
Spring 2006CS Integrating Intra and Inter Stub AS (very common): border router “injects” default route into intradomain protocol Non-stub, but non backbone: Border routers inject learned (either through BGP or static config) info into intradomain protocol Backbone: IBGP (interior BGP): Too much info to inject into traditional intradomain protocol (10,000 prefixes = > big LSP + complex shortest path info). Traditional intradomain + protocols for querying border routers.
Spring 2006CS Scalability (again) Nodes using BGP = O(number of ASs) Finding good interdomain route = finding path to correct border router (few per AS) Complexity of intradomain = O(number physical networks in AS) Tradeoff between scalability and optimality –Hierarchy hides info, hinders optimality –Hiding info key to scaling, since nodes don’t need global info –In large networks, scalability more important
Spring 2006CS IP Version 6 Features –128-bit addresses (classless) –multicast –real-time service –authentication and security –autoconfiguration –end-to-end fragmentation –protocol extensions Header –40-byte “base” header –extension headers (fixed order, mostly fixed length) fragmentation source routing authentication and security other options