an introduction to packet switching

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

Post on 11-Feb-2016

17 views

Category:

Documents


0 download

DESCRIPTION

An Introduction to Packet Switching . Nick McKeown Assistant Professor of Electrical Engineering and Computer Science, Stanford University [email protected] http://www.stanford.edu/~nickm. Sir William Preece, Chief of the British Postal System, 1876: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: An Introduction to Packet Switching

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.

An Introduction to PacketSwitching

Nick McKeownAssistant Professor of Electrical Engineering and Computer Science, Stanford [email protected]://www.stanford.edu/~nickm

Page 2: An Introduction to Packet Switching

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

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 4: An Introduction to Packet Switching

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 Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 5: An Introduction to Packet Switching

Basic Architectural Components

PolicingOutput

SchedulingSwitching

RoutingCongestion

ControlReservationAdmission

ControlControl

Datapath:per-packet processing

Page 6: An Introduction to Packet Switching

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

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

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 Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 9: An Introduction to Packet Switching

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

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

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

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 Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 13: An Introduction to Packet Switching

First Generation Packet Switches

Shared Backplane

Line Interface

CPUMemory

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

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

Third Generation Packet Switches

LineCard

MAC

LocalBuffer

Memory

CPUCard

LineCard

MAC

LocalBuffer

Memory

Switched Backplane

Line Interface

CPUMemory

Page 16: An Introduction to Packet Switching

Fourth Generation Packet Switches

Page 17: An Introduction to Packet Switching

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 18: An Introduction to Packet Switching

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

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

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 s1 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 ns10 Gb/s 640 Gb/s 0.8 ns 20 Gb/s 21.2 ns

Page 21: An Introduction to Packet Switching

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

Buffer MemoryIs It Going to Get Better?

time

Specmarks,Memory size,Gate density

time

MemoryBandwidth

(to core)

Page 23: An Introduction to Packet Switching

Progression

Shared Memory

InputQueued

Combined Input and

Output QueuedParallelPacket

Switches37526014

72356104

75231064

70513426

74560312

76453202

76543210

000001010011100101110111

Batcher Sorter Self-Routing Network

Multistage

Page 24: An Introduction to Packet Switching

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 25: An Introduction to Packet Switching

Input Queueing

configuration

Data

In

Data Out

Scheduler

Memory b/w = 2R

Page 26: An Introduction to Packet Switching

Input QueueingHead of Line Blocking

Del

ay

Load58.6% 100%

Page 27: An Introduction to Packet Switching

Head of Line Blocking

Page 28: An Introduction to Packet Switching
Page 29: An Introduction to Packet Switching
Page 30: An Introduction to Packet Switching

Input QueueingVirtual output queues

Page 31: An Introduction to Packet Switching

Input QueuesVirtual Output Queues

Del

ay

Load 100%

Proof by Lyapunov function

Page 32: An Introduction to Packet Switching

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 33: An Introduction to Packet Switching

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

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

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

Using Speedup

1

1

1

2

2

Page 37: An Introduction to Packet Switching

The Ideal Solution

N N

Output Queued Switch1

N= ?

Combined Input-Output Queued Switch1

N

Page 38: An Introduction to Packet Switching

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

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements

Page 40: An Introduction to Packet Switching

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

Approach #1: Ping-pong Buffering

BufferMemory

64-byte wide bus

BufferMemory

64-byte wide bus

Page 42: An Introduction to Packet Switching

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

Approach #2: Multiple Parallel Buffers

aka Banking, Interleaving

BufferMemoryBuffer

MemoryBuffer

MemoryBuffer

Memory

Page 44: An Introduction to Packet Switching

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

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

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

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

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

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

451

2

3

4

1234115

Page 50: An Introduction to Packet Switching

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

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

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

Precise Emulation of an FCFS Shared Memory Switch

N N

Shared Memory1

N

Parallel Packet Switch

= ?

1

N

1

N

Page 54: An Introduction to Packet Switching

An asideUnbuffered Clos Circuit Switch

Expansion factor required = 2-1/N

Page 55: An Introduction to Packet Switching

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

Page 56: An Introduction to Packet Switching

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-1Worst-case: |UIL(Ii) U UOL(Oi)| = 2m -2Therefore, if R >= 2m-2 there are always enough middle stages.

Page 57: An Introduction to Packet Switching

An asideUnbuffered Clos Circuit Switch

Expansion factor required = 2-1/N

Page 58: An Introduction to Packet Switching

Outline

• IntroductionWhat is a packet-switch?

• The Memory Bandwidth Problem• Input-Queued Switches

Reducing memory bandwidth requirements• Combined Input-Output Queued Switches

Making input-queued switches useful• Parallel Packet Switches

Further reducing memory b/width requirements