# Mental Subnetting

So for the last few weeks I’ve been trying to learn how to do Subnetting off the top of my head. I’ve been using a great guide written by user LordFlasheart on the techexams.net forums. Here I’m going to explain how I interpreted the guide and am using it to subnet in my head…

I’m not going to explain the concepts of Subnetting here, only the operations that I perform in my mind when calculating the Subnet, Broadcast Address, and Host Range of a given IP.

The IP address we’re working with in this example is 192.168.73.33/21

1.Determine the next largest subnet block from the prefix
`blocks=[8,16,24,31]`
24 > /21, therefore 24 will be the block we’re working with.
24 is the 3rd octet (192.168.73.33)

2.Calculate 2 ^ (block – prefix): This gives you the block size
2 ^ (24/21) = 2^3 = 8 // 8 is our block size

Octetx = 3rd Octet = 192.168.73.33 = 73
73 – (73*8) = 73-1 = 72

4.Any octets after the one we’re working with = 0
192.168.72.0

Tada, that’s it. The Subnet ID of 192.168.73.33/21 is 192.168.72.0

The IP address we’re working with in this example is 192.168.73.33/21

1.Determine the next largest subnet block from the prefix
24 > /21, therefore 24 will be the block we’re working with.
24 is the 3rd octet

2.Calculate 2 ^ (block – prefix) – This gives you the block size
2 ^ (24 – /21) = 2^3 = 8 // 8 is our block size

73 – (73*8) + 8 = (73-1) + 8 = 72 + 8 = 80

4.Any octets after the one we’re working with = 0
192.168.80.0

7. Take 1 from that IP Address.
192.168.80.0 – 1 = 192.168.79.255