If you are looking for examples of VLSM subnet or want to understand complex VLSM computation through the examples, this tutorial is the ideal resource for you. It provides examples of VLSM subnets which not only help you learn the VLSM subnet, but also help you perform VLSM calculation.

For this tutorial, I assume you know what the VLSM subnet is and how it is done. As I already explained the VLSM subnet and its procedure in the previous parts of this tutorial, in this part I will focus on the VLSM examples.

Subnet graphics

Before taking the VLSM subnet examples, let’s create a subnet graph for each IP class. The subnet diagrams summarize all possible combinations of all subnet bits in all IP classes.

In the VLSM subnet, we calculate the number of networks and hosts provided by the given subnet bits. The subnet graphics not only provide this information, but also help us to select the appropriate block sizes and subnet masks for the segments.

Class A under compensation chart

CIDR Subnet mask Network bits Host Bits networks Block size or total number of hosts Valid Hosts
/ 8 255.0.0.0 0 24 1 16777216 16777214
/ 9 255.128.0.0 1 23 2 8388608 8388606
/ten 255.192.0.0 2 22 4 4194304 4194302
/ 11 255.224.0.0 3 21 8 2097152 2097150
/ 12 255.240.0.0 4 20 16 1048576 1048574
/ 13 255.248.0.0 5 19 32 524288 524286
/ 14 255.252.0.0 6 18 64 262144 262142
/ 15 255.254.0.0 seven 17 128 131072 131070
/ 16 255.255.0.0 8 16 256 65536 65534
/ 17 255.255.128.0 9 15 512 32768 32766
/ 18 255.255.192.0 ten 14 1024 16384 16382
/ 19 255.255.224.0 11 13 2048 8192 8190
/ 20 255.255.240.0 12 12 4096 4096 4094
/ 21 255.255.248.0 13 11 8192 2048 2046
/ 22 255.255.252.0 14 ten 16384 1024 1022
/ 23 255.255.254.0 15 9 32768 512 510
/ 24 255.255.255.0 16 8 65536 256 254
/ 25 255.255.255.128 17 seven 131072 128 126
/ 26 255.255.255.192 18 6 262144 64 62
/ 27 255.255.255.224 19 5 524288 32 30
/ 28 255.255.255.240 20 4 1048576 16 14
/ 29 255.255.255.248 21 3 2097152 8 6
/ 30 255.255.255.252 22 2 4194304 4 2

Class B under compensation table

CIDR Subnet mask Network bits Host Bits networks Block size / total number of hosts Valid Hosts
/ 16 255.255.0.0 0 16 1 65536 65534
/ 17 255.255.128.0 1 15 2 32768 32766
/ 18 255.255.192.0 2 14 4 16384 16382
/ 19 255.255.224.0 3 13 8 8192 8190
/ 20 255.255.240.0 4 12 16 4096 4094
/ 21 255.255.248.0 5 11 32 2048 2046
/ 22 255.255.252.0 6 ten 64 1024 1022
/ 23 255.255.254.0 seven 9 128 512 510
/ 24 255.255.255.0 8 8 256 256 254
/ 25 255.255.255.128 9 seven 512 128 126
/ 26 255.255.255.192 ten 6 1024 64 62
/ 27 255.255.255.224 11 5 2048 32 30
/ 28 255.255.255.240 12 4 4096 16 14
/ 29 255.255.255.248 13 3 8192 8 6
/ 30 255.255.255.252 14 2 16384 4 2

Class C under compensation chart

CIDR Subnet mask Network bits Host Bits networks Block size / total number of hosts Valid Hosts
/ 24 255.255.255.0 0 8 1 256 254
/ 25 255.255.255.128 1 seven 2 128 126
/ 26 255.255.255.192 2 6 4 64 62
/ 27 255.255.255.224 3 5 8 32 30
/ 28 255.255.255.240 4 4 16 16 14
/ 29 255.255.255.248 5 3 32 8 6
/ 30 255.255.255.252 6 2 64 4 2

For how to create the subnet graphics, see the previous parts of this tutorial.

Examples of VLSM subnets

There are five IP classes; A, B, C, D and E. From there, the classes Sub-networking can only be carried out in the first three classes; A, B and C. To understand the VLSM subnet in detail, let’s take an example from each class.

Example 1 of VLSM (class C network)

Example 2 of VLSM (class B network)

vlsm ip class b

Example 3 of VLSM (class A network)

example vlsm class ip a

VLSM calculation step by step

Based on host requirements, organize all segments in descending order and select the appropriate block size for each segment.

