30
Internet Routing (COS Internet Routing (COS 598A) 598A) Today: Addressing and Routing Today: Addressing and Routing Jennifer Rexford Jennifer Rexford http://www.cs.princeton.edu/~jrex/ http://www.cs.princeton.edu/~jrex/ teaching/spring2005 teaching/spring2005 Tuesdays/Thursdays 11:00am-12:20pm Tuesdays/Thursdays 11:00am-12:20pm

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

  • View
    218

  • Download
    2

Embed Size (px)

Citation preview

Internet Routing (COS Internet Routing (COS 598A)598A)

Today: Addressing and RoutingToday: Addressing and Routing

Jennifer RexfordJennifer Rexford

http://www.cs.princeton.edu/~jrex/teaching/http://www.cs.princeton.edu/~jrex/teaching/spring2005spring2005

Tuesdays/Thursdays 11:00am-12:20pmTuesdays/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

00001100 00100010 10011110 00000101

Network (24 bits) Host (8 bits)

12 34 158 5

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…

04/18/23

Classless Inter-Domain Routing (CIDR)

IP Address : 12.4.0.0 IP Mask: 255.254.0.0

00001100 00000100 00000000 00000000

11111111 11111110 00000000 00000000

Address

Mask

for hosts Network Prefix

Use two 32-bit numbers to represent a network. Network number = IP address + Mask

Usually written as 12.4.0.0/15

04/18/23

CIDR = Hierarchy in Address Allocation

12.0.0.0/8

12.0.0.0/16

12.254.0.0/16

12.1.0.0/1612.2.0.0/1612.3.0.0/16

:::

12.253.0.0/16

12.3.0.0/2412.3.1.0/24

::

12.3.254.0/24

12.253.0.0/1912.253.32.0/1912.253.64.0/1912.253.96.0/1912.253.128.0/1912.253.160.0/1912.253.192.0/19

:::

• 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

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 AllocationRegDate: 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

4.0.0.0/84.83.128.0/1712.0.0.0/812.34.158.0/24126.255.103.0/24

12.34.158.5destination

forwarding table

Serial0/0.1outgoing link

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…

ISP 1

ISP 2

ISP 3

IXP

private peering

commercialcustomer

access router

gateway router

dial-in access

destination

destination

interdomainprotocols

intradomainprotocols

Connections Between Networks

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”

• 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

Currently around 20,000 in use.

Interdomain Routing (Between ASes)

1

2

3

4

5

67

ClientWeb server

Path: 6, 5, 4, 3, 2, 1

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?

32 1

12.34.158.5

“12.34.158.0/24: path (2,1)” “12.34.158.0/24: path (1)”

data traffic data traffic

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?

12.34.158.0/24

Border router:

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

iBGP session12.34.158.0/24

“12.34.158.0/24through red

router”

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

32

2

1

13

1

4

5

3

“Use Serial0/0.1to get to the red router”

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

04/18/23

What if There are Multiple Choices?

192.44.78.0/24

15 56 IGP distances

egress 1 egress 2

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!

Hot-potato routing

Two Kinds of Routing Protocols

• 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

• 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

Link State Vectoring

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

Web response

client

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)