44
Switching - Fabric An Engineering Approach to Computer Networking

Switching - Fabric An Engineering Approach to Computer Networking

Embed Size (px)

Citation preview

Page 1: Switching - Fabric An Engineering Approach to Computer Networking

Switching - Fabric

An Engineering Approach to Computer Networking

Page 2: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 2

Switching

Number of connections: from few (4 or 8) to huge (100K)

Page 3: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 3

Switching - Basic Assumptions

continuous streams

telephone connections no bursts no buffers

connections change

multicast

Blocking external internal

re-arrangeable strict sense non-blocking wide sense non-blocking

Page 4: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 4

Multiplexors and demultiplexors

Multiplexor: aggregates sessions N input lines Output runs N times as fast as input

Demultiplexor: distributes sessions

one input line and N outputs that run N times slower Can cascade multiplexors

Page 5: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 5

Time division switching Key idea: when demultiplexing, position in frame determines

output limk

Time division switching interchanges sample position within a frame: time slot interchange (TSI)

Page 6: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 6

Example - TSI

sessions: (1,2) (2,4) (3,1) (4,3)

4 3 2 12 4 1 3TSI

Page 7: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 7

TSI

Simple to build.

Multicast

Limit is the time taken to read and write to memory

For 120,000 circuits need to read and write memory once every 125 microseconds each operation takes around 0.5 ns => impossible with current

technology Need to look to other techniques

Page 8: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 8

Space division switching

Each sample takes a different path through the switch, depending on its destination

Page 9: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 9

Crossbar

Simplest possible space-division switch

Crosspoints can be turned on or off

Page 10: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 10

Crossbar - example

1

2

3

4

1 2 3 4

sessions: (1,2) (2,4) (3,1) (4,3)

Page 11: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 11

Crossbar

Advantages: simple to implement simple control strict sense non-blocking

Drawbacks number of crosspoints, N2

large VLSI space vulnerable to single faults

Page 12: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 12

Time-space switching

Precede each input trunk in a crossbar with a TSI

Delay samples so that they arrive at the right time for the space division switch’s schedule

2 1

4 3

MUX

MUX

1

2

3

4

Page 13: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 13

Time-Space: Example

2 1

3 4

2 1

4 3TSI

31

24

Internal speed = double link speed

time 1

time 2

Page 14: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 14

Finding the schedule

Build a graph nodes - input links session connects an input and output nodes.

Feasible schedule

Computing a schedule compute perfect matching.

Page 15: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 15

Time-space-time (TST) switching

Allowed to flip samples both on input and output trunk

Gives more flexibility => lowers call blocking probability

Page 16: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 16

Circuit switching - Space division

graph representation transmitter nodes receiver nodes internal nodes

Feasible schedule edge disjoint paths.

cost function number of crosspoints internal nodes

Page 17: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 17

Example

sessions: (1,3) (2,6) (3,1) (4,4) (5,2) (6,5)

Page 18: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 18

Clos Network

Clos(N, n , k)N - inputs/outputs;

nxk (N/n)x(N/n) kxn

N=6n=2k=2

3x3

3x3

2x2

2x2

2x2

2x2

2x2

2x2

Page 19: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 19

Clos Network - strict sense non-blocking

Holds for k >= 2n-1

Proof: Consider and idle input and output Input box connected to at most n-1 middle layer switches output box connected to at most n-1 middle layer switches There exists a "free" middle switch.

Page 20: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 20

Proof

Page 21: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 21

Example

Clos(8,2,3)

N=8n=2k=3

4x4

4x4

3x2

3x2

3x2

2x3

2x3

2x3

2x3 4x4 3x2

Page 22: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 22

Clos Network - rearrangable

Holds for k >= n

Proof: Consider all input and output find a perfect matching. route the perfect matching remaining network is Clos(N-n,n-1,k-1)

summary: smaller circuit weaker guarantee

Mulicast ?

Page 23: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 23

Rearrangable Clos Network – routing algorithm

Start at some arbitrary 2x2 input switch, and route it to its destination through the upper switch.

Route the other output port of the 2x2 switch you reached to its input port through the lower switch.

If the other port in the input switched you reached has not been routed yet, route it through the upper middle switch.

Otherwise, select an arbitrary input port switch that was not yet used, and repeat the procedure.

Page 24: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 24

Recursive constructions

N/2 x N/2

N/2 x N/2

.

.

.

.

.

.

1

n

1

n

Page 25: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 25

Algorithm Complexity

N routing steps for each level

Log n levels to do

===> N log n

Given parallel hardware: O(N) time

Page 26: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 26

Alternative View of the problem

A graph coloring problem:

Input/output switches = nodes

A match = link