VLSM Example 1
No. Segment Host requirement Closest block size Valid block hosts
1 LAN1 segment 29 32 30 (32 -2)
2 LAN segment 2 21 32 30 (32 -2)
3 LAN segment 3 12 16 14 (16-2)
4 LAN segment 4 8 16 14 (16-2)
5 WAN 1 link 2 4 2 (4-2)
6 WAN 2 link 2 4 2 (4-2)
seven WAN 3 link 2 4 2 (4-2)
8 WAN 4 link 2 4 2 (4-2)

When selecting the closest block size, compare the host requirement with a valid host instead of the block size itself. For example, LAN segment 4 needs 8 hosts, but we cannot use block size 8 for this. As block size 8 only offers 6 valid hosts (8 -2) while we need 8 valid hosts for this segment. For this segment, we must use the block size which provides 8 or more valid hosts such as block size 16. Similarly for WAN links which need 2 hosts, we must use block size 4.

VLSM Example 2
No. Segment Host requirement Closest block size Valid block hosts
1 VLAN1 240 256 254
2 VLAN2 200 256 254
3 LAN segment 1 150 256 254
4 LAN segment 2 50 64 62
5 WAN 1 link 2 4 2
6 WAN 2 link 2 4 2
VLSM Example 3
No. Segment Host requirement Closest block size Valid Hosts
1 LAN segment 3 350 512 510
2 LAN segment 4 250 256 254
3 LAN segment 1 80 128 126
4 LAN segment 5 50 64 62
5 LAN segment 2 20 32 30
6 WAN Link1 2 4 2
seven WAN Link2 2 4 2
8 WAN Link3 2 4 2
9 WAN Link4 2 4 2
ten WAN Link5 2 4 2
11 WAN Link6 2 4 2

Once the segments are organized according to host requirements and host requirements converted to the nearest block size, do the following.

  • Make a subnet for the most important segment. From subnets to subnets, assign the first subnet to it.
  • If the next segment has a similar block size, assign the next subnet to it.
  • Repeat this process until the requirements are the same.
  • If the next segment requires a different block size, redo the subnet for the block size of that segment and choose the subnet that comes after the busy subnets. Busy subnets are the subnets that provide the IP addresses already in use.
  • Just like the step above, if the next segment requires a similar block size, use the following subnet for this, otherwise start the subnet again.
  • Repeat the same steps until the last segment of the network.

Let’s implement the above steps in our examples.

VLSM Example 1

The first largest segment (LAN Segment1) requires block size 32. For block size 32, we use the subnet of / 27.

In class C, the subnet of / 27 provides us with 8 networks (subnets) of block size 32.

0-31, 32-63, 64-95, 96-127, 128-159, 160-191, 192-223, 224-255

Let’s use the first subnet 0-31 for that.

Since the second segment (LAN Segment2) also has the same requirement, use the second subnet 32-63 for that.

The third segment (LAN Segment3) requires block size 16 which is different from the second segment, so instead of using the subnet that provides block size 32, we will redo the subnet and use the sub- network which provides block size 16.

In class C, the / 28 subnet provides 16 networks of block size 16.

0-15, 16-31, 32-47, 48-63, 64-79, 80-95, 96-111, 112-127, 128-143, 144-159, 160-175, 176-191, 192-207, 208-223, 224-239, 240-255

If we exclude busy subnets, we will get the available subnets for this segment and the following segments.

Subnets that provide addresses already assigned are called busy subnets. In this subnet, the occupied subnets are 0-15, 16-31, 32-47, and 48-63. These subnets provide the addresses (0 to 63) that are already assigned in the previous segments.

Let’s use the first available subnet 64-79 of this subnet for the third segment (LAN3 segment).

The fourth segment (LAN4 segment) also has the same requirement. Assign the next available subnet 80-95 to her.

The following segments are WAN links. WAN links only require 2 addresses. For 2 valid addresses, we need a block size of 4.

In class C, the / 30 subnet provides 64 block size 4 networks.

0-3, 4-7, 8-11, 12-15, 16-19, 20-23, 24-27, 28-31, 32-35, 36-39, 40-43, 44-47, 48- 51, 52-55, 56-59, 60-63, 64-67, 68-71, 72-75, 76-79, 80-83, 84-87, 88-91, 92-95, 96-99, 100-103, 104-107, 108-111, 112-115, 116-119, 120-123, 124-127, 128-131, 132-135, 136-139, 140-143, 144- 147, 148-151, 152-155, 156-159, 160-163, 164-167, 168-171, 172-175, 176-179, 180-183, 184-187, 188-191, 192-195, 196-199, 200-203, 204-207, 208-211, 212-215, 216-219, 220-223, 224-227, 228-231, 232-235, 236-239, 240-243, 244- 247, 248-251, 252-255

