Title: Introduction to Routers and Switches
1- Introduction to Routers and Switches
2What do they look like?
Access routers e.g. ISDN, ADSL
Core ATM switch
Core router e.g. OC48c POS
3Basic Architectural Componentsof an IP Router
Control Plane
Datapath per-packet processing
4Per-packet processing in an IP Router
- 1. Accept packet arriving on an incoming link.
- 2. Lookup packet destination address in the
forwarding table, to identify outgoing port(s). - 3. Manipulate packet header e.g., decrement TTL,
update header checksum. - 4. Send packet to the outgoing port(s).
- 5. Buffer packet in the queue.
- 6. Transmit packet onto outgoing link.
5General Switch Model
Interconnect
6IP Switch Model
2. Interconnect
1. Ingress
3. Egress
Forwarding Table
Forwarding Decision
Forwarding Table
Forwarding Decision
Forwarding Table
Forwarding Decision
7Forwarding Engine
Packet
header
payload
Router
Destination Address
Routing Lookup Data Structure
Outgoing Port
Forwarding Table
Dest-network
Port
65.0.0.0/8
3
128.9.0.0/16
1
149.12.0.0/19
7
8The Search Operation is not a Direct Lookup
(Outgoing port, label)
(Incoming port, label)
Address
Memory
Data
IP addresses 32 bits long ? 4G entries
9The Search Operation is also not an Exact Match
Search
Exact match search search for a key in a
collection of keys of the same length.
Relatively well studied data structures
- Hashing
- Balanced binary search trees
10Example Forwarding Table
Destination IP Prefix Outgoing Port
65.0.0.0/8 3
128.9.0.0/16 1
142.12.0.0/19 7
Prefix length
IP prefix 0-32 bits
142.12.0.0/19
128.9.0.0/16
65.0.0.0/8
0
232-1
224
65.0.0.0
65.255.255.255
11Prefixes can Overlap
Longest matching prefix
128.9.176.0/24
128.9.16.0/21
128.9.172.0/21
142.12.0.0/19
65.0.0.0/8
128.9.0.0/16
0
232-1
Routing lookup Find the longest matching prefix
(the most specific route) among all prefixes that
match the destination address.
12Difficulty of Longest Prefix Match
128.9.176.0/24
128.9.172.0/21
128.9.16.0/21
142.12.0.0/19
128.9.0.0/16
65.0.0.0/8
13Lookup Rate Required
40B packets (Mpps)
Line-rate (Gbps)
Line
Year
1.94
0.622
OC12c
1998-99
7.81
2.5
OC48c
1999-00
31.25
10.0
OC192c
2000-01
125
40.0
OC768c
2002-03
14Size of the Forwarding Table
Number of Prefixes
95
96
97
98
99
00
Year
- Source http//www.telstra.net/ops/bgptable.html
15Internal Interconnects
1. Multiplexers
2. Tri-State Devices
3. Shared Memory
16InterconnectsTwo basic techniques
Input Queueing
Output Queueing
Usually a non-blocking switch fabric (e.g.
crossbar)
Usually a fast bus
17Shared Memory Bandwidth
5ns SRAM
Shared Memory
- 5ns per memory operation
- Two memory operations per packet
- Therefore, up to 160Gb/s
- In practice, closer to 80Gb/s
1
2
N
200 byte bus
18Input buffered swtich
Internconnect
- Independent routing logic per input
- FSM
- Scheduler logic arbitrates each output
- priority, FIFO, random
- Head-of-line blocking problem
19Input QueueingHead of Line Blocking
Delay
Load
100
20Head of Line Blocking
21(Virtual) Output Buffered Switch
N buffers per input
- How would you build a shared pool?
22Solving HOL with Input QueueingVirtual output
queues
23Input QueueingVirtual Output Queues
Delay
Load
100
24Output scheduling
- n independent arbitration problems?
- static priority, random, round-robin
- simplifications due to routing algorithm?
- general case is max bipartite matching
25Finding a maximum size match
Requests
Inputs
Outputs
- How do we find the maximum size (weight) match?