Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst...

64
Lecture 6: Intra-Domain Routing

Transcript of Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst...

Page 1: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Lecture 6: Intra-Domain Routing

Page 2: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Overview

• Internet structure, ASes

• Forwarding vs. Routing

• Distance vector and link state

• Example distance vector: RIP

• Example link state: OSPF

Page 3: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

The Internet, 1990

NSFNET backboneStanford

BARRNETregional

BerkeleyPARC

NCAR

UA

UNM

Westnetregional

UNL KU

ISU

MidNetregional…

• Hierarchical structure w. single backbone

Page 4: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Address allocation, 1990

Network number Host number

Class B address

Subnet mask (255.255.255.0)

Subnetted address

111111111111111111111111 00000000

Network number Host IDSubnet ID

• Hierarchical IP addresses- Class A (8-bit prefix), B (16-bit), C (24-bit)

• Subnetting adds another level within organizations- Subnet masks define variable partition of host part

- Subnets visible only within site

Page 5: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Example

Subnet mask: 255.255.255.128

Subnet number: 128.96.34.0

128.96.34.15

128.96.34.1

H1 R1

128.96.34.130 Subnet mask: 255.255.255.128

Subnet number: 128.96.34.128

128.96.34.129128.96.34.139

R2H2

128.96.33.1

128.96.33.14

Subnet mask: 255.255.255.0

Subnet number: 128.96.33.0

H3

Page 6: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

The Internet, today

Backbone service provider

Peeringpoint

Peeringpoint

Large corporation

Large corporation

Smallcorporation

“Consumer” ISP

“Consumer” ISP

“Consumer” ISP

• Multiple “backbones”

Page 7: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Address allocation, today

• Class system makes inefficient use of addresses- class C with 2 hosts (2/255 = 0.78% efficient)

- class B with 256 hosts (256/65535 = 0.39% efficient)

- Causes shortage of IP addresses (esp. class B)

- Makes address authorities reluctant to give out class Bs

• Still Too Many Networks- routing tables do not scale

- route propagation protocols do not scale

Page 8: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Supernetting

• Assign block of contiguous network numbers tonearby networks

• Called CIDR: Classless Inter-Domain Routing

• Represent blocks with a single pair(first network address , count)

• Restrict block sizes to powers of 2- Represent length of network in bits w. slash

- E.g.: 128.96.34.0/25 means netmask has 25 1 bits, followedby 7 0 bits, or 0xffffff80 = 255.255.255.128

- E.g.: 128.96.33.0/24 means netmask 255.255.255.0

• All routers must understand CIDR addressing

Page 9: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

IP Connectivity

• For each destination address, must either:1. Have prefix mapped to next hop in forwarding table, or

2. know “smarter router”—default for unknown prefixes

• Route using longest prefix match, default is prefix0.0.0.0/0

• Core routers know everything—no default

• Manage using notion of Autonomous System (AS)

• Two-level route propagation hierarchy- interior gateway protocol (each AS selects its own)

- exterior gateway protocol (Internet-wide standard)

Page 10: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Autonomous systems

• Correspond to an administrative domain- Internet is not a single network

- ASes reflect organization of the Internet

- E.g., Stanford, large company, etc.

• Goals:- ASes want to choose their own local routing algorithm

- ASes want to set policies about non-local routing

• Each AS assigned unique 16-bit number

Page 11: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Types of traffic & AS

• Local traffic – packets with src or dst in local AS

• Transit traffic – passes through an AS

• Stub AS- Connects to only a single other AS

• Multihomed AS- Connects to multiple ASes

- Carries no transit traffic

• Transit AS- Connects to multiple ASes and carries transit traffic

Page 12: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Intra-domain routing

• Intra-domain routing: within an AS

• Single administrative control: optimality isimportant

- Contrast with inter-AS routing, where policy dominates

- Next lecture will cover inter-domain routing (BGP)

Page 13: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Forwarding vs. Routing

Page 14: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

What is routing?• forwarding – moving packets

between ports- Look up destination address in

forwarding table

- Find out-port or 〈out-port, MACaddr〉 pair

• Routing is process of populat-ing forwarding table

- Routers exchange messages aboutnets they can reach

- Goal: Find optimal route for ev-ery destination

- . . . or maybe good route, or justany route (depending on scale)

Page 15: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Stability

• Stable routes are often preferred over rapidlychanging ones

• Reason 1: management- Hard to debug a problem if it’s transient

• Reason 2: higher layer optimizations- E.g., TCP RTT estimation

- Imagine alternating over 500ms and 50ms routes

• Tension between optimality and stability

Page 16: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Routing algorithm properties

• Global vs. decentralized- Global: All routers have complete topology

- Decentralized: Only know neighbors & what they tell you

