0% found this document useful (0 votes)
241 views22 pages

Variable Length Subnet Mask (VLSM)

The document discusses Variable Length Subnet Mask (VLSM) and provides an example of how to implement VLSM to efficiently allocate IP addresses across multiple networks or subnets with varying address requirements. Specifically, it shows how to: 1) Calculate the number of bits needed to create the required number of subnets and define a custom subnet mask. 2) Determine the address range and subnet prefix for each subnet based on its requirements. 3) Build an addressing table showing the subnet number, prefix, and range of usable addresses for each subnet. This allows for a more efficient use of IP addresses than traditional subnetting by allowing variable subnet mask lengths tailored to the needs of each subnet.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views22 pages

Variable Length Subnet Mask (VLSM)

The document discusses Variable Length Subnet Mask (VLSM) and provides an example of how to implement VLSM to efficiently allocate IP addresses across multiple networks or subnets with varying address requirements. Specifically, it shows how to: 1) Calculate the number of bits needed to create the required number of subnets and define a custom subnet mask. 2) Determine the address range and subnet prefix for each subnet based on its requirements. 3) Build an addressing table showing the subnet number, prefix, and range of usable addresses for each subnet. This allows for a more efficient use of IP addresses than traditional subnetting by allowing variable subnet mask lengths tailored to the needs of each subnet.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Variable Length Subnet Mask

(VLSM)
Topic Outline
• Understand the concept of VLSM
• Calculate VLSM in a given scenario
Subnetting without VLSM
• Using traditional subnetting, the same number of
addresses is allocated for each subnet.
• Inefficient used of IP address. Why ?

How many subnet or network in above network diagram ?


7 networks
Subnet / Network 1 = Building A
Subnet / Network 2 = Building B
Subnet / Network 3 = Building C
Subnet / Network 4 = Building D
Subnet / Network 5 = R1 to R2
Subnet / Network 6 = R2 to R3
Subnet / Network 7 = R3 to R4
Using traditional subnetting with the given address of
192.168.20.0/24
Build your addressing table .

Subnet Subnet / Network 1st Usable IP Last Usable IP Broadcast Address


/Network Address Address Address
Number

Subnet /
Network 1

Subnet /
Network 2
Subnet /
Network 3

Subnet /
Network 4

Subnet /
Network 5
Subnet /
Network 6
Subnet /
Network 7
192.168.20.0/24
Solution :
• Number of subnet needed = 7
• Using formula, determine the number of bits to be borrowed to create 7
subnet.
2^n = 7
n = 3; meaning 3 bits from host portion will be borrowed / joint network
portion.

• Define Custom Subnet Mask


192.168.20.0 is a class C address
Default Subnet Mask = 255.255.255.0
= 11111111.11111111.11111111.00000000
Custom Subnet Mask = 11111111.11111111.11111111.11100000
= 255.255.255.224
• Determine the range for each subnet
Custom Subnet Mask = 11111111.11111111.11111111.11100000

So, range for each subnet = 32


2^5 = 32
Subnet Subnet / Network 1st Usable IP Address Last Usable IP Address Broadcast Address
/Network Address
Number
Subnet /
Network 1
192.168.20.0 192.168.20.1 192.168.20.30 192.168.20.31
Subnet /
Network 2
192.168.20.32 192.168.20.33 192.168.20.62 192.168.20.63
Subnet /
Network 3
192.168.20.64 192.168.20.65 192.168.20.94 192.168.20.95
Subnet /
Network 4
192.168.20.96 192.168.20.129 192.168.20.126 192.168.20.127
Subnet /
Network 5
192.168.20.128 192.168.20.193 192.168.20.158 192.168.20.159
Subnet /
Network 6
192.168.20.160 192.168.20.161 192.168.20.190 192.168.20.191
Subnet /
Network 7
192.168.20.192 192.168.20.193 192.168.21.222 192.168.21.223

The number of IP address from


1st usable IP to last IP address is
same in each subnet.
Subnet / Network 1 = Building A = 192.168.20.0
Subnet / Network 2 = Building B = 192.168.20.32
Subnet / Network 3 = Building C = 192.168.20.64
Subnet / Network 4 = Building D = 192.168.20. 96
Subnet / Network 5 = R1 to R2 = 192.168.20. 128
Subnet / Network 6 = R2 to R3 = 192.168.20.160
Subnet / Network 7 = R3 to R4 = 192.168.20.192

Subnet Subnet / Network 1st Usable IP Address Last Usable IP Address Broadcast Address
/Network Address
Number

