Cisco – how to do inter vlan for same subnet

ciscoNetworkroutingsubnetswitch

I configure two same subnet network(ip:192.168.0.2 & ip:192.168.0.3) into VLAN…so they wont communicating with each other…but now i want them to communicate with each other…

For that i connected my switch to a router but with a single same subnet (ip:192.168.0.1)..
For both system i had given the default gateway as (ip:192.168.0.1) and also trunk the gateway coming from router to switch but still they are not communicating with each other..
For different subnet mask this strategy works…but for same subnet it is not happening..
I just want to know why it is not happening or i am doing something wrong??

Best Answer

If you want to remove the "barrier" between the VLANs just reconfigure the ports to use the same VLAN ID.

As Ron's pointed out, a router is required to enable communication between two VLANs (=distinct L2 segments). In your case that isn't possible as both VLANs use the same IP subnet - you'd need to renumber one of the subnets (or use a highly awkward source and destination NAT).

Routing doesn't work with identical (or overlapping) subnets because a sending node consults its local routing table, finds that the destination is on the local subnet and tries to ARP the destination IP address. Failing that (since the destination is in another broadcast domain), transmission fails altogether. Static ARP entries won't help either as distinct VLANs do not communicate directly, ie. on the L2.