• Intra-domain vs. Inter-domain routing- Intra-: All routers under same administrative control

- Intra-: Scale to ∼100 networks (e.g., campus like Stanford)

- Inter-: Decentralized, scale to Internet

• We’ll cover basic algorithms for intra-domainrouting and two protocols: RIP and OSPF

Page 17: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Optimality

4

3

6

21

9

1

1

D

A

FE

B

C

• View network as a graph

• Assign cost to each edge- Can be based on latency, b/w, utilization, queue length, . . .

• Problem: Find lowest cost path between two nodes- Each node individually computes the cost (some recent

research argues against doing this, more on this later)

Page 18: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Scaling issues

• Every router must be able to forward based on anydestination IP address

- Given address, it needs to know ”next hop” (table)

- Naıve: Have an entry for each address

- There would be 108 entries!

• Solution: Entry covers range of addresses- Can’t do this if addresses are assigned randomly! (e.g.,

Ethernet addresses)

- This is why address aggregation is important

- Addresses allocation should be based on network structure

• What is structure of the Internet?

Page 19: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Distance Vector and Link State

Page 20: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Basic Algorithms

• Two classes of intra-domain routing algorithms

• Link state- Have a global view of the network

- Simpler to debug

- Require global state

• Distance vector- Require only local state (less overhead, smaller footprint)

- Harder to debug

- Can suffer from loops

Page 21: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Link State

• Strategy- Send to all nodes (not just neighbors)

- Send only information about directly connected links (notentire routing table)

• Link State Packet (LSP)- ID of the node that created the LSP

- Cost of link to each directly connected neighbor

- Sequence number (SEQNO)

- Time-to-live (TTL) for this packet

Page 22: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Reliable flooding

• Store most recent LSP from each node

• Forward LSP to all nodes but one that sent it

• Generate new LSP periodically- Increment SEQNO

• Start SEQNO at 0 when reboot- If you hear your own packet w. SEQNO= n, set your next

SEQNO to n + 1

• Decrement TTL of each stored LSP- discard when TTL= 0

Page 23: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Calculating best path

• Dijkstra’s shortest path algorithm

• Let:- N denote set of nodes in the graph

- l(i, j) denotes non-negative cost (weight) for edge (i, j)

- s denotes yourself (node computing paths)

• Initialize variables- M ← s (set of nodes “incorporated” so far)

- Cn ← l(s, n) (cost of the path from s to n)

- Rn ← ⊥ (next hop on path to n)

Page 24: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Dijkstra’s algorithm

• While N 6= M

- Let w ∈ (N −M) be node with lowest Cw

- M ←M ∪ w

- Foreach n ∈ (N −M), if Cw + l(w, n) < Cn

then Cn ← Cw + l(w, n), Rn ← w

• Example: D (D, 0,⊥)(C, 2, C)(B, 5, C)(A, 10, C)

D

A

B

C

5 3

2

11

10

Page 25: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Distance Vector

• Local routing algorithm

• Each node maintains a set of triples- (Destination,Cost ,NextHop)

• Exchange updates with direct neighbors- periodically (on the order of several seconds to minutes)

- whenever table changes (called triggered update)

• Each update is a list of pairs:- (Destination,Cost)

• Update local table if receive a “better” route- smaller cost

- from newly connected/available neighbor

• Refresh existing routes; delete if they time out

Page 26: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Calculating best path

• Bellman-Ford equation

• Let:- Da(b) denote the distance from a to b

- c(a, b) denote the cost of a link from a to b

• Then Dx(y) = minz(c(x, z) +Dz(y))

• Routing messages contain D; when does a nodetransmit a message?

Page 27: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

DV Example

A

BC

DE

F G

• B’s routing table:

Destination Cost NextHop

A 1 A

C 1 C

D 2 C

E 2 A

F 2 A

G 3 A

Page 28: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Adapting to failures

A

BC

DE

F G

- F detects that link to G has failed

- F sets distance to G to infinity and sends update to A

- A sets distance to G to infinity since it uses F to reach G

- A receives periodic update from C with 2-hop path to G

- A sets distance to G to 3 and sends update to F

- F decides it can reach G in 4 hops via A

Page 29: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Danger: Loops

A

BC

DE

F G

- link from A to E fails

- A advertises distance of infinity to E

- B and C advertise a distance of 2 to E

- B decides it can reach E in 3 hops; advertises this to A

- A decides it can reach E in 4 hops; advertises this to C

- C decides that it can reach E in 5 hops. . .

Page 30: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

How to avoid loops

• IP TTL field prevents a packet from living forever- Does not break or repair a loop

• Simple approach: consider small cost n (e.g., 16) tobe infinity

- After n rounds will decide node is unavailable

