Command by command
| Cisco IOS | Linux | What it gives you |
|---|---|---|
show ip route | ip route show | Full routing table |
show ip route 10.0.1.0 | ip route get 10.0.1.0 | Which route would actually be used for one destination |
show ip route ospf | birdc show route protocol ospf1 | Only OSPF-learned routes |
show ip route bgp | birdc show route protocol bgp1 | Only BGP-learned routes |
show ip route summary | ip route show | wc -l | Linux has no built-in summary |
What the output looks like
$ ip route show
default via 10.0.1.254 dev ge0
10.0.1.0/24 dev ge0 proto kernel scope link src 10.0.1.1
10.0.2.0/24 via 10.0.1.2 dev ge0 proto bird metric 32
10.0.3.0/24 via 10.0.1.3 dev ge0
Why the two differ
Cisco prints a legend of route codes (C connected, S static, O OSPF, B BGP) and a per-route administrative distance in square brackets. Linux prints neither. What it prints instead is a proto tag recording who installed a route: proto kernel for a directly connected subnet, proto bird for a route the BIRD routing daemon installed. A route added by hand with a plain ip route add carries no tag at all: the kernel records it as proto boot, which the listing leaves out (add proto static to the command and that is shown instead). The mental translation is proto kernel ≈ Cisco's C, no tag ≈ S, and proto bird covers both O and B — which is why you drop to birdc when you need to tell OSPF and BGP apart.
The trap
Linux has no administrative distance. Where IOS picks between two routes to the same prefix by comparing AD, the kernel picks by longest prefix match first and then by metric, and a lower metric wins. A second IPv4 route with the same prefix and the same metric is refused with "File exists" rather than quietly ranked; spreading traffic over two next hops takes a single route with several nexthop entries. Choosing between OSPF, BGP and static routes happens inside the routing daemon, before anything reaches the kernel.
Common questions
Is route -n the same as ip route show?
It shows the same table but through the older net-tools interface, which has been deprecated since roughly 2011 and is not installed by default on most modern distributions. It also cannot display several things the kernel now supports, including multiple routing tables and IPv6 routes in the same view. Use ip route show.
How do I see which route Linux would actually pick?
ip route get <destination>. It runs the real lookup and prints the single route the kernel would use, including the source address it would choose. This is the closest thing to show ip route <prefix> and it is far more reliable than reading the table by eye.
Why do OSPF routes not appear in ip route show?
They appear only once the routing daemon has exported them into the kernel. If BIRD2 has learned a route but not installed it — a filter blocked the export, or the protocol is not up — the route exists in BIRD's table only. birdc show route shows what BIRD knows; ip route show shows what the kernel will actually forward on.
Stop reading, start running
Open the lab, go live, and run ip route show against real Linux networking in your browser. No install, no signup.