Describe the structure of a packet

Data Transmission – Packet Structure

Learning objectives

  • Explain why data are divided into packets and describe the three logical parts of a packet.
  • Identify the different transmission methods required by the Cambridge IGCSE syllabus and give typical examples.
  • List the main header fields of an IPv4 packet and state their purpose.
  • Describe the basic error‑detection techniques and the purpose of encryption.
  • Link packet structure to the wider syllabus (hardware, software, Internet, emerging technologies).

1. What is a packet?

A packet is the unit of data used by a packet‑switched network. Large messages are broken into many packets so that each can travel independently, possibly via different routes, to the destination where they are re‑assembled.

2. Types & methods of data transmission (syllabus 2.1)

Method Typical medium Duplex mode When it is used
Serial vs. Parallel
Serial transmission Twisted‑pair, fibre‑optic, radio (Wi‑Fi, Bluetooth) Half‑ or full‑duplex Long‑distance links where fewer wires are advantageous.
Parallel transmission Internal computer buses, printer ports Usually simplex or half‑duplex Short‑range, high‑speed connections inside a device.
Simplex, Half‑duplex, Full‑duplex
Simplex TV broadcast, keyboard to PC Simplex (one‑way) When data flow is required only in one direction.
Half‑duplex Wi‑Fi (CSMA/CA), walkie‑talkies Half‑duplex (send OR receive at a time) When the same channel is shared for both directions.
Full‑duplex Ethernet (copper/fibre), telephone lines Full‑duplex (simultaneous send & receive) Most modern LANs where high throughput is required.

3. How packet‑switching works

  • Each packet carries a header containing source and destination addresses.
  • Routers read the header, decide the best next hop, and forward the packet.
  • Packets may arrive out of order; the destination uses sequence information (e.g., TCP sequence numbers) to re‑assemble them.

4. Generic packet layout

Header (control information)
Payload (user data)
Trailer / Footer (error‑check)

The three sections are present in virtually every protocol layer that transports data.

5. Header fields – a concise IPv4 example

Field Purpose Size
Version Identifies IP version (4) 4 bits
Header Length Length of the header in 32‑bit words 4 bits
Total Length Header + payload size (bytes) 16 bits
TTL (Time‑to‑Live) Maximum number of hops before discarding 8 bits
Protocol Identifies encapsulated transport protocol (e.g., TCP = 6, UDP = 17) 8 bits
Header Checksum Error‑check for the header only 16 bits
Source IP address Sender’s IP address 32 bits
Destination IP address Receiver’s IP address 32 bits

Concrete example – IPv4 + TCP

  • Source IP: 192.168.1.10
  • Destination IP: 203.0.113.5
  • TTL: 64
  • Protocol: 6 (TCP)
  • TCP sequence number: 1 024
  • Payload: 5 bytes – the ASCII string “HELLO”

6. Payload

  • Contains the user data or the next‑layer segment (e.g., a TCP segment).
  • Maximum size is limited by the Maximum Transmission Unit (MTU) of the underlying link (e.g., Ethernet MTU = 1500 bytes). Payload ≤ MTU – header – trailer.

7. Trailer (Footer)

  • Most commonly a Frame Check Sequence (FCS) – a 32‑bit CRC used by Ethernet to detect errors in the whole frame.
  • Other link‑layer protocols may use a simpler checksum or parity bits.

8. Methods of error detection (syllabus 2.2)

  • Parity bit – adds one bit so the number of 1’s is even (even parity) or odd (odd parity).
  • Parity byte / parity block – a whole byte (or block) of parity bits, as required by some exam questions.
  • Checksum – the binary sum of all 16‑bit words; the receiver recomputes and compares.
  • CRC / FCS – a polynomial‑based cyclic redundancy check (used in Ethernet).
  • ARQ (Automatic Repeat re‑Quest) – protocol that asks the sender to retransmit when an error is detected (e.g., Stop‑and‑Wait, Go‑Back‑N).

Quick calculation – even parity

Data word: 1011001 (7 bits).
Number of 1’s = 4 (even).
For **even parity** the parity bit is 0. The transmitted 8‑bit word is 10110010.

9. Encryption (syllabus 2.3)

  • Purpose: to provide confidentiality – only the intended receiver can read the payload.
  • Two main categories (as worded in the syllabus):
    • Symmetric encryption – the same key encrypts and decrypts (e.g., AES). Fast, used for bulk data.
    • Asymmetric encryption – a public key encrypts, a private key decrypts (e.g., RSA). Used to exchange symmetric keys securely.

Scenario – choosing encryption

Question: A student wants to send a large file securely over the Internet. Which type of encryption will be used for the file itself and why?

Answer outline: The file will be encrypted with a symmetric algorithm (e.g., AES) because symmetric ciphers are much faster for large amounts of data. An asymmetric algorithm (e.g., RSA) will be used only to exchange the symmetric key securely.

10. Linking packet structure to the rest of the syllabus

  • Hardware (Section 3) – Routers, switches and Network Interface Cards (NICs) read the header to forward packets; MAC addresses are part of the data‑link header.
  • Software (Section 4) – The operating system’s networking stack builds the header, adds checksums, and handles re‑assembly of payloads.
  • Internet (Section 5) – IPv4/IPv6, TCP/UDP and the concept of MTU are fundamental to the global Internet.
  • Automated & emerging technologies (Section 6) – IoT devices, autonomous vehicles and cloud services all rely on packet‑switched communication and often use encryption to protect data.

11. Key take‑aways

  • Packets = Header + Payload + Trailer.
  • Header fields such as source/destination IP, TTL and protocol are essential for routing and delivery.
  • Transmission methods (serial/parallel, simplex/half‑/full‑duplex) determine how the bits travel over the chosen medium.
  • Error‑detection (parity, checksum, CRC) and ARQ keep data reliable; encryption protects confidentiality.
  • Understanding packet structure helps explain how hardware, software and the Internet work together.

12. Exam‑style practice questions

AO1 – Label the parts of a packet (diagram)

Label the three sections shown below as Header, Payload and Trailer.

Header
Payload (Data)
Trailer / FCS

AO2 – Application

Question: A packet travelling over an Ethernet LAN has the following header values: Source IP = 10.0.0.1, Destination IP = 10.0.0.2, TTL = 64, Protocol = 6 (TCP). The payload carries the ASCII string “DATA”. The Ethernet frame’s FCS is correct. Explain the role of each of the following components in delivering the packet:

  1. Source and Destination IP addresses
  2. TTL field
  3. Protocol field
  4. TCP sequence number (assume it is 1 024)
  5. FCS in the trailer

Suggested answer outline:

  1. IP addresses allow each router to forward the packet toward the correct destination network.
  2. TTL prevents a packet from circulating forever; each router reduces TTL by 1 and discards the packet when it reaches 0.
  3. The Protocol field tells the receiving host that the payload is a TCP segment, so the TCP module will process it.
  4. The sequence number enables the receiver to place this segment in the correct order and to detect any missing segments.
  5. The FCS (a CRC) verifies that the whole Ethernet frame arrived without bit errors; if the check fails the frame is discarded and the sender must retransmit.

Create an account or Login to take a Quiz

45 views
0 improvement suggestions

Log in to suggest improvements to this note.