1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

42
1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th , 2000 Nick McKeown [email protected] http://www.stanford.edu/~nickm

description

3 Outline (next time) The way routers are really built. Evolution of their internal workings. What limits their performance. The effect that DWDM is having on switch/router design. The way the network is built today. Discussion: The scope for optics

Transcript of 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

Page 1: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

1

Hi gh Pe rf orm a nceSwi tc hi ng and Routi ngTe lec om Ce nter W orks ho p: Sep t 4 , 19 97.

A quick tutorial on IP Router design

Optics and Routing SeminarOctober 10th, 2000

Nick [email protected]://www.stanford.edu/~nickm

Page 2: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

2

Outline• Where IP routers sit in the network• What IP routers look like• What do IP routers do?• Some details:

– The internals of a “best-effort” router• Lookup, buffering and switching

– The internals of a “QoS” router• Can optics help?

Page 3: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

3

Outline (next time)

• The way routers are really built.• Evolution of their internal workings.• What limits their performance.• The effect that DWDM is having on

switch/router design.• The way the network is built today.• Discussion: The scope for optics

Page 4: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

4

Outline• Where IP routers sit in the network• What IP routers look like• What do IP routers do?• Some details:

– The internals of a “best-effort” router• Lookup, buffering and switching

– The internals of a “QoS” router• Can optics help?

Page 5: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

5

The Internet is a mesh of routers (in theory)

The Internet Core

IP Core router

IP Edge Router

Page 6: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

6

What do they look like?

Access routerse.g. ISDN, ADSL

Core routere.g. OC48c POS

Core ATM switch

Page 7: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

7

Basic Architectural Components

of an IP Router

Control Plane

Datapath”per-packet processing

SwitchingForwardingTable

Routing Table

Routing Protocols

Page 8: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

8

Per-packet processing in an IP Router

1. Accept packet arriving on an incoming link.2. Lookup packet destination address in the

forwarding table, to identify outgoing port(s).

3. Manipulate packet header: e.g., decrement TTL, update header checksum.

4. Send packet to the outgoing port(s).5. Buffer packet in the queue.6. Transmit packet onto outgoing link.

Page 9: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

9

Outline• Where IP routers sit in the network• What IP routers look like• What do IP routers do?• Some details:

– The internals of a “best-effort” router• Lookup, buffering and switching

– The internals of a “QoS” router• Can optics help?

Page 10: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

10

Basic Architectural Components

Datapath: per-packet processing2. Interconnect 3. EgressForwardin

gTable

ForwardingDecision

1. Ingress

Forwarding

Table

ForwardingDecision

Forwarding

Table

ForwardingDecision

Page 11: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

11

Forwarding Engine

header

payloadPacket

Router

Destination Address

Outgoing Port

Dest-network PortForwarding Table

Routing Lookup Data Structure

65.0.0.0/8128.9.0.0/16

149.12.0.0/19

31

7

Page 12: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

12

The Search Operation is not a Direct Lookup

(Incoming port, label)

Addre ss MemoryDat a

(Outgoing port, label)

IP addresses: 32 bits long 4G entries

Page 13: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

13

The Search Operation is also not an Exact Match Search

• Hashing • Balanced binary search trees

Exact match search: search for a key in a collection of keys of the same length.

Relatively well studied data structures:

Page 14: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

14

0 224 232-1

128.9.0.0/16

65.0.0.0

142.12.0.0/1965.0.0.0/8

65.255.255.255

Example Forwarding Table Destination IP Prefix Outgoing Port65.0.0.0/8 3128.9.0.0/16 1142.12.0.0/19 7

IP prefix: 0-32 bits

Prefix length

128.9.16.14

Page 15: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

15

Prefixes can Overlap

128.9.16.0/21 128.9.172.0/21

128.9.176.0/24

Routing lookup: Find the longest matching prefix (aka the most specific route) among all prefixes that match the destination address.

0 232-1

128.9.0.0/16142.12.0.0/1965.0.0.0/8

128.9.16.14

Longest matching prefix

Page 16: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

16

8

32

24

Prefixes

Prefi

x Le

ngth

128.9.0.0/16142.12.0.0/19

65.0.0.0/8

Difficulty of Longest Prefix Match

128.9.16.14

128.9.172.0/21

128.9.176.0/24

128.9.16.0/21

Page 17: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

17

Lookup Rate Required

12540.0OC768c2002-0331.2510.0OC192c2000-017.812.5OC48c1999-001.940.622OC12c1998-99

40B packets (Mpps)

Line-rate (Gbps)

LineYear

DRAM: 50-80 ns, SRAM: 5-10 ns

31.25 Mpps 33 ns

Page 18: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

18

0100002000030000400005000060000700008000090000

100000

Size of the Forwarding Table

Source: http://www.telstra.net/ops/bgptable.html

95 96 97 98 99 00Year

Num

ber o

f Pre

fixes

10,000/year

Page 19: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

19

Basic Architectural Components

Datapath: per-packet processing2. Interconnect 3. EgressForwardin

gTable

ForwardingDecision

1. Ingress

Forwarding

