3 ms·
When asking "what's the default gateway?", more often than not, the real question you have is "what's the gateway to IP address X", which would be: ip route
by kees99 8y ago
When asking "what's the default gateway?", more often than not, the real question you have is "what's the gateway to IP address X", which would be:
ip route get X
- isostatic 8y agoNo it's not, it's usually "What is the default gateway on this network segment because I want to plug my laptop in" I do use ip route a fair bit - if I have a machine connected to two (or more) network segments and want to ensure traffic gets routed back the way it came However my main criticism for "ip route" is that it's inconsistent and a change route "route" "route" does reverse dns lookups - e.g "my.server.tld rather than "1.2.3.4", or "default" rather than "0.0.0.0" "route -n" shows 1.2.3.4 "ip route" doesn't do reverse lookup, however it does say "default" rather than "0.0.0.0".
- deleted 8y ago[deleted]
- gsich 8y agoThen reask: whats the gateway to 0.0.0.0/0