2. Introduction
What is a Packet Switch?
• Basic Architectural Components
• Some Example Packet Switches
Copyright 1999. All Rights Reserved 3
Basic Architectural Components
Datapath: per-packet processing
3.
1.
Output
Forwarding 2. Scheduling
Table
Interconnect
Forwarding
Decision
Forwarding
Table
Forwarding
Decision
Forwarding
Table
Forwarding
Decision
Copyright 1999. All Rights Reserved 4
2
3. Where high performance packet
switches are used
- Carrier Class Core Router
- ATM Switch
- Frame Relay Switch
The Internet Core
Edge Router Enterprise WAN access
& Enterprise Campus Switch
Copyright 1999. All Rights Reserved 5
Some Example Packet Switches
• Packet switches exist for different networking technologies
– Internet: IP protocol suite
– Ethernet: Ethernet switches
– ATM (Asynchronous Transfer Mode): ATM switch
– MPLS (Multiprotocol label switching): MPLS switch
• There are many similarities in the architecture of the switches
Copyright 1999. All Rights Reserved 6
3
4. Packet Lookup
Where does a packet go next?
• ATM and MPLS switches
– Direct Lookup
• Bridges and Ethernet switches
– Associative Lookup
– Hashing
• IP Routers
– Patricia trees/tries
Copyright 1999. All Rights Reserved 7
Lookup in an ATM Switch
• Lookup cell VCI/VPI in VC table.
• Replace old VCI/VPI with new.
• Forward cell to outgoing interface.
• Transmit cell onto link.
Copyright 1999. All Rights Reserved 8
4
5. Lookup in an 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.
Copyright 1999. All Rights Reserved 9
Lookup in an 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.
Copyright 1999. All Rights Reserved 10
5
6. ATM and MPLS Switches
Direct Lookup
VCI Address (Port, VCI)
Data
Memory
Copyright 1999. All Rights Reserved 11
Bridges and Ethernet Switches
Associative Lookups
Associative Advantages:
Memory or CAM
• Simple
Associated
Search
Network Associated Data Disadvantages
Address
{
Data
Data Hit? • Slow
48 Address
• High Power
log2 N
• Small
• Expensive
Copyright 1999. All Rights Reserved 12
6
7. Bridges and Ethernet Switches
Hashing
Associated
Search Data
Data
{
Address
Data
Hashing 16 Hit?
Memory
48 Function Address
log2 N
Copyright 1999. All Rights Reserved 13
Lookups Using Hashing
An example
Memory
#1 #2 #3 #4
Associated
Search Data
Data
48
Hashing Function
CRC-16
16
#1 #2 { Hit?
Address
log2 N
#1 #2 #3
Linked lists
Copyright 1999. All Rights Reserved 14
7
8. IP Router
Lookup
H
Dstn Forwarding Engine
E Next Hop
A Addr
Next Hop Computation
D
E
R
Forwarding Table
Destination Next Hop
---- ----
---- ----
Incoming
Packet ---- ----
IPv4 unicast destination address based lookup
Copyright 1999. All Rights Reserved 15
IP Routers
Lookup
• Longest Prefix Matching
Prefix Port
65/8 3
• Lookup time
128.9.16.14 128.9/16 5 • Storage space
128.9.16/20 2 • Update time
128.9.19/24 7
128.9.25/24 10 • Preprocessing time
128.9.176/20 1
142.12/19 3
Copyright 1999. All Rights Reserved 16
8
9. Ternary CAMs
Associative Memory
Value Mask
10.0.0.0 255.0.0.0 R1
10.1.0.0 255.255.0.0 R2 Next Hop
10.1.1.0 255.255.255.0 R3
10.1.3.0 255.255.255.0 R4
10.1.3.1 255.255.255.255 R4
Priority Encoder
Copyright 1999. All Rights Reserved 17
Binary Tries
0 1 Example Prefixes
a) 00001
b) 00010
c) 00011
d) 001
d g e) 0101
f
f) 011
g) 100
h i h) 1010
e
i) 1100
a b c
j) 11110000
j
Copyright 1999. All Rights Reserved 18
9
10. Patricia Tree
Example Prefixes
0 1 a) 00001
b) 00010
c) 00011
d) 001
Skip=5 e) 0101
f g j f) 011
d g) 100
h) 1010
e h i i) 1100
a b c j) 11110000
Copyright 1999. All Rights Reserved 19
Switching Fabrics:
How does the packet get there?
• Output and Input Queueing
• Output Queueing
• Input Queueing
• Other non-blocking fabrics
Copyright 1999. All Rights Reserved 20
10
11. Basic Architectural Components
Datapath: per-packet processing
3.
1.
Output
Forwarding 2. Scheduling
Table
Interconnect
Forwarding
Decision
Forwarding
Table
Forwarding
Decision
Forwarding
Table
Forwarding
Decision
Copyright 1999. All Rights Reserved 21
Interconnects
Two basic techniques
Input Queueing Output Queueing
Usually a non-blocking Usually a fast bus
switch fabric (e.g. crossbar)
Copyright 1999. All Rights Reserved 22
11
12. Interconnects
Output Queueing
Individual Output Queues Centralized Shared Memory
Memory b/w = 2N.R
1
2
N 1
2
Memory b/w = (N+1).R N
Copyright 1999. All Rights Reserved 23
Output Queueing
How fast can we make centralized shared memory?
5ns SRAM
Shared
Memory
1 • 5ns per memory operation
• Two memory operations per packet
2 • Therefore, up to 160Gb/s
• In practice, closer to 80Gb/s
N
200 byte bus
Copyright 1999. All Rights Reserved 24
12
13. Switching Fabrics
• Output and Input Queueing
• Output Queueing
• Input Queueing
– Scheduling algorithms
– Other non-blocking fabrics
– Combining input and output queues
– Multicast traffic
Copyright 1999. All Rights Reserved 25
Input Queueing with Crossbar
Memory b/w = 2R
Scheduler
Data In
configuration Data Out
Copyright 1999. All Rights Reserved 26
13
14. Input Queueing
Head of Line Blocking
Delay
Load
58.6% 100%
Copyright 1999. All Rights Reserved 27
Head of Line Blocking
Copyright 1999. All Rights Reserved 28
14
15. Copyright 1999. All Rights Reserved 29
Copyright 1999. All Rights Reserved 30
15
16. Input Queueing
Virtual output queues
Copyright 1999. All Rights Reserved 31
Input Queues
Virtual Output Queues
Delay
Load
100%
Copyright 1999. All Rights Reserved 32
16
17. Input Queueing
Memory b/w = 2R
Scheduler
Can be quite
complex!
Copyright 1999. All Rights Reserved 33
Input Queueing
Scheduling
1 1
2 2
1 1
2 2
Copyright 1999. All Rights Reserved 34
17
18. Wave Front Arbiter
Scheduling Algorithm
Requests Match
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
Copyright 1999. All Rights Reserved 35
Wave Front Arbiter
Requests Match
Copyright 1999. All Rights Reserved 36
18
19. Other Non-Blocking Fabrics
Clos Network
Copyright 1999. All Rights Reserved 37
Other Non-Blocking Fabrics
Clos Network
Expansion factor required = 2-1/N (but still blocking for multicast)
Copyright 1999. All Rights Reserved 38
19
20. Other Non-Blocking Fabrics
Self-Routing Networks
000 000
001 001
010 010
011 011
100 100
101 101
110 110
111 111
Copyright 1999. All Rights Reserved 39
Other Non-Blocking Fabrics
Self-Routing Networks
The Non-blocking Batcher Banyan Network
Batcher Sorter Self-Routing Network
3 7 7 7 7 7 7 000
7 2 5 0 4 6 6 001
5 3 2 5 5 4 5
010
2 5 3 1 6 5 4 011
6 6 1 3 0 3 3
100
0 1 0 4 3 2 2
101
1 0 6 2 1 0 1
110
4 4 4 6 2 2 0
111
• Fabric can be used as scheduler.
•Batcher-Banyan network is blocking for multicast.
Copyright 1999. All Rights Reserved 40
20