Octet

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

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

CodeMeaning
C, Lconnected 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 N2OSPF intra-area, inter-area, external type 1 and 2, NSSA external
D, D EXEIGRP internal, EIGRP external
BBGP
i L1, i L2, i iaIS-IS level 1, level 2, inter-area
RRIP

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).

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.
How did you do?Book 3.3 Internet (IP)