- But rounds can be long: this takes time

• Distance vector based only on local information

Page 31: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Better loop avoidance

• Split horizon- When sending updates to node A, don’t include

destinations you route to through A

- Prevents B and C from sending cost 2 to A

• Split horizon with poison reverse- When sending updates to node A, explictly include very

high cost (“poison”) for destinations you route to through A

- When does poison reverse help?

Page 32: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Poison Reverse example

A

BC

DE

F G

E:2

Page 33: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Poison Reverse example

A

BC

DE

F G

B:E:2

Page 34: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Poison Reverse example

A

BC

DE

F G

B:E:2

Page 35: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Poison Reverse example

A

BC

DE

F G

E:∞B:E:∞

Page 36: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Warning

• Note: Split horizon/split horizon with poisonreverse only help between two nodes

- Can still get loop with three nodes involved

- Might need to delay advertising routes after changes, butwill affect convergence time

Page 37: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Distance Vector vs. Link State

• # of messages- DV: convergence time varies, but Ω(d) where d is # of

neighbors of node

- LS: O(n · d) for n nodes in system

• Computation- DV: Could count all the way to∞ if loop

- LS: O(n2)

• Robustness – what happens with malfunctioningrouter?

- DV: Node can advertise incorrect path cost

- DV: Costs used by others, errors propagate through net

- LS: Node can advertise incorrect link cost

Page 38: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Metrics

• Original ARPANET metric- measures number of packets enqueued on each link

- took neither latency nor bandwidth into consideration

• New ARPANET metric- stamp each incoming packet with its arrival time (AT)

- record departure time (DT)

- when link-level ACK arrives, computeDelay = (DT −AT ) + Transmit + Latency

- if timeout, reset DT to departure time for retransmission

- link cost = average delay over some time period

• Fine Tuning- compressed dynamic range

- replaced Delay with link utilization

• Today: policy often trumps performance [more later]

Page 39: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Intradomain routing protocols

• RIP (routing information protocol)- Fairly simple implementation of DV

- RFC 2453 (38 pages)

• OSPF (open shortest path first)- More complex link-state protocol

- Adds notion of areas for scalability

- RFC 2328

Page 40: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

2-minute stretch

Page 41: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Example Distance Vector: RIP

Page 42: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

RIPv2 [RFC 2453]

• Runs over UDP port 520

• Limits networks to 15 hops (16 =∞)

• Depends on count to infinity for loops

• Supports split horizon, poison reverse

• RFC 1812 specifes what options routers should ormust have

Page 43: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

RIPv2 packet format

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| command (1) | version (1) | must be zero (2) |

+---------------+---------------+-------------------------------+

| |

~ RIP Entry (20) ~

| |

+---------------+---------------+---------------+---------------+

Page 44: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

RIPv2 Entry

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| address family identifier (2) | Route Tag (2) |

+-------------------------------+-------------------------------+

| IP address (4) |

+---------------------------------------------------------------+

| Subnet Mask (4) |

+---------------------------------------------------------------+

| Next Hop (4) |

+---------------------------------------------------------------+

| Metric (4) |

+---------------------------------------------------------------+

Page 45: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Route Tag Field

• Allows RIP nodes to distinguish internal andexternal routes

• Must persist across announcements

• E.g., encode AS

Page 46: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Next Hop Field

• Allows one router to advertise routes for multiplerouters on same subnet

• Suppose only XR1 talks RIP2:

----- ----- ----- ----- ----- -----

|IR1| |IR2| |IR3| |XR1| |XR2| |XR3|

--+-- --+-- --+-- --+-- --+-- --+--

| | | | | |

--+-------+-------+---------------+-------+-------+--

<-------------RIP-2------------->

Page 47: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Example Link State: OSPF

Page 48: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPFv2 [RFC 2328]

• Link state protocol

• RFC 2328 (244 pages)

• Runs directly over IP (protocol 89)- Has to provide its own reliability

• All exchanges are authenticated

• Adds notion of areas for scalability

Page 49: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPF Areas

• Area 0 is “backbone” area (includes all boundaryrouters)

• Traffic between two areas must always go througharea 0

• Only need to know how to route exactly withinarea

• Else, just route to appropriate area

• (Virtual links can allow distant routers to be inarea 0)

Page 50: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPF areas

Page 51: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPF Packet Header

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Version # | Type | Packet length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Router ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Area ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Checksum | AuType |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Authentication |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Authentication |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 52: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPF Packet Types

• 1 - Hello packet

• 2 - Database Description

• 3 - Link State Request

• 4 - Link State Update

• 5 - Link State Acknowledgment

Page 53: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Database Description

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Interface MTU | Options |0|0|0|0|0|I|M|MS

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| DD sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| |

~ An LSA Header (20+bytes) ~

| |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

Page 54: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Database Description Packet Fields

• Interface MTU

• Options (multicast, external LSAs, etc.)

• Init bit, More bit, Master/Slave bit

• Sequence number: distinguishes DD packets.

• Exchange- First packet in an exchange has the I bit sent, all but last

have M bit set, sequence number increments on each packet

Page 55: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

DD Packet Exchange

• Used to initialize routing state

• Node A sends an empty DD to node B withsequence number n, the I, M, and MS bits set

• Node B responds with a DD with the I and MSbits cleared, seq. no n

- Can contain LSAs - if there are more, set the M bit

• Node A n+ 1, I bit cleared, MS bit set, M bitdepends on whether there are more LSAs

• Continues until both send cleared M bit

Page 56: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

OSPF areas

Page 57: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

LSA Details

• Many different LSA formats

• Example 1: Router-LSAs, describe a router’s links

• Example 2: Summary-LSAs, generated by areaborder routers

- Describes an IP network within the area

- Includes IP address, network mask, and cost metric

• Example 3: AS-external-LSAs- Describes an IP network in another AS

- Includes IP address, netmask, cost, and forwarding address

Page 58: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Basic Algorithms

• Two classes of intra-domain routing algorithms

• Link state (e.g., OSPF)- Have a global view of the network

- Simpler to debug

- Require global state (OSPF reduces this through areas)

• Distance vector (e.g. RIP)- Require only local state (less overhead, smaller footprint)

- Harder to debug

- Can suffer from loops

Page 59: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

The Internet, today

Backbone service provider

Peeringpoint

Peeringpoint

Large corporation

Large corporation

Smallcorporation

“Consumer” ISP

“Consumer” ISP

“Consumer” ISP

Page 60: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of
Page 61: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

A R I NAmerican Registry for Internet Numbers

digitalenvoyPROJECT

C o p y r i g h t ( c ) 2 0 0 8 U C R e g e n t sA l l r i g h t s r e s e r v e d .

A R K H O S T S . AARNet . APAN . ARIN . ASTI Institute . CANET . CENIC . CNRST . ELTENET . FunkFeuer . HEANet . Iowa State University . KREONet2 . Purdue University . RNP . TKK . Universitat Leipzig . Universitat Politecnica . University of Cambridge . University of Hawaii . University of Waikato

A C K N O W L E D G E M E N T S F O R I P v 6 . APNIC . AfriNIC . Alexander Gall . Andreas Johansson . Antonio Prado . Antonio Querubin . ARIN . Azael Fernandez Alcantara . Bernhard Schmidt . Brad Dreisbach . Brian Fitzgerald . CAIDA . Chris Morrow . Derek Morr . Gabriel Kerneis . Geoff Huston . Gert Doering . ISC . IIjitsch van Beijnum . Jean-Philippe Pick . John Kristoff . John Osmon . Kenjiro Cho . Kurt Jaeger . LACNIC . Martin Millnert . Mathieu Arnold . RIPE NCC . Nuno Vieira . Ollivier Robert . Sebastian Abt . Shane Kerr

A N A L Y S I S T E A M . Bradley Huffaker . kc claffyS O F T W A R E D E V E L O P M E N T Young Hyun . Matthew LuckieP O S T E R D E S I G N Jennifer Hsu

C O O P E R A T I V E A S S O C I A T I O N F O R I N T E R N E T D A T A A N A L Y S I S

San Diego Supercomputer Center . University of California, San Diego500 Gilman Drive, mc0505 . La Jolla, CA 92093-0505 . 858-534-5000 . http://www.caida.org/

http://www.caida.org/research/topology/as_core_network/

www.caida .org

01

0W

20W

30W

40W

50W

60W

70W

80W90W100W

110W

120W

130W

140W

150W

160W

17

0W

18

0E/

W1

70

E

160E

150E

140E

130E

120E

110E

100E 90E80E

70E

60E

50E

40E

30E

20E

10

E

OC

E

A

N

IA

A

FR

IC

A

S

O

U

TH

AM

ER

ICA

A

S

IA

EU

RO

PE

NO

RTH AME

RI

CA

2516(KDDI)2516(KDDI)

1273(CW)1273(CW)5459(London IX)5459(London IX)

3320(Deutsche Telekom)3320(Deutsche Telekom)1299(TeliaNet)1299(TeliaNet)

1239(Sprint)1239(Sprint)3257(Tiscali)3257(Tiscali)

3549(Global Crossing)3549(Global Crossing)7018(AT&T)7018(AT&T)174(Cogent)174(Cogent)

702(MCI)702(MCI)

6453(Teleglobe)6453(Teleglobe)6461(Abovenet)6461(Abovenet)

