Unit 2: The Internet · Addressing the Internet

Article

How IP addresses are organised

6 min read

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.

LevelWhoWhat they do
1A worldwide organisationGives very large blocks to five regional groups
2A regional Internet registryGives smaller blocks to ISPs and large organisations
3An ISP or a large organisationGives addresses to the networks of its customers
4A home, school or company networkGives an address to each device

Blocks of addresses get smaller at each level

  1. Worldwide organisation

    very large blocks to 5 regional groups

  2. Regional registry

    smaller blocks to ISPs and large organisations

  3. ISP or large organisation

    addresses for its customers' networks

  4. Home, school or company network

    one address for each device

Like a post office sorting by country, then city, then street, then house.

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.

AddressNetwork partDevice partDevice
198.51.100.7198.51.1007A library computer at Greenfield School
198.51.100.8198.51.1008The school printer
198.51.100.200198.51.100200A teacher's laptop
203.0.113.7203.0.1137A 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

SenderRouter198.51.100.x203.0.113.x
For data going to 198.51.100.200, the router sees the start, 198.51.100, which is Greenfield School's network, and sends the data that way.

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?

AddressNetwork partBelongs to
192.0.2.15192.0.2P
198.51.100.15198.51.100Q
192.0.2.240192.0.2P
100.51.198.15100.51.198Neither

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.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this site. All lessons and questions here are written by JrCodex.