feature article

IP ADDRESS & SUBNETTING

classes

Private IP addressing

private

binary bits

Subnet Mask calculation

If the CIDR value is /25 then subnet mask will be – 255.255.255.128. In binary – 11111111.11111111.11111111.10000000  (8+8+8+1 = 25)

Same way if subnet mask is – 255.255.192.0 the CIDR value will be /18 (8+8+2)

Wild card calculation –

Whatever the subnet mask minus it with 255. E.g. – mask 255.255.0.0 wildcard will be 0.0.255.255

wild card calc

Supernet calculation

Sometimes we set lesser subnet mask or cidr value than the default value & apply it on ACL, Prefix-list or route advertisement. This will help us to just select 1 master subnet & all child subnet will be select. Example –

  1. 172.16.0.0/12 – This will select 172.16.0.0 to 172.31.0.0         B.  192.168.0.0/ 13 will select 192.168.0.0 to 192.175.255.255

Master network octet + wildcard mask octet = extended range

ext range

If we extend master subnet 172.16.0.0/16 to 172.31.0.0 then calculation of subnet mask or cidr value will be 31-16 = 15. So calculating by wildcard – 0.15.255.255 mask will be – 255.240.0.0. Extended range minus master range = wildcard octet (convert into subnet mask)

wildcard to select

Note that we cannot select any range from our mind, e.g. if we want to range from 192.168.1.0/24 to 192.168.63.255 then we’ve to start from 192.168.0.0 instead of 192.168.0.0.