an introduction to packet switching nick mckeown assistant professor of electrical engineering and...

58
An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University [email protected] http://www.stanford.edu/~nickm

Upload: emery-young

Post on 14-Jan-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

High PerformanceSwitching and RoutingTelecom Center Workshop: Sept 4, 1997.

An Introduction to PacketSwitching

Nick McKeownAssistant Professor of Electrical Engineering and Computer Science, Stanford University

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

Page 2: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Sir William Preece, Chief of the British Postal System, 1876:

“The Americans may have need of the telephone, but we do not. We have plenty of messenger boys.”

Page 3: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 4: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

IntroductionWhat is a Packet Switch?

• IntroductionWhat is a packet-switch?

– Basic Architectural Components– Some Example Packet Switches– The Evolution of IP Routers

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 5: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Basic Architectural Components

PolicingOutput

SchedulingSwitching

Routing

CongestionControl

ReservationAdmissionControl

Control

Datapath:per-packet processing

Page 6: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Basic Architectural Components

Datapath: per-packet processing

ForwardingDecision

ForwardingDecision

ForwardingDecision

Forwarding

Table

Forwarding

Table

Forwarding

Table

Interconnect

OutputScheduling

1.

2.

3.

Page 7: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Where high performance packet switches are used

Enterprise WAN access& Enterprise Campus Switch

- Carrier Class Core Router- ATM Switch- Frame Relay Switch

The Internet Core

Edge Router

Page 8: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

IntroductionWhat is a Packet Switch?

• IntroductionWhat is a packet-switch?

– Basic Architectural Components– Some Example Packet Switches– The Evolution of IP Routers

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 9: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

ATM Switch

• Lookup cell VCI/VPI in VC table.• Replace old VCI/VPI with new.• Forward cell to outgoing interface.• Transmit cell onto link.

Page 10: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Ethernet Switch

• Lookup frame DA in forwarding table.– If known, forward to correct port.– If unknown, broadcast to all ports.

• Learn SA of incoming frame.• Forward frame to outgoing

interface.• Transmit frame onto link.

Page 11: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

IP Router

• Lookup packet DA in forwarding table.– If known, forward to correct port.– If unknown, drop packet.

• Decrement TTL, update header Cksum.

• Forward packet to outgoing interface.

• Transmit packet onto link.

Page 12: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

IntroductionWhat is a Packet Switch?

• IntroductionWhat is a packet-switch?

– Basic Architectural Components– Some Example Packet Switches– The Evolution of IP Routers

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 13: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

First Generation Packet Switches

Shared Backplane

Line Interface

CPU

Memory

CPU BufferMemory

LineInterface

DMA

MAC

LineInterface

DMA

MAC

LineInterface

DMA

MAC

Fixed length “DMA” blocksor cells. Reassembled on egress

linecard

Fixed length cells or variable length packets

Page 14: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Second Generation Packet Switches

CPU BufferMemory

LineCard

DMA

MAC

LocalBuffer

Memory

LineCard

DMA

MAC

LocalBuffer

Memory

LineCard

DMA

MAC

LocalBuffer

Memory

Page 15: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Third Generation Packet Switches

LineCard

MAC

LocalBuffer

Memory

CPUCard

LineCard

MAC

LocalBuffer

Memory

Switched Backplane

Line Interface

CPUMem

ory

Page 16: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Fourth Generation Packet Switches

Page 17: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 18: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Two Basic Techniques

Input-queued Crossbar

Shared Memory

1+1 = 2 operations per cell time

N+N = 2N operations per cell time

Page 19: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Shared MemoryThe Ideal

A

ZZ

A

ZZZ

A

A

Z

A

ZPIKTD

AAAAAAA

FXHBAD

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

Page 20: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

A Comparison Memory speeds for 32x32 switch

Line Rate MemoryBW

Access TimePer cell

MemoryBW

Access Time

Shared-Memory Input-queued

100 Mb/s 6.4 Gb/s 80 ns 200 Mb/s 2.12 s

1 Gb/s 64 Gb/s 8 ns 2 Gb/s 212 ns

2.5 Gb/s 160 Gb/s 3.2 ns 5 Gb/s 84.8 ns

10 Gb/s 640 Gb/s 0.8 ns 20 Gb/s 21.2 ns

Page 21: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Buffer MemoryHow Fast Can I Make a Packet Buffer?

BufferMemory

5ns SRAM

Rough Estimate:– 5ns per memory operation.– Two memory operations per

packet.– Therefore, maximum

51.2Gb/s.

– In practice, closer to 40Gb/s.

64-byte wide bus 64-byte wide bus

Page 22: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Buffer MemoryIs It Going to Get Better?

time

Specmarks,Memory size,Gate density

time

MemoryBandwidth

(to core)

Page 23: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Progression

Shared Memory

InputQueued

Combined Input and

Output QueuedParallelPacket

Switches37526014

72356104

75231064

70513426

74560312

76453202

76543210

000001

010011

100101

110111

Batcher Sorter Self-Routing Network

Multistage

Page 24: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 25: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Input Queueing

configuration

Data

In

Data Out

Scheduler

Memory b/w = 2R

Page 26: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Input QueueingHead of Line Blocking

Dela

y

Load58.6% 100%

Page 27: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Head of Line Blocking

Page 28: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu
Page 29: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu
Page 30: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Input QueueingVirtual output queues

Page 31: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Input QueuesVirtual Output Queues

Dela

y

Load100%

Proof by Lyapunov function

Page 32: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 33: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

The Speedup Problem

