Switching Hardware 10/11/06 CS/ECE 438 - UIUC, Fall 2006 1 Switch - - PowerPoint PPT Presentation

switching hardware
SMART_READER_LITE
LIVE PREVIEW

Switching Hardware 10/11/06 CS/ECE 438 - UIUC, Fall 2006 1 Switch - - PowerPoint PPT Presentation

Switching Hardware 10/11/06 CS/ECE 438 - UIUC, Fall 2006 1 Switch Design Chicago Bloomington Champaign Indianapolis Springfield Effingham St. Louis 10/11/06 CS/ECE 438 - UIUC, Fall 2006 2 Switch Design Chicago Bloomington Champaign


slide-1
SLIDE 1

10/11/06 CS/ECE 438 - UIUC, Fall 2006 1

Switching Hardware

slide-2
SLIDE 2

10/11/06 CS/ECE 438 - UIUC, Fall 2006 2

Switch Design

Champaign Effingham Springfield Bloomington

  • St. Louis

Indianapolis Chicago

slide-3
SLIDE 3

10/11/06 CS/ECE 438 - UIUC, Fall 2006 2

Switch Design

Champaign Effingham Springfield Bloomington

  • St. Louis

Indianapolis Chicago

slide-4
SLIDE 4

10/11/06 CS/ECE 438 - UIUC, Fall 2006 2

Switch Design

Champaign Effingham Springfield Bloomington

  • St. Louis

Indianapolis Chicago

How should we design Champaign to accommodate traffic flows?

slide-5
SLIDE 5

10/11/06 CS/ECE 438 - UIUC, Fall 2006 2

Switch Design

Champaign Effingham Springfield Bloomington

  • St. Louis

Indianapolis Chicago

How should we design Champaign to accommodate traffic flows?

slide-6
SLIDE 6

10/11/06 CS/ECE 438 - UIUC, Fall 2006 3

Contention

slide-7
SLIDE 7

10/11/06 CS/ECE 438 - UIUC, Fall 2006 3

Contention

 Bridges: same collision domain

If an output port is busy when forwarding packet from input port, cause collision

slide-8
SLIDE 8

10/11/06 CS/ECE 438 - UIUC, Fall 2006 3

Contention

 Bridges: same collision domain

If an output port is busy when forwarding packet from input port, cause collision

 Switches: different collision domain

Use CSMA/CD before sending packet onward

slide-9
SLIDE 9

10/11/06 CS/ECE 438 - UIUC, Fall 2006 3

Contention

 Bridges: same collision domain

If an output port is busy when forwarding packet from input port, cause collision

 Switches: different collision domain

Use CSMA/CD before sending packet onward

 Buffer packets

When output port is busy

When multiple packets are destined for same

  • utput port
slide-10
SLIDE 10

10/11/06 CS/ECE 438 - UIUC, Fall 2006 4

Switch Design

Input Port Input Port Input Port Input Port Input Port Input Port Output Port Output Port Output Port Output Port Output Port Output Port

Switch Fabric

slide-11
SLIDE 11

10/11/06 CS/ECE 438 - UIUC, Fall 2006 5

Contention – Output Port Buffering

B A irate Bob writing complaint letter in triplicate Alice waiting to return penny given in error trying to buy food you standard checkout lines customer service 1x6 switch

slide-12
SLIDE 12

10/11/06 CS/ECE 438 - UIUC, Fall 2006 6

Contention – Input Port Buffering

standard checkout lines customer service B A irate Bob writing complaint letter in triplicate Alice waiting to return penny given in error trying to buy food you 1x6 switch head-of-line blocking

slide-13
SLIDE 13

10/11/06 CS/ECE 438 - UIUC, Fall 2006 6

Contention – Input Port Buffering

standard checkout lines customer service B A irate Bob writing complaint letter in triplicate Alice waiting to return penny given in error trying to buy food you 1x6 switch head-of-line blocking cashiers are standing by!

slide-14
SLIDE 14

10/11/06 CS/ECE 438 - UIUC, Fall 2006 7

Contention – Output Port Contention

