This blog is for learning quick IP subnetting, if time permits you should read & understand the proper calculation of IP subnetting.

You need to identify below items in day to day IP subnetting challenges.

  • Number of hosts in the subnet
  • Broadcast Address
  • Network Subnet Address
  • Subnet Mask in both formats (For ex – 255.255.255.0 or /24)

Now it’s time to learn the quick way of doing it, you need to remember baseline details & calculate accordingly for all subnetting problems.

1.) First You need to remember how to quickly find number of hosts in IP Subnet?

Remember /24 = 256 hosts = 254 Usable hosts (Remove Subnet & Broadcast address hence usable hosts are(256-2=254)
First IP is always Subnet Address and Last IP is broadcast Address.

Now if you want to calculate number of hosts for subnet masks less than 24, Multiply the number of hosts in /24 mask(256 hosts) with 2 as below. 
/23 = 256*2 = 512 hosts
/22 = 512*2 = 1024 hosts
/21 = 1024*2 = 2048 hosts 

You can keep going same way for mask below 21.

Now if you want to calculate number of hosts for subnet mask higher than 24, Divide the number of hosts in 24 mask(256 hosts) with 2 as below. 
/25 = 256/2 = 128 hosts
/26 = 128/2 = 64 hosts
/27 = 64/2 = 32 hosts
/28 = 32/3 = 16 hosts 

You can keep going same way for mask higher than 28.

For example in below example, We need to find Subnet Address/Broadcast Address/Number of usable hosts?

Q – 10.1.1.0/24
Now as per earlier facts to remember /24 means 256 total hosts as well as first IP subnet & last IP Broadcast.

10.1.1.0 – IP Subnet Address
10.1.1.255 – Broadcast Address
10.1.1.1 to 10.1.1.254 (Usable hosts)

2.) How to write Subnet Mask in / format Or 255.x.x.x format

Remember /24 – 255.255.255.0
/25 – 255.255.255.128 – Add 128 in last octet
/26 – 255.255.255.192 – Keep Adding half of above value to value itself  128 + 64=192
/27 – 255.255.255.224 – 192 + half of 64 = 192 + 32 = 224
/28 – 255.255.255.240 – 224 + Half of 32 = 224 +16 = 240
/29 – 255.255.255.248 – 240 + Half of 16 = 240 + 8 = 248
/30 – 255.255.255.252 – 248 + Half of 8 = 248 +4 = 252

Now for other scenario with subnet mask values lower than 24
/24 – 255.255.255.0
/23 – 255.255.254.0 – Remove 1 from above 3rd octet (255-1=254,It was 255 earlier)
/22 – 255.255.252.0 – Remove 2 (1*2) from 3rd octet (254-2 =252, it was 254 earlier)
/21 – 255.255.248.0 – Remove 4 (2*2)from 3rd octet (252-4 = 248, it was 252 earlier)
/20 – 255.255.240.0 – Remove 8(4*2) from 3rd octet(248-8 = 240, it was 248 earlier)
Notice –  We need to multiply by 2 to find out how much to remove
/19 – 255.255.224.0 – Remove 16 from 3rd octet
/18 – 255.255.192.0 – Remove 32 from3rd octet
/17 – 255.255.128.0 – Remove 64 from 3rd Octet
/16 – 255.255.0.0 – Remove 128 from 3rd octet

I hope this will help you out in quick subnetting. I will still encourage you to go with binary calculation for the subnet mask.

5 5 votes
Article Rating
Quick & Dirty way to IP Subnetting
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x

Discover more from NetworkSecurityGuru

Subscribe now to keep reading and get access to the full archive.

Continue reading