In this tutorial, we are going to take all the learning’s we have done in part 1, 2 and 3 and we will combine them all to solve this cool challenge. In this challenge we will apply all the subnetting concepts to subnet a test network IP address. Try to do this challenge yourself. If you get stuck somewhere you can take help from the solution presented in this guide.
The Challenge
Consider the following IP address scheme:
192.168.1.0/24
Task:
Create an IP addressing scheme with more than 1 network address that can support 40 devices per subnet.
Solution:
Let’s look at the different possibilities you can have with the current IP scheme:
Subnet Mask in Decimal | Subnet Mask in Binary | CIDR Notation | Networks | Hosts / Network |
255.255.255.0 | 11111111.11111111.11111111.00000000 | /24 | 2 ^ 0 = 1 | 254 |
255.255.255.128 | 11111111.11111111.11111111.10000000 | /25 | 2 ^ 1 = 2 | 126 |
255.255.255.192 | 11111111.11111111.11111111.11000000 | /26 | 4 | 62 |
255.255.255.224 | 11111111.11111111.11111111.11100000 | /27 | 8 | 30 |
255.255.255.240 | 11111111.11111111.11111111.11110000 | /28 | 16 | 14 |
255.255.255.248 | 11111111.11111111.11111111.11111000 | /29 | 32 | 6 |
255.255.255.252 | 11111111.11111111.11111111.11111100 | /30 | 64 | 2 |
255.255.255.254 | 11111111.11111111.11111111.11111110 | /31 | 128 | 1 |
Looking at the table, 192.168.1.0/26 seems to be the perfect fit for our use case. The subnet mask will be 255.255.255.192. This network can support 4 subnets and 62 hosts per subnet.
Determine Addresses for Each Subnet
Now, if you remember, we need to determine the following for each of the subnets in our network:
- Network Address
- Broadcast Address
- First available host address
- Last available host address
Address: 192.168.1.0 /26
Subnet Mask: 255.255.255.192 = /26
Hosts / Net = 62
First Subnet
Network Address (Set all host bits to 0) -> 192.168.1.0 /26 -> 11000000.10101000.00000001. 00 000000
Broadcast Address (Set host bits to 1) -> 192.168.1.63 -> 11000000.10101000.00000001. 00 111111
First Host (Add one) -> 192.168.1.64 -> 11000000.10101000.00000001. 00 000001
Last Host (Subtract one) -> 192.168.1.62 -> 11000000.10101000.00000001. 00 111110
Second Subnet
Network Address (Set all host bits to 0) -> 192.168.1.64 /26 -> 11000000.10101000.00000001. 01 000000
Broadcast Address (Set host bits to 1) -> 192.168.1.127 -> 11000000.10101000.00000001. 01 111111
First Host (Add one) -> 192.168.1.65 -> 11000000.10101000.00000001. 01 000001
Last Host (Subtract one) -> 192.168.1.126 -> 11000000.10101000.00000001. 01 111110
Third Subnet
Network Address (Set all host bits to 0) -> 192.168.1.128 /26 -> 11000000.10101000.00000001. 10 000000
Broadcast Address (Set host bits to 1) -> 192.168.1.191 -> 11000000.10101000.00000001. 10 111111
First Host (Add one) -> 192.168.1.129 -> 11000000.10101000.00000001. 10 000001
Last Host (Subtract one) -> 192.168.1.190 -> 11000000.10101000.00000001. 10 111110
Fourth Subnet
Network Address (Set all host bits to 0) -> 192.168.1.192 /26 -> 11000000.10101000.00000001. 11 000000
Broadcast Address (Set host bits to 1) -> 192.168.1.255 -> 11000000.10101000.00000001. 11 111111
First Host (Add one) -> 192.168.1.193 -> 11000000.10101000.00000001. 11 000001
Last Host (Subtract one) -> 192.168.1.254 -> 11000000.10101000.00000001. 11 111110
This is how you can create subnets based on the current IP scheme. You can practice it by using different classes of IP addresses and get better at this.