27
Spring 2006 CS 332 1 Interdomain Routing

Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Embed Size (px)

DESCRIPTION

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 …

Citation preview

Page 1: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 1

Interdomain Routing

Page 2: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 2

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

Page 3: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 3

Internet StructureRecent Past

NSFNET backboneStanford

BARRNETregional

BerkeleyPARC

NCAR

UA

UNM

Westnetregional

UNL KU

ISU

MidNetregional…

Page 4: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 4

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

Page 5: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 5

Subnetting• Add another level to address/routing hierarchy: subnet• Subnet masks define variable partition of host part• Subnets visible only within site

Network number Host number

Class B address

Subnet mask (255.255.255.0)

Subnetted address

111111111111111111111111 00000000

Network number Host IDSubnet ID

Page 6: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 6

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 11111111 11111111 11111111 10000000 10000000 01100000 00100010 00001111 10000000 01100000 00100010 00000000

Page 7: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 7

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:<SubnetNumber, SubnetMask, NextHop> replaces

<NetworkNumber, NextHop>

Page 8: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 8

Subnet Example

Forwarding table at router R1Subnet Number Subnet Mask Next Hop128.96.34.0 255.255.255.128 interface 0128.96.34.128 255.255.255.128 interface 1128.96.33.0 255.255.255.0 R2

Subnet mask: 255.255.255.128Subnet number: 128.96.34.0

128.96.34.15 128.96.34.1H1

R1

128.96.34.130 Subnet mask: 255.255.255.128Subnet number: 128.96.34.128

128.96.34.129128.96.34.139

R2H2

128.96.33.1128.96.33.14

Subnet mask: 255.255.255.0Subnet number: 128.96.33.0

H3

Page 9: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 9

Forwarding AlgorithmD = destination IP addressfor 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

Page 10: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 10

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.

Page 11: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 11

Supernetting (CIDR)• What we’re shooting for:

backbone

3185*

31*

319*

3172*317*

3174*

317483*317482*

534*

51*

52*

5*

76*748*

73*

7*

Page 12: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 12

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 192.4.16-192.4.31 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

Page 13: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 13

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

Page 14: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 14

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.

Page 15: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 15

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)

Page 16: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 16

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)

Page 17: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 17

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)

Page 18: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 18

Internet StructureToday

Backbone service provider

Peeringpoint

Peeringpoint

Large corporation

Large corporation

Smallcorporation

“Consumer ” ISP

“Consumer” ISP

“ Consumer” ISP

transit ASs

stub AS

multihomed AS

Page 19: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 19

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

Page 20: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 20

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

Page 21: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 21

BGP-4: Border Gateway Protocol

Border routers

Page 22: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 22

BGP Example• Speaker for AS2 advertises reachability to P and Q

– network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached directly from AS2

• Speaker for backbone advertises– networks 128.96, 192.4.153, 192.4.32, and 192.4.3 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)

128.96192.4.153

192.4.32192.4.3

192.12.69

192.4.54192.4.23

Transit networks

stubs

Page 23: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 23

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 10.0.1 through AS 2, it advertises this toAS 3, who in turn advertisesit back to AS 2. If AS 2decides that it should sendpackets for 10.0.1 throughAS 3, we’ve got a loop.

Page 24: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 24

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 144.166.206/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

Page 25: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 25

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.

Page 26: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 26

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

Page 27: Spring 2006CS 3321 Interdomain Routing. Spring 2006CS 3322 How to Make Routing Scale Flat versus Hierarchical Addresses Inefficient use of Hierarchical

Spring 2006 CS 332 27

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