How to divide subnets in VLSM

How to divide subnets in VLSM

 In the network shown below, we will explain how to divide the “192.168.1.0/24” network into subnets and assign IP addresses.

The largest network in the diagram above is a network with 60 hosts.

 Attempting to assign this with simple subnetting would result in “/26” subnetting to support a network of 60 hosts.

The number of divided subnets is only 2 2 = 4 because there are only 2 bits borrowed from the host part.

 In this case, just assigning subnets to four LANs will use up all IP addresses, and there will be no subnets to assign between routers (WAN).

 Therefore, to meet the IP address allocation requirements of this network, you must plan the allocation in VLSM.

VLSM procedure

 Basically, you can assign subnets from anywhere within the “192.168.1.0/24” range as long as the subnet ranges do not overlap.

 You can allocate from the beginning, you can allocate from the middle, and of course you can allocate from the end.

Here, we will explain how to allocate large subnets from the beginning.

The required subnet size is as follows:

 ・60 hosts LAN A ・・・ “/26” subnet
 ・28 hosts LAN B ・・・ “/27” subnet
 ・12 hosts LAN C ・・・ “/28” subnet
 ・12 hosts LAN D ・・・・”/28″ subnet
 ・WAN1 (2 hosts) … “/30” subnet
 ・WAN2 (2 hosts) … “/30” subnet
 ・WAN3 (2 hosts) … “/30” subnet

Since the 1st to 3rd octets are common numbers, we focus only on the 4th octet.

(1) Allocation of “/26” subnet

First, assign LAN A with the largest 60 hosts.

We need 6 bits for the host bits, so we allocate a range starting with ’00’.

 00 | 000000

 00 | 111111

You can assign a subnet of “192.168.1.0/26”.

A range of “192.168.1.0” to “192.168.1.63” is assigned.

(2) Allocation of “/27” subnet

Next, allocate LAN B of 28 hosts, the second largest.

Requires 5 bits for host bits. We will assign it to the continuation of “00111111”.

The range starting with ’00’ is already in use at ‘192.168.1.0/26’.

So, assign a range that starts with “010”.

 010 | 00000

 010 | 11111

You can assign a subnet of “192.168.1.64/27”.

A range of “192.168.1.64” to “192.168.1.95” is assigned.

(3) Allocation of “/28” subnet

Next, assign LAN C and LAN D, which are the third largest.

We will assign LAN C first.

4 bits are required for the host bits. We will assign it to the continuation of “01011111”.

The range starting with ‘010’ is already used by ‘192.168.1.64/27’.

So, assign a range that starts with “0110”.

 0110 | 0000

 0110 | 1111

You can assign a subnet of “192.168.1.96/28”.

A range of “192.168.1.96” to “192.168.1.111” is assigned.

Next, assign LAN D.

Bit requires 4 bits. We will assign it to the continuation of “01101111”.

The range starting with ‘0110’ is already used by ‘192.168.1.96/28’.

So, assign a range that starts with “0111”.

 0111 | 0000

 0111 | 1111

You can assign a subnet of “192.168.1.112/28”.

A range of “192.168.1.112” to “192.168.1.127” is assigned.

④ Allocation of “/30” subnet

Finally allocate 3 WAN links.

Two bits are required for the host bit. We will assign it to the continuation of “01111111”.

The range starting with ‘0111’ is already used by ‘192.168.1.112/28’.

So I allocate a range starting with “100000”.

 100000 | 00

 100000 | 11

You can assign a subnet of “192.168.1.128/30”.

A range of “192.168.1.128” to “192.168.1.131” is assigned.

 Similarly, if you assign the remaining two WAN links, you can assign “192.168.1.132/30” and “192.168.1.136/30” respectively.

(5) Spare subnet

If you assign the remaining ranges without overlapping, you can assign one for the WAN link and three for the LAN spare.

 ・192.168.1.136/30 ・・・ Reserve for WAN ・192.168.1.144/28 ・・
 ・ Reserve for LAN
 ・192.168.1.160/27 ・・・ Reserve for LAN ・192.168.1.192/26 ・・・ Reserve
 for LAN

 By assigning with VLSM in this way, you can assign IP addresses with the minimum number of IP addresses you need and leave the remaining IP addresses for future expansion.