Check Which Route a Destination Uses with ip route get

See exactly which interface, source address and gateway the kernel picks for a given destination — no guessing from routing tables.

LinuxroutingrouteipDiagnosticsLow risk
Run ip route get 192.168.1.10 and the kernel prints the resolved route, e.g. '192.168.1.10 dev eth0 src 192.168.1.5'.

01Command

Command
$ ip route get 192.168.1.10

02What it does

Unlike ip route show, which just lists the tables, ip route get performs a real lookup the same way the kernel does when sending a packet, including rule (policy routing) evaluation. The output shows the outgoing device, the chosen source IP and the gateway via the 'via' field. Append 'from 10.0.0.5' to test how traffic with a specific source address is routed, which is invaluable when debugging multi-homed servers or VPN split tunnels.

03Risk

RiskLow risk
Requirementsiproute2 (preinstalled)
!Warning: ip route get is a read-only lookup — it never installs or changes routes, so it is safe to run anytime.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ip-route(8) — main IPv4/IPv6 routing table management
    Debian manpages · community · 2026-09-17
    Evidence: Page documents the 'get' subcommand ('ip route get' — get a single route) and route attributes like via/dev/src; confirms 'ip route' and 'get' appear in the text.
  • ip-route(8) — Ubuntu man page
    Ubuntu manpages · community · 2026-09-17
    Evidence: Man page contains the 'get' subcommand description showing it performs a route lookup and returns the resolved via/dev/src values.

Last verified: 2026-09-19 · Category: Network

06Related solutions