You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Every device on the Internet needs a unique IP address so that packets can be routed to the correct destination. At A-Level you must understand IPv4, IPv6, the concept of subnetting, and the difference between public and private addresses.
IPv4 (Internet Protocol version 4) uses a 32-bit address, typically written in dotted-decimal notation — four decimal numbers (octets) separated by dots.
Example: 192.168.1.100
Binary: 11000000.10101000.00000001.01100100
An IPv4 address is divided into a network part (identifies the network) and a host part (identifies the specific device on that network).
The subnet mask determines which bits belong to the network part and which belong to the host part.
| IP Address | Subnet Mask | Network Part | Host Part |
|---|---|---|---|
| 192.168.1.100 | 255.255.255.0 | 192.168.1 | .100 |
| 10.0.0.50 | 255.0.0.0 | 10 | .0.0.50 |
In the subnet mask, 1-bits mark the network part and 0-bits mark the host part:
The subnet mask can also be written as a prefix length using CIDR (Classless Inter-Domain Routing) notation:
| Address | Purpose |
|---|---|
| 127.0.0.1 | Loopback (localhost) — a device sending data to itself |
| 0.0.0.0 | Default route / unspecified address |
| 255.255.255.255 | Broadcast — sent to all devices on the local network |
Certain address ranges are reserved for use within private networks (LANs). They are not routable on the public Internet.
| Range | CIDR | Typical Use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Large organisations |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Medium organisations |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Home networks, small businesses |
Because private addresses cannot be used on the Internet, a NAT router translates private addresses to a single (or a few) public IP addresses when traffic leaves the local network. This allows many devices to share one public address.
LAN devices (private IPs) ──→ [NAT Router] ──→ Internet (public IP)
192.168.1.10 Public: 80.1.2.3
192.168.1.11
192.168.1.12
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.