Skip main navigation

£199.99 £139.99 for one year of Unlimited learning. Offer ends on 28 February 2023 at 23:59 (UTC). T&Cs apply

Find out more

Internet Protocol (IP) Addresses

Learn about the addresses used on the internet, they work just like your postal address - following a logical order.

Last week, we introduced Ethernet addresses, which are tied to physical devices: the term ‘physical address’ always refers to an Ethernet or similar data link layer address.

Imagine a gigantic worldwide Ethernet network of interconnected switches. For each switch to be able to switch incoming data frames to the correct port, the switch would need to have some sort of list where it can look up the physical address of every connected device in the network.

A switch with a long list of devices

This list would be huge, and it would take a lot of memory storage and processor time to use it and keep it updated. And how would the system cope if a device moved? What about technologies that don’t use Ethernet addresses? It just wouldn’t work!

Internet Protocol (IP) addresses are logical addresses

This is why a new addressing scheme was invented: the IP address system. Like postal addresses, IP addresses are logical addresses: they have a logical structure and provide a set of instructions for reaching a destination.

Take this postal address as an example:

  • 12, Clooney Hill
  • Birmingham
  • UK

It can be read from the bottom up, so a letter with this address would be first sent to the UK, then to Birmingham, and then to the right street and house number.

When IP addresses were invented, in the 1970s, it was decided to make them 32 bits long. 32 bits allow for 4 billion unique addresses, enough so that each person on Earth at the time could have one. We didn’t know how big the interconnected network — or internet — we were building would become!

This 32-bit IP address is usually not written in binary. Instead, it is split into four 8-bit chunks (bytes), and each chunk is converted to decimal. The address is then written in dotted decimal notation, with the four decimal values separated by dots.

So the IP address 11000000101010000000111000010111 becomes:

Binary 11000000 10101000 00001110 00010111
Dotted decimal 192 168 14 23

11000000 10101000 00001110 00010111 =

The logical structure of an IP address

Network bits are the initial bits in an IP address. They identify a particular network. The remaining bits are called host bits and identify a device (or ‘host’) in that network.

The first value of an IP address indicates address is split into network bits and host bits. There are three classes of addresses identified by this initial value:

  • Class A uses 8 network bits and 24 host bits
  • Class B uses 16 network bits and 16 host bits
  • Class C uses 24 network bits and 8 host bits

A graphic showing how the 32 bits are split between class A, B and C IP addresses. Class A uses 8 network bits and 24 host bits, for 128 networks each (Not 256 as the leading bit is fixed to be a 0) with 16,777,216 hosts. Class B uses 16 network bits (starting 10) and 16 host bits, for 16,384 networks each with 65,536 hosts. Class C uses 24 network bits (starting 110) and 8 host bits, for 2,097,152 networks, each with 256 hosts.

The more network bits, the more networks can be identified. But more network bits mean fewer host bits, meaning smaller networks.

IP addresses for mobile devices

Mobile devices (including laptops) are automatically given a different IP address each time they join a different network, because the network bits of their address need to identify the new network. Later in the course, you will learn how IP addresses are automatically allocated.

A laptop moves between a house and a cafe. In the middle, its IP address changes as it moves between networks.

The IP packet

Sending data using IP addresses is very similar to sending data using MAC addresses and Ethernet frames:

The source and destination IP addresses are sent first (together with some additional fields you will learn about later). Then follows the actual data to be transmitted. This structure is called an IP packet, and it looks different to an Ethernet frame.

A simplified IP packet, consisiting of "Other header fields", a 4-byte long "Source IP address", a 4-byte long "Destination IP address", and up to 65,553 bytes of Data.

Private IP addresses

Within each IP address class, a specific range is allocated for private IP addresses. That means these addresses can be used many times over on different networks, as long as these networks do not become connected. In class C networks, all networks starting with 192.168. are private.

The future is here now

The current version of IP is version 4 (IPv4). The 32 bits in IPv4 give 4,294,967,296 addresses, but we are running out.

Therefore, IP version 6 (IPv6) has been developed, with 128 bits allocated for each address: a colossal 3.4×1038 (340,282,366,920,938,463,463,374,607,431,768,211,456) addresses.

IPv6 addresses are written in hexadecimal as 32 digits in blocks of four, e.g.:


IPv6 has been designed to coexist with IPv4, so both systems can run in parallel.

Next step

We’ve now introduced IP addresses and IP packets — how do these coexist with Ethernet addresses and frames? In the next step, we will look at why we still need the Ethernet frames of the data link Layer and how these transport IP packets.


  • Have we really used up 4 billion IP addresses?
  • How many devices can we have on a network?
  • What can you deduce about a device with an IP address of

Join in the discussion below to share your thoughts.

This article is from the free online

An Introduction to Computer Networking for Teachers

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education