1
Packet Switching
Outline Space switch - crossbar Add multiplexers and demultiplexers
Packet multiplexing Practice: Ethernet switch
Malathi VeeraraghavanUniversity of Virginia
Some figures: Courtesy of Leon-Garcia & Widjaja’s textbook web site
2
Host 1
SwitchLink
Host R
Host R – 1
Controller
123
P
123
P
Connectionof inputs to outputs… …
Network: Links & switches A switch redirects (forwards) data units (bits or packets)
from one link to another
Network
Switch
Port or interface
Size of switch fabric = P x P
3
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
4
Different views of a switch(example switch: 12 input by 12 output)
123
4 5 6 7
9101112
8
1
23
12
.
.
.
.
.
.
1
23
12
Folded view of a switch
Inputinterfaces
Outputinterfaces
Unfolded view of a switch
Bidirectional links
5
P
1 2
1
P
2
P –1
…
…
Crossbar Space Switch 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
…
Inputinterfaces
OutputinterfacesNote: this is the same as the
unfolded view with the output interfacesmoved to the bottom
6
Status check
Outline• Space switches – crossbar• Add multiplexers and
demultiplexers Packet switch: packet mux/demux
• Practice: Ethernet switch and SONET switch
7
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
1
23
Q
.
.
.
Inputinterfaces
.
.
.
1
23
Q
Outputinterfaces
Unfolded view of a switch
M
M
M
M
Spaceswitch
D
D
D
D
D: DemultiplexerM: Multiplexer
8
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
9
Controller
1
2
3
P
Line card
Line card
Line card
Line card
Spa
ce s
witc
h
Line card
Line card
Line card
Line card
1
2
3
P
Input ports Output ports
Data path Control path (a)
…………Packet switch: header based
“Unfolded” View of Switch Input line card functions
Packet-based demultiplexing Header processing
Output line card functions Packet-based multiplexing Buffering packets
Space switch Transfer packets between
line cards Close crosspoints on a
packet-by-packet basis Controller
Routing slides
Folded view: line card has both input and output functions
10
Packet-based multiplexing
Host 1 Host 2
Switch
Switch
Host 3 Host 4Packet-basedmultiplexer
inputlink
inputlink
outputlink
Scheduling algorithms: FCFS, priority
11
Example of a packet switch: an Ethernet switch
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
Host 1
Host 4Host 2
Host 3
Ethernetswitch
Destination MAC address: 05:a1:08:10:a4:3e
Destination MAC address: 09:a5:08:10:a4:3da
b
c
d
Destination Output Port
05:a1:08:10:a4:3e
09:a5:08:10:a4:3d
05:a1:08:10:a4:3e c
b09:a5:08:10:a4:3d
Forwarding table
12
Recall Ethernet frame format
CRCSrc.Addr. Data
IPdatagram
Type
66 46-1500
0800
Type
2
2
46-1500
4
Dst.Addr.
Example MAC address:04-3C-5A-11-26-78Each four-bit half of eachbyte is expressed inhexa-decimal notation
13
Insides of an Ethernet switch – unfolded view (assuming crossbar)
Controller
1
2
3
4
Line card
Line card
Line card
Line card
Line cardLine cardLine cardLine card
1 2 3 4
Input ports
Output ports1. Physical layer2. Data link layer3. Once a frame is received correctly, consult forwarding table with destination MAC address4. Make appropriate crosspoint connection in fabric5. Send frame to appropriate outgoing line card
14
Analogy for switch: road intersection
15
Analogy for a forwarding table
Road signs