Describe the process of packet switching

Data Transmission – Packet Switching

Learning objective

Explain how packet switching works, describe the structure of a packet, evaluate why this method is suitable for most computer‑network communications, and apply the required calculations (transmission time, packet count) as set out in the Cambridge IGCSE 0478 syllabus.

1. What is packet switching?

  • A method of sending data in which a message is broken into small blocks called packets.
  • Each packet travels independently through the network; different packets may follow different routes.
  • At the destination the packets are re‑assembled in the correct order to reconstruct the original message.
  • Why use packets?
    • Efficient use of bandwidth – links are shared among many users.
    • Robustness – if one path fails, packets can be rerouted automatically.
    • Scalability – new devices can be added without redesigning the network.
    • Supports bursty traffic (e.g., web browsing, email).

2. Where does packet switching happen?

  • Routers (layer 3) – read the destination address in a packet’s header and forward it onto the next link.
  • Switches (layer 2) – forward Ethernet frames within a LAN using MAC addresses.
  • Network Interface Cards (NICs) – add the packet header before transmission and strip it on reception.

3. Packet (or frame) structure

Field Description Typical size (bits)
Source address IP address of the sending device (IPv4 or IPv6) 32 (IPv4) / 128 (IPv6)
Destination address IP address of the receiving device 32 (IPv4) / 128 (IPv6)
Sequence number Order of the packet within the original message (used for re‑assembly) 16–32
Payload (data) Actual user data carried by the packet Variable – up to the Ethernet MTU of 1500 bytes (12 000 bits)
Checksum / CRC Error‑detecting code (detects but does not correct corruption) 16–32

Note: In Ethernet the 1500 B payload is the **Maximum Transmission Unit (MTU)**. The complete Ethernet frame also contains a 14‑byte header and a 4‑byte CRC, so the total bits placed on the wire are larger than the payload alone.

4. Error‑detection in packet‑switched networks

Cambridge expects you to know three common techniques:

  • Parity bit – a single extra bit added so that the total number of 1’s is even (even parity) or odd (odd parity). Simple but can only detect an odd number of bit errors.
  • Checksum / CRC – a block of bits calculated from the entire packet (e.g., 16‑bit Internet checksum or 32‑bit CRC). The receiver recomputes the value; a mismatch indicates corruption.
  • Automatic Repeat reQuest (ARQ) – when a checksum/CRC fails, the receiver asks the sender to retransmit the erroneous packet. This provides reliable delivery over an unreliable link.

Some protocols also use a check‑digit (e.g., for credit‑card numbers) but this is outside the core networking context.

5. How packet switching works (step‑by‑step)

  1. Segmentation: The original data stream is divided into packets of fixed or variable size.
  2. Header addition: Each packet receives a header containing source/destination addresses, a sequence number, and a checksum/CRC.
  3. Routing: Routers examine the destination address and forward the packet toward its target. Different packets may travel different routes.
  4. Transmission over the link: Packets travel across one or more physical links (serial or parallel, simplex/half‑duplex/full‑duplex).
  5. Reception: The destination NIC collects incoming packets and checks the checksum/CRC.
  6. Re‑assembly: Using the sequence numbers, the receiver orders the packets and rebuilds the original message.
  7. Error handling: If a packet is missing or its checksum fails, the receiver requests retransmission via ARQ.

6. Transmission‑media characteristics (relevant to packet switching)

Each medium is classified by its signalling method (serial vs. parallel) and by its directionality (simplex, half‑duplex, full‑duplex). The table links the media to the syllabus categories.

Media Serial / Parallel Simplex / Half‑duplex / Full‑duplex Typical use in packet‑switched networks
Twisted‑pair (Ethernet, Cat‑5/6) Serial Full‑duplex (modern switches) LANs, Internet access
Coaxial cable (10BASE‑2, 10BASE‑5) Serial Half‑duplex (older Ethernet) Early LANs, cable TV
Fiber‑optic cable Serial Full‑duplex Backbone, high‑speed inter‑city links
USB (Universal Serial Bus) Serial Full‑duplex (USB 2.0 and later) Peripheral connections; can carry packet‑switched data (e.g., USB‑Ethernet adapters)
Parallel printer cable (IEEE 1284) Parallel Half‑duplex Legacy printers – not used for modern packet‑switched networks

