Ping 2 different subnet mask /24 and /25

using 2 different subnet maks and should ping each other to access the end product.
Please give me more detailed instruction, how to configure in this situation.

Didn’t we do this before here?


And we concluded this was not a mask issue but a routing issue, and instructions were given to OP about how to fix it...

1 Like

Yes, as others have said, its a routing issue. Lets explain with the example of my home network. On my openwrt router the "ip route" command gives:

ip r
default via dev pppoa-wan dev br-lan scope link  src via dev br-lan dev pppoa-wan scope link  src 

The interesting one is the - that is not on the directly attached network of the router, but the routing instruction says that packets for that address should be sent to - which is on the directly attached network.

Now on machine "ip route" gives:

ip r
default via dev eth0 proto dhcp src metric 1024 dev eth0 proto kernel scope link src dev eth0 proto dhcp scope link src metric 1024 dev usb0 proto kernel scope link src dev usb1 proto kernel scope link src 

So notice it has 192.168.7.* networks on two external networks, actually two usb ports that do ethernet over usb. Note they are very restricive /30 networks, there is only 1 machine at the end of each.

Now doing this I can route packets to the 192.168.7.* machines from anywhere on my network, even if not attached. Its becuase the default route via the openwrt router, know how to route packets to those machines.

I've always added routes by hand (language is clearer to me) so use commands like ip r add via what you need to check is that each machine on your network knows how to route packets ...

You also need to think what means when it says it has no gateway. This means that its subnet mask means that the only machine that exist to it are; so it knows that packets to that it can send out on the subnet; but that machine has no knowledge of how to send packets to any other address, e.g. it has no knowledge of - so it could not respond to ping from that machine. Hence you will need to cure that problem on, so it knows how to route general packets; if you don't do this you are stuck on the subnet ...

1 Like

Please don't double post.

1 Like