Learn the easy way to subnet using the proven Subnetting Secrets method.
Write out the subnetting cheat chart by hand. You need to be able to do it by hand in case you have to work out subnetting problems in your head or in an exam. The subnetting cheat chart is here.
Look at the IP address and subnet mask. If the subnet mask is written out in abbreviated form (called CIDR) then just count up in blocks of eight and add the last few numbers to reach the subnet mask. e.g.
192.168.1.23/26 – we need to work out what the slash 26 actually is when written out as a full subnet. The binary maths section tells you that 255 in binary is equal to 8 and we need to reach 26 so..
255 is 8 255.255 is 16 bits 255.255.255 is 24 bits and to get to 26 we need to add 2 to 24 so tick two places down on the top left column on the subnetting cheat chart.
So you can see that by ticking down two (which is 24 + 2 = 26 bits) we have generated the subnet mask of 255.255.255.192 which if write out in binary bits is 26 binary bits (or 8 + 8 + 8 + 2).
Tick the same number across the top row of the Subnetting Secrets Cheat Chart.
The above table is purely one binary octet written out in decimal. Whichever number your last tick ends at tells you which number your subnets begin on. Don’t worry if this doesn’t make much sense at the moment. Please keep with it and like any new still, it will click very soon.
So we have it number 64 which tell us that our subnets are going up in increments of 64. Our host number out of the IP address 192.168.1.23 is the number 23. It is 23 because 192 is a traditional class C address so we can only use numbers in the last octet for IP addresses.
Let’s write out our subnets counting up in increments of 64. We are allowed to start with IP subnet zero because the guys who invented the RFC (requests for comment) for subnetting designed it to permit that.
192.168.1.0 – this is the first subnet and is known as the zero subnet. Host number 23 is in here because if we go to the next subnet we have gone well past 23.
192.168.1.64 – we have added the first 64 to the end.
192.168.1.128 – we have added another 64 to the end. This is our 3rd subnet.
192.168.1.192 – our last subnet. We can’t go higher because our subnet mask ends in 192.
The answer to the question ‘which subnet is host 192.168.1.23 in is subnet 192.168.1.0
Step 4 (Optional)
We have actually reached the answer so in an interview or exam stop there. They may ask another question though. They may ask you to identify the first and last host and the broadcast addresses for your subnet. This step is very easy.
Take the subnet our host 192.168.1.23 is in. To get the first host just add one to the subnet 192.168.1.0 so the answer is 192.168.1.1.
To get the broadcast address just jump to the next subnet and subtract one. Remember that the boxes our number go in can only run from 0 up to 255. We are working in binary here and writing it out in decimal. This is where novice network engineers can get stuck. Just picture each box as a rolling set of numbers like an odometer in a car. It just rolls from 0 to 1 to 2 to 3 and so on until it reaches 255 and then it rolls back to 0.
Take one away from the second subnet 192.168.1.64 so the broadcast address for your first subnet is 192.168.1.63.
To get the last host address take one away from that number. The answer is 192.168.1.62.