1.4Circuit, packet and virtual-circuit switching
The idea
Switching decides how data crosses the network. Circuit switching reserves a path; packet switching sends independent packets that are stored and forwarded by each router.
Think of it like this: Circuit switching is a private road built just for you. Packet switching is shared roads where each parcel finds its own way and waits at junctions.
Why it exists
GATE asks for the total time to send a file in pieces over several hops. The pipeline formula gives it in one line.
How it works
- Time for one packet over k links: k × Tt + the propagation delays.
- When n packets are sent back to back, the first travels k links and each extra packet adds only one Tt at the end.
- Total = (k + n − 1) Tt + total Tp.
- Always check whether the router can send while it receives; store-and-forward means it cannot start on a packet until the whole packet has arrived.
Worked example: 10⁶ bits as 1000 packets of 1000 bits over 3 links of 1 Mbps, T<sub>p</sub> = 1 ms per link.
Tt = 1 ms. Total = (3 + 999) × 1 + 3 × 1 = 1005 ms.
Now play with it
- →Set n = 1 in the calculator to see the one-packet case.
- →Compare the pipelined and the non-pipelined line for the default numbers.
Default: a 10⁶-bit file as 1000 packets over 3 links of 1 Mbps and 1 ms propagation gives (3 + 999) × 1 + 3 = 1005 ms.
| Circuit switching | Packet switching (datagram) | Virtual circuit | |
|---|---|---|---|
| Setup | yes, before data | none | yes, once |
| Path | dedicated | each packet routed alone | fixed for the call |
| Header | none | full destination address | short circuit ID |
| Delay per hop | no queueing after setup | store-and-forward + queueing | store-and-forward |
| Bandwidth use | wasted when idle | shared, efficient for bursts | shared |
| Order | in order | may arrive out of order | in order |
Check yourself
n equal packets are sent over k store-and-forward links of equal bandwidth. The transmission part of the total time is
Exam notes (the dense version)
Circuit switching reserves a path first (setup time), then sends with no per-hop wait. Packet switching (datagram) sends each packet independently with store-and-forward: a router receives the whole packet before forwarding. For one packet over k links: k · (L/B) + total Tp. For n packets pipelined over k links: (k + n − 1) · (L/B) + total Tp. Virtual circuits set up a fixed path once and then use short circuit IDs. Packet switching wins for bursty traffic because links are shared.
Previous year questions: Layering, Delays & Switching (7)
PYQs are grouped by topic, so this is the full set for Layering, Delays & Switching; try the ones that match this subtopic. Open all 7 on the topic page.