7. Formula for transmission time

Formula:
$$T_{\text{total}} = T_{\text{propagation}} + \frac{L}{R}$$

where

  • $T_{\text{propagation}}$ – time for a signal to travel through the medium (seconds).
  • $L$ – length of the packet (or frame) in bits.
  • $R$ – transmission rate of the link (bits / second).

8. Numeric example (including header bits)

Calculate the total time to transmit a standard Ethernet frame that carries the maximum payload (1500 B) over a 10 Mbps link, with a propagation delay of 2 ms.

  1. Convert payload to bits: $1500\;\text{B} \times 8 = 12\,000\;\text{bits}$.
  2. Add Ethernet header (14 B) and CRC (4 B): $ (14+4)\times8 = 144\;\text{bits}$.
  3. Total frame size $L = 12\,000 + 144 = 12\,144\;\text{bits}$.
  4. Transmission time $= \dfrac{L}{R}= \dfrac{12\,144}{10\,000\,000}=0.0012144\;\text{s}=1.214\;\text{ms}$.
  5. Total time $= T_{\text{propagation}} + \dfrac{L}{R}=2\;\text{ms}+1.214\;\text{ms}=3.214\;\text{ms}$.

Unit note: The file size in the syllabus is often given in binary units (1 KiB = 1024 B). In this example the value 12 KB = 12 288 B (12 × 1024) was used, which matches the Cambridge convention for “kilobyte”. If a decimal value is supplied (12 000 B) state the conversion you are using.

9. Advantages of packet switching

  • High bandwidth utilisation – idle capacity can be used by other users.
  • Resilience – packets can be rerouted around failures.
  • Scalable – adding new hosts does not require new dedicated circuits.
  • Supports bursty, asynchronous traffic typical of data‑centric applications.

10. Comparison with circuit switching

Aspect Packet switching Circuit switching
Resource allocation Dynamic – resources are allocated per packet Static – a dedicated path is reserved for the whole session
Efficiency High – unused capacity can be used by other traffic Low – reserved capacity may sit idle
Delay Variable – depends on congestion and routing Predictable – fixed latency once the circuit is set up
Complexity Higher – needs routing, sequencing, error checking Lower – simple end‑to‑end connection

11. Exam‑style question (IGCSE practice)

Scenario: A student wants to send a 12 KB file from a laptop to a server over an Ethernet network that uses a maximum payload of 1500 bytes per packet. The link speed is 10 Mbps and the propagation delay is 2 ms.

  1. Calculate the minimum number of packets required.
  2. Using the formula in section 7, compute the total transmission time for one packet (include Ethernet header and CRC).
  3. Explain briefly why packet switching is more suitable than circuit switching for this file transfer.

Answer outline (for teacher marking):

  • Number of packets: $ \lceil 12\,\text{KB} / 1500\,\text{B} \rceil = \lceil 12\,288 / 1500 \rceil = 9$ packets.
  • Transmission time for one packet:
    • Payload = 1500 B = 12 000 bits.
    • Header + CRC = 18 B = 144 bits.
    • Total $L = 12\,144$ bits.
    • Total $T_{\text{total}} = 2 ms + 1.214 ms = 3.214 ms$.
  • Why packet switching? The 9 packets can share the 10 Mbps link with other traffic, making efficient use of bandwidth. If any link fails, individual packets can be rerouted, whereas a dedicated circuit would be blocked and waste the whole link for the duration of the transfer.

12. Quick reference diagram (suggested)

Data message → segmentation → packets travel through routers → re‑assembly at destination.

Create an account or Login to take a Quiz

28 views
0 improvement suggestions

Log in to suggest improvements to this note.