Exclude busy subnets and use the first four available subnets 96-99, 100-103, 104-107 and 108-111 for WAN links.

The following figure explains the above steps and the subnet.

vlsm subnet for example of class ip c

Subnet table for the first example of VLSM
Segment CIDR Subnet mask Network address Mailing address Valid host addresses
LAN1 segment / 27 255.255.255.224 192.168.1.0 192.168.1.31 192.168.1.1 to 192.168.1.30
LAN segment 2 / 27 255.255.255.224 192.168.1.32 192.168.1.63 192.168.1.33 to 192.168.1.62
LAN segment 3 / 28 255.255.255.240 192.168.1.64 192.168.1.79 192.168.1.65 to 192.168.1.78
LAN segment 4 / 28 255.255.255.240 192.168.1.80 192.168.1.95 192.168.1.81 to 192.168.1.94
WAN 1 link / 30 255.255.255.252 192.168.1.96 192.168.1.99 192.168.1.97 to 192.168.1.98
WAN 2 link / 30 255.255.255.252 192.168.1.100 192.168.1.103 192.168.1.101 to 192.168.1.102
WAN 3 link / 30 255.255.255.252 192.168.1.104 192.168.1.107 192.168.1.105 to 192.168.1.106
WAN 4 link / 30 255.255.255.252 192.168.1.108 192.168.1.111 192.168.1.107 to 192.168.1.108

example vlsm class c solved

VLSM Example 2

In this example, the first segment (VLAN1) requires block size 256.

In class B, the / 24 subnet provides us with 256 subnets and 256 hosts in each subnet.

0.0, 1.0, 2.0, 3.0, 4.0, 5.0 ……………………………… .. 252.0, 253.0, 254.0, 255 , 0

Let’s assign the first subnet 0.0 to this segment.

Since the second segment (VLAN2) and the third segment (LAN1 segment) also have the same requirement, instead of remaking the subnet, let’s use the following available subnets from subnets already subnets for these segments.

Assign a second subnet 1.0 and third subnet 2.0 to the second segment (VLAN2) and to the third segment (LAN Segment1) respectively.

The fourth segment (LAN Segment2) requires a block size of 64 which is different and less than the current block size. Instead of using the current subnets, let’s redo the subnet for this segment.

In class B, the / 26 subnet provides 1024 subnets with a block size of 64.

0.0, 0.64, 0.128, 0.192, 1.0, 1.64, 1.128, 1.192, 2.0, 2.64, 2.128, 2.192, 3.0, 3.64, 3.128, 3.192, 4.0, 4.64, 4.128, 4.192 ………………………………… .. 254.0, 254.64, 254.128, 254.192, 254.0, 254.64, 254.128, 254.192

Exclude already occupied subnets and use the first available subnet 3.0 for this segment (LAN segment2).

The next two segments are WAN links. For WAN links, we use the / 30 subnet.

In class B, the / 30 subnet provides 16384 networks with block size 4.

0.4, 0.8, 0.12,…. …… 3.0, 3.4, …………. 3.56, 3.60, .64, 3.68, 3.72, 3.78, …………………………… 255.248, 255.252

Just like we did above, exclude busy subnets and assign the first two available subnets 3.64 and 3.68 to WAN Link1 and WAN Link2 respectively.

Subnet table for the second example of VLSM
Segment CIDR Subnet mask Network address Mailing address Valid host addresses
VLAN1 / 24 255.255.255.0 172.168.0.0 172.168.0.255 172.168.0.1 to 172.168.0.254
VLAN2 / 24 255.255.255.0 172.168.1.0 172.168.1.255 172.168.1.1 to 172.168.1.254
LAN segment 1 / 24 255.255.255.0 172.168.2.0 172.168.2.255 172.168.2.1 to 172.168.2.254
LAN segment 2 / 26 255.255.255.192 172.168.3.0 172.168.3.63 172.168.3.1 to 172.168.3.62
WAN 1 link / 30 255.255.255.252 172.168.3.64 172.168.3.67 172.168.3.65 to 172.168.3.66
WAN 2 link / 30 255.255.255.252 172.168.3.68 172.168.3.71 172.168.3.69 to 172.168.3.70

example vlsm class b solved

VLSM Example 3

The largest segment (LAN segment 3) requires block size 512.

In class A, the / 23 subnet provides 32,768 networks with the block size of 512.

