Select your language
Networking

IP Addressing

When network devices are physically connected, they then need to be configured to allow them to talk to one another.

Every device on a network needs a unique address, to be able to talk to one another.


IP Addresses

IP Addresses are a device’s identity on an Ethernet network. They are formed of four 8bit numbers (with a value of 0-255), known as octets separated by dots. For example, 192.168.0.1. Every device needs an IP address, which can either be manually assigned to a device, or automatically assigned to a device by a DHCP Server.

It is recommended (but not required) to use IP addresses within the following ranges:

  • 10.0.0.0 - 10.255.255.255
  • 172.16.0.0 - 172.31.255.255
  • 192.168.0.0 - 192.168.255.255


These IP addresses have been reserved for use on local networks by IANA (Internet Assigned Numbers Authority).


Subnets

Every device, will also have a subnet mask along with their IP address. The subnet mask also uses the same format as IP addresses, with four octets separated by dots. The Subnet mask indicates what a device can see on the network. This is because the subnet mask is used to split the device's IP address into the "network address", and "host address".

There are three classes of subnets, also known as "natural masks":

  • Class A - Subnet of 255.0.0.0 (can be displayed as a "/8" prefix after an IP address)
  • Class B - Subnet of 255.255.0.0 (can be displayed as a "/16" prefix after an IP address)
  • Class C - subnet of 255.255.255.0 (can be displayed as a "/24" prefix after an IP address)


As can be seen, working from octet one through to octet three of the subnet, each class changes the next octet to "255", rather than "0". Typically in show networks, subnets in use will either be a class A, B or C.

Put simply, if there is a "255" in an octet of a device's subnet, this device can only talk to other devices with an identical value in that octet of their IP addresses.

With a class A subnet, all devices must all have an identical first octet of their IP address, with the remaining octets not having to match. For example, all devices could have 10.x.y.z. The first available IP a device could use in the range would be 10.0.0.1, and the last would be 10.255.255.254. Every device must have a unique address within this range. In this example, "10" is considered the network address - any devices that want to talk must all be on network number 10. The remaining three octets "x.y.z" are then the host address - each device (or "host") has a unique address within that network number. 10.255.255.255 could not be used by a device on this network, as this address is known as the broadcast address. If information needs to be sent to everything on this network, it could be sent to 10.255.255.255, and all devices would receive it.

With a class C subnet, all devices must share the first three octets of their IP address, leaving only the last octet to be unique for the device. For example, 192.168.1.x where x can be any number between 0-254. Every device must have a unique address within this range. As you can see, with a class C subnet, only 254 different devices will be able to talk to one another. In this example, "192.168.1" is considered the network address. Any devices that want to talk on this network must all be on network number 192.168.1. The remaining octet "x" is the host address. Each device (or "host") must have a unique address within that network number. 192.168.1.255 could not be used by a device on this network, as this address is known as the broadcast address. If information needs to be sent to everything on this network, it could be sent to 192.168.1.255, and all devices would receive it.


For example, these two devices could talk:

  • Device 1 - IP: 10.1.1.10, Subnet: 255.255.255.0
  • Device 2 - IP:10.1.1.20, Subnet: 255.255.255.0

They have a "class C" subnet, and therefore have the first 3 octets of their IP identical. "10.1.1" is the network address.


These devices could talk:

  • Device 1 - IP: 10.1.2.10, Subnet - 255.255.0.0
  • Device 2 - IP: 10.1.3.10, Subnet - 255.255.0.0

They have a "class B" subnet, and therefore have the first 2 octets of their IP identical. "10.1" is the network address.


These devices could not talk:

  • Device 1 - IP:10.1.2.10, Subnet: 255.255.255.0
  • Device 2 - IP:10.2.3.10, Subnet: 255.255.255.0

They have a "class C" subnet, and therefore the first 3 octets must match. In this example however, they don't, meaning device 1 is on network address "10.1.2", and device 2 is on network address "10.2.3".

Thankfully, there is a way of avoiding needing to worry about all this. Instead, we can use a DHCP server, to automatically assign your devices their required IP address and subnets.