Incorrect subnetmask/gateway, ping local vs ping remote

FrankGuthrieFrankGuthrie Posts: 245Member
I've seen this a couple of times, but if the subnetmask/gateway is incorrectly configured, you can't ping a host from a remote network, but it does reply when pinging from the gateway itself.

I'm trying to wrap my head around as to how the ping works when pinging directly from the gateway, vs a few hops away, where in the ping process does failure happen? Can someone explain this to me?

Comments

  • hurricane1091hurricane1091 Posts: 918Member
    Can you elaborate further? Are you saying that if you incorrectly configure a host with an IP and bad subnet mask but correct default gateway, you are able to ping the default gateway but not remote hosts?

    Going to update this, as I think I misunderstand the question here. The scenario I drew up in my head will not apply here and is no good, because the default gateway will not respond to a ping from 192.168.1.200 if the router itself is 192.168.1.1/25. If the router was set to /24 and the host was set to /25, but with an IP address inside the lower half of the range, it would still reach the default gateway, but that hypothetical missing route from the remote router would not occur.

    I would like to elaborate on network's post further, because he is on the right track and I was going down the wrong trail. If a host is incorrectly configured for 192.168.1.200/8 when it should be a /24, the host is going to be thinking 192.X.X.X is on the same subnet and try to ARP for this unsuccessfully rather than directing a ping at the IP address of the remote host with the default gateway as the layer 2 destination.
  • networker050184networker050184 Posts: 11,962Mod Mod
    It's all about ARP. If the host thinks the address is within it's local subnet (it uses it's configured IP and mask) it will try to ARP for it. So if you have the wrong mask it will be trying to ARP for devices that do not exist on that segment.
    An expert is a man who has made all the mistakes which can be made.
Sign In or Register to comment.