7132(SBC)7132(SBC)4323(Time Warner)4323(Time Warner)

209(Qwest)209(Qwest)

3561(Savvis)3561(Savvis)

2914(NTT)2914(NTT)

701(UUNET)701(UUNET)3356(Level 3)3356(Level 3)

8928(Interoute)8928(Interoute)

10026(Asia Netcom)10026(Asia Netcom)

7473(Singapore Tel.)7473(Singapore Tel.)

4637(Reach)4637(Reach)

20485(JSC)20485(JSC)

5511(France Tel)5511(France Tel)

15412(Flag)15412(Flag)

3786 (DACOM)3786 (DACOM)

786(JANET)786(JANET)

703 (UUNET)703 (UUNET)

2828 (XO)2828 (XO)3491 (Beyond)3491 (Beyond)

4766 (Korea Tel)4766 (Korea Tel)3904 (Hutchison(3904 (Hutchison)

7714(TelstraClear)7714(TelstraClear)

This visualization represents macroscopic snapshots of the IPv4 and IPv6Internet topologies observed during the first week of January 2008.It simultaneously illustrates the peering richness of each topology and the worldwide distribution of nodes in each routing system.

The IPv4 data was collected between January 2nd and 17th 2008 by 13 CAIDA archipelago monitors located in 13 different cities, 11 countries, and 3continents. The monitors probed paths toward 48M /24 networks spread across 95% of the prefixes seen in Route Views Border Gateway Protocol (BGP) routing tables on 1 January 2008.

The IPv6 data was collected between January 1st and 8th 2008 by volunteers responding to a request sent to the North American Network Operators' Group (NANOG) mailing list. There were 56 contributors, in 53 different cities, 9 countries, and

3 continents. They used the scamper command-line tool to probe 2,358 IPv6 destinations spread across 822 prefixes or 81% of the prefixes seen by RIPE NCC on 1 January 2008.

We aggregated these network views to construct IPv4 and IPv6 Internet graphs at the Autonomous System (AS) level. Each AS approximately corresponds to an Internet Service Provider (ISP). We map each IP address to the AS responsible for routing traffic to it, i.e., to the origin (end-of-path) AS for the IP prefix representing the best match of this address in BGP routing tables. For the IPv4 graph we used the BGP IPv4 routing table collected by Route Views. For the IPv6 graph we used the IPv6 routing table collected by RIPE NCC.

The position of each AS node is plotted in polar coordinates, position (radius, angle) calculated using the following equations:

The outdegree of an AS node is the number of next-hop ASes that were observed accepting our probe traffic from this AS. The link color reflects outdegree, from lowest (blue) to highest (yellow). Toward the center of the graph we have manually labeled some of the higher degree ASes with their associated ISPs.

To determine the longitude of ASes, we used the IPv4 BGP table from Route Views and mapped each AS to its set of announced IPv4 prefixes. (IPv4 tables are currently much larger, facilitating more accurate inference of geographic coverage of an AS.) We subdivided prefixes into the smallest prefixes that Digital

maximum.outdegree + 11- log( outdegree(AS) + 1 )radius =

( longitude of the AS’s BGP prefixes )in netacqangle =

Number ofIP address

Number ofIP links

Number ofASes

Number ofASlinks

IPv6IPv4

Dates

Jan. 2nd-17th, 2008

Jan. 1st-8th, 2008

4,853,9914,752

5,682,41917,036

17,791

48950,3331,904

1845

1614

1383

1153

922

691

461

230

0

Peering:OutDegree

157

137

117

98

78

58

39

19

0

A S - l e v e l I N T E R N E T G R A P H

I P v 4 & I P v 6 I N T E R N E T T O P O L O G Y M A P J A N U A RY 2 0 0 8

0 1

0W

20W

30W 40W

50W 60W 70W 80W 90W

100W

110W

1

20W

1

30W

140W

15

0W

160W

1

70

W

1

80

E/

W

1

70

E

160E

15

0E

140

E

130E

1

20E

110E

100E 90E 80E 70E 60E 50E 40E 30E 20E 1

0E

OC

E

A

N

I

A

A

FR

IC

A

S

O

U

TH

AM

ER

IC

A

A

S

IA

EU

RO

PE

NO

RTHAME

RI

CA

Brussels, BE

Oslo, NO

RK,

luoe

S

SU,ululonoH

SU,revne

D

Toronto, C

A

SU,ogei

DnaS

SU,esoJ

naS

SU,xineohP

SU,notsuo

H

Chicago, U

S

Ottaw

a, CA

Washington, U

SB

oston, US

Buenos Aires, A

R

Rio de Janeiro, BR

London, UKParis, FR

Berlin, DEVienna, ATStockholm, SESofia, BGHelsin

ki, FIPretoria, ZAKiev, UA

Warsaw, PL

Ankara, TR

Tel Aviv, ILMosco

w, RU

AbuDha

bi, A

EBom

bay,

IN

Del

hi, I

N

HT,

kokg

naB

GS,e

ropa

gniS

DI,a

trak

aJ

NC,

gniji

eBWT

,iep

iaT

PJ,oykoT

UA,yendyS

Frankfurt, DE

UR,ko

tsovi

dalV

Alges, PT

Dublin, IE

LambdaNet (13237)LambdaNet (13237)

Global (3549)Global (3549)Sprint (6175)Sprint (6175) Teleglobe (6453)Teleglobe (6453)

TowardEX (30071)TowardEX (30071)Hurricane (6939)Hurricane (6939)

Tiscali (3257)Tiscali (3257)NTT (2914)NTT (2914)

IIJ (2497)IIJ (2497)

WIDE (2500)WIDE (2500)

Asia Netcom (18084)Asia Netcom (18084)OpenCarrier (41692)OpenCarrier (41692)

Cable & Wireless (1273)Cable & Wireless (1273)

LavaNet (6435)LavaNet (6435)

Envoy's Netacuity (R) mapped to a single geographic location in January 2008. We calculated the AS angle coordinate from the weighted average (by number of IP addresses in each mapped prefix) of the longitude coordinates of these prefixes.

The IPv6 graph with 486 ASes remains much smaller than the IPv4 graph with 18,753 ASes. While the IPv4 graph's central core is still dominated by American ASes, the IPv6 graph center is more balanced between America and Europe. A European ISP Tiscali (3257) has replaced the previously highest ranking AS, NTT (2914), since our last IPv6 Internet AS core graph in 2005. Although NTT is a Japanese telecommunication company, the address space it uses for AS 2914 comes from the American company Verio, which NTT purchased in 2000. The fact that the largest AS in the IPv6 graph is European and that the other European ASes are comparable in degree to the American ASes reflects the wider adoption of IPv6 outside the United States.

Brussels, BE

Oslo, NO

RK,

luoe

S

SU,ululonoH

SU,revne

D

Toronto, C

A

SU,ogei

DnaS

SU,esoJnaS

SU,xineohP

SU,notsuo

H

Chicago, U

S

Ottaw

a, CA

Washington, U

SB

oston, US

Buenos Aires, A

R

Rio de Janeiro, BR

London, UKParis, FR

Berlin, DEVienna, ATStockholm, SESofia, BGHelsin

ki, FIPretoria, ZAKiev, UA

Warsaw, PL

Ankara, TR

Tel Aviv, ILMosco

w, RU

AbuDha

bi, A

EBom

bay,

IN

Del

hi, I

N

HT,

kokg

naB

GS,e

ropa

gniS

DI,a

trak

aJ

NC,

gniji

eBWT

,iep

iaT

PJ,oykoT

UA,yendyS

Frankfurt, DE

UR,ko

tsovi

dalV

Alges, PT

Dublin, IE

IPv6IPv4

Page 62: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of
Page 63: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

A R I NAmerican Registry for Internet Numbers

digitalenvoyPROJECT

C o p y r i g h t ( c ) 2 0 0 8 U C R e g e n t sA l l r i g h t s r e s e r v e d .

A R K H O S T S . AARNet . APAN . ARIN . ASTI Institute . CANET . CENIC . CNRST . ELTENET . FunkFeuer . HEANet . Iowa State University . KREONet2 . Purdue University . RNP . TKK . Universitat Leipzig . Universitat Politecnica . University of Cambridge . University of Hawaii . University of Waikato

A C K N O W L E D G E M E N T S F O R I P v 6 . APNIC . AfriNIC . Alexander Gall . Andreas Johansson . Antonio Prado . Antonio Querubin . ARIN . Azael Fernandez Alcantara . Bernhard Schmidt . Brad Dreisbach . Brian Fitzgerald . CAIDA . Chris Morrow . Derek Morr . Gabriel Kerneis . Geoff Huston . Gert Doering . ISC . IIjitsch van Beijnum . Jean-Philippe Pick . John Kristoff . John Osmon . Kenjiro Cho . Kurt Jaeger . LACNIC . Martin Millnert . Mathieu Arnold . RIPE NCC . Nuno Vieira . Ollivier Robert . Sebastian Abt . Shane Kerr

A N A L Y S I S T E A M . Bradley Huffaker . kc claffyS O F T W A R E D E V E L O P M E N T Young Hyun . Matthew LuckieP O S T E R D E S I G N Jennifer Hsu

C O O P E R A T I V E A S S O C I A T I O N F O R I N T E R N E T D A T A A N A L Y S I S

San Diego Supercomputer Center . University of California, San Diego500 Gilman Drive, mc0505 . La Jolla, CA 92093-0505 . 858-534-5000 . http://www.caida.org/

http://www.caida.org/research/topology/as_core_network/

www.caida .org

01

0W

20W

30W

40W

50W

60W

70W

80W90W100W

110W

120W

130W

140W

150W

160W

17

0W

18

0E/

W1

70

E

160E

150E

140E

130E

120E

110E

100E 90E80E

70E

60E

50E

40E

30E

20E

10

E

OC

E

A

N

I

A

A

FR

IC

A

S

O

U

TH

AM

ER

ICA

A

S

IA

EU

RO

PE

NO

RTH AME

RI

CA

2516(KDDI)2516(KDDI)

1273(CW)1273(CW)5459(London IX)5459(London IX)

3320(Deutsche Telekom)3320(Deutsche Telekom)1299(TeliaNet)1299(TeliaNet)

1239(Sprint)1239(Sprint)3257(Tiscali)3257(Tiscali)

3549(Global Crossing)3549(Global Crossing)7018(AT&T)7018(AT&T)174(Cogent)174(Cogent)

702(MCI)702(MCI)

6453(Teleglobe)6453(Teleglobe)6461(Abovenet)6461(Abovenet)

7132(SBC)7132(SBC)4323(Time Warner)4323(Time Warner)

209(Qwest)209(Qwest)

3561(Savvis)3561(Savvis)

2914(NTT)2914(NTT)

701(UUNET)701(UUNET)3356(Level 3)3356(Level 3)

8928(Interoute)8928(Interoute)

10026(Asia Netcom)10026(Asia Netcom)

7473(Singapore Tel.)7473(Singapore Tel.)

4637(Reach)4637(Reach)

20485(JSC)20485(JSC)

5511(France Tel)5511(France Tel)

15412(Flag)15412(Flag)

3786 (DACOM)3786 (DACOM)

786(JANET)786(JANET)

703 (UUNET)703 (UUNET)

2828 (XO)2828 (XO)3491 (Beyond)3491 (Beyond)

4766 (Korea Tel)4766 (Korea Tel)3904 (Hutchison(3904 (Hutchison)

7714(TelstraClear)7714(TelstraClear)

This visualization represents macroscopic snapshots of the IPv4 and IPv6Internet topologies observed during the first week of January 2008.It simultaneously illustrates the peering richness of each topology and the worldwide distribution of nodes in each routing system.

The IPv4 data was collected between January 2nd and 17th 2008 by 13 CAIDA archipelago monitors located in 13 different cities, 11 countries, and 3continents. The monitors probed paths toward 48M /24 networks spread across 95% of the prefixes seen in Route Views Border Gateway Protocol (BGP) routing tables on 1 January 2008.

The IPv6 data was collected between January 1st and 8th 2008 by volunteers responding to a request sent to the North American Network Operators' Group (NANOG) mailing list. There were 56 contributors, in 53 different cities, 9 countries, and

3 continents. They used the scamper command-line tool to probe 2,358 IPv6 destinations spread across 822 prefixes or 81% of the prefixes seen by RIPE NCC on 1 January 2008.

We aggregated these network views to construct IPv4 and IPv6 Internet graphs at the Autonomous System (AS) level. Each AS approximately corresponds to an Internet Service Provider (ISP). We map each IP address to the AS responsible for routing traffic to it, i.e., to the origin (end-of-path) AS for the IP prefix representing the best match of this address in BGP routing tables. For the IPv4 graph we used the BGP IPv4 routing table collected by Route Views. For the IPv6 graph we used the IPv6 routing table collected by RIPE NCC.

The position of each AS node is plotted in polar coordinates, position (radius, angle) calculated using the following equations:

The outdegree of an AS node is the number of next-hop ASes that were observed accepting our probe traffic from this AS. The link color reflects outdegree, from lowest (blue) to highest (yellow). Toward the center of the graph we have manually labeled some of the higher degree ASes with their associated ISPs.

To determine the longitude of ASes, we used the IPv4 BGP table from Route Views and mapped each AS to its set of announced IPv4 prefixes. (IPv4 tables are currently much larger, facilitating more accurate inference of geographic coverage of an AS.) We subdivided prefixes into the smallest prefixes that Digital

maximum.outdegree + 11- log( outdegree(AS) + 1 )radius =

( longitude of the AS’s BGP prefixes )in netacqangle =

Number ofIP address

Number ofIP links

Number ofASes

Number ofASlinks

IPv6IPv4

Dates

Jan. 2nd-17th, 2008

Jan. 1st-8th, 2008

4,853,9914,752

5,682,41917,036

17,791

48950,3331,904

1845

1614

1383

1153

922

691

461

230

0

Peering:OutDegree

157

137

117

98

78

58

39

19

0

A S - l e v e l I N T E R N E T G R A P H

I P v 4 & I P v 6 I N T E R N E T T O P O L O G Y M A P J A N U A RY 2 0 0 8

0 1

0W

20W

30W 40W

50W 60W 70W 80W 90W

100W

110W

1

20W

1

30W

140W

15

0W

160W

1

70

W

1

80

E/

W

1

70

E

160E

15

0E

140

E

130E

1

20E

110E

100E 90E 80E 70E 60E 50E 40E 30E 20E 1

0E

OC

E

A

N

I

A

A

FR

IC

A

S

O

U

TH

AM

ER

IC

A

A

S

IA

EU

RO

PE

NO

RTHAME

RI

CA

Brussels, BE

Oslo, NO

RK,

luoe

S

SU,ululonoH

SU,revne

DT

oronto, CA

SU,ogei

DnaS

SU,esoJ

naS

SU,xineohP

SU,notsuo

HC

hicago, US

Ottaw

a, CA

Washington, U

SB

oston, US

Buenos Aires, A

R

Rio de Janeiro, BR

London, UKParis, FR

Berlin, DEVienna, ATStockholm, SESofia, BGHelsin

ki, FIPretoria, ZAKiev, UA

Warsaw, PL

Ankara, TR

Tel Aviv, ILMosco

w, RU

AbuDha

bi, A

EBom

bay,

IN

Del

hi, I

N

HT,

kokg

naB

GS,e

ropa

gniS

DI,a

trak

aJ

NC,

gniji

eBWT

,iep

iaT

PJ,oykoT

UA,yendyS

Frankfurt, DE

UR,ko

tsovi

dalV

Alges, PT

Dublin, IE

LambdaNet (13237)LambdaNet (13237)

Global (3549)Global (3549)Sprint (6175)Sprint (6175) Teleglobe (6453)Teleglobe (6453)

TowardEX (30071)TowardEX (30071)Hurricane (6939)Hurricane (6939)

Tiscali (3257)Tiscali (3257)NTT (2914)NTT (2914)

IIJ (2497)IIJ (2497)

WIDE (2500)WIDE (2500)

Asia Netcom (18084)Asia Netcom (18084)OpenCarrier (41692)OpenCarrier (41692)

Cable & Wireless (1273)Cable & Wireless (1273)

LavaNet (6435)LavaNet (6435)

Envoy's Netacuity (R) mapped to a single geographic location in January 2008. We calculated the AS angle coordinate from the weighted average (by number of IP addresses in each mapped prefix) of the longitude coordinates of these prefixes.

The IPv6 graph with 486 ASes remains much smaller than the IPv4 graph with 18,753 ASes. While the IPv4 graph's central core is still dominated by American ASes, the IPv6 graph center is more balanced between America and Europe. A European ISP Tiscali (3257) has replaced the previously highest ranking AS, NTT (2914), since our last IPv6 Internet AS core graph in 2005. Although NTT is a Japanese telecommunication company, the address space it uses for AS 2914 comes from the American company Verio, which NTT purchased in 2000. The fact that the largest AS in the IPv6 graph is European and that the other European ASes are comparable in degree to the American ASes reflects the wider adoption of IPv6 outside the United States.

Brussels, BE

Oslo, NO

RK,

luoe

S

SU,ululonoH

SU,revne

D

Toronto, C

A

SU,ogei

DnaS

SU,esoJnaS

SU,xineohP

SU,notsuo

H

Chicago, U

S

Ottaw

a, CA

Washington, U

SB

oston, US

Buenos Aires, A

R

Rio de Janeiro, BR

London, UKParis, FR

Berlin, DEVienna, ATStockholm, SESofia, BGHelsin

ki, FIPretoria, ZAKiev, UA

Warsaw, PL

Ankara, TR

Tel Aviv, ILMosco

w, RU

AbuDha

bi, A

EBom

bay,

IN

Del

hi, I

N

HT,

kokg

naB

GS,e

ropa

gniS

DI,a

trak

aJ

NC,

gniji

eBWT

,iep

iaT

PJ,oykoT

UA,yendyS

Frankfurt, DE

UR,ko

tsovi

dalV

Alges, PT

Dublin, IE

IPv6IPv4

Page 64: Lecture 6: Intra-Domain Routing - Stanford University · Represent blocks with a single pair ( rst network address; count ) Restrict block sizes to powers of 2-Represent length of

Overview

• Internet structure, ASes

• Forwarding vs. Routing

• Distance vector and link state

• Example distance vector: RIP

• Example link state: OSPF

• Next lecture: BGP