Internet Routing (COS 598A) Today: Addressing and Routing Jennifer Rexford Tuesdays/Thursdays 11:00am-12:20pm

Download Report

Transcript Internet Routing (COS 598A) Today: Addressing and Routing Jennifer Rexford Tuesdays/Thursdays 11:00am-12:20pm

Internet Routing (COS 598A)
Today: Addressing and Routing
Jennifer Rexford
http://www.cs.princeton.edu/~jrex/teaching/spring2005
Tuesdays/Thursdays 11:00am-12:20pm
Outline
• IP addressing
– Address allocation blocks
– Packet forwarding
• Routing protocols
– Autonomous Systems
– Interdomain routing
– Intradomain routing
• Practical realities
– Asymmetric routing
– IP address != host
– Autonomous System != institution
• Discussion of Saltzer84 and Clark88
IP Addressing
• 32-bit number in dotted-quad notation (12.34.158.5)
• Divided into network & host portions (left and right)
• 12.34.158.0/24 is a 24-bit prefix with 28 addresses
12
34
158
5
00001100 00100010 10011110 00000101
Network (24 bits)
Host (8 bits)
Some History: Why Dotted-Quad Notation?
• In the olden days…
– Class A: 0*
• Very large /8 blocks (e.g., MIT has 18.0.0.0/8)
– Class B: 10*
• Large /16 blocks (e.g,. Princeton has 128.112.0.0/16)
– Class C: 110*
• Small /24 blocks (e.g., AT&T Labs has 192.20.225.0/24)
– Class D: 1110*
• Multicast groups
– Class E: 11110*
• Reserved for future use (sounds a bit scary…)
• And then, address space became scarce…
Classless Inter-Domain Routing (CIDR)
Use two 32-bit numbers to represent a network.
Network number = IP address + Mask
IP Address : 12.4.0.0
Address
Mask
IP Mask: 255.254.0.0
00001100 00000100 00000000 00000000
11111111 11111110 00000000 00000000
Network Prefix
for hosts
Usually written as 12.4.0.0/15
CIDR = Hierarchy in Address Allocation
• Prefixes are key to Internet scalability
– Address allocation by ARIN/RIPE/APNIC and by ISPs
– Routing protocols and packet forwarding based on prefixes
– Today, routing tables contain ~150,000-200,000 prefixes
12.0.0.0/16
12.1.0.0/16
12.2.0.0/16
12.3.0.0/16
12.0.0.0/8
:
:
:
12.253.0.0/16
12.254.0.0/16
12.3.0.0/24
12.3.1.0/24
:
:
12.3.254.0/24
12.253.0.0/19
12.253.32.0/19
12.253.64.0/19
12.253.96.0/19
12.253.128.0/19
12.253.160.0/19
12.253.192.0/19
:
:
:
Figuring Out Who Owns an Address
• Address registries
– Public record of address allocations
– ISPs should update when giving addresses to
customers
– However, records are notoriously out-of-date
• Ways to query
– UNIX: “whois –h whois.arin.net 128.112.136.35”
– http://www.arin.net/whois/
– http://www.geektools.com/whois.php
–…
Example Output for 128.112.136.35
OrgName: Princeton University
OrgID: PRNU
Address: Office of Information Technology
Address: 87 Prospect Avenue
City: Princeton
StateProv: NJ
PostalCode: 08544-2007
Country: US
NetRange: 128.112.0.0 - 128.112.255.255
CIDR: 128.112.0.0/16
NetName: PRINCETON
NetHandle: NET-128-112-0-0-1
Parent: NET-128-0-0-0-0
NetType: Direct Allocation
RegDate: 1986-02-24
Longest Prefix Match Forwarding
• Forwarding tables in IP routers
– Maps each IP prefix to next-hop link(s)
• Destination-based forwarding
– Packet has a destination address
– Router identifies longest-matching prefix
– Cute algorithmic problem: very fast lookups
forwarding table
destination
12.34.158.5
4.0.0.0/8
4.83.128.0/17
12.0.0.0/8
12.34.158.0/24
126.255.103.0/24
outgoing link
Serial0/0.1
Where do Forwarding Tables Come From?
• Routers have forwarding tables
– Map prefix to outgoing link(s)
• Entries can be statically configured
– E.g., “map 12.34.158.0/24 to Serial0/0.1”
• But, this doesn’t adapt
– To failures
– To new equipment
– To the need to balance load
–…
• That is where routing protocols come in…
Routing Protocols
Two-Tiered Internet Routing Architecture
• Goal: distributed management of resources
– Internetworking of multiple networks
– Networks under separate administrative control
• Solution: two-tiered routing architecture
– Intradomain: inside a region of control
• Okay for routers to share topology information
• Routers configured to achieve a common goal
– Interdomain: between regions of control
• Not okay to share complete information
• Networks may have different/conflicting goals
• Led to the use of different protocols…
Connections Between Networks
interdomain
protocols
dial-in access
private peering
ISP 2
intradomain
protocols
destination
IXP
ISP 1
gateway router
access router
ISP 3
commercial
customer
destination
Internet Routing Architecture
• Divided into Autonomous Systems
– Distinct regions of administrative control
– Routers/links managed by a single “institution”
– Service provider, company, university, …
• Hierarchy of Autonomous Systems
– Large, tier-1 provider with a nationwide backbone
– Medium-sized regional provider with smaller backbone
– Small network run by a single company or university
• Interaction between Autonomous Systems
– Internal topology is not shared between ASes
– … but, neighboring ASes interact to coordinate routing
AS Numbers (ASNs)
ASNs are 16 bit values.
64512 through 65535 are “private”
Currently around 20,000 in use.
•
•
•
•
•
•
•
•
•
Level 3: 1
MIT: 3
Harvard: 11
Yale: 29
Princeton: 88
AT&T: 7018, 6341, 5074, …
UUNET: 701, 702, 284, 12199, …
Sprint: 1239, 1240, 6211, 6242, …
…
ASNs represent units of routing policy
Interdomain Routing (Between ASes)
Path: 6, 5, 4, 3, 2, 1
4
3
5
2
7
1
6
Web server
Client
Interdomain Routing: Border Gateway Protocol
• ASes exchange info about who they can reach
– IP prefix: block of destination IP addresses
– AS path: sequence of ASes along the path
• Policies configured by the AS’s operator
– Path selection: which of the paths to use?
– Path export: which neighbors to tell?
“12.34.158.0/24: path (2,1)”
3
“12.34.158.0/24: path (1)”
1
2
data traffic
data traffic
12.34.158.5
Zooming in to AS 3
• Border router
– Learns BGP route from neighbor AS
– Creates forwarding-table entry for prefix
• But, how do the other routers get there?
Border router:
12.34.158.0/24
How do Other Routers Learn the BGP Route?
• Internal BGP
– iBGP sessions between the routers
– Allows other routers to get the big picture
• Simplest case: “full mesh” of iBGP sessions
“12.34.158.0/24
through red
router”
iBGP session
12.34.158.0/24
How To Get to the Egress Router?
• Interior Gateway Protocol (OSPF/IS-IS)
– Routers flood information to learn topology
– Routers determine “next hop” to other routers…
– Compute shortest paths based on the link weights
– Link weights configured by the operator
2
3
2
“Use Serial0/0.1
to get to the
red router”
1
1
1
3
5
4
3
Constructing the Forwarding Table
• Three protocols
– External BGP: learn the external route
– Internal BGP: propagate inside the AS
– IGP: learn outgoing link on path to other router
• Router joins the data
– Prefix 12.34.158.0/24 reached through red router
– Red router reached via link Serial0/0.1
– Forwarding entry: 12.34.158.0/24  Serial0/0.1
• Router forwards packets
– Lookup destination 12.34.158.5 in table
– Forward packet out link Serial0/0.1
What if There are Multiple Choices?
Hot-potato routing
192.44.78.0/24
egress 2
egress 1
15
56
IGP distances
This router has two BGP routes to 192.44.78.0/24.
Hot potato: get traffic off of your network as
soon as possible. Go for egress 1!
Two Kinds of Routing Protocols
Link State
• Topology information is flooded
within the routing domain
• Best end-to-end paths are
computed locally at each router.
• Best end-to-end paths
determine next-hops.
• Based on minimizing some
notion of distance
• Works only if policy is shared and
uniform
• Examples: OSPF, IS-IS
Vectoring
• Each router knows little about
network topology
• Only best next-hops are chosen by
each router for each destination.
• Best end-to-end paths result from
composition of all next-hop choices
• Does not require any notion of
distance
• Does not require uniform policies
at all routers
• Examples: RIP, BGP
Practical Realities
IP Address != Host Machine
• Dynamic IP address assignment (DHCP)
– Single client may have multiple addresses over time
– Address may correspond to multiple clients over time
• Shared machines
– Multiple users on a shared compute server
– Transfers traveling through proxies and firewalls
– Multiple Web sites hosted on a single machine
• Replicated sites
– Multiple machines hosting a single (popular) Web site
• Addresses do not correspond to geographic location
– Similar prefix does not necessarily imply nearby hosts
– Single prefix may span hosts in large geographic region
• Source IP address may be spoofed (e.g., DoS attack)
AS != Institution
• Not equivalent to an AS
– Many institutions span multiple autonomous systems
– Some institutions do not have their own AS number
– Ownership of an AS may be hard to pinpoint (whois)
• Not equivalent to a block of IP addresses (prefix)
– Many institutions have multiple (non-contiguous) prefixes
– Some institutions are a small part of a larger address block
– Ownership of a prefix may be hard to pinpoint (whois)
• Not equivalent to a domain name (att.com)
– Some sites may be hosted by other institutions
– Some institutions have multiple domain names (att.net)
Routing is Not Symmetric
Web request and TCP ACKs
client
Web response
server
Discussion of Saltzer84
• End-to-end argument
– Better to implement functions close to application
– … except when performance requires otherwise
• Why?
–…
• What should be the “end” for routing?
– Router?
– End host?
– Enterprise edge?
– Autonomous System?
Discussion of Clark88
• Basic story of Clark88
– Enumerate (and prioritize) system goals
– … and see what decisions that leads you to make
• Clark88 doesn’t say much about routing, but
– “Some of the most significant problems with the
Internet today relate to lack of sufficient tools for
distributed management, especially in the area of
routing.”
• What should be goals & priorities for routing?
–…
For Next Tuesday’s Class…
• Topology: Inside an Autonomous System
– “Measuring ISP topologies with RocketFuel” (SIGCOMM’02)
– “A first-principles approach to understanding the Internet’s
router-level topology” (SIGCOMM’04)
• Written review, one page each (hard-copy)
–
–
–
–
Brief summary of the paper
Reasons to accept the paper
Reasons to reject the paper
Three suggestions for future research directions
• Other materials
– Short paper on path diversity (Teixeira03)
– Internet topology pictures (Maps)