Subnet /
192.168.20.0 192.168.20.1 192.168.20.30 192.168.20.31
Building A Network 1
Subnet / 192.168.20.32 192.168.20.33 192.168.20.62 192.168.20.63
Building B Network 2

Building C
Subnet /
Network 3
192.168.20.64 192.168.20.65 192.168.20.94 192.168.20.95

Subnet / 192.168.20.96 192.168.20.129 192.168.20.126 192.168.20.127


Building D Network 4

Subnet / 192.168.20.128 192.168.20.193 192.168.20.158 192.168.20.159


R1 to R2 Network 5
Subnet /
192.168.20.160 192.168.20.161 192.168.20.190 192.168.20.191
R2 to R3 Network 6
Subnet /
R3 to R4 Network 7
192.168.20.192 192.168.20.193 192.168.21.222 192.168.21.223

IP address allocated more than the number of IP required


Variable Length Subnet Mask
(VLSM)
How many network are shown in above topology?
Example 1 : Given IP address 192.168.10.0/24. Apply VLSM to assign IP
addresses for each network.

G0/0 G0/1

Network #1 Network #2
Number of IP needed = 6 Number of IP needed = 2
a. start calculation with highest number of IP address / host needed.
Network 1 > Network 2
Network #1

b. Use formula Use formula 2^n – 2 = number of host needed


Network 1 : 2^n – 2 = 6
n = 3 ; means allocate 3 bits for host portion.
Network #1
Custom subnet Mask = x. x. x.000
= 11111111.1111111.11111111.11111000 / 29
= 255.255.255.248
2^3 = 8
Range for Network #1= 11111111.1111111.11111111.11111000

Build addressing table :


Network Custom Subnet Prefix Network 1st Last Usable IP Broadcast
Mask address usable IP
Network 255.255.255.248 / 29 192.168.10.0 192.168.10.1 192.168.10.6 192.168.10.7
#1
192.168.10.8

2nd IP
1st Usable IP = 192.168.10.1
3rd IP
1st IP
2nd Usable IP = 192.168.10.2
3rd Usable IP = 192.168.10.3
4th IP
4th Usable IP = 192.168.10.4
5th IP 6th IP 5th Usable IP = 192.168.10.5
6th Usable IP = 192.168.10.6
2
22
2
Network #2
a. Use formula Use formula 2^n – 2 = number of host needed
2^n – 2 = 2
n = 2 ; means allocate 2 bits for host portion.
b. Custom subnet mask =111111111.11111111.11111111.11111100
2^2 = 4
=255.255.255.252
c. Range for subnet = 2^2 =4
d. Continue from previous addressing table
Network Custom Subnet Prefix Network 1st Last Usable IP Broadcast
Mask address usable IP
Network 255.255.255.248 / 29 192.168.10.0 192.168.10.1 192.168.10.6 192.168.10.7
#1
8
Network 255.255.255.252 /30 192.168.10.8 192.168.10.9 192.168.10.10 192.168.10.11
#2 4

192.168.10.12

1st IP

2nd IP
Se0/0

Se0/1

R1 R2

Subnet / Network 1 = LAN 3 = 250 hosts


Subnet / Network 2 = LAN 4 = 100 hosts
Subnet / Network 3 = LAN 1 = 60 hosts 5 subnet /
Subnet / Network 4 = LAN 2= 10 hosts network
Subnet / Network 5 = R1 to R2 = 2 host
172.30.4.0/22
Build your addressing table by implementing VLSM
Subnet Subnet / Custom Subnet Prefix 1st Usable IP Last Usable IP Broadcast
/Network Network Mask Address Address Address
Number Address

Subnet /
Network 1

Subnet /
Network 2

Subnet /
Network 3

Subnet /
Network 4

Subnet /
Network 5

Subnet /
Network 6

Subnet /
Network 7
Step : Begin your calculation with the highest number of host required

LAN 3 > LAN 4 > LAN 1 > LAN 2 > R1 to R2


(250 hosts) (100 hosts) (60 hosts) (10 hosts) (2 hosts)

LAN 3
• Use formula 2^n – 2 = number of host needed
2^n - 2 = 250
n = 8 , meaning 8 bits for host portion. Balance 24 bits are for network portion.
custom subnet mask = 11111111.11111111.11111111.00000000 = /24
= 255.255.255.0

• Determine the range of subnet


custom subnet mask = 11111111.11111111.11111111. 00000000

Range for next subnet is 1