B irate Bob writing complaint letter in triplicate Alice waiting to return penny given in error you A waiting to complain about head-of-line blocking standard checkout lines customer service 1x6 switch

slide-15
SLIDE 15

10/11/06 CS/ECE 438 - UIUC, Fall 2006 8

Contention – Buffering Capacity

B you buffering capacity per output is finite A (others turned away at door) standard checkout lines customer service 1x6 switch

slide-16
SLIDE 16

10/11/06 CS/ECE 438 - UIUC, Fall 2006 9

Contention – Back Pressure

 Let the receiver tell the sender to slow down

Propagation delay requires that the receiver react before the buffer is full

Typically used in networks with small propagation delay switch 1 switch 2 “no more, please”

slide-17
SLIDE 17

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

Switch

slide-18
SLIDE 18

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

1 Switch

slide-19
SLIDE 19

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

2 1 Switch

slide-20
SLIDE 20

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

3 2 1 Switch

slide-21
SLIDE 21

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

4 3 2 1 Switch

slide-22
SLIDE 22

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

5 4 3 1 2 Switch

slide-23
SLIDE 23

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

6 5 4 1 2 3 stop Switch

slide-24
SLIDE 24

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

1 2 3 4 7 6 5 stop Switch

slide-25
SLIDE 25

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

1 2 3 4 5 8 7 6 stop Switch

slide-26
SLIDE 26

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

1 2 3 4 5 6 9 8 7 Switch

slide-27
SLIDE 27

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

1 2 3 4 5 6 9 8 7 Discard: Switch

slide-28
SLIDE 28

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

9 1 2 3 4 5 6 8 Discard: Switch

slide-29
SLIDE 29

10/11/06 CS/ECE 438 - UIUC, Fall 2006 10

Contention – Back Pressure

 NOTE

Propagation delay requires that switch 2 exert backpressure at high-water mark rather when buffer completely full. Backpressure is thus typically only used in networks with small propagation delays (e.g., switch fabrics). Switch

9 Discard: 1 2 3 4 5 6 Switch

slide-30
SLIDE 30

10/11/06 CS/ECE 438 - UIUC, Fall 2006 11

Switch Design Goals

 Throughput

 Number of packets a switch can forward

per second

 Scalability

 How many input/output ports can it

connect

 Cost

 Per port monetary costs

slide-31
SLIDE 31

10/11/06 CS/ECE 438 - UIUC, Fall 2006 12

Special Purpose Switches

 Problem

Connect N inputs to M outputs

NxM (“N by M”) switch

Often N = M  Goals

High throughput

Best is MIN(sum of inputs, sum of outputs)

Avoid contention

Good scalability

Linear size/cost growth

slide-32
SLIDE 32

10/11/06 CS/ECE 438 - UIUC, Fall 2006 13

Switch Design

 Ports handle complexity

 Forwarding decisions  Buffering

 Simple fabric

 Move packets from inputs to outputs  May have a small amount of internal

buffering

slide-33
SLIDE 33

10/11/06 CS/ECE 438 - UIUC, Fall 2006 14

Switch Design Goals

 Throughput

Main problem is contention

Need a good traffic model

Arrival time

Destination port

Packet length

Telephony modeling is well understood

Until faxes and modems

Modeling of data traffic is new

Not well understood

Will good models help?

slide-34
SLIDE 34

10/11/06 CS/ECE 438 - UIUC, Fall 2006 15

Switch Design Goals

 Contention

Avoid contention through intelligent buffering

Use output buffering when possible

Apply back pressure through switch fabric

Improve input buffering through non-FIFO buffers

Reduces head-of-line blocking

Drop packets if input buffers overflow

slide-35
SLIDE 35

10/11/06 CS/ECE 438 - UIUC, Fall 2006 16

Switch Design Goals

 Scalability

 O(N) ports  Port design complexity O(N) gives O(N2)

for entire switch

 Port design complexity of O(1) gives

O(N) for entire switch

slide-36
SLIDE 36

10/11/06 CS/ECE 438 - UIUC, Fall 2006 17

