Finding VLSM Overlaps

Step 1 Calculate the subnet ID and subnet broadcast address of each subnet, which gives you the range of addresses in that subnet.
Step 2 List the subnet IDs in numeric order (along with their subnet broadcast addresses).
Step 3 Scan the list top to bottom, comparing each pair of adjacent entries, to see if their range of addresses overlaps.

Example ( Problem 2 on page 208 ICDN 2 )

Subnets: 172.16.126.151/22, 172.16.122.57/27, 172.16.122.33/30, 172.16.122.1/30, 172.16.128.151/20

Step 1 - Calculate the subnet ID and subnet broadcast address

Subnet 1

172.16.126.151/22 ( decimal mask = 255.255.252.0) .240 is the only part of the mask needed for Boolean AND

Convert the red numbers into binary for a Boolean AND operation, the .126 is sometimes referred to as the interesting octet because it is the only one that has subnet bits and host bits in it.


128 64 32 16 8 4 2 1 ( Useful when converting to binary if you have not memorized it yet)

126 (3rd octet of IP address)
0 1 1 1 1 1 1 0
252 (3rd octet of Subnet Mask)
1 1 1 1 1 1 0 0
Boolean AND results
0 1 1 1 1 1 0 0

Reverse the Boolean AND results back to binary

128 64 32 16 8 4 2 1
   0   1    1   1 1 1 0 0 = 124

Place .124 in the 3rd octet of the IP address to find the network ID, also replace all the host bits with the value of 0.

Network ID - 172.16.124.0

Next find the broadcast address of that subnet by replacing all host bits with 1. Since the last two octets are the only ones containing host bits only convert them the rest will remain the same.

0 1 1 1 1 1 0 0 . 0 0 0 0 0 0 0 0

0 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1

Covert back to binary for the broadcast value. Notice 128 is not converted because it was part of the network value not a valid host bit. 

Broadcast ID - 172.16.127.255

Subnet 2

172.16.122.57/27 255.255.255.224 The reason .57 is highlighted is because .122 is part of the network ID, being that the 3rd octet is 255 there are no host bits in that octet making it part of the network ID.

128 64 32 16 8 4 2 1

An easy way to figure out binary values is to know that when subtracting 1 from any multiple of 2 returns the same number as if all bits behind it were all 1s. Example 64-1 is 63 same value as 0 0 1 1 1 1 1 1 or 127 0 1 1 1 1 1 1 1.  

57 (4th octet of IP address)
0 0 1 1 1 0 0 1
224 (4th octet of Subnet Mask)
1 1 1 0 0 0 0 0
Boolean AND results
0 0 1 0 0 0 0 0 

Reverse the Boolean AND results back to binary

0 0 1 0 0 0 0 0 = 32

Network ID - 172.16.122.32

0 0 1 1 1 1 1 1 = 63

Broadcast ID - 172.16.122.63


Subnet 3

172.16.122.33/30 255.255.255.252

33
0 0 1 0 0 0 0 1
30
1 1 1 1 1 1 0 0 (finding the broadcast simply changes the 0s to 1s and add that value to the network value of 32)
Boolean AND
0 0 1 0 0 0 0 0

Network ID 

172.16.122.32

Broadcast ID

172.16.122.35

Subnet 4 

172.16.122.1/30

1
0 0 0 0 0 0 0 1
252
1 1 1 1 1 1 0 0
Boolean AND
0 0 0 0 0 0 0 0

Network ID 

172.16.122.0

Broadcast

172.16.122.3


Subnet 5

172.16.128.151/20 255.255.240.0

128
1 0 0 0 0 0 0 0
240
1 1 1 1 0 0 0 0 
Boolean AND
1 0 0 0 0 0 0 0

Network Address

172.16.128.0

Broadcast Address

172.16.143.255

Step 2 List the subnet IDs in numeric order & Identify the Overlap

172.16.122.0 - 172.16.122.3
172.16.122.32 - 172.16.122.35
172.16.122.32 - 172.16.122.63
172.16.124.0 - 172.16.127.255
172.16.128.0 - 172.16.143.255