0.0.0, 0.2.0, 0.4.0, …………………………………. 0.252.0, 0.254.0

Assign the first subnet 0.0.0 to this segment.

The second largest segment (LAN segment 4) requires the block size of 256.

In class A, the / 24 subnet provides 65,536 networks with the block size of 256.

0.0.0, 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, ……………………… 0.252.0, 0.253.0, 0.254.0

Exclude busy subnets and assign the first available subnet 0.2.0 to her.

The third largest segment (LAN segment 1) requires a block size of 128.

In class A, the / 25 subnet provides 131,072 networks with the block size of 128.

0.0.0, 0.0.128, 0.1.0, 0.1.128, 0.2.0, 0.2.128, 0.3.0, 0.3.128, 0.4.0, 0.4.128 ………………… 0.254.0, 0.254.128, 0.255.0, 0.255.128

Assign the first available subnet 0.3.0 to this segment.

The fourth largest segment (LAN segment 5) requires a block size of 64.

In class A, the / 26 subnet provides 262,144 networks with a block size of 64.

0.0.64, 0.0.128, 0.0.192, 0.0.255, 0.1.64, …………………. 0.2.192, 0.2.255, 0.3.64, 0.3.128, 0.3.192, 0.3.255, 0.4.64 …………………. , 0.254.0, 0.254.64, 0.254.128, 0.254.255

In this subnet, the first subnet with the available addresses is 0.3.128. Assign it to this segment.

The fifth largest segment (LAN Segment2) requires a block size of 32.

In class A, the / 27 subnet provides 524,288 networks with a block size of 32.

0.0.32, 0.0.64, 0.0.96, 0.0.128 ………. 0.3.0, 0.3.32, 0.3.64, 0.3.96, 0.3.128, 0.3.160, 0.3.192, 0.3.224, 0.3.255, …………………. , 0.255.0, 0.255.32, 0.255.64, 0.255.92, 0.255.128, 0.255.224, 0.255.255

The first available subnet of this subnet is 0.3.192. Let’s assign it to this segment.

The next six segments are WAN links. For WAN links, use the / 30 subnet.

In class A, the / 30 subnet provides 4194304 networks with block size 4.

0.0.0, 0.0.4, 0.0.8 ……………………. …………… .. 0.3.208, 0.3.212, 0.3.216, 0.3.220, 0.3.224, 0.3.228, 0.3.232, 0.3.236, 0.3.240, 0.3.248, 0.3.252, 0.4.0, 0.4.8, …………… .. 0.255.240, 0.255.244 , 0.255.248, 0.255.252

Assign 0.3.224, 0.3.228, 0.3.232, 0.3.236, 0.3.240 and 0.3.248 subnets to the WAN links respectively.

Subnetwork table for the third example of VLSM
Segment CIDR Subnet mask Network address Mailing address Valid host addresses
LAN segment 3 / 23 255.255.254.0 10.0.0.0 10.0.1.255 10.0.0.1 to 10.0.1.254
LAN segment 4 / 24 255.255.255.0 10.0.2.0 10.0.2.255 10.0.2.1 to 10.0.2.254
LAN segment 1 / 25 255.255.255.128 10.0.3.0 10.0.3.127 10.0.3.1 to 10.0.3.126
LAN segment 5 / 26 255.255.255.192 10.0.3.128 10.0.3.191 10.0.3.129 to 10.0.3.190
LAN segment 2 / 27 255.255.255.224 10.0.3.192 10.0.3.223 10.0.3.193 to 10.0.3.222
WAN Link1 / 30 255.255.255.252 10.0.3.224 10.0.3.227 10.0.3.225 to 10.0.3.226
WAN Link2 / 30 255.255.255.252 10.0.3.228 10.0.3.231 10.0.3.229 to 10.0.3.230
WAN Link3 / 30 255.255.255.252 10.0.3.232 10.0.3.235 10.0.3.233 to 10.0.3.234
WAN Link4 / 30 255.255.255.252 10.0.3.236 10.0.3.239 10.0.3.237 to 10.0.3.238
WAN Link5 / 30 255.255.255.252 10.0.3.240 10.0.3.243 10.0.3.241 to 10.0.3.242
WAN Link6 / 30 255.255.255.252 10.0.3.244 10.0.3.247 10.0.3.245 to 10.0.3.246

solved vlsm class example

That’s it for this tutorial. If you have a comment or suggestion about this tutorial, or need help with the VLSM subnet, send me an email. If you like this tutorial, don’t forget to share it via your favorite social network.

Author

Write A Comment