switching hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., ethernet pause-based flow...

53
Spring 2019 © CS 438 Staff, University of Illinois 1 Switching Hardware

Upload: others

Post on 17-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 1

Switching Hardware

Page 2: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 2

Where are we?

n Understand¡ Different ways to move through a network

(forwarding)n Read signs at each switch (datagram)n Follow a known path (virtual circuit)n Carry instructions (source routing)

¡ Bridge approach to extending LAN conceptn Next: how switches are built and contention

within switches

Page 3: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 3

Switch Design

Champaign

Effingham

Springfield

Bloomington

St. Louis

Indianapolis

Chicago

How should we design Champaign to accommodate

traffic flows?

Page 4: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch architecture

Spring 2019 © CS 438 Staff, University of Illinois 4

Cisco Catalyst 6500

Juniper EX2200

Juniper EX8200

Page 5: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 5

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

Page 6: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch Architecture

n Problem

¡ Connect N inputs to M

outputs

n NxM (�N by M�) switch

n Common case: N = M

n Goals

¡ Avoid contention

¡ High throughput

¡ Good scalability

n Near-linear size/cost growth

Spring 2019 © CS 438 Staff, University of Illinois 6

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

Page 7: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch high level architecture

n Ports handle complexity¡ Forwarding decisions at

input ports¡ Buffering at output and

possibly input ports

n Simple fabric (it seems…)¡ Move packets from inputs to outputs¡ May have a small amount of internal buffering

Spring 2019 © CS 438 Staff, University of Illinois 7

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

Page 8: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch Design Goals

n Minimize Contention¡ Avoid contention through intelligent buffering¡ Use output buffering when possible¡ Apply back pressure through switch fabric¡ Improve input buffering through non-FIFO

buffersn Reduces head-of-line blocking

¡ Drop packets if input buffers overflow

Spring 2019 © CS 438 Staff, University of Illinois 8

Page 9: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch Design Goals

n Maximize Throughput¡ Main problem is contention¡ Need a good traffic model

n Arrival timen Destination portn Packet length

¡ Telephony modeling is well understoodn Until faxes and modems

¡ Data traffic has different propertiesn E.g., phone call arrivals are �Poisson�, but packet

arrivals are �heavy-tailed�Spring 2019 © CS 438 Staff, University of Illinois 9

Page 10: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 10

Contention

n Problem¡ Some packets may be destined for the same output port

n Solutions¡ One packet gets sent first¡ Other packets get delayed or dropped

n Delaying packets requires buffering¡ Buffers are finite, so we may still have to drop¡ Buffering at input ports

n Increases, adds false contentionn Sometimes necessary

¡ Buffering at output ports¡ Buffering inside switch

Page 11: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 11

Buffering

Waiting to buy foodWaiting for

Cust. service

standard checkout lines customer service

We need �buffering�, places where people can wait before they

get service

Page 12: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 12

Output Port Buffering

Waiting to buy food

standard checkout lines customer service

Waiting for

Cust. serviceHow big should buffers be?

à Should make sure we can hold enough

à But don�t want people to wait forever

Page 13: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch Design

Spring 2019 © CS 438 Staff, University of Illinois 13

Input Port 1

Input Port 2

Input Port 3

Input Port 4

Input Port 5

Input Port 6

Output Port 1

Output Port 2

Output Port 3

Output Port 4

Output Port 5

Output Port 6

Output Queues

Add output queues to hold packetsPacket remains queued here untiloutput port available to send

Page 14: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 14

Input Port Bufferingstandard checkout lines customer service

Waiting for Cust. servicePeople waiting to get

into the store

Waiting to buy food We also need buffering at the input, since processingcan be slower than input rate,

or delays at output

Page 15: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch Design

Spring 2019 © CS 438 Staff, University of Illinois 15

Input Port 1

Input Port 2

Input Port 3

Input Port 4

Input Port 5

Input Port 6

Output Port 1

Output Port 2

Output Port 3

Output Port 4

Output Port 5

Output Port 6

Input Queues

Output Queues

Add input queues to temporarily hold received packets until they can be processedPacket remains queued until input queue empties, until output queue has free slots

Page 16: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch design:putting the pieces together

Spring 2019 © CS 438 Staff, University of Illinois 16

Input Port 1

Input Port 2

Input Port 3

Input Port 4

Input Port 5

Input Port 6

Output Port 1

Output Port 2

Output Port 3

Output Port 4

Output Port 5

Output Port 6

Input Queues

Output Queues

InterconnectionNetwork

Page 17: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Switch design:putting the pieces together

Spring 2019 © CS 438 Staff, University of Illinois 17

Input Port 1

