MCA · MCA C1001
Switching: circuits, messages, packets, and forwarding
Compare resource reservation, datagrams, virtual circuits, route selection, queueing, and store-and-forward pipelining.
On this page
Switching moves information through intermediate nodes toward a destination. Circuit, message, and packet switching make different choices about resource reservation and forwarding granularity. These choices affect delay, efficiency, buffering, and failure recovery.
What you will learn
- Explain circuit, message, datagram, and virtual-circuit switching.
- Calculate store-and-forward and pipelined transfer time.
- Distinguish forwarding, routing, reservation, and reliability.
1. Circuit switching: establish, transfer, release
Circuit switching establishes a communication path with resources allocated for the connection, transfers information, and releases the allocation. The circuit may use physical paths or reserved time/frequency resources rather than one exclusive wire per call. Setup can be refused if resources are unavailable.
Once established under its design conditions, reserved capacity provides predictable service and avoids competition for that allocated capacity at every data unit. Idle allocation can be wasted. A physical fault can interrupt the connection, and setup takes time. Circuit switching does not inherently encrypt data or prevent endpoint failure.
It suits traffic requiring sustained predictable allocation. Bursty computer traffic can waste reservation because a user may spend long periods reading or thinking. Compare the complete lifecycle, not only transfer once the path is ready.
2. Message switching
Message switching forwards a complete message from one intermediate node to the next. Each node stores the whole message before sending it onward. No end-to-end circuit must be reserved first. Store-and-forward allows scheduling and route decisions, but complete messages can require substantial storage and impose large waiting times.
A long message may delay shorter messages behind it. Nodes need finite buffer management and an overload policy. Some messaging applications also store and forward at the application layer, but application email handling should not be confused with a claim that all its underlying Internet links use network-layer message switching.
The key defining distinction is forwarding granularity: the whole message. Packet switching divides data into smaller independently handled units, permitting finer-grained scheduling and pipelining.
3. Packet switching and statistical sharing
Packet switching divides traffic into bounded units containing control information and payload. Intermediate nodes use headers and forwarding state to choose an output. Multiple flows share links; their packets can be interleaved. Shared capacity is used efficiently for bursty traffic, but contention produces queueing and finite-buffer loss.
Packet overhead consumes capacity, and dividing a message creates requirements for reassembly or stream recovery at suitable endpoints. Packets can be lost, duplicated, delayed, or reordered depending on the system. Reliability is supplied by additional mechanisms where required, not by the word “packet”.
Store-and-forward packet devices receive the required packet before forwarding. Cut-through implementations can begin earlier under supported conditions, changing latency and error-handling trade-offs. Calculations should state which forwarding model is assumed.
| Method | Allocation / unit | Main advantage | Main cost |
|---|---|---|---|
| Circuit | Reserved connection resources | Predictable allocated service | Setup and idle reservation |
| Message | Whole message stored at each hop | No prior end-to-end reservation | Large storage and delay |
| Packet | Small units sharing links | Pipelining and bursty sharing | Headers, queues, loss and ordering concerns |
4. Datagram and virtual-circuit arrangements
A datagram network forwards packets using destination addressing and current forwarding information without requiring a prior per-flow path setup. IP is the central Internet example. Different packets may follow different paths after routing changes. The network does not promise that they arrive in order or arrive at all.
A virtual-circuit arrangement establishes forwarding state and identifiers for a logical path. Packets then follow that arrangement while it remains valid. This can reduce per-packet decision information or support particular service policies, but state must be installed, maintained, and recovered. A virtual circuit does not automatically reserve bandwidth; reservation is a separate design choice.
A TCP connection over IP is transport state between endpoints, not proof that IP routers have established a circuit for it. Distinguish an application session, transport connection, network forwarding path, and physical circuit.
5. Routing and forwarding are separate
Routing determines paths or constructs forwarding information. Forwarding uses that information to move an arriving unit to a chosen next hop or output. A router does not compute a fresh global shortest path from scratch for every packet in the usual model.
Routes depend on reachability, metrics, and policy. The chosen route need not be geographically shortest or lowest latency. A forwarding loop can occur when information is inconsistent; hop limits prevent packets from circulating forever but do not fix the underlying route. Convergence after failure takes time and may temporarily disrupt traffic.
Queues form when several inputs request an output faster than it can serve them. Scheduling affects fairness and delay. Priority can help selected traffic but can starve other traffic without safeguards. A switching system needs both a forwarding decision and a plan for contention.
6. Store-and-forward calculation and packet pipelining
For one L-bit message over H identical links of rate R, pure store-and-forward transmission takes H × L/R when propagation, setup, processing, and queueing are ignored. Splitting into N equal packets allows links to operate on different packets simultaneously. In the ideal equal-rate model, completion takes (H + N − 1) × packet_bits/R.
Headers make packet_bits larger than payload_bits. Very small packets increase overhead; very large packets increase waiting and reduce scheduling granularity. Unequal link rates and queueing need a more detailed model. The formula is a teaching model, not a universal Internet-transfer prediction.
Performance conclusions should name assumptions. Packet pipelining can reduce message completion time without reducing the physical propagation delay of any one bit. A faster average does not establish guaranteed delivery or deadline compliance.
Worked example
Send 12,000 payload bits over three 1 Mb/s links. One whole store-and-forward message takes 3 × 12,000 / 1,000,000 = 36 ms. Divide it into six packets of 2,000 payload bits with 100 header bits each. Each packet transmission takes 2.1 ms. Ideal pipeline completion is (3 + 6 − 1) × 2.1 = 16.8 ms, excluding propagation and other delays. Total transmitted data per link is 12,600 bits, so the speed gain comes from overlapping stages despite header overhead.
7. Failure and service guarantees
Reserved resources simplify certain guarantees but do not eliminate faults. Statistical packet sharing accommodates changing traffic efficiently but needs explicit mechanisms if a bounded delay or loss target is required. Retries can restore delivery after transient loss but increase completion time and duplicate risk at higher layers.
Choose by workload: a short bursty transaction benefits from flexible sharing; a sustained deadline-sensitive flow may need admission and resource control. Modern systems can combine packet switching with policy, prioritisation, or reservations. Avoid a rigid claim that packet networks can never support quality of service.
An architectural explanation should identify who detects failure, who retransmits, who keeps state, and what happens during recovery. Delivery and successful application processing remain different outcomes.
Revision and practice
- Compare setup, storage, overhead, and utilisation across methods.
- Compute whole-message versus packet-pipeline completion time.
- Explain why TCP is not a physical or network-layer circuit.
- Separate route computation from per-packet forwarding.
Questions and answers
Easy: explain the idea. Medium: apply or compare it. Hard: analyse assumptions and trade-offs. Tags describe the question’s purpose; interview questions are original practice, not claims about a specific employer.
An intermediate node receives and stores the required unit before forwarding it. The unit can be a whole message or a packet. Name the unit and account for its transmission time on each link.
Flows share link capacity rather than holding idle reservations. Their packets can be interleaved and pipelined. This efficiency brings contention, headers, and variable queueing, so it is not a free guarantee of low delay.
No. It establishes logical path state or identifiers. Bandwidth reservation, admission, and scheduling require additional mechanisms. A logical connection and a capacity guarantee are different properties.
Smaller units enable finer pipelining and shorter blocking intervals, but each carries overhead and requires processing. Goodput can fall when headers dominate. The right size depends on path MTU, workload, device capability, and delay requirements.
They are often used loosely, but routing determines paths or forwarding information; forwarding moves units using that information. Layer-2 switching commonly uses MAC/VLAN state, while IP routing uses prefixes. Modern devices may perform both.
It bounds how long a packet can continue forwarding and helps terminate loops. It does not choose a correct path, restore missing reachability, or ensure delivery. A packet can expire while the route remains broken.
References and further exploration
The explanations and practice above are the study material. These primary sources let you verify standards, examine historical evidence, and continue investigating.
Spot an error? Report it to Study Shelf with this page link.