CS Atlas GATE 2027
Computer Networks course
0 / 90 complete

Computer Networks/Phase 1 · Layering, Switching & Performance

Lesson 1.2.3 · Item 16 of 90

Virtual circuits and the full comparison

Read at your own pace. Try the questions before opening the answers.

On this page

Recall warm-up

  1. What does a router do with a packet under store-and-forward?
    Stuck? Peek at 1.2.2 Packet switching: store-and-forward, datagrams, statistical multiplexing
    • Packet switching: packets with headers; no reservation; full link rate while sending.
    • Store-and-forward: receive whole packet → buffer/queue → forward; full buffer → loss.
    • Datagram: each packet routed independently; may reorder; robust to failures.
    • Statistical multiplexing: share capacity on demand; P(exactly k of n) = C(n,k)pᵏ(1−p)ⁿ⁻ᵏ.

    Read lesson 1.2.2

  2. Three phases of circuit switching?
    Stuck? Peek at 1.2.1 Circuit switching: setup, reserved resources, teardown
    • Circuit switching: setup → data transfer → teardown.
    • Dedicated path; each link's share (time slot or frequency band) is reserved: circuit rate = R/n.
    • Total time = setup + bits/circuit rate (+ travel time if given).
    • + guaranteed rate, in order, no queues; − setup delay, idle capacity wasted, fragile.

    Read lesson 1.2.1

  3. Which OSI layer chooses routes across networks?
    Stuck? Peek at 1.1.2 The OSI 7 layers and the TCP/IP model
    • OSI bottom-up: Physical, Data link, Network, Transport, Session, Presentation, Application.
    • Scope: link → hop → host-to-host → process-to-process.
    • Routers: layers 1–3; hosts: 1–7.
    • TCP/IP (5): application (= OSI 5–7), transport, network, data link, physical.
    • Encryption/compression = presentation; dialogue control = session.

    Read lesson 1.1.2

The Hook

A taxi rank at an airport: the first time you go to a hotel, the dispatcher writes the route on a card and gives your group a short card number. Every later taxi of your group just shows "card 7" and drivers already know the way. No lane is reserved — taxis still share the road — but the route is decided once. That is a virtual circuit.

Predict First

In a virtual circuit, does a packet need to carry the full destination address in every header?

,

No. After setup, each packet carries only a short virtual-circuit identifier (VCI); each switch looks it up in a table built during setup. The full address is needed only in the setup request.

Core Concept

Virtual circuit: setup + packets

Virtual-circuit switching: a path is chosen once during setup; switches record an entry for the connection; then packets carrying a short VC identifier follow that path. Links are not reserved — packets still queue and share capacity.

It has the same three phases as a circuit (setup, data transfer, teardown) but the data moves as packets with store-and-forward.

Host ASwitch 1Switch 2Host Bsetup (full address) → table entries madeconnection acceptedpackets with VCI only, same pathteardown: entries removed
A virtual circuit decides the route once; packets then follow it using a short label.

VC tables and label swapping

Each switch keeps a table: (incoming link, incoming VCI) → (outgoing link, outgoing VCI). The VCI usually changes at each hop — each link has its own numbering — so a switch rewrites the label as it forwards ("label swapping").

SwitchIn linkIn VCIOut linkOut VCI
S1112322
S222217
One connection's entries: 12 on the first link, 22 on the second, 7 on the third.

Connection-oriented vs connectionless

Connection-oriented: a setup phase creates state before data flows (circuit switching, virtual circuits). Connectionless: no setup; every unit is independent (datagrams).

Connection-oriented
setup state first · same path · in order
Connectionless
no setup · independent packets · may reorder
Two families.

The full comparison

GATE favourite. Learn this table row by row.

PropertyCircuitVirtual circuitDatagram
Setup phaseyesyesno
Resources reservedyes (link capacity)no (only table entries)no
Addressing in each unitnone neededshort VCIfull destination address
Pathfixedfixed after setupper packet
Orderin orderin ordermay reorder
Store-and-forward / queueingnoyesyes
Effect of a switch failurecall dropsall VCs through it droponly packets there are lost; others reroute
Link capacity usewasted when idlesharedshared
Circuit vs virtual circuit vs datagram.