Table

ForwardingDecision

Forwarding

Table

ForwardingDecision

Page 20: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

20

InterconnectsTwo basic techniques

Input Queueing Output Queueing

Usually a non-blockingswitch fabric (e.g. crossbar)

Usually a fast bus

Page 21: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

21

InterconnectsOutput Queueing

Individual Output Queues Centralized Shared Memory

Memory b/w = (N+1).R

1

2

N

Memory b/w = 2N.R

1

2

N

Page 22: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

22

Output 2

Output N

InterconnectsCentralized Shared Memory

Large, single dynamically allocated memory buffer:N writes per “cell” timeN reads per “cell” time.

Limited by memory bandwidth.

Input 1 Output 1

Input N

Input 2

Numerous work has proven and made possible:– Fairness– Delay Guarantees– Delay Variation Control– Loss Guarantees– Statistical Guarantees

Page 23: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

23

Output QueueingHow fast can we make centralized shared memory?

SharedMemory

200 byte bus

5ns SRAM

1

2

N

• 5ns per memory operation• Two memory operations per packet• Therefore, up to 160Gb/s• In practice, closer to 80Gb/s

Page 24: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

24

InterconnectsInput Queueing with Crossbar

configuration

Data

In

Data Out

ArbiterMemory b/w = 2R

Page 25: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

25

Input QueueingHead of Line Blocking

Del

ay

Load58.6% 100%

Page 26: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

26

Head of Line Blocking

Page 27: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

27

Input QueueingVirtual output queues

Page 28: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

28

Input QueueingVirtual Output Queues

Del

ay

Load 100%

Page 29: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

29

Input QueueingVirtual output queues

Arbiter

Memory b/w = 2R

Complex!

Page 30: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

30

Other Non-Blocking FabricsClos Network

Page 31: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

31

Other Non-Blocking FabricsClos Network

Expansion factor required = 2-1/N

Page 32: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

32

Other Non-Blocking FabricsSelf-Routing Networks

000001

010011

100101

110111

000001

010011

100101

110111

Page 33: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

33

Other Non-Blocking FabricsSelf-Routing Networks

37526014

72356104

75231064

70513426

74560312

76453202

76543210

000001010011100101110111

Bitonic Sorter Self-Routing Network

The Non-blocking Batcher Banyan Network

• Fabric can be used as scheduler. •Batcher-Banyan network is blocking for multicast.

Page 34: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

34

Outline• Where IP routers sit in the network• What IP routers look like• What do IP routers do?• Some details:

– The internals of a “best-effort” router• Lookup, buffering and switching

– The internals of a “QoS” router• Can optics help?

Page 35: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

35

Basic Architectural Components

OutputScheduling

Control Plane

Datapath”per-packet processing

SwitchingForwardingTable

ReservationAdmissionControl Routing

Table

Routing Protocols

Policing& AccessControl

PacketClassification

Ingress EgressInterconnect

1. 2. 3.

Page 36: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

36

Basic Architectural Components

Datapath: per-packet processing2. Interconnect 3. EgressForwardin

gTable

ClassifierTable

Policing &AccessControl

ForwardingDecision

1. Ingress

Forwarding

Table

ClassifierTable

Policing &AccessControl

ForwardingDecision

Forwarding

Table

ClassifierTable

Policing &AccessControl

ForwardingDecision

Limitation: Memory b/w Limitation: Interconnect b/w Power & Arbitration

Limitation: Memory b/w

Page 37: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

37

Outline• Where IP routers sit in the network• What IP routers look like• What do IP routers do?• Some details:

– The internals of a “best-effort” router• Lookup, buffering and switching

– The internals of a “QoS” router• Can optics help?

Page 38: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

38

Can optics help?

Cynical view:1. A packet switch (e.g. an IP router)

must have buffering.2. Optical buffering is not feasible.3. Therefore, optical routers are not

feasible.4. Hence, “optical switches” are circuit

switches (e.g. TDM, space or Lambda switches).

Page 39: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

39

Can optics help?

Open-minded view:• Optics seem ill-suited to processing

intensive functions, or where random access memory is required.

• Optics seems well-suited to bufferless, reconfigurable datapaths.

Page 40: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

40

Can optics help?

PhysicalLayer

Framing&

Maintenance

PacketProcessing

Buffer Mgmt&

Scheduling

Buffer Mgmt&

Scheduling

Buffer & StateMemory

Buffer & StateMemory

Typical IP Router Linecard

OC192c linecard:~10-30M gates~2Gbits of memory~2 square feet>$10k cost

LookupTables

Backplane

Buffered orBufferless

Fabric

Arbitration

Page 41: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

41

Can optics help?

• Linecard?– The linecard is processing & memory

intensive.• Interconnect?

– Arbitration is very processing intensive.– The fabric can be a bufferless datapath…– How fast can an optical datapath be

reconfigured?

Page 42: 1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown

42

Outline for next time…

• The way IP routers are really built.• Evolution of their internal workings.• What limits their performance.• The effect that DWDM is having on

switch/router design.• The way the network is built today.• Discussion: The scope for optics