show ip route – Reading and Troubleshooting the Routing Table

1. What Is the Routing Table?

The routing table is the data structure a router uses to decide where to forward every IP packet it receives. When a packet arrives on any interface, the router reads the destination IP address, looks it up in the routing table, and forwards the packet out the interface that leads toward the best matching route. If no match is found and no default route exists, the packet is dropped.

show ip route (run from privileged EXEC mode) displays the complete IPv4 routing table — every known network prefix, its source, its administrative distance and metric, the next-hop address, the route age, and the exit interface. Knowing how to read every element of this output is one of the most fundamental CCNA skills.

  When does a router add an entry to the routing table?
  ├── Connected route (C)   → when an interface is configured with an IP and is up/up
  ├── Local route (L)       → automatically added alongside each C route (/32 host route)
  ├── Static route (S)      → when admin enters "ip route" command
  └── Dynamic route (O/D/R) → when a routing protocol learns the prefix from a neighbour

  When does a route disappear?
  ├── Interface goes down    → connected route removed instantly
  ├── Static route deleted   → "no ip route ..." command
  └── Dynamic route lost     → neighbour adjacency drops; route times out
            

Related pages: show ip protocols | OSPF Neighbor States | OSPF Areas & LSAs | Routers | ping | Static NAT | Subnetting

2. Full show ip route Output — Annotated

