Packet Switching & Packet Structure

When data travels across large computer networks such as the Internet, files are not sent as one massive, unbroken stream. If an entire multi-gigabyte file were transmitted in a single piece, any single line drop would corrupt the entire transfer, and single users would monopolize network cables.

Instead, networks break data down into small, manageable units called packets and transmit them using packet switching.


Learning Objectives

  • Describe the structure and components of a network packet: Header, Payload, and Trailer.
  • Explain how the packet switching process operates across routers.
  • Analyze the advantages and disadvantages of packet switching compared to circuit switching.

The Structure of a Data Packet

Every network packet consists of three fundamental sections:

+-------------------------------------------------------------+
|                        PACKET HEADER                        |
|  Source IP  |  Destination IP  |  Packet #  |  Total Count  |
+-------------------------------------------------------------+
|                           PAYLOAD                           |
|                    Actual User Data Chunk                   |
+-------------------------------------------------------------+
|                       PACKET TRAILER                        |
|        Checksum / CRC Error Code  |  End-of-Packet Marker   |
+-------------------------------------------------------------+

1. Packet Header

Contains addressing and tracking metadata needed to route and reassemble the packet:

  • Source IP Address: The network IP address of the sending device.
  • Destination IP Address: The network IP address of the intended recipient device.
  • Packet Sequence Number: The ordinal number of the packet (e.g. Packet 4 of 25) so the recipient knows where this chunk fits in the overall file.
  • Total Packets / Packet Size: Informs the receiver how many packets are expected and the size of the packet.
  • Protocol Identifier: Identifies the transmission protocol used (such as TCP or UDP).

2. Payload

  • The actual chunk of user data being transmitted.
  • Payloads typically range from a few hundred bytes up to 64 KiB depending on the network protocol.
  • Examples include a segment of text, a block of pixels from an image, or part of an audio file.

3. Packet Trailer

Contains control and verification markers:

  • Error Detection Code (Checksum or Cyclic Redundancy Check / CRC): A calculated mathematical value used by the recipient to detect whether any bits flipped during transmission.
  • End-of-Packet Marker: A dedicated bit pattern indicating the physical end of the packet.

The Packet Switching Lifecycle

Packet switching is the method of grouping data into packets and transmitting them across a shared network where each packet is routed independently.

Step-by-Step Operation:

  1. Packetisation: The sending device splits the original file into multiple numbered packets, appending headers and trailers.
  2. Independent Routing:
  • Each packet is dispatched onto the network independently.
  • Intermediate routers inspect the destination IP address in each packet header.
  • Routers consult their routing tables to forward the packet along the fastest available path at that exact moment.
  • If a particular cable or router becomes congested or fails, subsequent packets are rerouted along alternative paths.
  1. Arrival Out of Order:
  • Because packets may take different geographic paths of varying distances and speeds, they frequently arrive at the destination computer in a different order from how they were sent (e.g., Packet 3 arrives before Packet 2).
  1. Reassembly:
  • The recipient device stores arriving packets in a buffer.
  • The recipient uses the packet sequence numbers in the headers to reorder the packets correctly.
  • Each packet's checksum is verified against its payload. If a packet is missing or corrupted, a retransmission request is sent for that specific packet.

Advantages & Disadvantages of Packet Switching

Advantages

Disadvantages

High Network Efficiency: Communication lines are shared dynamically; no line sits idle while a user pauses.

Latency & Jitter: Packets take variable amounts of time to arrive, causing potential delays in real-time streaming or gaming.

Resilience & Fault Tolerance: If a router or line fails, packets automatically route around the fault.

Out-of-Order Delivery: Requires processing overhead and buffer memory at the destination to reassemble packets.

Granular Retransmission: If a transmission error occurs, only the corrupted packet needs to be resent, not the entire file.

Header Overhead: Every packet carries address and sequence metadata, increasing total transmitted data volume.

Written practice and self-review

A user uploads a high-resolution video file to a cloud web server using packet switching.

Describe the lifecycle of the data transmission, explaining:

  1. How the original video file is prepared for transmission.
  2. Why individual packets may follow different physical routes across intermediate routers.
  3. How the receiving server reconstructs the complete video file accurately even if packets arrive out of order.

Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.

AI Socratic Tutor

All-Access
Sign in or create an account. AI Tutor is an All-Access benefit.
Sign Up

Need guidance? Ask a question or use the hint below.

AI Socratic Tutor is an All-Access Benefit

Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.

You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.

Exam-Style Check: Packet Structure & Switching

• Multiple Choice
+25 XP
Question

Which three components make up a standard network packet in packet switching?

All-Access Required

Interactive exercises for Module 2 and beyond require an active plan.