Default Gateway
Cheat sheet · https://pcornel.dk/topic.php?topic=2778
Answer
The default gateway is the route for 0.0.0.0/0 (and ::/0): where packets go when no more specific route matches.
Remember
Only one default route should normally be active per address family, or set clear metrics. The gateway must be on a directly connected subnet. IPv6 often learns its default route from router advertisements.
First checks
ip -br addr— interfaces and addressesip route— routing table and default routeip neigh— ARP/neighbour cacheip route get <dest>— route, interface and source chosen for a destinationnmcli device status / networkctl— which tool manages each interface
Commands
ip route add defaultip neigh show 10.110.0.1ping -c 3 10.110.0.1ip rule add from 10.0.20.5 table 200
Verify in this order
default route configured or learned → gateway on a connected subnet → ARP/ND resolves it → off-subnet packets forwarded
Where it usually breaks
First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2778