Input Port 2

Input Port 3

Input Port 4

Input Port 5

Input Port 6

Output Port 1

Output Port 2

Output Port 3

Output Port 4

Output Port 5

Output Port 6

Input Queues

Output Queues

InterconnectionNetwork

Packet remains queued until input queue empties andoutput queue 3 has free slots Packet remains queued until

output port available to send

Looks in forwarding table, finds output port 3 is associated with destination

Page 18: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 18

Contention – Head of Line Blocking

standard checkout lines customer service

cashiers are standing by!cashiers are standing by!cashiers are standing by!

People waiting to get into the store

waiting for free slots in cust. svc line �Head of line blocking�

slows throughput

Page 19: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Head of Line Blocking

Spring 2019 © CS 438 Staff, University of Illinois 19

Input Port 1

Input Port 2

Input Port 3

Input Port 4

Input Port 5

Input Port 6

Output Port 1

Output Port 2

Output Port 3

Output Port 4

Output Port 5

Output Port 6

Input Queues

Output Queues

Interconnectionnetwork:

�switch fabric�

Two packets with same outputport à contention

We can�t send this packet, even though it�s not contending for resources!

Page 20: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Unblocking head of line blocking

n Solution 1: No input queue¡ Switching fabric (hopefully) keeps up with input

raten Solution 2: No need to always serve packet

at head of queue. Could pick any!¡ Each input port has separate queue for each

output portn Next question: which packet do we pick?

Spring 2019 © CS 438 Staff, University of Illinois 20

Page 21: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Picking packets� ports

Spring 2019 © CS 438 Staff, University of Illinois 21

132

41

4

142

Input port 1

Input port 2

Input port 3

Input port 4

4Switching fabric

Output port 1

Output port 2

Output port 3

Output port 4

Page 22: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Picking packets� ports

n Underlying problem for max throughput in single timestep: bipartite matching¡ Pick max subset of edges using 1 edge per

nodeSpring 2019 © CS 438 Staff, University of Illinois 22

132

41

4

142

Input port 1

Input port 2

Input port 3

Input port 4

4Switching fabric

Output port 1

Output port 2

Output port 3

Output port 4

Page 23: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Picking packets� ports

n Switches may not find optimal solution: we also want¡ Fairness¡ Simplicity of implementation

Spring 2019 © CS 438 Staff, University of Illinois 23

132

41

4

142

Input port 1

Input port 2

Input port 3

Input port 4

4Switching fabric

Output port 1

Output port 2

Output port 3

Output port 4

Page 24: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

What we know so far

n Buffering masks temporary contentionn Need to carefully manage queues

¡ Head-of-line blocking problem¡ Fairness¡ Throughput

Spring 2019 © CS 438 Staff, University of Illinois 24

Page 25: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

What we know so far

n Did we completely solve contention problem? Could a packet ever be dropped?¡ Yes: queues can still overflow¡ Solution 1: plan allowed packet rates in

advance – virtual circuit switching¡ Solution 2: dynamically request rate

reduction – backpressure

Spring 2019 © CS 438 Staff, University of Illinois 25

Page 26: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 26

Contention – Back Pressure

n 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�

Page 27: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 27

Contention – Back Pressure

n Need to send backpressure before queue fills

n So, better when propagation delay small¡ e.g., switch fabrics¡ e.g., Ethernet pause-based flow control (IEEE

802.3x) used to run FibreChannel over Ethernet

Switch2 113 2 14 3 2

15 4 3

12 1234569 8 76 5 4

123stop

12347 6 5

stop12345

8 7 6

stop123456

9 8

7Discard:

9123456

8Discard: 9Discard:

123456Switch

Page 28: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 28

Switch Design Goals

n High Throughput¡ Number of packets a switch can forward

per secondn High Scalability

¡ How many input/output ports can it connect

n Low Cost¡ Per port monetary costs

Page 29: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Two simple fabrics

Spring 2019 © CS 438 Staff, University of Illinois 29

Two simple fabrics for very

large high-performance

switches!

Shared bus or memory:Low $, low throughput

Full mesh:High $, high throughput

Page 30: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 30

Special Purpose Switches

n Problem¡ Connect N inputs to M outputs

n NxM (�N by M�) switchn Often N = M

n Goals¡ High throughput

n Best is MIN(sum of inputs, sum of outputs)¡ Avoid contention¡ Good scalability

n Linear size/cost growth

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

Page 31: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 31

Switch Design

n Ports handle complexity¡ Forwarding decisions¡ Buffering

n Simple fabric¡ Move packets from inputs to outputs¡ May have a small amount of internal buffering

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

Page 32: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 32

Switch Design Goals