Switch Design

 Crossbar switches  Banyan Networks  Batcher Networks  Sunshine Switch

slide-37
SLIDE 37

10/11/06 CS/ECE 438 - UIUC, Fall 2006 18

Crossbar Switch

 Every input port is connected to every

  • utput port

 NxN

 Output ports

 Complexity scales as O(N2)

slide-38
SLIDE 38

10/11/06 CS/ECE 438 - UIUC, Fall 2006 19

Crossbar Switch

Output Port Output Port Output Port Output Port

slide-39
SLIDE 39

10/11/06 CS/ECE 438 - UIUC, Fall 2006 20

Knockout Switch

Assumption:

It is unlikely that N inputs will have packets destined for the same output port

Pick L from N packets at a port

Output port maintains L cyclic buffers

Shifter places up to L packets in one cycle

Each buffer gets only one packet

Output port uses round-robin between buffers

Arrival order is maintained

Problem

Hot spots

Output ports scale as O(N)

slide-40
SLIDE 40

10/11/06 CS/ECE 438 - UIUC, Fall 2006 21

Knockout Switch

 Output port design

Packet filters

Recognize packets destined for a specific port

Concentrator

Selects up to L packets from those destined for this port

Discards excess packets

Queue

Length L

slide-41
SLIDE 41

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4

slide-42
SLIDE 42

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4 What happens if more than L arrive?

slide-43
SLIDE 43

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4 What happens if more than L arrive? 1 2 3 4

slide-44
SLIDE 44

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4 What happens if more than L arrive? 1 2 3 4

slide-45
SLIDE 45

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4 What happens if more than L arrive? Discard 1 2 3 4

slide-46
SLIDE 46

10/11/06 CS/ECE 438 - UIUC, Fall 2006 22

Knockout Switch

R R R D R R D R 2x2 random selector Delay unit Choose L of N Ex: 2 of 4 What happens if more than L arrive? Choice 1 Choice 2 Discard 1 3 4

slide-47
SLIDE 47

10/11/06 CS/ECE 438 - UIUC, Fall 2006 23

Self-Routing Fabrics

 Idea

Use source routing on “network” in switch

Input port attaches output port number as header

Fabric routes packet based on output port

 Types

Banyan Network

Batcher-Banyan Network

Sunshine Switch

slide-48
SLIDE 48

10/11/06 CS/ECE 438 - UIUC, Fall 2006 24

Banyan Network

 A network of 2x2 switches

 Each element routes to output 0 or 1

based on packet header

 A switch at stage i looks at bit i in the

header

1

slide-49
SLIDE 49

10/11/06 CS/ECE 438 - UIUC, Fall 2006 24

Banyan Network

 A network of 2x2 switches

 Each element routes to output 0 or 1

based on packet header

 A switch at stage i looks at bit i in the

header

1

00100

slide-50
SLIDE 50

10/11/06 CS/ECE 438 - UIUC, Fall 2006 24

Banyan Network

 A network of 2x2 switches

 Each element routes to output 0 or 1

based on packet header

 A switch at stage i looks at bit i in the

header

1

00100

slide-51
SLIDE 51

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

slide-52
SLIDE 52

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111

slide-53
SLIDE 53

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111

slide-54
SLIDE 54

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111 001 011 110 111

slide-55
SLIDE 55

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111

slide-56
SLIDE 56

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111 001 011 110 111

slide-57
SLIDE 57

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111

slide-58
SLIDE 58

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111 001 011 110 111

slide-59
SLIDE 59

10/11/06 CS/ECE 438 - UIUC, Fall 2006 25

Banyan Network

001 011 110 111 001 011 110 111

slide-60
SLIDE 60

10/11/06 CS/ECE 438 - UIUC, Fall 2006 26

Banyan Network

 Perfect Shuffle

N inputs requires log2N stages of N/2 switching elements

Complexity on order of N log2N

 Collisions

If two packets arrive at the same switch destined for the same output port, a collision will occur

If all packets are sorted in ascending order upon arrival to a banyan network, no collisions will

  • ccur!
slide-61
SLIDE 61

