Escolar Documentos
Profissional Documentos
Cultura Documentos
Ivan Marsic
Rutgers University
Chapter 4 Switching and Queuing Delay Models
Chapter 4
Topic:
Packet Switching in Routers
Router Architecture
Forwarding Table Lookup
Switching Fabric Design
How Queuing Happens
Why Routers?
(Recall Chapter 1)
Avoid needing direct link between all hosts
(totally connected graph)
Redundancy: If one path fails, find an
alternative path
Routing Delays
Source
Destination
Source
Router
Destination
transmission
time
propagation
time
Time
router
delay
detail
(a)
transmission
time (2nd link)
router
processing
time
(b)
Router Components
Input port
Output port
Input port
Output port
Network port
(bidirectional)
Switching
fabric
4
Transmission of packets
Network
L2
Router B
Router A
L3 L2 L1
End system
L1
L2
Router C
End system
Forwarding Algorithms
Routing
function
Forwarding
algorithm
Unicast routing
Unicast routing
with Types of Service
Multicast routing
Longest match on
source address
+ exact match on
source address,
destination address,
and incoming interface
Router Architectures
CPU
packets
CPU
Memory
NFE
Processor
Memory
NFE
Processor
Line Card
#1
Line Card
#4
Line Card
#1
CPU
Memory
CPU
Memory
Line Card
#4
Line Card
#2
Line Card
#5
Line Card
#2
CPU
Memory
CPU
Memory
Line Card
#5
Line Card
#3
Line Card
#6
Line Card
#3
CPU
Memory
CPU
Memory
Line Card
#6
(a)
(b)
CPU
Memory
packets
Line Card
#1
Fwd
Engine
Fwd
Engine
Line Card
#4
Line Card
#2
Fwd
Engine
Fwd
Engine
Line Card
#5
Line Card
#3
Fwd
Engine
Fwd
Engine
Line Card
#6
(c)
CPU
Memory
Network layer
Output port
Link layer
Line card
Line card
packets
System bus
Input port
Output port
NFE processor
NFE processor
CPU
Memory
Network layer
Link layer
Routing processor
packets
Line card
Line card
N x N switching elements
allows N simultaneous packets
switched (in the best case
when all packets going to
different outputs)
Output
Input port
tag
0
1
Input port
tag
Output port
tag
0
1
(b)
(a)
8x8 Banyan has only 12
switching elements
(while 8x8 crossbar
requires 64)
But, much greater
likelihood of collisions
Input port
tag
000
Output port
tag
00
00
01
01
10
10
11
11
Output port
tag
000
001
001
010
010
011
011
100
100
101
101
110
110
111
111
Packet
with tag 100
100
(c)
Packet
with tag 001
001
Reducing Collisions
(Show slide with a collision example)
Collisions can be reduced if packets are
ordered on input ports by their output port
number
The router cannot choose the ordering of
arriving packets, but we can insert a sorting
hardware between the input network ports
and the switching fabric
Batcher Network
Comparator
Input
numbers
Output
numbers
Low
High
(b)
(a)
Input
list
7
4
3
4
5
2
5
6
6
1
7
Output
list
3
3
(c)
7
9
Batcher-Banyan Network
Batcher
sort
network
Trap
network
Shuffle
exchange
network
Banyan
network
Empty input
Batcher sorter
0
0
1
0
0
0
1
2
Trap
network
Banyan network
0
0
1
1
2
2
3
Topic:
Router Delays
& Queuing Models
Where & Why Queuing Happens
Littles Law
Queuing Models
M / M / 1, M / M / 1/ m, M / G / 1
Networks of Queues
Reception delay =
Input port
Fwd decision
queuing delay
t xI
Switch fabric
Transmission
queuing delay
Output port
Transmission delay =
t xO
Head of Line
Blocking
An Input-queued Switch
Input ports
Switch fabric
Arbiter
Output ports
System
Arriving
customers
in
Departing
customers
Interarrival
time = A2 A1
out
Input
sequence
C1
C2
Ci
Time
A1
Output
sequence
C3
A2
A3
C1
Service
time = X1
Ai
C2
X2
Waiting
time = W 3
C3
X3
Ci
Xi
System
Arriving packets
Queue
Server
Queued packets
Serviced packet
Source
Source
Arrival rate
= packets per second
Service rate
= packets per second
Departing
packets
Delay Time
Total delay of customer i = Waiting + Service time
Ti = W i + Xi
Server
Service rate
Arrival rate
customers
unit of time
customers
unit of time
NQ
Customers in queue
Customer
in service
N
Customers in system
C1
C2
C3
Time
C1
C2
C3
Time
Arrival Sequences
Sequence 1
0
(arrivals)
(departures)
t (s)
Server
Server
Service
delay
Sequence 3
0
t (s)
4
Queuing
delay
Sequence 4
t (s)
4
Sequence 2
t (s)
4
Cumulative
Number of arrivals, A(t)
Number of departures, B(t)
A(t)
T1
T2
N(t)
B(t)
Time
N(t)
Time
Littles Law
Average number of packets in the system =
arrival rate average time that packet
spends in the system
N=T
Problem
We would like to know more, such as what are
the probabilities of finding different number of
customers on arrival, etc.
Room 0
Room n 1
Room n
Room n + 1
t(n+1 n)
t(n n+1)
n1
n1
M/G/1 Example
A2 = 9:30
A4 = 10:10
A1 = 9:05
(a)
A3 = 9:55
A6 = 11:05
A5 = 10:45
X1 = 30
X2 = 10
X3 = 75
X4 = 15
X5 = 20
X6 = 25
9:00 9:05
9:35
9:45
9:55
11:10
Customer 5
service time = 15 min
Customer 6
arrives at 11:05
(c)
(b)
11:45
Time
Customer 4
service time = 20 min
Server
5
9:55
11:25
11:10
Customers 4 and 5
waiting in queue
Ni = 2
Customer 3 in service;
Residual time = 5 min
X1
Time
X1
X2
XM(t)