The following is a fully annotated show ip route output representative of a router running OSPF and with static and connected routes. Every section and every line is explained.

  Router# show ip route

  Codes: L - local, C - connected, S - static, R - RIP, M - mobile,
         B - BGP, D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
         N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2,
         E1 - OSPF external type 1, E2 - OSPF external type 2,
         i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
         ia - IS-IS inter area, * - candidate default, U - per-user static route,
         o - ODR, P - periodic downloaded static route, H - NHRP, + - replicated route
  │
  └─ Legend printed at the top of every "show ip route" output.
     Memorise the common codes: C, L, S, O, O IA, O E1, O E2, D, D EX, R, B.

  Gateway of last resort is 10.0.0.2 to network 0.0.0.0
  │                          │                   │
  │                          │                   └─ The default route prefix
  │                          └─ Next-hop for the default route
  └─ "Gateway of last resort" = the router has a default route (0.0.0.0/0).
     "Gateway of last resort is not set" = no default route; packets with
     no matching prefix will be DROPPED.

       10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
  │
  └─ Parent classful network (10.0.0.0/8) with child subnets shown below.
     "variably subnetted" = subnets use different prefix lengths (VLSM).

  C       10.0.0.0/30 is directly connected, Serial0/0/0
  │       │            │                     │
  │       │            └─ Exit interface      └─ "directly connected" = no next-hop
  │       └─ Network prefix / mask              needed; router IS on this network
  └─ Route code: C = Directly connected

  L       10.0.0.1/32 is directly connected, Serial0/0/0
  │       │
  │       └─ /32 host route = the router's OWN IP on Serial0/0/0
  └─ Route code: L = Local (added automatically for every router IP; used for
                 local delivery — frames destined to this router's own address)

  S*      0.0.0.0/0 [1/0] via 10.0.0.2
  │       │         │  │        │
  │       │         │  │        └─ Next-hop IP address for the default route
  │       │         │  └─ Metric = 0 (static routes have no metric calculation)
  │       │         └─ AD = 1 (static route)
  │       └─ 0.0.0.0/0 = default route (matches any destination not in the table)
  └─ S* = Static route; * = candidate default (this IS the default route)

  O       10.1.1.0/24 [110/20] via 192.168.1.2, 00:05:43, GigabitEthernet0/1
  │       │            │   │         │            │           │
  │       │            │   │         │            │           └─ Exit interface
  │       │            │   │         │            └─ Route age (hh:mm:ss since
  │       │            │   │         │               last update; for OSPF: time
  │       │            │   │         │               since LSA was received)
  │       │            │   │         └─ Next-hop IP address
  │       │            │   └─ Metric (OSPF cost = 20 for this path)
  │       │            └─ Administrative Distance = 110 (OSPF)
  │       └─ Destination network / prefix length
  └─ O = OSPF intra-area route

  O IA    10.2.0.0/24 [110/30] via 192.168.1.2, 00:12:15, GigabitEthernet0/1
  └─ O IA = OSPF inter-area route (prefix is in a different OSPF area, learned
            via an ABR)

  D       172.16.0.0/16 [90/256000] via 192.168.2.1, 00:03:11, GigabitEthernet0/2
  └─ D = EIGRP internal route; metric 256000 is EIGRP composite metric

  C       192.168.1.0/30 is directly connected, GigabitEthernet0/1
  L       192.168.1.1/32 is directly connected, GigabitEthernet0/1
            

3. Route Codes — Complete Reference

Code Protocol / Type Meaning Default AD Metric
C Connected Network on a directly attached, up/up interface; added automatically when the interface is configured with an IP address and comes up 0 N/A (always preferred)
L Local The router's own IP address on an interface — a /32 host route added automatically alongside every C route; used for packets destined to the router itself 0 N/A
S Static Manually configured route; persists until deleted; does not adapt to topology changes 1 0 (no calculation)
S* Static default Static route to 0.0.0.0/0 that is currently the "candidate default" — also shown as "Gateway of last resort" at the top of the routing table 1 0
O OSPF intra-area Route within the same OSPF area as this router 110 Cost (reference BW / link BW)
O IA OSPF inter-area Route from a different OSPF area, learned via an Area Border Router (ABR) 110 Cost
O E1 OSPF external type 1 Route redistributed into OSPF from an external protocol; E1 = external cost + internal OSPF cost (grows with each hop through the OSPF domain) 110 External + internal cost
O E2 OSPF external type 2 Route redistributed into OSPF; E2 = external cost only (does not increase with internal hops — default for OSPF redistribution) 110 External cost only (fixed)
D EIGRP internal Route from within the same EIGRP autonomous system 90 Composite (BW + delay + reliability + load + MTU)
D EX EIGRP external Route redistributed into EIGRP from another protocol 170 Composite
R RIP Route learned via Routing Information Protocol; max 15 hops (16 = unreachable) 120 Hop count (max 15)
B BGP Route learned via Border Gateway Protocol; eBGP (external) = AD 20, iBGP (internal) = AD 200 20 (eBGP) / 200 (iBGP) Path attributes (AS-path, MED, local-pref)

4. Administrative Distance — The Trustworthiness Scale

Administrative Distance (AD) is the measure of trustworthiness a router assigns to the source of a routing update. When a router knows a route to the same destination prefix from two different sources (e.g., one from OSPF and one from a static route), it installs only the route with the lower AD into the routing table. The higher-AD route is held as a backup but does not appear in show ip route unless the lower-AD route disappears.

  AD decision example:

  Router knows 10.1.1.0/24 from two sources:
  OSPF says: via 192.168.1.2  [110/20]   ← AD = 110
  Static:    via 10.0.0.2     [1/0]      ← AD = 1

  Router installs: S  10.1.1.0/24 [1/0] via 10.0.0.2  (lower AD wins)
  OSPF route is NOT in the routing table until the static route is removed.

  This is why a misconfigured static route can silently override a dynamic
  routing protocol — always check "show ip route" when debugging.
            
Route Source Default AD Notes
Directly connected (C, L) 0 Always the most trusted; cannot be overridden
Static route (S) 1 Beats all dynamic protocols; use with care
eBGP (external BGP) 20 Routes from external BGP peers (internet edges)
EIGRP internal (D) 90 Preferred over OSPF and RIP
OSPF (O, O IA, O E1, O E2) 110 All OSPF route types use AD 110 (same for intra, inter, external)
IS-IS 115 Used in service-provider environments
RIP (R) 120 Least preferred IGP; max 15 hops
EIGRP external (D EX) 170 Redistributed routes are less trusted than internal
OSPF external (O E1/E2) 110 Same AD as internal OSPF — OSPF uses metric to prefer E1 over E2 for the same prefix
iBGP (internal BGP) 200 Routes from internal BGP peers; lowest priority among dynamic protocols
Unknown / unreachable 255 Never installed in the routing table

5. Metrics — How Each Protocol Selects the Best Path

When a routing protocol knows multiple paths to the same destination (all with the same AD), it uses its own metric to select the best one. Only the lowest-metric path is installed in the routing table (unless equal-cost load balancing is in effect).

Protocol Metric Calculation / Detail Lower is Better?
OSPF Cost Reference BW ÷ Link BW (default reference BW = 100 Mbps; GigabitEthernet cost = 1; FastEthernet cost = 1; Serial = 64 at T1 speed). Accumulated along the path. Yes — lower cost = faster path
EIGRP Composite metric Complex formula using bandwidth (slowest link in the path) and delay (sum of all delays); reliability, load, and MTU optionally included; default K-values use only BW and delay Yes
RIP Hop count Number of routers traversed; maximum 15 hops (16 = unreachable / infinity) Yes — fewer hops
BGP Path attributes Complex decision process using AS-path length, local-pref, MED, weight, next-hop reachability — BGP does not use a simple numeric metric Protocol-specific decision process
Static route 0 (none) No metric — administrator chooses the path by specifying the next-hop or exit interface N/A

6. Longest-Prefix Match — How the Router Picks a Route

When a packet arrives, the router compares the destination IP against all prefixes in the routing table and selects the entry with the longest matching prefix (most specific route). Administrative Distance is only consulted when two routes to the same prefix exist from different sources.

  Routing table contains:
  C   10.0.0.0/8   is directly connected, GigabitEthernet0/0
  O   10.1.0.0/16  [110/20] via 192.168.1.2
  O   10.1.1.0/24  [110/30] via 192.168.1.2
  S*  0.0.0.0/0    [1/0]    via 10.0.0.2

  Packet arrives destined for 10.1.1.50:

  Matches 0.0.0.0/0   → /0  prefix length
  Matches 10.0.0.0/8  → /8  prefix length
  Matches 10.1.0.0/16 → /16 prefix length
  Matches 10.1.1.0/24 → /24 prefix length  ← LONGEST MATCH → this route is used

  Result: packet forwarded via 192.168.1.2 on GigabitEthernet0/1

  Another packet destined for 10.2.0.5:
  Matches 0.0.0.0/0   → /0  prefix length
  Matches 10.0.0.0/8  → /8  prefix length
  No match for 10.1.0.0/16 (10.2.x.x not in 10.1.x.x)
  No match for 10.1.1.0/24
  Longest match: 10.0.0.0/8 → packet forwarded out GigabitEthernet0/0

  Packet destined for 8.8.8.8:
  Only match: 0.0.0.0/0 (default route)
  → Forwarded to default gateway 10.0.0.2
            

The default route (0.0.0.0/0) has the shortest possible prefix length — it matches everything. It is only used when no more specific route exists. It is called the "Gateway of Last Resort" in show ip route output.

7. Route Entry Format — Every Field Decoded

  O IA    10.2.0.0/24 [110/30] via 192.168.1.2, 00:12:15, GigabitEthernet0/1
  │  │    │           │   │         │            │           │
  │  │    │           │   │         │            │           └─ Exit interface:
  │  │    │           │   │         │            │              the outbound port
  │  │    │           │   │         │            │              on THIS router
  │  │    │           │   │         │            └─ Route age: time since last
  │  │    │           │   │         │               update received (hh:mm:ss)
  │  │    │           │   │         │               For OSPF: time since LSA received
  │  │    │           │   │         │               For connected: "directly connected"
  │  │    │           │   │         └─ Next-hop IP: the IP address of the next
  │  │    │           │   │            router to forward this packet to
  │  │    │           │   └─ Metric: the protocol-specific cost for this path
  │  │    │           │      OSPF cost 30; EIGRP composite; RIP hop count
  │  │    │           └─ Administrative Distance: the trustworthiness value
  │  │    │              of the route source (110 = OSPF)
  │  │    └─ Destination network in CIDR notation (prefix/length)
  │  └─ Route sub-code (IA = Inter-Area for OSPF)
  └─ Route code: primary letter identifying the source protocol
            
Field Example Description
Route code O IA Source protocol and sub-type
Destination 10.2.0.0/24 Network prefix and prefix length (CIDR notation)
[AD/Metric] [110/30] Administrative Distance / Metric — AD determines which route wins when multiple sources know the same prefix; Metric determines which path wins within the same protocol
Next-hop via 192.168.1.2 IP address of the adjacent router to forward the packet toward; absent for connected routes (router is directly on that network)
Route age 00:12:15 Time since the route was last updated or confirmed; a rapidly aging route may indicate the neighbour that advertised it has become unreachable
Exit interface GigabitEthernet0/1 The router's own outbound interface; the physical port the packet will be sent out of

8. Special Routes — Default, Local, and Floating Static

Default Route (Gateway of Last Resort)

  The default route matches ANY destination not otherwise in the table.

  Configure a static default route:
  Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2
  !                          │       │      └─ Next-hop or exit interface
  !                         dest   mask (all zeros = match everything)

  Result in routing table:
  S*    0.0.0.0/0 [1/0] via 10.0.0.2
  │
  └─ S* = static route that is the candidate default

  Gateway of last resort is 10.0.0.2 to network 0.0.0.0
  ← This line appears at the top of show ip route when a default route exists.

  Advertise the default route via OSPF to other routers:
  Router(config)# router ospf 1
  Router(config-router)# default-information originate
  ! Tells OSPF to advertise this router's default route as an O E2 route

  If a router has no default route:
  "Gateway of last resort is not set"
  → Packets with no matching destination are dropped (ICMP unreachable sent back).
            

Local Routes (/32 Host Routes)

  For every interface with an IP address, Cisco IOS automatically adds:
  1. A C (connected) route for the network prefix
  2. An L (local) /32 host route for the router's own IP on that interface

  Interface: GigabitEthernet0/1  ip address 192.168.1.1 255.255.255.0

  C    192.168.1.0/24 is directly connected, GigabitEthernet0/1
  L    192.168.1.1/32 is directly connected, GigabitEthernet0/1
  │
  └─ L route purpose: when a packet arrives destined for 192.168.1.1 (the router
     itself), the L route matches with /32 (longest possible match) and the router
     processes the packet locally instead of forwarding it. Without the L route,
     the router would forward packets to itself out the interface.
            

Floating Static Routes (Backup Routes)

  A floating static route has a HIGHER AD than the primary route.
  It stays hidden in the routing table until the primary route disappears.

  Scenario: OSPF primary route + floating static backup

  ! Primary route learned automatically via OSPF (AD=110):
  O    10.1.1.0/24 [110/20] via 192.168.1.2, GigabitEthernet0/1

  ! Floating static with AD=200 (higher than OSPF's 110):
  Router(config)# ip route 10.1.1.0 255.255.255.0 10.0.0.2 200
  !                                                          └─ AD=200 (customised)

  While OSPF route is active → floating static does NOT appear in routing table.
  If OSPF neighbour drops and the O route is removed:
  S    10.1.1.0/24 [200/0] via 10.0.0.2  ← floating static now active!

  Common use: MPLS primary + internet VPN backup; WAN primary + 4G failover.
  AD values to use: higher than primary protocol's AD (110 for OSPF backup → use 200+)
            

9. ECMP — Equal-Cost Multi-Path Load Balancing

  When multiple routes to the same destination have IDENTICAL AD AND METRIC,
  the router installs ALL of them and load-balances across them.

  Router# show ip route 10.5.0.0
  Routing entry for 10.5.0.0/24
    Known via "ospf 1", distance 110, metric 20, type intra area
    Redistributing via ospf 1
    Last update from 192.168.1.2 on GigabitEthernet0/1, 00:05:12 ago
    Routing Descriptor Blocks:
    * 192.168.1.2, from 2.2.2.2, 00:05:12 ago, via GigabitEthernet0/1
        Route metric is 20, traffic share count is 1
      192.168.2.2, from 3.3.3.3, 00:05:12 ago, via GigabitEthernet0/2
        Route metric is 20, traffic share count is 1

  Two equal-cost OSPF paths (both metric=20) → both installed.
  Router alternates packets across both exits (per-flow or per-packet CEF).

  Default maximum ECMP paths:
  OSPF: 4 (configurable with "maximum-paths" under router ospf)
  EIGRP: 4 (also supports unequal-cost load balancing with "variance")
  RIP: 4

  ECMP verification:
  Router# show ip route 10.5.0.0
  → Look for multiple "via" entries with the same metric
            

10. Useful show ip route Variants

  ! Display the full routing table:
  Router# show ip route

  ! Display only OSPF routes:
  Router# show ip route ospf

  ! Display only EIGRP routes:
  Router# show ip route eigrp

  ! Display only static routes:
  Router# show ip route static

  ! Display only connected routes:
  Router# show ip route connected

  ! Look up a specific network (longest-prefix match):
  Router# show ip route 10.1.1.5
  Routing entry for 10.1.1.0/24
    Known via "ospf 1", distance 110, metric 20
    Routing Descriptor Blocks:
    * 192.168.1.2, via GigabitEthernet0/1
  ! → Shows which exact route would be used for that destination IP address.
  !   Use this to verify which path a specific host's traffic will take.

  ! Display the routing table summary:
  Router# show ip route summary
  Route Source    Networks    Subnets     Overhead    Memory (bytes)
  connected       2           4           384         592
  static          1           0           72          120
  ospf 1          0           8           768         1456
  ! Useful for quickly assessing the size and composition of the routing table.

  ! Display IPv6 routing table:
  Router# show ipv6 route
            

11. Step-by-Step Troubleshooting Scenarios

Scenario A — Destination Not Reachable; Route Missing

  Problem: ping 10.5.5.1 fails from Router A. User cannot reach the server.

  Step 1: show ip route on Router A
  Router# show ip route 10.5.5.0
  % Network not in table
  → No route to 10.5.5.0/24. Packets are being dropped.

  Step 2: Check if OSPF is even running and if 10.5.5.0 is being advertised:
  Router# show ip protocols
  → OSPF configured? Routing for Networks includes 10.5.5.0? Neighbour present?

  Step 3: Check OSPF neighbour state:
  Router# show ip ospf neighbor
  → Is the neighbour who should advertise 10.5.5.0 in FULL state?

  Step 4: On the router that owns 10.5.5.0/24 — verify it's in the OSPF config:
  RemoteRouter# show ip protocols
  → "Routing for Networks: 10.5.5.0 0.0.0.255 area 0" — is this present?

  Fix options:
  a) Add missing OSPF network statement on remote router
  b) Add a static route: ip route 10.5.5.0 255.255.255.0 [next-hop]
            