10/11/06 CS/ECE 438 - UIUC, Fall 2006 27

Batcher Network

 Performs merge sort  A network of 2x2 switches

Each element routes to output 0 or 1 based on packet header

A switch at stage i looks at the whole header

Two types of switches

Up switch

Sends higher number to top output (0)

Down switch

Sends higher number to bottom output (1)

slide-62
SLIDE 62

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D

slide-63
SLIDE 63

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D 7 3 6 1

slide-64
SLIDE 64

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort 7 3 6 1

slide-65
SLIDE 65

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort 7 3 6 1 7 3 6 1

slide-66
SLIDE 66

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort 7 3 6 1 7 3 6 1 Merge 7 3 6 1

slide-67
SLIDE 67

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort 7 3 6 1 7 3 6 1 3 7 6 1 Merge 7 3 6 1

slide-68
SLIDE 68

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort Merge 6 3 1 7 7 3 6 1 7 3 6 1 3 7 6 1 Merge 7 3 6 1

slide-69
SLIDE 69

10/11/06 CS/ECE 438 - UIUC, Fall 2006 28

Batcher Network

D D D U D D Sort Merge 6 3 1 7 7 3 6 1 7 3 6 1 3 7 6 1 1 7 3 6 Merge 7 3 6 1

slide-70
SLIDE 70

10/11/06 CS/ECE 438 - UIUC, Fall 2006 29

Batcher Network

slide-71
SLIDE 71

10/11/06 CS/ECE 438 - UIUC, Fall 2006 29

Batcher Network

D D D U D D

slide-72
SLIDE 72

10/11/06 CS/ECE 438 - UIUC, Fall 2006 29

Batcher Network

U U U D U U D D D U D D

slide-73
SLIDE 73

10/11/06 CS/ECE 438 - UIUC, Fall 2006 29

Batcher Network

U U U D U U D D D U D D D D D D D D D D D D D D

slide-74
SLIDE 74

10/11/06 CS/ECE 438 - UIUC, Fall 2006 30

Batcher Network

 How it really works

Merger is presented with a pair of sorted lists,

  • ne in ascending order, one in descending order

First stage of merger sends packets to the correct half of the network

Second stage sends them to the correct quarter

 Size

N/2 switches per stage

log2N x (1 + log2N)/2 stages

Complexity = N log2

2N

slide-75
SLIDE 75

10/11/06 CS/ECE 438 - UIUC, Fall 2006 31

Batcher-Banyan Network

Idea

Attach a batcher network back-to-back with a banyan network

Arbitrary unique permutations can be routed without contention

Two packets destined for same output port still collide!

Sunshine Switch

Like a knockout switch

Can handle up to L packets per output port

Recirculates overflow packets

If more than L packets arrive for any output port in one cycle

slide-76
SLIDE 76

10/11/06 CS/ECE 438 - UIUC, Fall 2006 32

Sunshine Switch

Elements

Multiple Banyan networks

Enables multiple packets per output port

Delay Box

Excess (K) packets are recirculated and resubmitted to the switch

Batcher network

N new packets

K delayed packets

Trap

Identifies packets destined for banyan

Identifies excess packets

Selector

Routes multiple packets for same output on separate banyans

slide-77
SLIDE 77

10/11/06 CS/ECE 438 - UIUC, Fall 2006 33

Sunshine Switch

Batcher Trap Selector L Banyans Delay Inputs n n+k n+k n n n n n n k k

slide-78
SLIDE 78

10/11/06 CS/ECE 438 - UIUC, Fall 2006 34

Invariants

 Batcher

All packets are sorted by destination

 Trap

Compares line i with line i+L, marks i+L for recirculation if address equal

 Selector

Another batcher network, sorting based on the recirculation bit

 Banyan

Alternate every L lines to each Banyan

slide-79
SLIDE 79

10/11/06 CS/ECE 438 - UIUC, Fall 2006 35

Sunshine Switch

 Can packets circulate for ever?

 Priority bit is used to favor older packets  Priority bit also ensure packet order is

preserved through the switch