0

I am trying to ping a device with IP 192.168.0.200, subnet mask 255.255.255.0. It is configured with gateway adress 192.168.1.1.

Is it because the gateway subnet, and ip adress subnet is different i am not able to ping it?

Yes ping is enabled on device.

3
  • 1
    The gateway needs to be on the same network as the host because a gateway is a host on the network that knows how to reach other networks. You would need a gateway to reach the gateway, and that is not how it works.
    – Ron Maupin
    Mar 3 at 20:41
  • @RonMaupin Perfectly reasonable to have a gateway on a different subnet, as long as both the host and the gateway have static routes to each other? Admittedly such a setup is somewhat unusual. Mar 5 at 2:50
  • @Charlieface, what the OP means is the default gateway on a device, which is to what a host will build a layer-2 frame for packets destined to a different network. That means the default gateway must be on the same network. A gateway on a different network needs a gateway on the source network to reach it because you cannot build a layer-2 frame for a gateway on a different network. You cannot have a host reach other networks without a gateway on its own network.
    – Ron Maupin
    Mar 5 at 16:46

1 Answer 1

4

The gateway address must be in the same subnet as the interface address. So your device is misconfigured.

2
  • as I thought. Anoying when I must connect to the device in order to change the network config.
    – alehol
    Mar 3 at 21:13
  • You could change the IP address on another device on the same network and then be able to connect to it. Say you have device 1 with IP 192.168.0.200 (/24 network) and device 2 with IP address 192.168.1.50 (/24 network). To connect to device 1, simply change the IP address of device 2 (assuming you can easily do so) to 192.168.0.50. Then connect to device 1, change its IP address to the correct configuration and then restore the configuration of device 2 so everything is correct. If that is easier than connecting to device1 directly, due to physical access issues, that should do it. Mar 4 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.