Scenario B — Static Route Silently Overriding OSPF

  Problem: Traffic to 10.1.1.0/24 is going the wrong path — should use OSPF
  but appears to be using a different next-hop.

  Router# show ip route 10.1.1.0
  Routing entry for 10.1.1.0/24
    Known via "static"    ← Static route is being used, not OSPF!
    S    10.1.1.0/24 [1/0] via 10.0.0.2

  Diagnosis: A static route with AD=1 is winning over the OSPF route (AD=110).
  The OSPF route exists but is suppressed because the static has lower AD.

  Fix: Remove the static route if unintended:
  Router(config)# no ip route 10.1.1.0 255.255.255.0 10.0.0.2

  Verify OSPF route is now installed:
  Router# show ip route 10.1.1.0
  O    10.1.1.0/24 [110/20] via 192.168.1.2  ← OSPF route now active ✓
            

Scenario C — Packets Taking Wrong Path (High Metric)

  Problem: Traffic between HQ and Branch is slow; suspected routing issue.

  Router# show ip route 10.2.0.0
  O    10.2.0.0/24 [110/1000] via 192.168.2.2, GigabitEthernet0/2

  Expected metric was ~20 (via a fibre GigabitEthernet path).
  Metric 1000 indicates the route is going through a slow serial link.

  Investigation:
  Router# show ip ospf interface
  → Serial0/0/0: Cost=64  (T1 serial default)
  → GigabitEthernet0/1: Cost=1

  The OSPF cost formula: reference BW (100 Mbps) / link BW
  FastEthernet (100 Mbps): 100/100 = 1
  GigabitEthernet (1 Gbps): 100/1000 = 0.1 → rounded to 1

  Both GigabitEthernet and FastEthernet get cost=1 unless the reference BW
  is increased. Fix: increase the reference BW on all routers:
  Router(config)# router ospf 1
  Router(config-router)# auto-cost reference-bandwidth 1000
  ! Now GigabitEthernet cost=1, FastEthernet cost=10, Serial cost=647
            

