Cisco Subnet – Why Can Ping These Subnets from a Different Subnet?
arpciscopacket-tracersubnetswitching
I wonder why I can ping 192.168.3.50 /27 and 192.168.3.70 /27 from 192.168.3.100 /24. Is is not supposed to be impossible?
Thanks in advance for your help.
Best Answer
The host with the /24 address thinks that all the other hosts are on the same network, so it will happily send out a ping on the layer-2 network.
For a response to be sent back, the hosts need to believe that the requesting host is on the same network, otherwise the hosts will try to send a response to their configured gateways. There is something wrong in the configuration of the two hosts which do respond. Unfortunately, host configurations are off-topic here. The masks may be incorrectly configured, or, as I have seen in a few hosts, they do not have a gateway configured so they do respond. You need to figure out what is wrong with the configurations on those two hosts.
Its IP address is 10.10.10.1, its netmask is /24 or 255.255.255.0
This means that as far as it is concerned, IP addresses in the rage of 10.10.10.0 - 10.10.10.255 are in the same subnet. So for destinations with these addresses, it can use ARP to find their MAC address, and send them packets (actually, frames) directly. All other addresses are unreachable to him, since no gateway is defined.
The same is true about PC2, with the address range 192.168.1.1-192.168.1.255
To make the two PCs be able to ping each other without adding a router or changing the IPs, you'd need to change the network masks to 0. So PC1 will be 10.10.10.1/0 and PC2 will be 192.168.1.1/0, making the subnet range for both of them the same 0.0.0.0-255.255.255.255
I have seen this before on other host types. Putting in default gateway addresses should prevent this behavior. Without a default gateway, the host sends an ARP for the other host's layer-3 address, and it receives a reply because the hosts are on the same layer-2 domain. With a default gateway, the host would ARP for the gateway's layer-3 address, not the other host's layer-3 address, but there is no gateway address for which to ARP.
Best Answer
The host with the
/24
address thinks that all the other hosts are on the same network, so it will happily send out a ping on the layer-2 network.For a response to be sent back, the hosts need to believe that the requesting host is on the same network, otherwise the hosts will try to send a response to their configured gateways. There is something wrong in the configuration of the two hosts which do respond. Unfortunately, host configurations are off-topic here. The masks may be incorrectly configured, or, as I have seen in a few hosts, they do not have a gateway configured so they do respond. You need to figure out what is wrong with the configurations on those two hosts.