11.2 Routers and IP addresses
You’ve learned about IP addressing and subnet masks in earlier sessions. This section serves as a brief reminder of your earlier work and provides an opportunity to practise and test your understanding of subnetting.
Watch the video below, which is about 1.5 minutes long.
Routers and IP addresses
Routers use IP addresses to direct packets. IP addressing has been covered very thoroughly in earlier sessions so you are already familiar with the host portion, network portion and subnet masks.
An IP address can identify an individual computer device (known as a host) or it can identify a network. The network address is always the lowest address in the network, which in binary will end in a zero, though it may not in dotted decimal. I’ll demonstrate this by using the IP address 192.168.1.0 with a /28 subnet mask. This means that the last four bits are the host part.
The first subnet would have addresses from 192.168.1.0 to 192.168.1.15, and the network address is 192.168.1.0, as expected. The second subnet goes from 192.168.1.16 to 192.168.1.31. The network address is now 192.168.1.16.
This looks anomalous until we look at the binary rendering of the last octet, which is 0001 0000. Here the host part (i.e. the last four bits) is all zeros, as befits a network address; but this is obscured in the decimal representation, which is 16, because this represents the entire octet, not just the host part.
Activity 3 Test yourself
1. How many IP addresses can be assigned to hosts on a subnet with a subnet mask of 255.255.255.240?
The correct answer is b.
Addresses with a subnet mask of 255.255.255.240 will run from XXX.XXX.XXX.240 to XXX.XXX.XXX.255. This provides 16 possible addresses. The lowest of these (XXX.XXX.XXX.240) will be assigned to the network address and the highest (XXX.XXX.XXX.255) is the broadcast address, leaving 14 addresses for the hosts.
2. Which of the following correctly describes the IP address 192.168.2.32/27?
It is a subnet network address.
It is a subnet host address.
It is a subnet broadcast address.
The correct answer is a.
With a subnet mask of /27 the last five bits are the host part. The binary equivalent of 32 is 100000 so this subnet has the addresses from 192.168.2.32 to 192.168.2.63. Therefore 192.168.2.32, being the lowest address, is the network address of this subnet.