Scenario D — No Gateway of Last Resort

  Problem: Users can reach internal subnets but cannot reach the internet.

  Router# show ip route
  Gateway of last resort is not set   ← No default route!
  ...

  Hosts are pinging internal resources fine (specific routes exist) but any
  packet destined for an internet IP (not in the routing table) is dropped.

  Fix: Configure a default route pointing to the ISP gateway:
  Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1  ! ISP gateway IP

  Verify:
  Router# show ip route
  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   ← default route now present ✓
            

See: show ip protocols | OSPF Neighbor States | ping

12. Common Troubleshooting Clues

Symptom in show ip route Likely Cause Fix / Next Step
Expected route missing entirely Routing protocol adjacency not formed; network statement missing; interface down; route filtered by distribute-list show ip protocols to check protocol status and network statements; show ip ospf neighbor or show ip eigrp neighbors
Static route instead of expected dynamic route Static route with lower AD (1) is suppressing the dynamic route (AD 90/110) Remove conflicting static route with no ip route; or convert to floating static with higher AD
Unexpected next-hop or exit interface Multiple equal-metric paths; topology change; wrong network statement on neighbouring router show ip route [specific-network] to see exact entry; traceroute [destination] to trace the actual path
"Gateway of last resort is not set" No default route configured; default route not being advertised to this router Add ip route 0.0.0.0 0.0.0.0 [next-hop]; or configure OSPF default-information originate on the edge router
Route age incrementing rapidly (route flapping) Unstable link; routing protocol adjacency flapping; interface up/down cycling show logging for %LINK-3-UPDOWN messages; check physical interface; investigate neighbour stability
Unexpectedly high metric Traffic routing via a slow link; OSPF cost not tuned; reference bandwidth mismatch show ip ospf interface to check per-interface cost; adjust with auto-cost reference-bandwidth or ip ospf cost on interface

