Skip to main content

What should the gateway address ("route") be set to if there is no gateway on the network? [Resolved]

I currently have a LAN-only network configuration with several devices including a Linux based controller. This network features a single managed switch but no router.

My Linux device can't seem to ping any of the other devices on the network, while all the other devices are able to ping each-other just fine.

Because my network does not have a gate-way, should my Linux device still feature a default gateway address? There is an old one address that had been saved to the device, however, because my Linux device isn't attempting to reach anything outside the network, it seems like this old gateway setting shouldn't even matter/affect things.

So my question: How should the gateway address on a Linux device be configured when there is no gateway on the network?


Question Credit: Izzo
Question Reference
Asked March 17, 2019
Posted Under: Network
39 views
2 Answers

If the network has no route, then don't configure one. Linux is perfectly fine operating without any default routes configured. The Linux box will be able to connect to any systems that it considers to be with in its local subnet.


credit: Zoredache
Answered March 17, 2019

You don't need a gateway when all your devices share the same IP subnet. Gateway is only needed when packets need to be forwarded between IP subnets.


credit: Tero Kilkanen
Answered March 17, 2019
Your Answer