Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

IP Math

I create a subnet using a class C /24. It goes

VLAN10 0-31 /27

VLAN20 32-63 /27

VLAN30 64-95 /27

VLAN40 96-159 /26

VLAN50 160-223 /26

When I place the addresses it to the interface VLAN40, ip address, I am getting this error, overlaps with Vlan30.

I thought I subnet correctly but I hosed something up. Can some one explain my error?

Hall of Fame Super Silver

Re: IP Math


I think I see what you are doing, and it is an easy mistake to make. You started from the assumption (which is correct) that a /27 contains 32 addresses and that a /26 contains 64 addresses. So you started laying out /27 subnets every 32 addresses, and after 3 subnets you switched to /26 with 64 addresses. And you made all the subnets adjacent, which seems efficient.

This is a very logical approach but it has a flaw. Subnetting works on bit boundaries. The best way to understand where a subnet starts is to lay out the address in binary, lay out the mask in binary, where the mask in binary has zero put a zero into the address (if the address in that position had a 1 change it to 0). Then take the resulting address from binary back to decimal. This gives the real beginning of the subnet. So here is how it works:

01100000 is the 96 address in binary

11000000 is the /26 mask in binary

01000000 is the resulting address and in decimal that is 64. So your subnet for VLAN 40 does not really start at 96 but starts at 64 and so does overlap the VLAN 30.

As a note: if you had started your process by laying out the larger subnets and then going to the smaller subnets you would not have had this problem.



New Member

Re: IP Math

I see what you are saying. I must have has a brain fart.

Thank you.

CreatePlease to create content