Packet Switching: Shared Resource Data Networks
Virtual Circuit Switching
Read aloud is unavailable in this browser.
The Middle Ground: Connections Without Dedication
Circuit switching dedicates physical resources but wastes capacity. Datagram switching shares resources efficiently but offers no guarantees. Is there a middle ground?
Virtual circuit switching answers this question by combining aspects of both approaches: it establishes a logical connection along a path through the network (like circuit switching) but shares the physical links among many concurrent connections (like packet switching).
Virtual circuits were central to telecommunications-oriented data networks (ATM, Frame Relay, X.25) and remain critical in modern networks through technologies like MPLS (Multi-Protocol Label Switching). Understanding virtual circuits is essential for network engineering, particularly in service provider and enterprise WAN contexts.
This page provides an exhaustive exploration of virtual circuit switching—its conceptual model, signaling mechanisms, forwarding operations, label switching technologies, and the engineering decisions that determine when virtual circuits are preferred over datagrams.
By completing this page, you will: (1) Understand the fundamental operation of virtual circuit switching, (2) Distinguish permanent (PVC) from switched (SVC) virtual circuits, (3) Trace the signaling and forwarding processes in virtual circuit networks, (4) Analyze label switching implementations (ATM, Frame Relay, MPLS), and (5) Evaluate when virtual circuits are preferred over datagram switching.
Conceptual Foundation: What is a Virtual Circuit?
A virtual circuit (VC) is a pre-established path through a packet-switched network along which packets flow in sequence. Unlike circuit switching, no physical resources are permanently dedicated—the path is "virtual" because packets from many VCs share the same physical links and switch capacity through statistical multiplexing.
Core Characteristics
1. Connection-Oriented Operation
Virtual circuits require explicit setup before data transfer. A signaling process establishes the path, allocates resources (optionally), and assigns identifiers at each hop. Only after setup succeeds can data packets flow.
2. Path Determination at Setup Time
Unlike datagrams where each packet is independently routed, virtual circuits determine the path once, at connection establishment. All subsequent packets follow this pre-determined path.
3. Short Labels Instead of Full Addresses
After setup, packets carry short virtual circuit identifiers (VCIs) or labels instead of full destination addresses. These labels have only local significance—each switch maps incoming labels to outgoing labels and interfaces.
4. In-Order Delivery
Since all packets follow the same path, they naturally arrive in the order sent (assuming no packet loss). This simplifies receiver processing compared to datagrams, which may arrive out-of-order.
5. Per-Connection State
Every switch along the path maintains state for each active virtual circuit—a mapping from incoming interface/label to outgoing interface/label. This is fundamentally different from datagram routers, which maintain only topology state.
- •Resource Allocation: Circuit switching dedicates physical capacity (a time slot, a wavelength, a frequency band). Virtual circuits share physical capacity—resources are consumed only when packets are actually transmitted.
- •Utilization: Circuit switches maintain dedicated paths even during silence (waste). Virtual circuit switches multiplex many connections onto shared links (efficient).
- •Switching Speed: Circuit switching can be very fast (no per-packet processing). Virtual circuit switching requires per-packet label lookup (but simpler than datagram LPM).
- •Failure Behavior: Circuit failures drop the dedicated connection. Virtual circuit failures may require re-establishment (though fast-reroute mechanisms exist).
The term 'virtual' distinguishes this from physical circuit switching. A virtual circuit appears to the endpoints as a dedicated connection—packets flow in order along a fixed path. But the underlying physical links are shared with other virtual circuits through packet multiplexing. The 'circuit' is a logical abstraction, not a physical dedication.
Types of Virtual Circuits: PVC vs. SVC
Virtual circuits are classified into two fundamental types based on how they are established and managed.
Permanent Virtual Circuit (PVC)
A Permanent Virtual Circuit is manually configured by the network operator. It exists indefinitely until explicitly removed—there is no signaling protocol to establish or tear down the connection.
Characteristics:
- Pre-provisioned by network administrators
- Always available (no setup delay)
- Billing based on subscription, not usage
- Typically used for site-to-site enterprise connectivity
- Simple endpoint operation—no signaling capability required
PVC Configuration Process:
- Administrator identifies endpoints and required capacity
- Route is determined (manually or via network management system)
- Each switch along the path is configured with the appropriate label mapping
- Configuration is stored persistently; survives switch restarts
- Endpoints are notified and can begin transmitting immediately
Use Cases:
- Point-to-point WAN links between branch offices
- Backhaul connections from cell towers to core network
- Leased line replacements in Frame Relay/MPLS networks
- Fixed-topology SCADA and industrial control networks
Switched Virtual Circuit (SVC)
A Switched Virtual Circuit is established dynamically through a signaling protocol. The connection exists only for the duration of a communication session, after which resources are released.
Characteristics:
- Established on-demand via signaling
- Setup delay before data can flow
- Billing based on connection duration or data volume
- Resources returned to pool when connection terminates
- Requires signaling protocol support at endpoints
SVC Lifecycle:
┌─────────────────────────────────────────────────────────────────┐
│ SVC Lifecycle Phases │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. SETUP: Signaling message propagates through network │
│ ┌──────┐ SETUP ┌────────┐ SETUP ┌──────┐ │
│ │Source│────────────→│ Switch │────────────→│ Dest │ │
│ └──────┘ └────────┘ └──────┘ │
│ │
│ 2. CONNECT: Confirmation propagates back to source │
│ ┌──────┐ CONNECT ┌────────┐ CONNECT ┌──────┐ │
│ │Source│←────────────│ Switch │←────────────│ Dest │ │
│ └──────┘ └────────┘ └──────┘ │
│ │
│ 3. DATA TRANSFER: Packets flow using established VC │
│ ┌──────┐ DATA ┌────────┐ DATA ┌──────┐ │
│ │Source│─────◆◆◆────→│ Switch │─────◆◆◆───→│ Dest │ │
│ └──────┘ └────────┘ └──────┘ │
│ │
│ 4. RELEASE: Teardown signaling releases resources │
│ ┌──────┐ RELEASE ┌────────┐ RELEASE ┌──────┐ │
│ │Source│────────────→│ Switch │────────────→│ Dest │ │
│ └──────┘ └────────┘ └──────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Use Cases:
- Dial-up connections (X.25, ISDN)
- ATM-based SVC networks
- On-demand MPLS LSPs with RSVP-TE signaling
- Dynamic VPN tunnel establishment
| Characteristic | PVC | SVC |
|---|---|---|
| Setup Method | Manual configuration | Signaling protocol |
| Setup Delay | None (always ready) | Signaling RTT |
| Lifetime | Indefinite | Session-based |
| Configuration Changes | Requires admin intervention | Dynamic |
| Scalability | Limited by manual provisioning | Scales with signaling |
| Billing Model | Flat rate | Usage-based |
| Failure Recovery | Requires manual reconfiguration | Can re-signal alternate path |
| Complexity | Simple endpoint | Requires signaling stack |
Modern MPLS networks often use a hybrid: Label Switched Paths (LSPs) are signaled dynamically (like SVCs) but persist indefinitely (like PVCs). The signaling protocol (LDP, RSVP-TE) automatically establishes paths, but the paths remain until explicitly torn down or the network topology changes.
Virtual Circuit Signaling
Signaling is the process by which virtual circuits are established, modified, and released. Understanding signaling is essential for grasping how virtual circuits actually work.
Signaling Functions
Signaling protocols must accomplish several tasks:
- Path Selection: Determine the sequence of switches from source to destination
- Resource Allocation: Reserve bandwidth, buffers, and processing capacity (if required)
- Label Assignment: Allocate labels at each hop for the virtual circuit
- State Installation: Program forwarding tables at each switch
- Confirmation: Notify the source that the path is ready
- Teardown: Release resources when the connection ends
Signaling Message Flow
Let's trace the establishment of a switched virtual circuit:
Step 1: SETUP/Request
The source generates a SETUP message containing:
- Source address (for routing the confirmation back)
- Destination address (for path selection)
- Requested QoS parameters (bandwidth, delay, priority)
- Optional path constraints (explicit route, exclusions)
Step 2: Hop-by-Hop Processing
Each switch along the path:
- Receives the SETUP message
- Determines the next hop toward the destination
- Allocates resources (if doing resource reservation)
- Assigns a label for the incoming direction (or uses downstream-assigned label)
- Stores the per-VC state in its forwarding table
- Forwards the SETUP to the next hop
Step 3: Destination Response
The destination receives the SETUP and, if accepting:
- Allocates local resources
- Assigns the final label for incoming packets
- Sends a CONNECT/Confirm message back along the path
Step 4: Path Confirmation
Each switch along the reverse path:
- Completes its forwarding table entry with the downstream label
- Activates the virtual circuit for data forwarding
- Propagates the CONNECT toward the source
Step 5: Data Transfer
Once the source receives CONNECT, data can flow. Each packet carries the appropriate label, and switches forward based on label lookups.
- •X.25 Call Setup: Early packet-switched networks; connection-oriented with acknowledged delivery at each hop; largely obsolete.
- •Frame Relay LMI (Local Management Interface): Used for PVC status reporting; SVCs were defined but rarely deployed.
- •ATM UNI Signaling (Q.2931): Sophisticated SVC signaling based on ISDN Q.931; supports complex QoS negotiation.
- •RSVP (Resource Reservation Protocol): Originally for IntServ; now used in MPLS-TE for traffic-engineered LSP establishment.
- •LDP (Label Distribution Protocol): MPLS label distribution; hop-by-hop, follows IGP routing; minimal traffic engineering.
- •Segment Routing: Modern approach eliminating per-hop signaling; path encoded in packet header as segment list.
Every active virtual circuit requires state at every switch along its path. In a network with thousands of switches and millions of connections, maintaining this state becomes a significant challenge. This is why Internet backbone routers use datagrams (IP) for the control plane even when label switching (MPLS) is used for the data plane—the best of both worlds.
Label Switching and Forwarding
The core operation of virtual circuit switching is label switching—packets are forwarded based on short, locally-significant labels rather than full destination addresses.
Label Table Structure
Each switch maintains a label forwarding table (also called a label information base or LIB in MPLS). Each entry contains:
| Field | Description |
|---|---|
| Incoming Interface | The interface on which the packet arrives |
| Incoming Label | The label value in the received packet |
| Outgoing Interface | The interface for forwarding |
| Outgoing Label | The label to write into the packet |
| Additional Actions | QoS marking, counters, TTL handling |
Key Insight: The incoming label alone is NOT sufficient to determine forwarding. The combination of incoming interface AND incoming label uniquely identifies the virtual circuit. Different interfaces may use the same label value for different VCs.
Label Switching Operation
The forwarding process is elegantly simple:
┌─────────────────────────────────────────────────────────────────┐
│ Label Switching Process │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Packet arrives on interface i with label L_in │
│ │
│ 2. Switch looks up (i, L_in) in forwarding table │
│ │
│ 3. Table returns: (outgoing_interface j, outgoing_label L_out)│
│ │
│ 4. Switch swaps label: L_in → L_out │
│ │
│ 5. Packet forwarded on interface j │
│ │
└─────────────────────────────────────────────────────────────────┘
Label Operations
MPLS (and similar technologies) support three label operations:
1. SWAP: Replace the incoming label with the outgoing label. This is the standard transit operation.
2. PUSH: Add a new label to the packet. Used at ingress or for label stacking (tunneling).
3. POP: Remove the label. Used at egress or when the packet needs to transition to a different forwarding context.
Worked Example: Label Switching Path
Consider an MPLS network:
┌─────┐ Label=20 ┌─────┐ Label=30 ┌─────┐ Label=40 ┌─────┐
│ R1 │───────────────→│ R2 │───────────────→│ R3 │───────────────→│ R4 │
│(LER)│ │(LSR)│ │(LSR)│ │(LER)│
└─────┘ └─────┘ └─────┘ └─────┘
Ingress Egress
Label Forwarding Tables:
R1 (Ingress LER):
Destination 10.4.0.0/16 → Push Label 20, Forward to R2
R2 (Transit LSR):
Interface=eth0, Label=20 → Swap to Label 30, Forward to R3
R3 (Penultimate LSR):
Interface=eth0, Label=30 → Swap to Label 40, Forward to R4
(or: Pop label, forward as IP to R4 - Penultimate Hop Popping)
R4 (Egress LER):
Label=40 → Pop Label, Forward based on IP destination
(or receive IP packet directly if PHP was used)
Packet Journey:
- IP packet arrives at R1 destined for 10.4.0.0/16
- R1 pushes MPLS label 20, forwards to R2
- R2 receives, looks up (eth0, 20), swaps to label 30, forwards to R3
- R3 receives, looks up (eth0, 30), swaps to label 40, forwards to R4
- R4 pops label, delivers based on IP destination address
In MPLS, the second-to-last router often pops the label (PHP) instead of the egress router. This saves the egress router from doing two lookups (label lookup + IP lookup). With PHP, the egress router receives a plain IP packet and performs only IP routing. This optimization is standard in MPLS deployments.
Virtual Circuit Technologies
Several technologies have implemented virtual circuit switching over the decades. Understanding their evolution provides context for modern networking.
X.25 (1970s-1990s)
X.25 was the first widely deployed packet-switched network standard, designed for unreliable analog circuits.
Characteristics:
- Connection-oriented with per-hop error correction and flow control
- Virtual circuit identifiers: Logical Channel Numbers (LCN)
- Designed for 9.6-64 kbps links
- Extensive error handling at each hop (high overhead)
- Largely obsolete, replaced by Frame Relay and IP
Frame Relay (1990s-2010s)
Frame Relay stripped away X.25's per-hop processing for use on more reliable digital circuits.
Characteristics:
- Connection-oriented but minimal per-hop processing
- Virtual circuit identifier: DLCI (Data Link Connection Identifier, 10 bits)
- Designed for 56 kbps to 45 Mbps links
- Error detection only (no correction)—relies on endpoints
- Primarily used for PVCs; SVC support rarely deployed
- Replaced by MPLS and direct IP connectivity
ATM (Asynchronous Transfer Mode, 1990s-2000s)
ATM was designed to unify voice, video, and data on a single network with guaranteed QoS.
Characteristics:
- Fixed 53-byte cells (48 bytes payload, 5 bytes header)
- Virtual circuit identifiers: VPI/VCI (8-12 bits / 16 bits)
- Hardware switching at very high speeds (155 Mbps to 10+ Gbps)
- Comprehensive QoS with multiple service categories (CBR, VBR, ABR, UBR)
- Complex signaling (Q.2931) for SVCs
ATM Cell Header:
| Field | Size | Purpose |
|---|---|---|
| GFC | 4 bits | Generic Flow Control (UNI only) |
| VPI | 8 bits | Virtual Path Identifier |
| VCI | 16 bits | Virtual Channel Identifier |
| PT | 3 bits | Payload Type |
| CLP | 1 bit | Cell Loss Priority |
| HEC | 8 bits | Header Error Control |
Two-Level Hierarchy: ATM uses Virtual Paths (VP) containing multiple Virtual Channels (VC). This enables efficient management—switching at the VP level is faster, while VCs provide granular connections.
Legacy: ATM is rarely deployed for new installations, but its concepts (small fixed-size units, hierarchical VCs, QoS categories) influenced later technologies. Many DSL modems still use ATM as the underlying transport.
MPLS (Multi-Protocol Label Switching, 2000s-Present)
MPLS combines datagram control with label-switched forwarding—the dominant virtual circuit technology today.
Characteristics:
- 32-bit label header (20-bit label, 3-bit TC, 1-bit S, 8-bit TTL)
- Works with any network layer protocol ("multi-protocol")
- Label distribution via LDP or RSVP-TE
- Traffic engineering with explicit path control
- VPN support via label stacking
- Integrates with IP routing (IGP/BGP) for control plane scaling
| Technology | Label Size | Typical Speed | QoS Support | Status |
|---|---|---|---|---|
| X.25 | 12 bits (LCN) | Up to 64 kbps | Basic (packet classes) | Obsolete |
| Frame Relay | 10 bits (DLCI) | Up to 45 Mbps | CIR, DE bit | Legacy, phasing out |
| ATM | 24 bits (VPI/VCI) | 155 Mbps - 10 Gbps | Comprehensive (CBR, VBR, ABR, UBR) | Legacy, niche use |
| MPLS | 20 bits (label) | Any (multi-rate) | DiffServ + TE | Active, dominant |
MPLS represents the synthesis of datagram and virtual circuit paradigms. The control plane uses IP routing protocols—scalable, connectionless, and well-understood. The data plane uses label switching—fast, deterministic, and traffic-engineerable. This hybrid captures the advantages of both approaches while minimizing their weaknesses.
Advantages and Limitations of Virtual Circuits
Virtual circuits offer distinct advantages but also impose meaningful constraints. A nuanced understanding of these tradeoffs is essential for network design.
- •Predictable Paths: All packets follow the same route, enabling accurate latency predictions and consistent performance. Essential for real-time applications requiring bounded delay.
- •In-Order Delivery: Same-path routing guarantees packets arrive in transmission order. Simplifies receiver processing—no reorder buffer needed.
- •QoS Enforcement: Resources can be reserved per-circuit during setup. Bandwidth guarantees, delay bounds, and jitter limits are achievable. Enables deterministic service for sensitive traffic.
- •Efficient Forwarding: Label lookup is simpler than longest-prefix-match. Exact-match on a 20-bit label is faster than LPM on a 32/128-bit address with 1M+ prefixes.
- •Traffic Engineering: Explicit path control allows operators to route traffic away from congestion, optimize link utilization, and provide path diversity for resilience.
- •Per-Connection Accounting: Since each VC is identifiable, usage tracking and billing per-circuit is straightforward. Important for service providers selling connectivity.
- •Reduced Header Overhead: Short labels (e.g., 4 bytes MPLS) vs. full addresses (20-40 bytes IP). More efficient for small packets.
- •Setup Delay: Signaling must complete before data can flow. For short transfers, setup delay may exceed data transfer time. Makes VCs inefficient for request-response traffic.
- •State Scalability: Every switch must store per-VC state. For N endpoints with full-mesh connectivity, state is O(N²). Hundreds of thousands of VCs strain switch memory and management.
- •Failure Vulnerability: If a switch or link on the path fails, the entire VC is disrupted. Alternate paths require re-signaling or pre-provisioned backup VCs (complexity).
- •Path Rigidity: Traffic cannot automatically shift to better paths. Load balancing requires explicit multi-path configuration or re-signaling.
- •Signaling Complexity: Signaling protocols add network complexity, potential failure modes, and debugging challenges. Interoperability between vendors can be problematic.
- •Resource Inefficiency: Reserved resources may go unused if traffic is bursty. Unlike datagrams, unused VC bandwidth isn't automatically available to other traffic (unless over-subscription is configured).
| Scenario | Virtual Circuit | Datagram |
|---|---|---|
| VoIP, Video Conferencing | ✓ Predictable latency, jitter | Requires QoS overlay |
| Web Browsing | Setup delay problematic | ✓ Zero setup, short connections |
| Enterprise WAN | ✓ Traffic engineering, SLAs | Simpler but less control |
| Internet Backbone | ✓ MPLS for TE | ✓ IP for scale |
| IoT Sensors (millions) | State doesn't scale | ✓ Connectionless, stateless |
| Financial Trading | ✓ Deterministic latency critical | Variable latency a problem |
Modern networks rarely use pure virtual circuits or pure datagrams. The Internet uses datagrams (IP) end-to-end but incorporates MPLS label switching for traffic engineering within carrier networks. SD-WAN creates virtual overlays atop datagram underlay. The engineering skill is knowing which approach to apply where—not choosing one paradigm for everything.
Virtual Circuits in Modern Networks
While the Internet is fundamentally datagram-based, virtual circuit technologies remain essential in specific contexts. Let's examine their modern applications.
MPLS in Service Provider Networks
MPLS is the workhorse of carrier networks, providing:
Traffic Engineering (MPLS-TE):
- Explicit path control to optimize link utilization
- Constraint-based routing (bandwidth, admin weight, affinities)
- Fast Reroute (FRR) for sub-50ms failover
- Enables carriers to meet strict SLAs
VPN Services:
- Layer 3 VPN (L3VPN): Customer routing isolated via VRFs and label stacking
- Layer 2 VPN (L2VPN, VPLS, EVPN): Carrier provides transparent L2 connectivity
- Internet service over MPLS core with customer traffic isolation
Segment Routing (SR):
- Next-generation MPLS eliminating per-hop signaling
- Path encoded in packet header as segment list
- Simplifies control plane while retaining TE capabilities
5G Transport Networks
5G mobile networks rely heavily on virtual circuits:
Fronthaul/Backhaul:
- Strict latency requirements (few milliseconds) for RAN connectivity
- MPLS/Segment Routing for deterministic paths
- Time-Sensitive Networking (TSN) integration for ultra-low latency
Network Slicing:
- Virtual circuits isolate different service types (eMBB, URLLC, mMTC)
- QoS guarantees per slice
- End-to-end slices from device to application
Data Center Interconnect (DCI)
Virtual circuits connect geographically distributed data centers:
EVPN-VXLAN over MPLS:
- Layer 2 extension across WAN
- Enables workload mobility between data centers
- Deterministic latency for synchronous replication
OTN (Optical Transport Network):
- Virtual circuits at the optical layer (ODU)
- Multi-gigabit to terabit connectivity
- Carrier-grade protection and monitoring
Financial Services
Latency-critical trading infrastructure uses virtual circuits:
Dedicated Market Data Feeds:
- PVCs from exchanges to trading floors
- Microsecond-level latency guarantees
- No statistical multiplexing with other traffic
Cross-Connect Services:
- Virtual circuits through carrier hotels and data centers
- Deterministic, measurable latency
- Essential for competitive trading advantage
While ATM and Frame Relay are largely historical, the virtual circuit concept thrives in modern guises: MPLS TE, Segment Routing, EVPN, and 5G network slicing. Whenever predictable performance, traffic engineering, or service isolation is required, virtual circuits—in some form—remain essential. Understanding this paradigm is crucial for modern network engineering.
KEEP LEARNING
Keep learning for free.
Read the complete lesson, save your notes and pick up where you left off with a free account. No card needed.