13. Exam Tips & Key Points

  • show ip route displays the complete IPv4 routing table — every known prefix, its source code, AD, metric, next-hop, age, and exit interface.
  • Know all common route codes: C (connected), L (local /32), S (static), S* (static default), O (OSPF intra), O IA (OSPF inter-area), O E2 (OSPF external, default redistribution type), D (EIGRP internal), D EX (EIGRP external), R (RIP), B (BGP).
  • In the [AD/Metric] bracket: first number = Administrative Distance (source trustworthiness), second number = Metric (path cost within the protocol). Lower AD wins between protocols; lower metric wins within a protocol.
  • AD values to memorise: Connected=0, Static=1, eBGP=20, EIGRP internal=90, OSPF=110, IS-IS=115, RIP=120, EIGRP external=170, iBGP=200.
  • The router uses longest-prefix match to select which routing table entry to use for a given packet. The 0.0.0.0/0 default route is always the last resort (shortest prefix).
  • Floating static routes use a manually assigned AD higher than the primary protocol (e.g., AD=200 as backup to OSPF's 110). They appear in the routing table only when the primary route disappears.
  • Local routes (L) are /32 host routes automatically added for each router IP — they direct traffic destined to the router itself to be processed locally rather than forwarded.
  • "Gateway of last resort is not set" means there is no default route — packets with no match are dropped. Fix: ip route 0.0.0.0 0.0.0.0 [next-hop].
  • ECMP: when multiple routes have identical AD and metric, all are installed and traffic is load-balanced across them. Use show ip route [network] to see multiple descriptor blocks.
  • OSPF cost = reference BW ÷ link BW (default reference 100 Mbps). Increase with auto-cost reference-bandwidth 1000 to differentiate Gigabit from FastEthernet links.

14. Summary Reference Table

Topic Key Detail
Primary command show ip route
Route for specific destination show ip route [IP address]
Format of each entry [Code] [Prefix/Len] [AD/Metric] via [Next-hop], [Age], [Interface]
AD determines Which source wins when same prefix known from multiple protocols
Metric determines Which path wins within the same routing protocol
Longest-prefix match Most specific (longest) matching prefix is always used first
Default route 0.0.0.0/0 — "Gateway of Last Resort"
Local route (L) /32 host route for the router's own interface IPs
Floating static Static route with AD set higher than primary protocol; acts as backup
ECMP Multiple equal AD+metric routes installed; traffic load-balanced
OSPF cost formula Reference BW ÷ Link BW (default ref = 100 Mbps)
Static missing → dynamic overridden Check with show ip route [network]; look at "Known via"

show ip route Quiz

1. What does route code "C" represent in a Cisco routing table, and what additional code is always added automatically alongside it?

Correct answer is B. The C code in a routing table represents a directly connected route — a network prefix that is reachable through a locally configured, up/up interface. When an interface is assigned an IP address and both the interface and line protocol are up, Cisco IOS automatically installs two routing table entries: (1) a C route for the network prefix (e.g., 192.168.1.0/24) which represents the entire connected subnet; (2) an L (local) /32 host route for the router's own specific IP address on that interface (e.g., 192.168.1.1/32). The L route is used so that when a packet arrives destined for the router's own IP, the /32 provides the longest-prefix match and the router processes it locally rather than attempting to forward it. Both C and L routes have AD=0 — the most trusted possible.

2. What is the Administrative Distance of an EIGRP internal route, and why does this make it preferred over OSPF when both know the same destination?

Correct answer is D. EIGRP internal routes have a default Administrative Distance of 90. AD is the "trustworthiness" metric that determines which routing source wins when multiple protocols know a route to the same destination prefix. Lower AD always wins. Since OSPF has AD=110 and EIGRP internal has AD=90, when both know 10.1.1.0/24, the router installs the EIGRP route (D 10.1.1.0/24 [90/...]) and the OSPF route is held but not shown in show ip route. The OSPF route becomes visible and active only if the EIGRP route is withdrawn. This is important for the CCNA exam — AD determines protocol preference, while Metric determines path preference within a single protocol. The full AD order: Connected=0, Static=1, eBGP=20, EIGRP internal=90, OSPF=110, IS-IS=115, RIP=120, EIGRP external=170, iBGP=200.

3. Which routing protocol uses hop count as its metric, and what is the maximum hop count before a destination is considered unreachable?

Correct answer is A. RIP (Routing Information Protocol) uses hop count as its metric — the number of router hops between the source and the destination network. Each time a RIP update passes through a router, the hop count is incremented by 1. The maximum usable hop count is 15 — a destination with a hop count of 16 is considered unreachable (infinity). This hard limit prevents routing loops but severely limits RIP's scalability — any network more than 15 hops in diameter cannot use RIP. Contrast with: OSPF uses cost (reference BW ÷ link BW) which favours higher-bandwidth paths; EIGRP uses a composite metric based primarily on bandwidth and delay of the slowest link in the path; BGP uses path attributes (AS-path length, local preference, MED) in a complex multi-attribute decision process.

4. In the routing table entry "O 10.0.0.0/24 [110/20] via 192.168.1.2", what do the numbers 110 and 20 specifically represent?

Correct answer is C. The [AD/Metric] bracket in every routing table entry contains two distinct values serving two different purposes. The first number (110) is the Administrative Distance — the trustworthiness score of the route's source protocol. It is used to choose between routes from different protocols pointing to the same prefix: lower AD wins. OSPF always has AD=110. The second number (20) is the Metric — the protocol-specific path cost. For OSPF, this is the accumulated cost (sum of interface costs along the path). It is used to choose between multiple OSPF paths to the same destination: lower metric wins. The two numbers serve completely different selection decisions: AD = which protocol; Metric = which path within that protocol. Confusing the two is the most common mistake on CCNA routing questions.

5. What does the next-hop IP address in a routing table entry represent, and what appears in its place for a directly connected route?

Correct answer is B. The next-hop IP address in a routing table entry is the IP address of the next adjacent router — the neighbouring device this router will forward the packet to in order to reach the destination network. The router performs an ARP lookup for the next-hop IP on the specified exit interface to obtain the Layer 2 (MAC) address for frame encapsulation. For directly connected routes (code C), there is no next-hop IP — the router itself is directly attached to that network, so it forwards frames directly to the destination host after an ARP lookup. The routing table shows "is directly connected, GigabitEthernet0/0" instead of a via statement. For local routes (L), the packet is destined for the router itself — no forwarding occurs at all; the router processes it internally.

6. What is a floating static route, how is it configured, and what specific scenario is it designed for?

Correct answer is D. A floating static route is a failover/backup route mechanism. The key is assigning a custom AD value higher than the primary route's AD. Example: OSPF (AD=110) is the primary WAN path. Configure a floating static with AD=200: ip route 10.1.1.0 255.255.255.0 10.0.0.2 200. The number 200 at the end sets the AD. Since 200 > 110, the static route is hidden — the OSPF route [110/x] is installed and the static [200/0] does not appear. When the OSPF neighbour drops and the O route is removed from the routing table, the floating static [200/0] is immediately activated and packets continue to flow via the backup path. When OSPF re-establishes, the O route [110/x] wins again and the floating static returns to dormancy. Common use cases: MPLS primary + internet VPN backup; primary WAN link + 4G failover.

7. What does the code "O IA" represent in an OSPF routing table, and how does it differ from a plain "O" route?

Correct answer is C. OSPF has multiple route sub-types that appear with different codes: O = OSPF intra-area route — the prefix is within the same OSPF area as this router; learned from Type 1 (Router LSA) and Type 2 (Network LSA) LSAs; O IA = OSPF inter-area route — the prefix is in a different OSPF area; an Area Border Router (ABR) receives the intra-area route from the remote area and generates a Type 3 Summary LSA that is flooded into the backbone (Area 0) and then into all other areas. Both O and O IA use AD=110 — OSPF does not distinguish trustworthiness between intra and inter-area. The metric of an O IA route is the accumulated cost through the ABR. O E1 / O E2 = OSPF external routes — redistributed from a different routing protocol (e.g., EIGRP or RIP redistributed into OSPF). See OSPF Areas & LSAs for more on LSA types and area design.

8. A router has 10.1.1.0/24 reachable via both OSPF and a static route. "show ip route" shows only the static route. What is happening and how would you make OSPF win?

Correct answer is A. This is one of the most important and commonly tested routing table scenarios. When a router knows a prefix from multiple sources, only the lowest-AD route is installed in the routing table. A static route always has AD=1; OSPF always has AD=110. Since 1 < 110, the static route wins and the OSPF route is completely invisible in show ip route. The OSPF route is not lost — it exists in the OSPF database — but it is suppressed from the routing table. This is the "static route silently overriding dynamic routing" scenario. The fix depends on intent: if the static route is a mistake, remove it with no ip route; if it's intentional but should be a backup, append a high AD number to make it a floating static (e.g., AD=200 to ensure OSPF's 110 wins). Always use show ip route [specific-network] when debugging routing decisions — it shows exactly which source installed the active route and its AD.

