← 🧱 Layering, Delays & Switching
Subtopic 4 of 4

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

  1. Time for one packet over k links: k × Tt + the propagation delays.
  2. When n packets are sent back to back, the first travels k links and each extra packet adds only one Tt at the end.
  3. Total = (k + n − 1) Tt + total Tp.
  4. 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.
Tt per packet (ms)1
One packet, store-and-forward6 ms
n packets pipelined: (k + n − 1) Tt + k Tp1005 ms
Without pipelining (k·n·Tt + k·Tp)3003 ms

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 switchingPacket switching (datagram)Virtual circuit
Setupyes, before datanoneyes, once
Pathdedicatedeach packet routed alonefixed for the call
Headernonefull destination addressshort circuit ID
Delay per hopno queueing after setupstore-and-forward + queueingstore-and-forward
Bandwidth usewasted when idleshared, efficient for burstsshared
Orderin ordermay arrive out of orderin 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

Remember: Pipelined: (k + n − 1) Tt + sum of Tp. Packet switching shares links; circuits waste idle capacity.
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.