Packet Switching - University of Virginia

advertisement
Packet Switching
Malathi Veeraraghavan
University of Virginia

Outline


Space switch - crossbar
Add multiplexers and demultiplexers


Packet multiplexing
Practice: Ethernet switch
Some figures: Courtesy of Leon-Garcia & Widjaja’s textbook web site
1
Network: Links & switches

A switch redirects (forwards) data units (bits or packets)
from one link to another
Size of switch fabric = P x P
Switch
Network
Host R
1
2
3
Host R – 1
Connection
of inputs
to outputs
1
2
3
…
Switch
…
Link
Controller
Host 1
P
P
2
Port or interface
Purpose of a switch

Why are switches needed?


To directly connect P hosts with each other, we
need P(P-1)/2 links
By connecting P hosts to a switch, we only need
P links:


Make connections between links through the switch
to create host-to-host communication paths
Cheaper to dig up the ground and lay fiber or
copper wires from host locations to one central
location where the switch is located rather
than on every pairwise route
3
Different views of a switch
(example switch: 12 input by 12 output)
Bidirectional links
12 11 10
1
9
2
8
3
7
4
5 6
Folded view
of a switch
Input
interfaces
Output
interfaces
1
1
2
3
2
3
12
.
.
.
.
.
.
12
Unfolded view
of a switch
4
Crossbar Space Switch

Input
interfaces
1
2
…

Size of switch:
written as P x P
read as P by P switch
Number of
crosspoints = P2
Connect an input to an
output by closing a
crosspoint
…

P
…
1
Note: this is the same as the
unfolded view with the output interfaces
moved to the bottom
2
P –1
P
Output
interfaces
5
Status check
 Outline
•
•
Space switches – crossbar
Add multiplexers and demultiplexers

•
Packet switch: packet mux/demux
Practice: Ethernet switch and SONET
switch
6
Add multiplexers/demultiplexers
(mux/demux) to interfaces

The links connected to
the switch are typically
shared

this means the
multiplexing function of
the data-link layer is
implementated at the
end of the link
Input
interfaces
1
2
3
Q
D: Demultiplexer
M: Multiplexer
.
.
.
Output
interfaces
D
D
M
M
D
M
Space
switch
D
M
1
.
.
.
2
3
Q
Unfolded view
of a switch
7
Types of switches

The type of switch is determined by the
type of multiplexing used on its links

Circuit switch:

Position-based multiplexing


TDM, FDM/WDM
Packet switch:

Packet-based multiplexing
8
Packet switch: header based
“Unfolded” View of Switch
 Input line card functions
Controller

Packet-based demultiplexing


P
Line card
Line card
2
Line card
3
Line card
Line card
Line card
P
Output line card functions





Data path
Control path
Output ports
(a)
Transfer packets between
line cards
Close crosspoints on a
packet-by-packet basis
Controller

Input ports
Packet-based multiplexing
Buffering packets
Space switch

…
1
…
…
3
Line card
Space switch
2
Line card
…
1
Header processing
Routing slides
Folded view: line card has both
input and output functions
9
Packet-based multiplexing
Switch
Host 2
Host 1
input
link
Host 3
input
link
output
link
Switch
Packet-based
multiplexer
Scheduling algorithms:
FCFS, priority
10
Host 4
Example of a packet switch: an Ethernet switch
Destination MAC address: 05:a1:08:10:a4:3e
05:a1:08:10:a4:3e
Host 1
a
b
Host 2
Ethernet
switch
Host 3
Destination MAC address: 09:a5:08:10:a4:3d
c
d
Destination
Output Port
05:a1:08:10:a4:3e
c
09:a5:08:10:a4:3d
b
Host 4
09:a5:08:10:a4:3d
Forwarding table





Headers of incoming packets are processed to extract destination address
Forwarding table is consulted to find output port, O, corresponding to destination
Corresponding space switch crosspoint connection is closed
Packet is sent from input port to the output port, O
If multiple packets destined to the same output link arrive at the same time,
they are held in queues (either on the input line card or output line card) and
scheduling algorithms are applied
11
Recall Ethernet frame format
Example MAC address:
04-3C-5A-11-26-78
Each four-bit half of each
byte is expressed in
hexa-decimal notation
Dst. Src. Type
Addr. Addr.
6
6
2
Type
0800
2
Data
46-1500
CRC
4
IP
datagram
46-1500
12
Insides of an Ethernet switch –
unfolded view (assuming crossbar)
Controller
1
Input ports
2
3
4
Line card
Line card
Line card
Line card
Line card Line card Line card Line card
1.
2.
3.
4.
5.
Physical layer
Data link layer
1
2
3
Once a frame is received correctly, consult forwarding table with destination MAC address
Make appropriate crosspoint connection in fabric
Send frame to appropriate outgoing line card
4
Output ports
13
Analogy for switch: road
intersection
14
Analogy for a forwarding table
Road signs
15
Download