9. OSPF uses cost as its metric. A GigabitEthernet interface and a FastEthernet interface both show the same cost of 1 in show ip ospf interface. Why, and how is this fixed?

Correct answer is B. OSPF cost is calculated as: Reference BW ÷ Interface BW (result rounded down, minimum 1). The default reference bandwidth is 100 Mbps. FastEthernet (100 Mbps): 100 ÷ 100 = 1. GigabitEthernet (1000 Mbps): 100 ÷ 1000 = 0.1 → rounded up to 1. Both get cost=1 — OSPF cannot differentiate a 100 Mbps link from a 1 Gbps link! This is a well-known limitation of the default OSPF cost formula. The fix: increase the reference bandwidth on every router in the OSPF domain to a value higher than the fastest link: Router(config-router)# auto-cost reference-bandwidth 1000 (for networks with GigabitEthernet as the fastest link) or 10000 for 10GigE. With reference=1000: FastEthernet (100M)=cost 10, GigabitEthernet (1G)=cost 1, Serial T1 (1.544M)=647. OSPF now correctly prefers the Gigabit path. Must be set consistently on ALL routers — a mismatch causes asymmetric routing.

10. What does the route age field indicate in a dynamic routing table entry, and what does a rapidly aging route (age approaching zero and resetting) suggest?

Correct answer is C. The route age field in show ip route output (displayed as hh:mm:ss, e.g., 00:12:15) shows how long ago the last routing update was received that confirmed this route. For OSPF, it reflects the time since the relevant LSA was received or refreshed. A healthy route age increases steadily over time as the protocol periodically re-confirms the route. A route age that frequently resets to near-zero (e.g., constantly showing 00:00:03 or 00:00:08) indicates the route is being repeatedly withdrawn and re-advertised — a strong signal of an unstable routing environment. Common causes: a flapping physical interface causing the OSPF or EIGRP neighbour to drop and reform repeatedly; an unstable WAN link cycling up/down; high CPU preventing timely processing of keepalives. To investigate: check show logging for repeated %LINK-3-UPDOWN or OSPF adjacency change messages; check show ip ospf neighbor for unstable neighbour states.

← Back to Home