here subnet clause is happening so you couldn't apply this subnets on same time. Because either of the subnets useing its own N/W and Brd address to communicate within its subnets...hence as it creating a IP clauses between these subnets it wont all you to implement on same LAN..
Hope it may helps you.
Re: crazy subnetting question?
11 years 8 months ago #19231
Yes, I tried it and it works!. I've set the two IPs and mask on two different PC on the same switch and they can ping each other.
I think this is what is happening, the 172.16.35.20/18 subnet contains the 172.16.40.25/19 subnet. A PC on the /18 will always think the other PC on the /19 is part of it's subnet, so when it sends a packet, it will forward it dirrectly (ARPing and finding it's MAC) without forwarding to the router.
However, when the other PC replies it will not necessarily see the sender PC from the /18 as part of it's /19 subnet. But in your case here it happens that the 172.16.35.20 (the sender) also lies within the 172.16.40.25/19 subnet. The replier (172.16.40.25) will also see sender as part of it's sub. and will forward directly.
Yes this sort of thing will work, and it works because each machine simply applies the logic we all know and love when considering how to forward the packet - if mysubnet mask indicates the destination is on my network then I'll attempt to deliver it locally, otherwise I'll forward it to my default gateway or to a specific gateway for the distant network if I have a suitable entry in my routing table. The fact that the two subnet masks aren't the same doesn't matter - it's the local on on each machine that is used when determining how to route.
In practical terms this can get interesting. You can have a machine on a real network with an incorrect subnet mask that still works fine, or works fine to one group of machines (IP addresses) but not to another, or that doesn't work at all. And you can get crazy situations like a ping packet being correctly routed from origin to target but then being misrouted by the target (or some device in between) due to a subnetting error and going off to goodness knows where instead of back to the origin. Bear this in mind - just because a ping fails doesn't always mean the target machine is down..
Answer to the question
11 years 8 months ago #19240
Great observation however be careful. What you are saying is correct if both machines are on the same switch, in the same VLAN. In reality, the different subnets would be seperated by routers (or VLAN's using intervlan routing) and as such it may not even get passed to the routers since it would beleive that they are on the same subnet and hence you would get into serious issues.
Its great for testing (and playing around with) but not to be setup in a live network environment as it would cause headache in troubleshooting