Professional Documents
Culture Documents
Lecture Note On Switch Architectures
Lecture Note On Switch Architectures
Function of Switch
Input 1
Input N
Output 1
Output N
Naive Way
Input 1
Input N
Output 1
Output N
Bus-Based Switch
Controller
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Priority
Waiting time
OPP destination(s)
Length of IPP queue
Token
Ring Switch
IPP
IPP
RI
RI
RI
RI
OPP
OPP
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Shared Memory
Crossbar Switch
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Input Port
Processor
Output Port
Processor
Controller
Output Buffering
Input Port
Output Port
Input Buffering
Output Port
Input Port
Bi-partite Matching
Stravation for
traffic(0 to 0 and 1 to
0)
Starvation free
No queue will be hold indefinitely
Simple to implement
Bufferless Crossbar
Centralized arbitrator is required
Arbitration complexity is O(N*N)
O(log2N) iterations of arbitration needed for high throughput
Buffered Crossbar
Simple scheduling algorithms
Ingress: O(1)
Egress: O(N)
Shared Memory
Comparisons (1)
Comparison (2)
Assume 10G for each port and packet size is 64 bytes.
Port multiplexing
Buffered multistage routing
Dynamic routing: Benes network
Static routing: Clos network
Port Multiplexing
IPP
OPP
IPP
OPP
High speed core can handles high speed links as well as low speed
Sharing of common circuitry
Reduced complexity in interconnection network
Better queueing performance for bursty traffic
Less fragmentation of bandwidth and memory
0000
0001
1000
0010
0011
1001
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1101
1111
Deflection Routing
3
4
1
2
4
1
2
2
3
2.
Interconnect
3.
Output
Scheduling
ATM Switches
Direct Lookup
Memory
Data
Address
VCI
(Port, VCI)
Ethernet Switches
Hashing
Memory
#1 #2 #3 #4
Search
Data
48
Hashing Function
16
#1 #2
CRC-16
Linked lists
Associated
Data
Hit?
Address
#1 #2 #3
Advantages
Simple
Expected lookup time can be small
Disadvantages
Non-deterministic lookup time
Inefficient use of memory
log2N
IP Router
Lookup
H
E
A
D
E
R
Destination
Address
Incoming
Packet
Forwarding Engine
Next Hop Computation
Forwarding Table
Destination Next Hop
----------------
----
Next Hop
Link
Router
Destination
Address
Lookup Data
Forwarding Engine
Outgoing
Port
Prefix length
142.12.0.0/19
Outgoing Port
3
1
7
Multiple Matching
Longest
matching prefix
128.9.176.0/24
128.9.16.0/21 128.9.172.0/21
65.0.0.0/8
128.9.0.0/16
128.9.16.14
142.12.0.0/19
232-1
Routing lookup: Find the longest matching prefix (or the most specific
route) among all prefixes that match the destination address.
Line
Line-rate
(Gbps)
40B packets
(Mpps)
1998-99
OC12c
0.622
1.94
1999-00
OC48c
2.5
7.81
2000-01
OC192c
10.0
31.25
2002-05
OC768c
40.0
125
31.25 Mpps 33 ns
DRAM: 50-80 ns, SRAM: 5-10 ns
100000
90000
80000
70000
60000
50000
10,000/year
40000
30000
20000
10000
0
95
96
97
Year
98
99
00
<
>
>
<
N entries
>
log2N
<
1
1
010
111
Number
Prefix Length
2.
Interconnect
3.
Output
Scheduling
First-Generation Routers
Buffer
Memory
CPU
DMA
DMA
DMA
Line
Interface
Line
Interface
Line
Interface
MAC
MAC
MAC
Second-Generation Routers
Buffer
Memory
CPU
DMA
DMA
DMA
Line
Card
Local
Buffer
Memory
Line
Card
Local
Buffer
Memory
Line
Card
Local
Buffer
Memory
MAC
MAC
MAC
Third-Generation Routers
Line
Card
CPU
Card
Line
Card
Local
Buffer
Memory
Local
Buffer
Memory
MAC
MAC
Switching Goals
Circuit Switches
A switch that can handle N calls has N logical inputs and N
logical outputs
N up to 200,000
Output blocking
no slot in output frame is available
Packet Switches
In a circuit switch, path of a sample is determined at
time of connection establishment. No need for header.
In a packet switch, packets carry a destination field or
label. Need to look up destination port on-the-fly.
Datagram switches: lookup based on destination address
Label switches: lookup based on labels
Output
trunk unavailable
Buffers
at input or output
Backpressure
if switch fabric doesnt have buffers, prevent packet from entering until
path is available
2.
Interconnect
3.
Output
Scheduling
Techniques in Queuing
Input Queueing
Output Queueing
Output Queueing
1
2
N
1
2
Memory b/w = (N+1).R
Input Queuing
Delay
Load
58.6%
100%
Delay
Load
100%
Classification
H
E
A
D
E
R
Incoming
Packet
Forwarding Engine
Packet Classification
Classifier (Policy Database)
Predicate
Action
----------------
----
Action
Field 2
Field k Action
Rule 1
152.163.190.69/ 21 152.163.80.11/ 32
UDP
A1
Rule 2
152.168.3.0/ 24
152.163.0.0/ 16
TCP
A2
Rule N
152.168.0.0/ 16
152.0.0.0/ 8
A NY
An
GivenaclassifierwithNrules,findtheactionassociated
withthehighestpriorityrulematchinganincomingpacket.