Data Communication · Lecture 10
Circuit, datagram and virtual-circuit networks: how data finds its way through switches
Md Mahbub E Noor · Assistant Professor, Department of CSE, University of Barishal
Course: Data Communication · 2nd Year, 2nd Semester
Lecture 9 ended with
statistical TDM: share capacity on demand, label each slot with an address.
Today
the same idea across a whole network of switches, compared with reserving a path in advance.
Reading: Forouzan, Chapter 8
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
2 / 31
Mesh: 8 × 7 / 2 = 28 links
Switched: 8 links to a switch
Mesh for 100 devices
100 × 99 / 2
4,950 links
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
3 / 31
Reserve a dedicated path first, then send
· physical layer
· traditional telephone network
Packet switching: each packet routed on its own
· network layer
· the Internet (IP)
Packet switching along a path set up in advance
· data link layer
· Frame Relay, ATM, MPLS
Packet switching = datagram + virtual circuit: data is cut into packets and no resources are reserved permanently. A fourth historical method, message switching, stored whole messages at each node.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
4 / 31
A
S1
S2
S3
S4
B
Orange: one channel reserved on every link of the path for the whole call
Each link is divided into n channels by FDM or TDM (Lecture 9); a call takes one channel per link.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
5 / 31
A
B
| Phase | What happens |
|---|---|
| Setup | request travels to B, each switch reserves a channel; B accepts; acknowledgement returns |
| Data transfer | continuous flow on the reserved path |
| Teardown | a signal releases the channels |
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
6 / 31
1
5
2
6
3
7
4
8
Colour shows each connection: 1↔7, 2↔5, 3↔8, 4↔6
Each link: FDM, 2 voice channels × 4 kHz
2 × 4 kHz
8 kHz per link
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
7 / 31
| Step | Working | Time |
|---|---|---|
| Setup (request + acknowledgement) | given | 20 ms |
| Transmit the message | 30 kbit / 1 Mbps | 30 ms |
| Propagation, 3 links | 3 × 2 ms | 6 ms |
| Total (teardown ignored) | 20 + 30 + 6 | 56 ms |
Illustrative numbers (not from the textbook). Notice the 20 ms setup paid before a single bit is sent.
Efficiency when the line is busy only 10% of a call
90% of reserved capacity is idle
10% use
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
8 / 31
Checkpoint 1 · 3 minutes
How many links would a full mesh of 50 devices need? How many with one central switch?
In Example 8.1, why is each link 8 kHz wide?
Setup takes 15 ms, a 60 kbit message is sent at 2 Mbps over 4 links with 1 ms propagation each. Total delay?
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
9 / 31
A
S1
S2
S3
S4
B
1
2
3
4
Packets 1–4 of one message, on different routes at the same moment
No reservation: resources are used on demand, first come, first served. A busy switch makes packets wait in a queue.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
10 / 31
| Destination address | Output port |
|---|---|
| 1232 | 1 |
| 4150 | 2 |
| 9130 | 3 |
| … | … |
A packet arrives with destination 4150
look up 4150 → port 2
forward on port 2
The destination address stays the same for the whole journey; each switch makes its own decision.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
11 / 31
A
S1
S2
B
Total = 3T + 3τ + w₁ + w₂
T = transmission time, τ = propagation time, w = waiting at each switch (grey)
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
12 / 31
| Quantity | Working | Value |
|---|---|---|
| Packets N | 30 kbit cut into 5 × 6 kbit | 5 |
| Packet time T | 6,000 / 1,000,000 s | 6 ms |
| Pipelined transmission | (N + links − 1) × T = 7 × 6 | 42 ms |
| Propagation | 3 × 2 ms | 6 ms |
| Packet total | 42 + 6 | 48 ms |
Circuit (slide 8)
20 + 30 + 6
56 ms
Packet (no queuing)
42 + 6
48 ms
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
13 / 31
Interactive
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
14 / 31
Checkpoint 2 · 3 minutes
Give two reasons why packets of one message can arrive out of order in a datagram network.
One 8,000-bit packet crosses 3 links at 1 Mbps, 1 ms propagation each, waiting 2 ms at each switch. Total delay?
A 40 kbit message is sent as 4 packets over 2 links at 1 Mbps (ignore propagation). Total time?
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
15 / 31
| Feature | Like circuit switching | Like datagram switching |
|---|---|---|
| Setup and teardown | yes | |
| Same path for all packets | yes | |
| Data in packets with headers | yes | |
| Resources | can be reserved at setup | or allocated on demand |
Global address (source, destination): used only during setup
Virtual-circuit identifier (VCI): a small number with meaning on one link only; carried in every frame
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
16 / 31
A
S1
S2
S3
B
VCI 14
VCI 66
VCI 22
VCI 77
| Switch | In port | In VCI | Out port | Out VCI |
|---|---|---|---|---|
| Switch 1 | 1 | 14 | 3 | 66 |
| Switch 2 | 1 | 66 | 2 | 22 |
| Switch 3 | 2 | 22 | 3 | 77 |
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
17 / 31
Interactive
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
18 / 31
Travels by the global address. Each switch picks the out port, fills in port, in VCI, out port, and chooses an unused incoming VCI for the next link.
Travels back; each switch learns the out VCI chosen by the next switch, completing its row. A learns VCI 14.
A sends a teardown request; B confirms; every switch deletes the row.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
19 / 31
Total = setup + data transfer + teardown
| Resources | Effect on delay |
|---|---|
| Reserved at setup | every packet sees the same delay |
| On demand | packets can wait in queues: different delays |
One setup round trip, then 3 packets of T each over 3 links
setup + (3 + 3 − 1)T + 3τ
same path, in order
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
20 / 31
| Circuit | Datagram | Virtual circuit | |
|---|---|---|---|
| Setup / teardown | yes | no | yes |
| Resources | reserved for the whole call | on demand | reserved or on demand |
| Data unit | continuous stream | packets (datagrams) | packets (frames) |
| Address in data | none | full destination address | local VCI |
| Path | fixed | per packet, may differ | fixed |
| Order | kept | may change | kept |
| Delay | setup, then constant | variable, no setup | setup, then steady or variable |
| Efficiency | low for bursty traffic | high | high |
| Layer / example | physical / telephone | network / IP | data link / Frame Relay, ATM |
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
21 / 31
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
22 / 31
Rows = inputs, columns = outputs; orange = closed crosspoints
Crosspoints, n × n crossbar
n² = 6²
36
1,000 × 1,000 crossbar
1,000²
1,000,000
At most 1,000 can be in use at once: 99.9% idle.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
23 / 31
N/n of n × k
k of N/n × N/n
N/n of k × n
Total = 2kN + k(N/n)²
Ex. 8.3: N = 200, n = 20, k = 4
2·4·200 + 4·(200/20)² = 1,600 + 400
2,000 (5% of 40,000)
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
24 / 31
n = √(N/2), k = 2n − 1
Total ≥ 4N[√(2N) − 1]
Clos criterion: with k ≥ 2n − 1 middle crossbars, a three-stage switch never blocks
| Stage | Crossbars | Size | Crosspoints |
|---|---|---|---|
| 1 | 20 | 10 × 19 | 20 × 190 = 3,800 |
| 2 | 19 | 20 × 20 | 19 × 400 = 7,600 |
| 3 | 20 | 19 × 10 | 20 × 190 = 3,800 |
| Total | 15,200 |
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
25 / 31
Interactive
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
26 / 31
Writes incoming TDM slots into RAM in arrival order, then reads them out in the order the outputs need: here A moves to slot 2, C to slot 1 …
A
B
C
D
→ RAM →
C
A
D
B
Time stage, space stage (crossbar), time stage: used in large digital telephone exchanges
Input ports (physical, data link, queue) · switching fabric (crossbar, banyan) · output ports · routing processor (table lookup)
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
27 / 31
Click the video to play or pause · Press → for full screen
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
28 / 31
Checkpoint 3 · 3 minutes
Switch 2's table has the row (in port 3, in VCI 41) → (out port 1, out VCI 9). A frame arrives on port 3 with VCI 41. What leaves, and where?
How many crosspoints does a 400 × 400 single crossbar need, and a Clos switch for N = 400?
Give one advantage and one disadvantage of datagram switching compared with virtual circuits.
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
30 / 31
Next lecture
Framing, byte and bit stuffing, and error detection and correction: parity, Hamming codes, checksums and CRC.
Reading: Forouzan, Chapters 9 and 10 · Practise in Switching Lab
Md Mahbub E Noor
Lecture 10: Switching
University of Barishal
31 / 31