Middle stage switches = colors

This is the well known “Coloring of bi-partite graph” problem.

Heuristics fail miserably!!!

Page 27: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 27

Another algorithm – matrix based

Specification matrix: Rows = input switches (n) Columns = middle switches (N/n = r) Content = output switches (1..n)

We need an algorithms that will fill up the matrix with a feasible routing: Same number cannot appear in the same column

Works also for CLOS with redundancy

Page 28: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 28

Algorithm Principle

For j=0,1,2,… balance the destination j among the columns

Challenges: efficiency termination

We describe an Algorithm by Lee, Hwang, and Carpinelli, T.COM. 44 (11), Nov 1996

Page 29: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 29

The Matrix Meaning

0

1

4x4

4x4

3x2

3x2

3x2

2x3

2x3

2x3

2x3 4x4 3x2

Page 30: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 30

Data Structures

(j,e), j=0,1,…n-1, e=0,1,…,r-1 :- the set of rows {i} such that sij=e

0(e), e=0,1,r-1 :- the set of columns {j} such that Si does not contain e

2(e), e=0,1,r-1 :- the set of columns {j} such that Si contains e at least twice

Page 31: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 31

AlgorithmInit: e=0

1. If 2(e) empty

ee+1if e=r stop; else goto 1

2. if 2(e)

j 1st element of 2(e)k 1st element of 0(e)

3. (simple swap)

i 1st element of (j,e)

if e< sik swap sij with sik

e’ sik

remove i from (j,e) and (k,e’)add i to (j,e’) and (k,e)if |(j,e)|=1 remove j from 2(e)if |(j,e’)|=1 remove j from 0(e’)if |(j,e’)|=2 add j to 2(e’)if |(k,e’)|=0 add k to 0(e’)if |(k,e’)|=1 remove k from 2(e’)remove k from 0(e)goto step 1

4. (Next Simple Swap)

If e> sik

i’ 2nd element of sik

repeat step 3 on i’

if e> si’k goto step 5

5. (Successive Swap)A. u e;

remove k from 0(u)if if |(j,u)|=2 remove j from 2(u)

B. v sik

swap sij with sik

remove i from (j,u) and (k,v)add i to (j,v) and (k,u)

C. if e<vif |(k,v)|=0 add k to 0(v)if |(k,v)|=1 remove k from 2(v)if |(j,v)|=1 remove j from 0(v)if |(j,v)|=2 add j to 2(v)goto step 1

D. if e>vuvgoto step 5B

Page 32: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 32

Algorithm Complexity

adding an element to a set, choosing/removing the 1st/2nd element from a set take O(1)

steps 5A 5B and 5D each take O(1) time

removing a generally positioned element from an r-set takes O(r) time step 5C time complexity is in O(r) [ 2(v)-{k}, 0(v)-{j} ]

the looping in step 5 does not contain step 5C, only 5B and 5D

the time complexity for step 5 is O(r)

Algorithm time complexity O(nr2)

Page 33: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 33

Recursive constructions - Benes Network

N/2 x N/2

N/2 x N/2

.

.

.

.

.

.

1

n

1

n

Page 34: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 34

Clos network size

Number of switching elements is given by

for k=n (rearrangeable non-blocking)

Optimal value for n is n=sqrt{2}N, which yields

22

22n

NNk

n

Nk

n

NknC

nNNn

n

NNnC

122 2

2

2/3)122( NC

Page 35: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 35

a lower bound for the number of switching elements? Assume we have 2x2 switching units.

We have N! switching permutation

Can we achieve this bound?

)log(33.1log2

144.1log

2!2

222

2

1

NNONNNNc

eNN NNC

Page 36: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 36

Example 16x16

Page 37: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 37

Benes Networks

Size: 2 log N –1 stages N/2 switches in each stage N log2 N –N/2

Rearrangeable Clos network with k=2 n=2

Symmetry

Example.

proof

Page 38: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 38

Strict Sense non-Blocking

N/2 x N/2

N/2 x N/2

.

.

.

.

.

.N/2 x N/2

Page 39: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 39

Cantor Networks

m copies of Benes network.

For m >= log N its strict sense non-blocking

Network size N log2 N

Example

Proof.

Page 40: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 40

Banyan

Self routing!

Size:

log2 N stages N/2 switches in each stage 0.5N log2 N elements This is less than the lower

bound!

Page 41: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 41

Banyan

111

110

Page 42: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 42

Other Banyans

Omega or

shuffle exchange

Page 43: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 43

How do deal with internal blocking in Banyan

speed – up

internal buffers

Batcher bitonic sorter

Page 44: Switching - Fabric An Engineering Approach to Computer Networking

April 3, 2000 Communication Networks 44