Putting it together

  • A virtual circuit sets up a path once and then forwards packets by short labels.
  • It is connection-oriented like a circuit, but shares link capacity like datagrams.
  • Know the comparison table: setup, reservation, addressing, path, order, failure.

Visual

Switching
Connection-oriented setup first
Virtual circuit packets on a fixed path, no reservation
A virtual circuit is connection-oriented like a circuit but carries packets like a datagram network.

Worked Examples

Easy

Which of circuit, virtual circuit, datagram: (a) has no setup; (b) reserves link capacity; (c) uses a short label in each packet?

Show the full solution

(a) Datagram. (b) Circuit. (c) Virtual circuit.

Medium

A full destination address takes 32 bits; a VCI takes 12 bits. A connection carries 10,000 packets. How many header bits per packet, and how many bytes in total, does the VC save?

Show the full solution

Per packet: 32 − 12 = 20 bits. Total: 20 × 10,000 = 200,000 bits = 25,000 bytes.

GATE

Which are true? (i) In a virtual circuit network, all packets of a connection follow the same path. (ii) Virtual circuits reserve link capacity at setup. (iii) Datagram networks need no setup phase. (iv) In a virtual circuit network packets can arrive out of order.

Show the full solution

(i) True. (ii) False — only table state, no link capacity reservation. (iii) True. (iv) False — one path means order is preserved.

GATE Traps

  • Virtual circuits do not reserve link capacity — packets still queue and can be dropped.
  • The VCI is local to each link and usually changes at every hop.
  • Both circuit and virtual-circuit networks deliver in order; only datagrams may reorder.

Memory Hook

"Circuit = private road. Virtual circuit = shared road with a fixed route card. Datagram = every car asks for directions at each junction."

Connect the Dots

We now know three ways for our packets to cross the network. Next (Ch 1.3): how long does it actually take? We need to measure delays: how long to push bits onto a link, how long they travel, and how long they wait.

Self-Test

  1. MCQ

    Which switching method reserves link capacity for the whole connection?

    1. Datagram
    2. Virtual circuit
    3. Circuit
    4. All three
  2. MSQ

    Which are true of virtual-circuit switching?

    1. It has a setup phase.
    2. Packets carry a short VC identifier.
    3. Packets of one connection can take different paths.
    4. Packets can be queued at switches.
  3. MCQ

    In which method can packets of one message arrive out of order?

    1. Circuit
    2. Virtual circuit
    3. Datagram
    4. None
  4. NAT

    Full address 32 bits, VCI 10 bits. Header bits saved over 500 packets?

    Write your answer before opening the key.

Rule Card

  • Virtual circuit: setup chooses a path, switches store (in-link, in-VCI → out-link, out-VCI); packets carry short VCIs; no link capacity reserved.
  • Connection-oriented: circuit, VC. Connectionless: datagram.
  • Setup? reserved? per-packet routing? → circuit Y/Y/N · VC Y/N/N · datagram N/N/Y.
  • Order kept by circuit and VC; datagrams may reorder.

Concept Ledger

  • virtual circuit
  • VC identifier (VCI), label swapping
  • connection-oriented vs connectionless
  • circuit / VC / datagram comparison

Answer Vault

Try the questions first. Open when you are ready to check.

Warm-up answers

  1. Receives it completely, stores it, then forwards it.
  2. Setup, data transfer, teardown.
  3. The network layer.

Self-test answers

  1. C — Only circuit switching reserves link capacity.
    • A: Datagrams reserve nothing.
    • B: VCs keep table entries but share link capacity.
    • D: Only circuits reserve.
  2. ABD — Setup, short labels, store-and-forward queues.
    • C: All packets of a VC follow the path chosen at setup.
  3. C — Only independent datagrams can take different paths.
    • A: Fixed path → in order.
    • B: Fixed path → in order.
    • D: Datagrams can reorder.
  4. 11000 — 22 × 500 = 11,000 bits.

Flashcards

  1. Does a virtual circuit reserve link capacity?
    Reveal answerNo — only table entries in switches.
  2. Which methods keep packet order?
    Reveal answerCircuit and virtual circuit.
  3. Connectionless switching method?
    Reveal answerDatagram.

Exam shortcuts

  • Three questions decide the type: setup? reserved link capacity? per-packet routing? circuit = yes/yes/no · VC = yes/no/no · datagram = no/no/yes. — any classification question about switching.

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.