02-20-2009 12:11 PM
I create a subnet using a class C 192.168.1.0 /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 192.168.1.97 255.255.255.192, I am getting this error, 192.168.1.64 overlaps with Vlan30.
I thought I subnet correctly but I hosed something up. Can some one explain my error?
02-20-2009 12:43 PM
Joshua
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.
HTH
Rick
02-20-2009 12:59 PM
I see what you are saying. I must have has a brain fart.
Thank you.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide