Network Layer · Computer Networks

Network Switching Techniques


1. Concept and Need for Switching

In an internetwork containing thousands or millions of end-user hosts, connecting every pair of devices via dedicated point-to-point links (full mesh) is physically and economically impossible (L=n(n−1)2L = \frac{n(n-1)}{2}).

Switching solves this by routing data through a network of interconnected intermediate nodes called Switches (or Routers). A switched network dynamically establishes temporary transmission paths between any sender and receiver.

                            SWITCHING TECHNIQUES
                                     |
         +---------------------------+---------------------------+
         |                                                       |
  CIRCUIT SWITCHING                                       PACKET SWITCHING
  (Dedicated physical path)                               (Store-and-forward packets)
                                                                 |
                                              +------------------+------------------+
                                              |                                     |
                                     DATAGRAM APPROACH                     VIRTUAL CIRCUIT
                                    (Connectionless / IP)               (Connection-Oriented)

2. Circuit Switching

In Circuit Switching, a dedicated physical transmission path (a continuous circuit of copper wires, radio channels, or TDM time slots) is established across intermediate switching nodes before data transfer begins.

  Host A ──── [ Switch 1 ] ═══════ [ Switch 2 ] ═══════ [ Switch 3 ] ──── Host B
                   \                 /
                    [ Switch 4 ] ───+
  (Path: Sw1 ====================> Sw2 ====================> Sw3 is dedicated exclusively to A and B)

The Three Phases of Circuit Switching:

  1. Connection Setup: A signaling control packet traverses the network to reserve dedicated channel bandwidth and routing switches end-to-end. If any intermediate link has insufficient capacity, a busy signal is returned.
  2. Data Transfer: Information flows continuously through the established circuit at constant wire speed with zero intermediate queueing or processing delay.
  3. Connection Teardown: When communication concludes, a disconnect signal releases all reserved switches and bandwidth for other users.

Characteristics:

  • Guaranteed Bandwidth & Latency: Predictable, deterministic performance ideal for real-time human voice.
  • Low Channel Efficiency: Channel capacity remains locked and completely wasted during pauses or silences in conversation.
  • Standard Example: Traditional Public Switched Telephone Network (PSTN).

3. Packet Switching

In Packet Switching, long messages are divided into smaller, discrete chunks called Packets (typically a few hundred to 1500 bytes). Each packet carries header metadata (source address, destination address, sequence number). Intermediate nodes use Store-and-Forward processing: a packet is fully received and buffered before being forwarded to the next outbound link.


A. Datagram Approach (Connectionless Packet Switching)

In the datagram approach (used by the Internet Protocol - IP):

  • Every packet is treated as an independent entity called a Datagram.
  • Intermediate routers inspect the destination IP address and make independent routing decisions on a per-packet basis.
  • Packets belonging to the same message may travel along completely different physical paths.
  • Packets may arrive at the receiver out of order or experience variable delay (jitter). Upper layers (TCP) are responsible for reordering and error recovery.
  • Advantage: Highly robust. If a router fails mid-session, subsequent datagrams are automatically rerouted around the failure.
       [ Router 1 ] ──(P1)──> [ Router 2 ]
      /                                   \
  Sender ───────(P2)───────> [ Router 3 ] ───> Receiver
      \                                   /
       [ Router 4 ] ──(P3)──> [ Router 5 ]
  (Packets P1, P2, P3 take different routes and may arrive out of order: [P2, P1, P3])

B. Virtual Circuit Approach (Connection-Oriented Packet Switching)

In Virtual Circuit packet switching (used in X.25, Frame Relay, and ATM):

  • A logical path is pre-established between sender and receiver before transmitting data packets, called a Virtual Circuit (VC).
  • Intermediate switches create an internal routing table mapping Virtual Circuit Identifiers (VCI) from input ports to output ports.
  • All packets carry a short VCI number rather than a full global destination address.
  • All packets follow the exact same physical path in sequential order, eliminating out-of-order delivery.
  • Two VC Types:
    1. SVC (Switched Virtual Circuit): Established dynamically on-demand for a session and torn down afterward.
    2. PVC (Permanent Virtual Circuit): Permanently configured by network operators between frequent endpoints (no setup/teardown overhead).
 Virtual Circuit Forwarding Table at Intermediate Switch:
 +------------+-----------+-------------+------------+
 | Input Port | Input VCI | Output Port | Output VCI |
 +------------+-----------+-------------+------------+
 |     1      |    14     |      3      |     22     |
 |     2      |    77     |      1      |     41     |
 +------------+-----------+-------------+------------+

4. Delay & Timing Analysis

  Circuit Switching Delay:
  Time
   |    [ Setup Phase ]  ──> RTT delay to establish path
   |    [ Data Transfer] ──> Only Propagation Delay (Zero store-and-forward delay!)
   |    [ Teardown ]
   v

  Packet Switching Delay:
  Time
   |    [ Hop 1 Transmission + Propagation ]
   |    [ Buffer & Store-and-Forward Delay at Router 1 ]
   |    [ Hop 2 Transmission + Propagation ]
   |    [ Buffer & Store-and-Forward Delay at Router 2 ]
   v

5. Comprehensive Comparison: Circuit vs. Datagram vs. Virtual Circuit

Parameter Circuit Switching Datagram Packet Switching Virtual Circuit Packet Switching
Path Reservation Dedicated physical path None (independent paths) Pre-established logical path
Setup Phase Mandatory None Mandatory (for SVC)
Addressing Full address during setup only Full global address in every packet Short VCI identifier in packet
Packet Order Strict sequential order Can arrive out of order Guaranteed in-order arrival
Intermediate Storage No buffering at switches Buffering at every router Buffering at every switch
Node Failure Impact Circuit breaks; call drops Packets dynamically rerouted Virtual circuit breaks
Bandwidth Utilization Inefficient (wasted in pauses) Highly efficient (statistical multiplexing) Efficient
Primary Real-World Use Traditional PSTN landline phone Internet (IPv4 / IPv6) ATM, Frame Relay, MPLS

6. Key Exam Questions & Takeaways

  1. Why does Datagram Packet Switching utilize bandwidth more efficiently than Circuit Switching?
    • Circuit switching reserves dedicated channel capacity for the entire session duration, even during idle silent intervals. Datagram packet switching uses statistical multiplexing: packets from multiple users interleave dynamically across the shared link, maximizing link utilization.
  2. What is the difference between an SVC and a PVC?
    • An SVC (Switched Virtual Circuit) is set up dynamically when requested and torn down when the call terminates. A PVC (Permanent Virtual Circuit) is permanently provisioned by network administrators and remains established continuously without connection setup delays.
  3. What is the role of the VCI in Virtual Circuit networks?
    • The Virtual Circuit Identifier (VCI) is a short local label that identifies the virtual circuit on a specific physical link. Switches use local VCI tables to swap the incoming VCI for an outgoing VCI and forward the packet, avoiding the overhead of full global IP addresses in packet headers.
Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Computer Networks modules