Download Interdomain Routing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IEEE 1355 wikipedia , lookup

Distributed firewall wikipedia , lookup

AppleTalk wikipedia , lookup

Internet protocol suite wikipedia , lookup

Network tap wikipedia , lookup

Deep packet inspection wikipedia , lookup

Net bias wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Computer network wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Airborne Networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Peering wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Interdomain Routing
Spring 2010
CS 332
1
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 2010
CS 332
2
Internet Structure
Recent Past
NSFNET backbone
Stanford
ISU
BARRNET
regional
Berkeley
PARC
MidNet
regional
Westnet
regional
UNM
NCAR
UNL
KU
UA
Spring 2010
CS 332
3
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 2010
CS 332
4
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
111111111111111111111111
00000000
Subnet mask (255.255.255.0)
Network number
Subnet ID
Host ID
Subnetted address
Spring 2010
CS 332
5
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
Spring 2010
CS 332
6
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>
Spring 2010
CS 332
7
Subnet Example
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
128.96.34.15
128.96.34.1
H1
R1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H2
R2
H3
128.96.33.14
128.96.33.1
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
Spring 2010
Forwarding table at router R1
Subnet Number
128.96.34.0
128.96.34.128
128.96.33.0
CS 332
Subnet Mask
255.255.255.128
255.255.255.128
255.255.255.0
Next Hop
interface 0
interface 1
R2
8
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
Spring 2010
CS 332
9
Subnetting notes
• Can put multiple subnets on one physical
network(?!)
• Subnets not visible from the rest of the
Internet
• Main advantage: we don't need a new Class
B or Class C address every time we add a
new physical network
Spring 2010
CS 332
10
Supernetting (CIDR)
• What we’re shooting for:
3185*
319*
52*
31*
51*
5*
backbone
317*
534*
3172*
7*
3174*
73*
748*
Spring 2010
76*
CS 332
317482*
317483*
11
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
Spring 2010
CS 332
12
Interdomain Routing
Much more difficult than intradomain routing
– Scale: Internet backbone router potentially has
200,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 2010
CS 332
13
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 2010
CS 332
14
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 2010
CS 332
15
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 2010
CS 332
16
Internet Structure
Today
multihomed AS
Large corporation
“Consumer ” ISP
Peering
point
Backbone service provider
“ Consumer” ISP
Peering
point
“Consumer”ISP
Large corporation
Small
corporation
transit ASs
stub AS
Spring 2010
CS 332
17
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 2010
CS 332
18
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 2010
CS 332
19
BGP-4: Border Gateway Protocol
Border routers
Spring 2010
CS 332
20
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
Customer P
(AS 4)
128.96
192.4.153
Customer Q
(AS 5)
192.4.32
192.4.3
Regional provider A
(AS 2)
Backbone network
(AS 1)
Transit
networks
stubs
Regional provider B
(AS 3)
Customer R
(AS 6)
192.12.69
Customer S
(AS 7)
192.4.54
192.4.23
• 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
Spring 2010
CS 332
21
Avoiding Loops
• Because of full path info, this scenario can be
avoided:
AS 1 learns it can reach
Network 10.0.1 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 10.0.1 through
AS 3, we’ve got a loop.
AS 1
AS 2
Spring 2010
AS 3
CS 332
22
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
Spring 2010
CS 332
23
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 2010
CS 332
24
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 2010
CS 332
25