Article
How IP addresses are organised
A letter addressed to "12 Rose Street, Pune, India" is sorted in steps: first the country, then the city, then the street, then the house. IP addresses are organised in a similar way. Why does that help?
Addresses are handed out in blocks
Nobody picks an IP address at random. Addresses are given out in large blocks, and each block is then split into smaller ones.
| Level | Who | What they do |
|---|---|---|
| 1 | A worldwide organisation | Gives very large blocks to five regional groups |
| 2 | A regional Internet registry | Gives smaller blocks to ISPs and large organisations |
| 3 | An ISP or a large organisation | Gives addresses to the networks of its customers |
| 4 | A home, school or company network | Gives an address to each device |
Blocks of addresses get smaller at each level
Worldwide organisation
very large blocks to 5 regional groups
Regional registry
smaller blocks to ISPs and large organisations
ISP or large organisation
addresses for its customers' networks
Home, school or company network
one address for each device
Your ISP gave your home network an address from its own block. That is why your address says something about which network you are on.
The first part names the network
Read an address from left to right. The first part tells you which network the device is on. The last part tells you which device on that network.
For the examples here, assume the first three numbers name the network. In real life the split can fall in different places, but the idea is the same.
| Address | Network part | Device part | Device |
|---|---|---|---|
| 198.51.100.7 | 198.51.100 | 7 | A library computer at Greenfield School |
| 198.51.100.8 | 198.51.100 | 8 | The school printer |
| 198.51.100.200 | 198.51.100 | 200 | A teacher's laptop |
| 203.0.113.7 | 203.0.113 | 7 | A computer in a shop |
The first three rows are on the same network, because they begin with 198.51.100. The fourth address ends in 7 like the first, but it begins with 203.0.113. It is on a different network.
With the first three numbers fixed, the last number can be any value from 0 to 255. That is 256 different device numbers on one network.
Check your understanding
Assume that the first three numbers of an address name its network. Which address is on the same network as 192.0.2.40?
Why this helps
Imagine the Internet had to remember a separate route for every one of billions of devices. It would be impossible. Because addresses are in blocks, a router can look only at the first part and decide which way to send the data.
The router reads only the start of the address
At the school, the school's own network then uses the last number to find the right device. This is just like the post office: first the city, and only then the house.
This design helps the Internet to scale, which means to keep working as more and more devices join.
Worked example: sorting addresses
Two networks are described:
- Network P: addresses start with 192.0.2
- Network Q: addresses start with 198.51.100
Which network does each address belong to?
| Address | Network part | Belongs to |
|---|---|---|
| 192.0.2.15 | 192.0.2 | P |
| 198.51.100.15 | 198.51.100 | Q |
| 192.0.2.240 | 192.0.2 | P |
| 100.51.198.15 | 100.51.198 | Neither |
Notice that 192.0.2.15 and 198.51.100.15 have the same last number, but they are on different networks. The last number only has meaning inside one network.
Check your understanding
Why is it useful that all addresses on one network start with the same numbers?
Addresses can change
When you move your phone from home Wi-Fi to school Wi-Fi, it gets a new address from the new network. Many home addresses also change from time to time. An address says which network a device is on at that moment. It is not a permanent name for the device, and it does not give the exact room or street.
Common mistakes
- Comparing only the last number. Two addresses with the same last number can be on very different networks.
- Reading the address from the right. The network part comes first.
- Thinking addresses are random. They are given out in blocks, and neighbouring addresses usually belong to the same network.
- Thinking an address is permanent. The same device can have different addresses on different networks.
On the exam
You will not be asked to work out network sizes. You should know that IP addresses are organised in a hierarchy, and that this helps the Internet grow, because routers can work with the first part of an address.
Key words
Hierarchy: levels of organisation, from large groups down to small ones. Block of addresses: a range of IP addresses given to one organisation. Network part: the first part of an address, which names the network. Device part: the last part, which names the device on that network. Scalable: able to keep working as it grows.