I’ll be basing this of VLSM Example 1 under topic 7 in your E-learn

Nomenclature/Jargon!

Before we start, let’s recap on what what means & what is what!

The what?The what!
Network Portionthe bits in the ip address that does not belong to the subnet
Host Portionthe bits that belong to the subnet!
Subnet Address/Identifierthe smallest address in a subnet, used to identify a subnet when making routing rules
Subnet MaskA 32 bit number that represents the network bits of a subnet with 1 and host bits with 0
This allows you to perform bitwise & on any address in a subnet to find the Subnet Identifier
OctetEach 8 bit chunk in the IPv4 address is an octet! (DO NOT CONFUSE THIS WITH OCTAL)

Steps:

  1. Identify the subnets
  2. Order the networks by decreasing size
  3. Find the first address of the given address-range/subnet
  4. Find smallest subnet size for each subnet
  5. Start subnetting

How 2 VLSM (fast):

1. Identify the subnets

So from this we know we need the following subnets:

  • A
  • B
  • C
  • AB
  • AC
  • BC

2. Order the networks by decreasing size

In example 1, the number of nodes in B are 20, we’re going to change that to 50 to make things more interesting.

SubnetNo. of HostsNo. of RoutersNo. of Usable IPs NeededNo. of Addresses Needed (Includes network & broadcast address)
C1251126128
A6016163
B5015153
AB0224
AC0224
CB0224

3. Find the first address of the given address-range/subnet

In example 1, the address range given is “192.168.160.0/24”. That’s a little too easy.

So for this example! We’ll be using the address range → 192.168.17.0/22

  1. /22 → the last 10 bits of the address is our host portion.
  2. Meaning, the last 2 bits of 17 is within our host portion, so we should make those bits 0.
  3. 17 in binary:
    1. 10 in binary (8+4) → 1010
    2. 7 in binary → 111
    3. 1010 + 0111 = 1 0001
    • or
    1. 16 in binary → 1 0000
    2. 1 in binary → 1
    3. 1 0000 + 0 0001 = 1 0001
  4. Turn last 2 bits to 0: 0001 00010001 0000. Woah! That’s 16 in decimal!
  5. Our first usable address is: 192.168.16.0 !!

4. Find smallest subnet size for each subnet

SubnetNo. of Addresses Needed (Includes network & broadcast address)Min subnet size ()Corresponding Subnet MaskFull Mask
C128128/25255.255.255.128
A6364/26255.255.255.192
B5364/26255.255.255.192
AB44/30255.255.255.252
AC44/30255.255.255.252
CB44/30255.255.255.252
How to find the mask based off Min subnet size?

The stupid way:

  • /24 means the whole last octet is the host portion right? so its size is 256
  • If 256 → /24
  • 128 → /25
  • 64 → /26
  • … so on (rmb! as subnet size decreases, mask INCREASES)

A logical way:

  • think about it, it’s not that deep…
  • lazy 2 write sry.
How to find Full Mask?

do the math or memorise :) You will need to do this in the text without a calculator.

5. Start subnetting

Quick Pointer: Network Address is ALWAYS even. Broadcast Address is ALWAYS odd. if it’s not, you’ve made a mistake somewhere.

Before we start, for brevity, I’m going to define the function: “”.

  • First Usable Address of the subnet
  • Minimum subnet size

Why do we -1 in the function?

  • if we need 64 Addresses, …0 is included in that count.
  • So, from 1.1.1.0 - 1.1.1.63 that’s 64 addresses! That’s why we -1.
Subnet C (/25)IPsCalculation Step
Network Address:192.168.16.0First Address in the given Address range
Broadcast Address:192.168.16.127
First Usable Address:192.168.16.1Network Address + 1
Last Usable Address192.168.16.126Broadcast Address - 1
Subnet A (/26)IPsCalculation Step
Network Address:192.168.16.128Previous subnet Broadcast Address + 1
Broadcast Address:192.168.16.191
First Usable Address:192.168.16.129Network Address + 1
Last Usable Address192.168.16.190Broadcast Address - 1
Subnet B (/26)IPsCalculation Step
Network Address:192.168.16.192Previous subnet Broadcast Address + 1
Broadcast Address:192.168.16.255
First Usable Address:192.168.16.193Network Address + 1
Last Usable Address192.168.16.254Broadcast Address - 1

yooo wait… We’ve reached the largest number possible in our last octet (255). Since we are able to use the last 2 digits in the next octet, we can simply carry over to our next octet.

Previous Subnet Broadcast Address + 1:

  • 192.168. 0001 0000 . 1111 1111 + 1
  • 192.168. 0001 0001 . 0000 0000
  • 192.168.17.0

Of course, you don’t have to break it into binary to do the calculation, just understand how it works :D

Subnet AB (/30)IPsCalculation Step
Network Address:192.168.17.0Previous subnet Broadcast Address + 1
Broadcast Address:192.168.17.3
First Usable Address:192.168.17.1Network Address + 1
Last Usable Address192.168.17.2Broadcast Address - 1
Subnet AC (/30)IPsCalculation Step
Network Address:192.168.17.4Previous subnet Broadcast Address + 1
Broadcast Address:192.168.17.7
First Usable Address:192.168.17.5Network Address + 1
Last Usable Address192.168.17.6Broadcast Address - 1
Subnet BC (/30)IPsCalculation Step
Network Address:192.168.17.8Previous subnet Broadcast Address + 1
Broadcast Address:192.168.17.11
First Usable Address:192.168.17.9Network Address + 1
Last Usable Address192.168.17.10Broadcast Address - 1

yay!