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.
01Command
$ ip route get 192.168.1.1002What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ip-route(8) — main IPv4/IPv6 routing table managementEvidence: 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 pageEvidence: 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
The routing table is the first thing to check when traffic leaves the wrong interface or the gateway seems dead — and `ip route show` is the quick, modern way to read it.
The classic forgotten-syntax command: `traceroute` shows every router between you and a destination plus the round-trip time of probes to each hop.
One command that prints every interface with its state and IPv4/IPv6 addresses in a short table — the modern, memorable replacement for digging through `ifconfig` or the verbose `ip addr` output.