Find a compromise: 1 < Speedup << N

- to get the performance of a shared memory switch- close to the cost of an IQ switch

Page 34: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Some Early Approaches

Probabilistic Analyses

- assume traffic models (Bernoulli, Markov-modulated,

Numerical Methods

- use actual and simulated traffic traces- run different algorithms - set the “speedup dial” at various values

non-uniform loading, “friendly correlated”)- obtain mean throughput and delays, bounds on tails- analyze different fabrics (crossbar, multistage, etc)

Page 35: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

The findings

Very tantalizing ...- under different settings (traffic, loading, algorithm, etc)- and even for varying switch sizes

A speedup of between 2 and 5 was sufficient!

Page 36: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Using Speedup

1

1

1

2

2

Page 37: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

The Ideal Solution

N N

Output Queued Switch1

N

= ?

Combined Input-Output Queued Switch1

N

Page 38: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Interesting Result

Theorem:For a switch with combined input and output queueing to exactly mimic an output queued switch, for all types of traffic, a speedup of 2-1/N is necessary and sufficient.

Joint work with Balaji Prabhakar, Ashish Goel and Shang-tse Chuang.

Page 39: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements

Page 40: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Optical Physical Layers……are Going to Make Things “Worse”

DWDM:– More ’s per fiber more ports per switch.– # ports: 16, …, 1000’s.

Data rate:– More b/s per higher capacity.– Data rates: 2.5Gb/s, 10Gb/s, 40Gb/s, 160Gb/s, …

Page 41: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Approach #1: Ping-pong Buffering

BufferMemory

64-byte wide bus

BufferMemory

64-byte wide bus

Page 42: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Approach #1: Ping-pong Buffering

BufferMemory

64-byte wide bus

BufferMemory

64-byte wide bus

Memory bandwidth doubled to ~80 Gb/s

Page 43: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Approach #2: Multiple Parallel Buffers

aka Banking, Interleaving

BufferMemory

BufferMemory

BufferMemory

BufferMemory

Page 44: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

The Fork Join Router

1

2

k

1

N

rate, R

rate, R

rate, R

rate, R

1

N

Router

Bufferless

Page 45: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

The Fork Join Router

• Advantages– kmemory bandwidth – klookup/classification rate – k routing/classification table size

• Problems– How to demultiplex prior to

lookup/classification?– How does the system perform/behave?– Can we predict/guarantee performance?

Page 46: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

A Parallel Packet Switch

1

N

rate, R

rate, R

rate, R

rate, R

1

N

OutputQueuedSwitch

OutputQueuedSwitch

OutputQueuedSwitch

1

2

k

Page 47: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchQuestions

1. Can it be work-conserving?2. Can it emulate a single big

shared memory switch?3. Can it support delay guarantees,

strict-priorities, WFQ, …?

Page 48: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchWork Conservation

rate, R1rate, R

1

2

k

1

R/k

R/k

R/k

R/k

R/k

R/k

Input LinkConstraint

Output LinkConstraint

Page 49: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchWork Conservation

rate, R1rate, R

1

2

k

1

R/k

R/k

R/k

R/k

R/k

R/k

1

2

3 Output LinkConstraint

45

1

2

3

4

1234115

Page 50: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchWork Conservation

1

N

rate, R

rate, R

rate, R

rate, R

1

N

OutputQueuedSwitch

OutputQueuedSwitch

OutputQueuedSwitch

1

2

k

S(R/k)

S(R/k)

S(R/k)

S(R/k)

S(R/k)

S(R/k)

Page 51: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchTheorems

1. If S > 2k/(k+2) 2 then a parallel packet switch can be work-conserving for all traffic.

2. If S > 2k/(k+2) 2 then a parallel packet switch can precisely emulate a FCFS output-queued switch for all traffic.

Page 52: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Parallel Packet SwitchTheorems

3. If S > 3k/(k+3) 3 then a parallel packet switch can be precisely emulate a switch with WFQ, strict priorities, and other types of QoS, for all traffic.

With Sundar Iyer and Amr Awadallah

Page 53: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Precise Emulation of an FCFS Shared Memory Switch

N N

Shared Memory

1

N

Parallel Packet Switch

= ?

1

N

1

N

Page 54: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

An asideUnbuffered Clos Circuit Switch

Expansion factor required = 2-1/N

Page 55: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Clos Network

I1

IX

a

b

c

O1

OXm {

}m

}m

m {

O1 O2 O3 Ox

I1 I2

I3 Ix

b

<= min(R,m) entries in each row <= min(R,m) entries in each column

R middlestage switches

Page 56: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Clos Network

I1

IX

ab

c

O1

OXm {

}m

}m

m {

O1 O2 O3 Ox

I1 I2

I3 Ix

b

<= min(R,m) entries in each row<= min(R,m) entries in each column

R middlestage switches

Define: UIL(Ii) = used links at switch Ii to connect to middle stages. UOL(Oi) = used links at switch Oi to connect to middle stages.

If we wish to connect Ii to Oi:

When adding connection: |UIL(Ii)| <= m-1 and |UOL(Oi)| <= m-1

Worst-case: |UIL(Ii) U UOL(Oi)| = 2m -2

Therefore, if R >= 2m-2 there are always enough middle stages.

Page 57: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

An asideUnbuffered Clos Circuit Switch

Expansion factor required = 2-1/N

Page 58: An Introduction to Packet Switching Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements

• Combined Input-Output Queued SwitchesMaking input-queued switches useful

• Parallel Packet SwitchesFurther reducing memory b/width requirements