Explain the use of IP addresses in the transmission of data over the internet

Published by Patrick Mutisya · 14 days ago

Cambridge A-Level Computer Science 9618 – 2.1 Networks (Internet)

2.1 Networks – The Internet

Objective

Explain the use of IP addresses in the transmission of data over the internet.

What is an IP address?

An Internet Protocol (IP) address is a numerical label assigned to each device that participates in a network that uses the Internet Protocol for communication. It serves two essential purposes:

  • Identification of the host or network interface.
  • Location addressing – enabling packets to be routed across multiple networks.

How IP addresses enable data transmission

  1. Packet creation: When an application sends data, the transport layer (TCP/UDP) encapsulates the data into a segment, which the network layer then wraps in an IP packet. The packet header contains:

    • Source IP address – the sender’s address.
    • Destination IP address – the intended receiver’s address.

  2. Routing decision: Each router examines the destination IP address, consults its routing table, and forwards the packet toward the next hop that is closer to the destination network.
  3. Hop‑by‑hop forwarding: The packet traverses many intermediate routers. At each hop, the router may decrement the TTL (time‑to‑live) field to prevent endless loops.
  4. Delivery: When the packet reaches the destination network, the final router delivers it to the host whose interface matches the destination IP address.

IP addressing schemes

Two versions of IP are in widespread use:

FeatureIPv4IPv6
Address length32 bits (≈ 4.3 × 10⁹ addresses)128 bits (≈ 3.4 × 10³⁸ addresses)
NotationDecimal dotted‑quad, e.g., 192.168.1.10Hexadecimal groups, e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Header complexitySimple, fixed length (20 bytes)More complex, variable length (40 bytes base)
Built‑in securityNone (requires IPsec as optional)IPsec mandatory
FragmentationPerformed by routers and hostsPerformed only by the source host

Subnetting – dividing a network

Subnetting uses a network mask to split a larger address space into smaller, manageable sub‑networks. The mask determines which part of the address identifies the network and which part identifies the host.

For example, the IPv4 address 192.168.12.45/24 has a mask of 255.255.255.0. The first 24 bits (192.168.12) represent the network, and the remaining 8 bits (45) identify the host within that network.

Network Address Translation (NAT)

Many private networks use non‑routable address ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). NAT translates these private addresses to a single public IP address when traffic leaves the local network, allowing multiple devices to share one global address.

End‑to‑end communication example

Consider a user on a laptop (IP 192.168.1.25) requesting a web page from a server with public IP 203.0.113.10:

  1. The laptop creates an IP packet with source 192.168.1.25 and destination 203.0.113.10.
  2. The packet reaches the home router, which applies NAT, replacing the source address with the router’s public IP, e.g., 198.51.100.5, and records the translation.
  3. Routers across the internet forward the packet based on the destination address until it reaches the web server.
  4. The server replies to 198.51.100.5. The home router uses its NAT table to translate the destination back to 192.168.1.25 and forwards the packet to the laptop.

Suggested diagram: Flow of an IP packet from a private host, through NAT, across the internet, and back to the host.

Key points to remember

  • IP addresses uniquely identify devices on a network and guide packet routing.
  • IPv4 uses 32‑bit addresses; IPv6 expands the space to 128‑bit addresses.
  • Subnet masks separate network and host portions of an address.
  • NAT allows many private devices to share a single public IP address.
  • Every IP packet carries both source and destination addresses, enabling routers to forward data correctly.