Structure of the Internet: IP addresses

From Wikibooks, open books for an open world
Jump to navigation Jump to search

UNIT 2 - ⇑ Structure of the Internet ⇑

← Packet switching IP addresses Domain names →

IP Address - numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol

Every device attached to a network has a number assigned to it. This unique number is called the IP Address, and you might be familiar with the format of:

nnn.nnn.nnn.nnn e.g.

Currently the most common form of IP Address is IPv4 which uses 32 bits to store an address. This means that there are theoretically different IP Addresses that can exist. However, due to the allocation of IP ranges to different organisations and tasks, the number is lower.

An IP address (version 4) in both dot-decimal notation and binary code

An IPv4 address is typically shown as split into 4 chunks as shown above. Different ranges of IP addresses are categorised differently, with the first part of the IP specifying who or where the IP address is (the network identifier), and the second part defining which host/machine it is (the host identifier).

Different sets of IP ranges are allocated to particular networks, geographic areas, companies etc. The table below shows several examples of IP ranges and the uses that they have been put to:

IP range Description Example
172.16.___.___ - 172.31.___.___
Private networks, e.g. intranets
AfriNIC allocations for IP addresses in Africa
European allocations for IP addresses
200.___.___.___ Latin America and the Caribbean
9.___.___.___ IBM
17.___.___.___ Apple

As you saw with packet switching, every request that gets sent over the internet is sent with the sender's IP address attached. This is useful for many different reasons. Firstly you can send a confirmation message to the sender to confirm that you received the data. Secondly websites can keep track of where their users come from. Thirdly websites can block requests from certain IP address ranges. For example if you were running a national television service such as the BBC, where your programming was paid for by your fellow countrymen, you wouldn't want people from other countries watching programmes that they hadn't paid for. If you try and access the BBC iPlayer from the USA it will say "Not available in your area". This is because an American's IP would be from a banned IP range. IP banning can also be used by governments to bar their populations from accessing websites on certain IP addresses.

The diagram above shows how two intranets can connect across the internet. If the computer in Intranet A with the IP address wants to send a message to a computer in Intranet B, it will send its message through the Router connected to Intranet A (IP= This router will then route the message onto the internet, going from router to router until it reaches the router attached to Intranet B (IP= This router will then pass the message on to the correct machine in Intranet B. Notice that because each intranet is connected to the internet through a router, the computers on each intranet will appear as having the IP of their router when connected to the internet. If you share a house and someone commits a crime online, the finger might be pointed at the whole household! Using IP addresses this way was never the intention of the designers of TCP/IP, they would much prefer that each machine had a distinct IP address, however, with the shortage of IP addresses this isn't possible. What is needed is a system that has more addresses available.

Extension: IPv6

As you might have noticed, there is a limit to the number of IPv4 addresses we can have, this limit is well below the current population of the world. If we were in the future to have every inhabitant of the planet connected to the internet, there wouldn't be enough IP Addresses for them to use! This problem is very current and IPv6 is being introduced to try and resolve it. IPv6 uses 128 bits for each address, meaning we have theoretically addresses available = different possible addresses.

Decomposition of an IPv6 address from hexadecimal representation to its binary value.

The IPv6 address has 128 bits split into:

  • 64 bits for the network
    • the first 16 bits are used for address type
    • 16 bits for sub networks
    • leaving 32 bits for main networks
  • 64 bits for the interface addresses

Why would we ever need this many you may ask? With so many addresses this will allow each person to have multiple devices connected to the internet, currently driven by the demand for internet on mobile phones. We are also looking at connecting lots of other devices to the internet that might not currently be connected. For example we could have fridges telling us when we are low on milk, ovens telling us when they need cleaning, bikes telling us when they need a service. The future is coming, watch this IPv6 space!

Exercise: IP Addresses

What is an IP address, give an example?


Numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol

What is the IP address range for an internal network?


192.168.___.___ OR
172.16.___.___ - 172.31.___.___

What IP address would an internal network machine appear to have when connecting to the internet?


The address of the router

Convert the following IP address into binary:



Convert the following IP address into decimal: 01011110.01100010.10011011.00010000


Why has IPv6 been introduced?


IPv4 only has 32 bits, this means as more and more machines connect to the internet we will eventually run out of IP Addresses. IPv6 allows for more addresses to be used.

For the following IP address can be split into two parts, label each: