Switching Techniques in Computer Networks: Circuit, Message and Packet Switching with Worked Examples

Circuit, message and packet switching produce different delays on the same three-link path. Follow datagram ordering, VCI translation and packet-header overhead.

KnowledgeGate Team

Exam prep & CS education

Updated 4 Dec 20265 min read
Switching Techniques in Computer Networks: Circuit, Message and Packet Switching with Worked Examples

Students often memorise circuit, message and packet switching as table rows, then get stuck when asked what a switch stores or how long delivery takes. A switch may store circuit state, a complete message, or packets, and delivery time depends on setup, serialization, propagation and pipelining. The earlier Introduction to Computer Networks: Layers, Topologies, Switching and Delay Formulas with Worked Examples maps these ideas at survey depth, while Data Communication in Computer Networks: Complete Guide with Worked Examples uses a compact two-link packet pipeline. A single three-link model exposes the deeper distinctions among circuit setup, whole-message forwarding, packet-header cost, datagram order and VCI state.

Switching techniques in computer networks: what is actually being switched

Switching moves data at an intermediate node from an incoming link to the correct outgoing link. Routing selects or learns a path. Forwarding applies that decision to a message, packet or virtual-circuit label.

Compare each technique on S -> R1 -> R2 -> D, a path with three links and two switches. The decisive comparison axes are setup, reservation, buffered data unit, header, pipelining, path and ordering behaviour, and delay source.

Circuit switching prepares a logical circuit. Message switching stores and forwards the whole message. Packet switching divides it into packets and uses either datagram or virtual-circuit operation.

Circuit switching: reserve the path before sending data

Circuit switching has three phases: setup, data transfer and teardown. Setup prepares a logical end-to-end path and reserves capacity. That path can cross several switches, so it need not be one physical wire.

A 12,000-bit message at 2 Mbps has serialization time:

L/R = 12,000/2,000,000 = 0.006 s = 6 ms

With 12 ms setup and 5 ms propagation on each link, the last bit arrives after:

12 + 6 + (3 x 5) = 33 ms

Transfer after setup is predictable here. The costs are setup and idle reserved capacity.

Message switching: store and forward the whole message

Message switching reserves no end-to-end circuit. Every intermediate node receives and buffers the complete message before using the next link.

The message takes 6 ms to serialize per 2 Mbps link. With three identical links, 5 ms propagation per link, and no queueing or processing, the last bit takes:

3 x (6 + 5) = 33 ms

R1 must buffer all 12,000 bits before forwarding, and so must R2. There is no packet-level pipeline to overlap this message across links.

Packet switching: datagrams, virtual circuits and pipelining

Split the payload into four 3,000-bit packets. Each takes:

3,000/2,000,000 = 0.0015 s = 1.5 ms

R1 can transmit P1 while S transmits P2. This pipeline creates the delay advantage on a multi-link path.

In datagram service, each packet carries enough destination information for independent forwarding. Packets may take different paths or arrive out of order. See IP Addressing and Subnetting Explained for the addressing model.

Let S-A-D have propagation delays of 2 ms and 5 ms, while S-B-D has 4 ms and 1 ms. Ignoring transmission, queueing and processing for this illustration, P1 leaves at t = 0 ms on S-A-D and arrives at 0 + 2 + 5 = 7 ms. P2 leaves at t = 1 ms on S-B-D and arrives at 1 + 4 + 1 = 6 ms. P2 arrives first.

A virtual circuit performs setup once, then forwards packets on one logical path using short identifiers. On S-B-D, B can translate VCI 7 on S-B to VCI 12 on B-D. This forwarding state does not automatically reserve bandwidth.

Diagram compares datagram and virtual-circuit paths, showing route delays and VCI translation.

Switching delay worked example: compare all three techniques

Assume three equal-rate store-and-forward links on S -> R1 -> R2 -> D; payload L = 12,000 bits; rate R = 2 Mbps; propagation d = 5 ms per link; setup Tsetup = 12 ms; four packets of 3,000 payload bits; zero queueing and processing; and, initially, no packet headers.

The results are:

  1. Circuit switching: 12 + 6 + 15 = 33 ms. Count one serialization term after setup, plus three-link propagation.

  2. Message switching: 3 x 6 + 15 = 33 ms. Serialize the whole message on every link.

  3. Packet switching: 3 x 5 + (3 + 4 - 1) x 1.5 = 15 + 9 = 24 ms.

The equal-link packet formula is H x d + (H + N - 1) x (P/R). With H = 3, N = 4 and P = 3,000 bits, the pipeline needs six transmission slots. Its gain comes from overlap, not a faster link.

Add a 200-bit header per packet. Each packet becomes 3,000 + 200 = 3,200 bits, taking 3,200/2,000,000 = 1.6 ms. Total data is 4 x 3,200 = 12,800 bits, and delay is 15 + 6 x 1.6 = 24.6 ms. Queueing or unequal rates need a different calculation.

Timing chart compares circuit and message switching at 33 ms with four-packet pipelining at 24 ms, or 24.6 ms with headers.

Switching techniques: common traps and how to repair them

Trap 1: multiplying L/R by the number of links for an established circuit. Separate the given setup delay, one end-to-end serialization term and propagation over all links.

Trap 2: applying the message-switching formula to packets. Draw the pipeline. For equal packets and equal-rate links, count H + N - 1 packet-transmission slots.

Trap 3: treating every virtual circuit as a reserved physical circuit. Use this distinction:

Model

Capacity and forwarding rule

Circuit switching

Reserves capacity on an established logical path

Datagram switching

Makes an independent forwarding decision for each packet

Virtual-circuit packet switching

Keeps logical forwarding state for packets on the selected path

Packet switching is therefore not always connectionless, and a virtual circuit does not by itself reserve bandwidth.

Switching techniques in exams: the patterns to practise

Feature

Circuit switching

Message switching

Packet switching

Setup

Required

Not required

Datagram: no; virtual circuit: yes

Resource reservation

Yes

No

Not inherent

Forwarding unit

Continuous payload on circuit

Whole message

Packet

Intermediate buffer

Not whole-message store-and-forward

Complete message

One or more packets

Per-unit header

Setup state; no packet header in this model

Message header

Header on each packet

Path handling

Established path

Chosen as message advances

Independent or virtual-circuit path

Main delay terms

Setup, serialization, propagation

Repeated serialization, propagation, queueing

Pipeline fill, propagation, queueing, headers

Practise four forms: classify a described network, derive end-to-end delay, add packet-header overhead, and trace destination addresses or VCI translations through a forwarding table. As a quick check, if propagation in the worked example rises to 8 ms per link while everything else stays fixed, packet delay before headers is 3 x 8 + 6 x 1.5 = 24 + 9 = 33 ms.

For a broader preparation path around these patterns, use the GATE CS Exam Preparation category.

Switching techniques: the short version and next step

  • Circuit switching means setup plus a reserved logical path.

  • Message switching means whole-message store-and-forward.

  • Packet switching means segmentation plus pipelining.

  • Datagram and virtual circuit are two packet-switching models.

Under the stated assumptions and without packet headers, the decisive comparison is 33 ms for circuit switching, 33 ms for message switching and 24 ms for packet switching. If you want a structured route through core CS subjects after this topic, GATE Guidance by Sanchit Sir is an optional next step.