show ip route

Displays the IPv4 routing table — what the device will actually do with a packet.

routing

What it does

Shows only the best path per prefix, after the routing process has already chosen between protocols by administrative distance. A route being absent here does not mean it was never learned; it may have lost to a lower-distance path and be sitting in the protocol's own database.

Per vendor

PlatformCommand
Cisco IOS / NX-OSshow ip route
Juniper JunOSshow route
MikroTik RouterOS/ip route print
Aruba AOS-CXshow ip route
FortiOSget router info routing-table all
Ubiquiti EdgeOSshow ip route

Useful variations

  • Longest-prefix match for one destinationshow ip route 10.20.5.7
  • Only OSPF-learned routesshow ip route ospf
  • Summary counts by protocolshow ip route summary

Pitfalls

The misreadings that actually cost people time.

  • `show ip route 10.20.5.0` returns the route that would be used for that address, not routes matching that prefix — use `longer-prefixes` to list children.
  • An empty table on a layer-3 switch usually means `ip routing` was never enabled.
  • The table shows the control plane's decision. On a hardware-forwarding switch, confirm against the FIB (`show ip cef`) if traffic disagrees.