Showing the default route is one of the fastest ways to confirm where a Linux host sends traffic when no more specific route matches. It is usually the first check when local-subnet communication works but internet or upstream connectivity does not.
The ip route show default filter asks the kernel for routes whose destination is the catch-all default prefix for the selected address family. In the output, the via field identifies the next-hop gateway, while dev shows the interface used to reach that gateway.
By default, ip route show reads the main routing table only. If the command returns no default route, or if live traffic follows a different path than the main table suggests, the host may be using policy-routing rules, a custom table, or a separate IPv6 default route checked with ip -6 route show default.
$ ip route show default default via 172.17.0.1 dev eth0
In the example above, 172.17.0.1 is the next-hop gateway and eth0 is the egress interface used for destinations that do not match a more specific route.
$ ip route show default via 172.17.0.1 dev eth0 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Connected or more specific prefixes are matched before the default route, so the default gateway is not always the path used for every destination.
$ ip route get 1.1.1.1
1.1.1.1 via 172.17.0.1 dev eth0 src 172.17.0.4 uid 0
cache
The via field confirms the selected gateway for that destination, while src shows the preferred source address for outbound packets.
Use ip -6 route show default when the issue involves IPv6, because IPv4 and IPv6 default routes are tracked separately.