n Throughput¡ Main problem is contention¡ Need a good traffic model

n Arrival timen Destination portn Packet length

¡ Telephony modeling is well understoodn Until faxes and modems

¡ Modeling of data traffic is newn Not well understoodn Will good models help?

Page 33: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 33

Switch Design Goals

n Contention

¡ Avoid contention through intelligent buffering

¡ Use output buffering when possible

¡ Apply back pressure through switch fabric

¡ Improve input buffering through non-FIFO

buffers

n Reduces head-of-line blocking

¡ Drop packets if input buffers overflow

Page 34: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 34

Switch Design Goals

n 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

Page 35: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 35

Switch Design

n Crossbar Switchesn Banyan Networksn Batcher Networksn Sunshine Switch

Page 36: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 36

Crossbar Switch

n Every input port is connected to every output port¡ NxN

n Output ports¡ Complexity scales as O(N2)

Page 37: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 37

Crossbar Switch

Output Port

Output Port

Output Port

Output Port

Input Port

Input Port

Input Port

Input Port

Page 38: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 38

Knockout Switch

n Problem¡ Full crossbar requires each output port to handle up to N

input packetsn Assumption

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

n Instead¡ implement each port to handle L<N packets at the same

timen Challenges

¡ What value of L to use¡ Managing hotspots

Page 39: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 39

Knockout Switch

n Output port design¡ Packet filters

n Recognize packets destined for a specific port

¡ Concentratorn Selects up to L packets from those destined for this

portn �Knocks out� (discards) excess packets

¡ Queuen Length L

Page 40: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Knockout Switch

n Goal¡ Want some fairness¡ No single input should have its packets always �knocked out�

n Approach¡ Essentially a �knock out� tennis tournament with

each game of 2 players (packets) chosen randomly

¡ Overall winner is selected by playing log N rounds, and keeping the winner

Spring 2019 © CS 438 Staff, University of Illinois 40

Page 41: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Knockout Switch

n 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

n Output ports scale as O(N)

Spring 2019 © CS 438 Staff, University of Illinois 41

Page 42: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 42

Knockout Switch

R R

R

D

R

RD

R2x2

random selector

Delay unit

Choose L of NEx: 2 of 4

What happens if more than L

arrive?

1 2 3 4

Choice 1

Choice 2

Discard1

34

12

34

Discard1

234

Page 43: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 43

Self-Routing Fabrics

n Idea¡ Use source routing on �network� in switch¡ Input port attaches output port number as

header¡ Fabric routes packet based on output port

n Types¡ Banyan Network¡ Batcher-Banyan Network¡ Sunshine Switch

Page 44: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 44

Banyan Network

n 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

0100100

Page 45: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Banyan Network

Spring 2019 © CS 438 Staff, University of Illinois 45

101

101

101

01

01

01

01

01

01

01

01

01

01

01

01

Page 46: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 46

Banyan Network

001

011

110111

001

011

110

111

001

011

110

111

001

011

110111

Page 47: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 47

Banyan Network

n Perfect Shuffle¡ N inputs requires log2N stages of N/2 switching

elements¡ Complexity on order of N log2N

n 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 occur!

Page 48: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Collision in a Banyan Network

Spring 2019 © CS 438 Staff, University of Illinois 48

001

011

110

111

001

110

001

110

01

01

01

01

01

01

01

01

01

01

01

01

001

110

Collision!Happens becauseinput is unsorted

Page 49: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 49

Batcher Network

n Performs merge sort

n 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 switchesn Up switch

¡ Sends higher number to top output (0)

n Down switch¡ Sends higher number to bottom output (1)

U

D

Page 50: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 50

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

Page 51: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 51

Batcher Network

8x8Switch

D

D

D

U

D

D

U

U

U

D

U

U

D

D

D

D

D

D

D

D

D

D

D

D

Sort inputs 0 – 3 in ascending order

Sort inputs 4 – 7 in descending order

Merge 0 – 3 with 4 – 7

Page 52: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 52

Batcher Network

n How it really works¡ Merger is presented with a pair of sorted lists,

one 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

n Size¡ N/2 switches per stage¡ log2N x (1 + log2N)/2 stages¡ Complexity = N log2

2N

Page 53: Switching Hardware · 2019-02-20 · ¡ e.g., switch fabrics ¡ e.g., Ethernet pause-based flow control (IEEE 802.3x) used to run FibreChannel over Ethernet Switch 2134 123 12 1 5

Spring 2019 © CS 438 Staff, University of Illinois 53

Batcher-Banyan Network

n Idea¡ Attach a batcher network back-to-back with a

banyan network¡ Arbitrary unique permutations can be routed

without contention