Default routes decide where traffic goes when no more specific route exists, so a wrong gateway can make everything beyond the local network disappear.

On Linux, the kernel routing table defines the chosen gateway and interface, and ip route reads that table directly to show via (gateway), dev (interface), and selection hints like metric and proto.

Multiple default routes can coexist (wired, Wi‑Fi, VPN), and the lowest metric typically wins within the same address family, so confirming both the default entries and the effective path for a real external IP avoids misdiagnosing DNS or firewall issues.

Steps to check the default route with ip route in Linux:

  1. Display the default route entries, including their metric values.
    $ ip route show default
    default via 192.0.2.1 dev eth0 

    Lower metric values are preferred when multiple default routes are present.

  2. Confirm the selected gateway, interface, and source address for an external IPv4 destination.
    $ ip route get 203.0.113.50
    203.0.113.50 via 192.0.2.1 dev eth0 src 192.0.2.40 uid 0 
        cache 

    Using an IP avoids DNS, and the src value shows which local address would be used.

  3. Display the IPv6 default route when IPv6 connectivity is expected.
    $ ip -6 route show default

    proto ra indicates a default route learned from router advertisements.

  4. Confirm the selected IPv6 gateway and source address for an external IPv6 destination.
    $ ip -6 route get 2001:db8:203:113::50
    2001:db8:203:113::50 from :: via fe80::1 dev eth0 src 2001:db8:1::10 metric 100 pref medium
        cache

    The src address shows which local IPv6 address would be used for the destination.