VLSM
Variable Length Subnet Mask
Last updated
Variable Length Subnet Mask
Last updated
VLSM is the process of creating subnets of different sizes to make your use of network addresses more efficiently. More complicated than FLSM (Fixed length subnet masks) where all of the subnets use the same prefix length. As we know thats not the case in the real world where different subnet sizes are required (point-to-point, management, Data Centres, PoOP's etc)
As can be seen we will have to assign different prefix's for the different LAN's and P-t-P WAN
The easiest way is to:
Assign the largest subnet at the START of the address space, then the next largest until all subnets have been assigned.
Tokyo LAN A
Toronto LAN B
Toronto LAN A
Tokyo LAN B
Point-to-Point Connection
Step 1:
Which formula to use Networks or Hosts?
110 Hosts -> (2^n-2)
Bits from right to left n=7 (128 -2 = 126 Hosts)
Therefore 2 networks /25 with a range of 128 and subnet mask 255.255.255.129. The hosts per subnet is 2^7-2= 126 Hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.1.0/25 192.168.1.1 192.168.1.126 192.168.1.127
192.168.1.128/25 192.168.1.129 192.168.1.254 192.168.1.255
We will now use the second network available which is 192.168.1.128/25.
Step 1:
Which formula to use Networks or Hosts?
45 Hosts -> (2^n-2)
Bits from right to left n=6 (64 -2 = 62 Hosts)
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.1.128/26 192.168.1.129 192.168.1.190 192.168.1.191
192.168.1.192/26 192.168.1.193 192.168.1.254 192.168.1.255
We will now use the second network available which is 192.168.1.192/26.
Step 1:
Which formula to use Networks or Hosts?
29 Hosts -> (2^n-2)
Bits from right to left n=5 (32 -2 = 30 Hosts)
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.1.192/27 192.168.1.193 192.168.1.222 192.168.1.223
192.168.1.224/27 192.168.1.225 192.168.1.254 192.168.1.255
We will now use the second network available which is 192.168.1.224/27
Step 1:
Which formula to use Networks or Hosts?
8 Hosts -> (2^n-2)
Bits from right to left n=4 (16 -2 = 14 Hosts)
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.1.224/28 192.168.1.225 192.168.1.238 192.168.1.239
192.168.1.240/28 192.168.1.241 192.168.1.254 192.168.1.255
We will now use the second network available which is 192.168.1.240/28
Step 1:
Which formula to use Networks or Hosts?
2 Hosts -> (2^n-2)
Bits from right to left n=2 (4 -2 = 2 Hosts)
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.1.240/30 192.168.1.241 192.168.1.242 192.168.1.243
192.168.1.244/30 192.168.1.245
192.168.1.248/30
192.168.1.252/30 ------DONE
LAN2 - 64 Hosts
LAN1 - 45 Hosts
LAN3 - 14 Hosts
LAN4 - 9 Hosts
Point-to-Point Link
LAN2 - 64 Hosts
192.168.5.0/24
Hosts -> (2^n-2) = 128-2 = 126 Hosts
n= 7
On /32 - right to left go back 7 bits /25
Range of 128
126 Hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address 192.168.5.0/25 192.168.5.1 192.168.5.126 192.168.5.127
192.168.5.128/25
LAN1 - 45 Hosts
192.168.5.128/27 - Taken from the next available subnet from above
Hosts 45 -> (2^n-2) = 64-2 = 62 Hosts
n=6
On /32 - right to left go back 6 bits /26
Range of 64
62 Hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.5.128/26 192.168.5.129 192.168.5.190 192.168.5.191
192.168.5.192/26
LAN3 - 14 Hosts
192.168.5.192/26 - Taken from the next available subnet from above
Hosts 14 -> (2^n-2) =
n=4 (on /32 right to left come back 4 bits) = /28
Range of 16
14 hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.5.192/28 192.168.5.193 192.168.5.206 192.168.5.207
192.168.5.208/28
LAN 4 - 9 Hosts
192.168.5.208/28 - Taken from the next available subnet from above
Hosts 9 -> (2^n-2)
n=4 (will take the next available subnet in the /28
Range 16
14 Hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.5.208/28 192.168.5.209 192.168.5.222 192.168.5.223
192.168.5.224/28
Point-to-Point - 2 Hosts
192.168.5.160/28
Hosts 2 -> (2^n-2)
n=2 (from /32 right to left move 2 bits) /30
Range 4
2 Hosts
Network Address 1st Usable Address Last Usable Address Broadcast Address
192.168.5.224/30 192.168.5.225 192.168.5.226 192.168.5.227
192.168.5.228/30 192.168.5.229 192.168.5.230 192.168.5.231
192.168.5.232/30 ----etc
DONE !! :)