IP Network-beginner’s cheat sheet

Vineet Singh
3 min readJun 21, 2021

--

FLSM- Fixed Length Subnet Masking

VLSM — Variable Length Subnet Masking

Always start with the biggest block of IPs required and then move towards lowest.

Formula to find the host bit and network bits are as follows:

For example you have a office where you wish to have 3 subnets for Accounts, HR and Management with the required number of employees to be 25, 4 and 13 respectively. The network range we are going to use is 192.168.10.0/24

Now, for block A, using the above formula

H = 5

and then n = 32–5 = 27

Therefore in CIDR value, we can call it that we need a network with /27

Accordingly Subnet mask = 255.255.255.224

Block size of each subnet will be 32

Now lets subnet the network 192.168.10.32/27 so that we just get enough IPs for block B

H = 4

n = 32–4 = 28

Therefore in CIDR value, we can call it that we need a network with /28

Accordingly Subnet mask = 255.255.255.240

Block size of each subnet will be 16

Similarly, we will get the network and broadcast address for block C

Benefits of VLSM over FLSM

  • Can save more IP addresses. Like in above example instead of subnetting the network with just 1 subnet mask, which would have given 8 networks of 32 block size, we carved networks of different block sizes and saved rest for future use.

Private IP addresses

Remember that the range of class B network is from 172.16.0.0/12 to 172.16.31.255/12. Why?

Network: 172.16.0.0/12

Subnet bits = 4

Block size = 16

subnet mask = 255.255.255.240

First network = 172.16.0.0/12

Next Network add = 172.16.32.0/12, therefore the broadcast of above network will be 172.16.31.255.

Classful Networks

Note the relation between fixed first 4 MSB bits and the first IP address of that class. So, don’t mug up but remember the relation.

Protocols and Port Numbers

--

--

Vineet Singh
Vineet Singh

Written by Vineet Singh

MSc in Satellite Communication and Space System from University of Sussex, CCNP Enterprise Core certified, Fortinet NSE 4 certified security specialist

No responses yet