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
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.
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.
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.
Delivery: When the packet reaches the destination network, the final router delivers it to the host whose interface matches the destination IP address.
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:
The laptop creates an IP packet with source 192.168.1.25 and destination 203.0.113.10.
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.
Routers across the internet forward the packet based on the destination address until it reaches the web server.
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.