UNIHIVE

Study Hub UNIPORT CSC 498

CSC 498 · Computer Network and Data Communications

Circuit, message and packet switching

How data crosses a network of switches: circuit switching, message switching, packet switching with datagrams and virtual circuits, and calculating the delays.

Our notes

3 min read

Circuit switching

A dedicated path is set up before communication (call set-up), used for the whole session, then released. The classic telephone network.

  • Fixed bandwidth and constant delay once connected (good for voice).
  • Capacity is wasted during silences; set-up takes time; a busy network refuses new calls ("network busy").

Message switching

The whole message is sent to the next node, stored, then forwarded when the next link is free (telegrams, early email). No set-up and good line use, but long delays and big buffers.

Packet switching

Messages are cut into packets (with headers carrying addresses and sequence numbers); each is stored and forwarded independently. Links are shared by many users (statistical multiplexing). ARPANET (1969) proved the idea; it is how the Internet works.

  • Datagram (connectionless): each packet is routed on its own and may take a different path and arrive out of order (IP). No set-up; robust to failures.
  • Virtual circuit (connection-oriented): a route is chosen at set-up and all packets follow it in order; each packet carries a short circuit number (X.25, Frame Relay, ATM, MPLS in carrier networks).
CircuitDatagram packetVirtual circuit packet
Set-upyesnoyes
Pathfixedper packetfixed
Orderkeptmay changekept
Bandwidthreservedsharedshared
Failure of a nodecall dropspackets reroutedcircuit must be re-made
Chargingby timeby databy data

Delays

For a message of L bits, link rate R, over k links (k − 1 switches), ignoring propagation and processing:

  • Message switching: k × L/R.
  • Packet switching with packets of P bits (n = L/P packets): L/R + (k − 1) P/R (pipelining: switches forward early packets while later ones are still arriving).
  • Circuit switching: set-up time + L/R (+ propagation).

Worked example. L = 8,000 bits, R = 1 Mbps, k = 3 links.

  • Message switching: 3 × 8 ms = 24 ms.
  • Packets of 1,000 bits (8 packets, 1 ms each): 8 + 2 × 1 = 10 ms (headers ignored).
  • Circuit switching with 15 ms set-up: 15 + 8 = 23 ms.

Smaller packets cut delay, but each packet carries a header, so too small wastes capacity.

  • Total delay per hop = processing + queueing + transmission + propagation. Queueing grows sharply as a link nears full use (traffic intensity ρ = La/R close to 1, where a is the packet arrival rate).

Routing in outline

Each router keeps a routing table (destination → next hop). Tables are built by routing algorithms:

  • Distance vector (Bellman-Ford; RIP): routers swap distance tables with neighbours.
  • Link state (Dijkstra; OSPF): every router learns the whole map and computes shortest paths.
  • BGP between the networks of different organisations (Internet service providers, MTN, Airtel, Glo, universities). Local traffic between Nigerian networks is exchanged at the Internet Exchange Point of Nigeria (IXPN), which keeps it from going abroad and back.
  • Flooding (send on every link) is simple and robust but wasteful; used carefully in some protocols.

Exams usually ask: compare circuit, message and packet switching; datagram versus virtual circuit; calculate delays for each; components of delay; distance vector versus link state routing.

Common mistake: thinking packets wait until the whole message reaches each switch. Each packet moves on as soon as it has arrived, which is why packet switching is faster than message switching.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 498 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.