Read this show ip route output for me. What does each part of a route line mean?
Show the answer
Say this first
Each line gives the source code (C, L, S, O, D, B and so on), the prefix, [AD/metric], the next hop
after via, the age of the route and the exit interface. Header lines group subnets of one classful
network and count subnets and masks. Gateway of last resort shows the default route, and * marks a
candidate default.
Go deeper
The output
R1# show ip route | begin Gateway
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 203.0.113.1
10.0.0.0/8 is variably subnetted, 8 subnets, 4 masks
C 10.0.12.0/30 is directly connected, GigabitEthernet0/0/1
L 10.0.12.1/32 is directly connected, GigabitEthernet0/0/1
C 10.0.13.0/30 is directly connected, GigabitEthernet0/0/2
L 10.0.13.1/32 is directly connected, GigabitEthernet0/0/2
O 10.1.0.0/24 [110/2] via 10.0.12.2, 01:12:44, GigabitEthernet0/0/1
D 10.2.0.0/16 [90/3072] via 10.0.13.2, 00:45:10, GigabitEthernet0/0/2
O IA 10.5.0.0/16 [110/3] via 10.0.12.2, 01:12:44, GigabitEthernet0/0/1
O E2 10.9.0.0/16 [110/20] via 10.0.12.2, 00:03:51, GigabitEthernet0/0/1
203.0.113.0/24 is variably subnetted, 2 subnets, 2 masks
C 203.0.113.0/30 is directly connected, GigabitEthernet0/0/0
L 203.0.113.2/32 is directly connected, GigabitEthernet0/0/0| begin Gateway skips the long legend of codes.
Reading one line
O IA 10.5.0.0/16 [110/3] via 10.0.12.2, 01:12:44, GigabitEthernet0/0/1
O IA: OSPF inter-area route.[110/3]: AD 110, OSPF cost 3.via 10.0.12.2: next hop.01:12:44: time since the route was last changed. Then the exit interface.
Codes you must know
| Code | Meaning |
|---|---|
| C, L | connected subnet, local /32 of the router's own address |
| S, S* | static, static that is a candidate default |
| O, O IA, O E1, O E2, O N1, O N2 | OSPF intra-area, inter-area, external type 1 and 2, NSSA external |
| D, D EX | EIGRP internal, EIGRP external |
| B | BGP |
| i L1, i L2, i ia | IS-IS level 1, level 2, inter-area |
| R | RIP |
The 10.0.0.0/8 is variably subnetted, 8 subnets, 4 masks header counts the entries under it (8) and
the different lengths among them (/30, /32, /24 and /16).
They will ask next
What does an ECMP route look like?
One prefix line, then one extra line per path:
Output O 10.1.0.0/24 [110/2] via 10.0.12.2, 01:12:44, GigabitEthernet0/0/1 [110/2] via 10.0.13.2, 01:12:44, GigabitEthernet0/0/2How do you see everything about one route?
Give an address:
show ip route 10.5.1.1.Output Routing entry for 10.5.0.0/16 Known via "ospf 1", distance 110, metric 3, type inter area Last update from 10.0.12.2 on GigabitEthernet0/0/1, 01:12:44 ago Routing Descriptor Blocks: * 10.0.12.2, from 10.255.0.2, 01:12:44 ago, via GigabitEthernet0/0/1 Route metric is 3, traffic share count is 1from 10.255.0.2is the router ID of the router that advertised it (here the ABR). The*marks the path the router is currently using.Why do static routes have no age?
The age shows when a protocol last refreshed or changed the route. Static routes are not learned from anyone, so IOS prints none.
Traps
- Reading
[110/20]as metric 110. The first number is AD. - Reading the age as uptime of the neighbor. It is the time since the route itself last changed.