2^1 = 1
192.168.20.0/24
Subnet Custom Subnet Mask Prefix Subnet / Network 1st Usable IP Last Usable IP Broadcast Address
/Network Address Address Address
Number
LAN 3 255.255.255.0 /24 172.30.4.0 / 24 172.30.4.1 172.30.4.254 172.30.4.255
LAN 4 255.255.255.128 /25 172.30.5.0 / 25 172.30.5.1 172.30.5.126 175.30.5.127

LAN 1 175.30.5.128

LAN 2

R1 to R2

LAN 4
• Use formula 2^n – 2 = number of host needed
2^n – 2 = 100
n = 7 , meaning 7 bits for host portion. Balance 25 bits are for network portion.
custom subnet mask = 11111111.11111111.11111111.10000000 = /25
= 255.255.255.224

• Determine the range of subnet


custom subnet mask = 11111111.11111111.11111111. 10000000

Range for next subnet is 128


2^7 = 128
Lan 1
• Use formula 2^n – 2 = number of host needed
2^n - 2 = 60
n = 6 , meaning 6 bits for host portion. Balance 26 bits are for network portion.
custom subnet mask = 11111111.11111111.11111111.11000000 = /26
= 255.255.255.192

• Determine the range of subnet


custom subnet mask = 11111111.11111111.11111111.11000000

Range for next subnet is 64 2^6 = 64

Subnet Custom Subnet Mask Prefix Subnet / Network 1st Usable IP Last Usable IP Broadcast Address
/Network Address Address Address
Number

LAN 3 255.255.255.0 /24 172.30.4.0 / 24 172.30.4.1 172.30.4.254 172.30.4.255


LAN 4 255.255.255.128 /25 172.30.5.0 / 25 172.30.5.1 172.30.5.126 175.30.5.127

LAN 1 255.255.255.192 /26 175.30.5.128 /26 175.30.5.129 175.30.5.190 175.30.5.191


LAN 2 175.30.192
R1 to R2
LAN 2
• Use formula 2^n – 2 = number of host needed
2^n - 2 = 10
n = 4 , meaning 4 bits for host portion. Balance 28 bits are for network portion.
custom subnet mask = 11111111.11111111.11111111.11110000 = / 28
= 255.255.255.240

• Determine the range of subnet


custom subnet mask = 11111111.11111111.11111111.11110000

Range for next subnet is 16 2^4 = 16

Subnet Custom Subnet Mask Prefix Subnet / Network 1st Usable IP Last Usable IP Broadcast Address
/Network Address Address Address
Number

LAN 3 255.255.255.0 /24 172.30.4.0 / 24 172.30.4.1 172.30.4.254 172.30.4.255


LAN 4 255.255.255.128 /25 172.30.5.0 / 25 172.30.5.1 172.30.5.126 175.30.5.127

LAN 1 255.255.255.192 /26 175.30.5.128 /26 175.30.5.129 175.30.5.190 175.30.5.191

LAN 2 255.255.255.240 /28 175.30.5.192 175.30.5.193 175.30.5.218 175.30.5.219

R1 to R2 175.30.5.208
R1 to R2
• Use formula 2^n – 2 = number of host needed
2^n – 2 = 2
n = 2 , meaning 2 bits for host portion. Balance 30 bits are for network portion.
custom subnet mask = 11111111.11111111.11111111.11111100 = /30
= 255.255.255.252

• Determine the range of subnet


custom subnet mask = 11111111.11111111.11111111.11111100

Range for next subnet is 4 2^2 = 4

Subnet Custom Subnet Mask Prefix Subnet / Network 1st Usable IP Last Usable IP Broadcast Address
/Network Address Address Address
Number

LAN 3 255.255.255.0 /24 172.30.4.0 172.30.4.1 172.30.4.254 172.30.4.255


LAN 4 255.255.255.128 /25 172.30.5.0 172.30.5.1 172.30.5.126 175.30.5.127

LAN 1 255.255.255.192 /26 175.30.5.128 175.30.5.129 175.30.5.190 175.30.5.191

LAN 2 255.255.255.240 /28 175.30.5.192 175.30.5.193 175.30.5.218 175.30.5.219

R1 to R2 255.255.255.252 /30 175.30.5.208 175.30.5.209 175.30.5.210 175.30.5.211

175.30.5.212

Less wastage of IP address.


Test Your Understanding ?????

10.10.96.0/21

Subnet Subnet / Custom Subnet Prefix 1st Usable IP Last Usable IP Broadcast
/Network Network Mask Address Address Address
Number Address
192.168.6.0/23

Subnet Subnet / Custom Subnet Prefix 1st Usable IP Last Usable IP Broadcast
/Network Network Mask Address Address Address
Number Address

You might also like