Routing table confusion is one of the most common traps on the CCNA 200-301 exam. Even experienced engineers can misread a routing table when multiple routes overlap, administrative distances conflict, or route types mix. This topic directly tests exam objective 3.1 (Interpret the components of a routing table). Mastering this skill is essential for troubleshooting real networks and for avoiding costly exam mistakes.
Jump to a section
Imagine you have a GPS navigation system in your car. The GPS has a list of all possible routes to different destinations. This list is like a routing table: each entry shows a destination (address), the road to take (next-hop), the distance (metric), and how trustworthy the source is (administrative distance). Now, pretend you have three different map sources: your built-in car GPS (like a directly connected route), a real-time traffic app on your phone (like OSPF), and an old paper map from 1995 (like a static route). If the car GPS says the destination is 10 miles away via highway, the traffic app says it's 12 miles via a different route, and the paper map says it's 15 miles via a back road, which one do you trust? You would likely trust the built-in GPS first because it's designed for your car (directly connected), then the traffic app because it's dynamic and updated (OSPF), and finally the paper map because it's outdated (static). But wait—what if the traffic app is actually more reliable than the car GPS? In networking, we assign administrative distances (AD) to rank trust. A directly connected route has AD 0 (most trusted), a static route has AD 1, OSPF has AD 110, and so on. The GPS analogy breaks if we think 'static routes are always best'—they are not, because AD is only part of the decision. If multiple routes have the same AD, then the metric (distance) decides. In the GPS example, if both the car GPS and the traffic app are equally trusted (same AD), you'd choose the shorter distance (10 miles vs 12 miles). This is exactly how routers choose the best route: first by longest prefix match (most specific destination), then by lowest AD, and finally by lowest metric. If the GPS has two routes to the same street: one says 'via Main St, 5 miles, from traffic app' and another says 'via Oak St, 3 miles, from traffic app', you'd choose Oak St because it has a lower metric (distance). But if the traffic app says 'via Main St, 5 miles' and the paper map says 'via Oak St, 3 miles', you'd still trust the traffic app because it has a better AD (trust) even though the distance is longer. That's routing table confusion: when you forget that AD overrides metric when comparing different sources. The exam loves to test this hierarchy.
What is a Routing Table?
A routing table is a data structure stored in a router's memory that contains information about destination networks and the paths to reach them. Each entry, called a route, includes the destination network address, the next-hop IP address or outgoing interface, the administrative distance (AD), and the metric. The routing table is used by the router to make forwarding decisions for every IP packet that arrives.
Why Does Routing Table Confusion Happen?
Routing table confusion occurs when a router has multiple routes to the same destination network, and the engineer (or exam candidate) misidentifies which route will be chosen. The selection process follows a strict three-step hierarchy:
Longest Prefix Match: The router always prefers the route with the most specific (longest) subnet mask. A /32 host route beats a /24 network route.
Lowest Administrative Distance: If two routes have the same prefix length, the one with the lowest AD wins. AD indicates the trustworthiness of the route source.
Lowest Metric: If both routes have the same prefix length and the same AD, the one with the lowest metric wins. Metric is a measure of distance or cost, specific to the routing protocol.
Key Administrative Distances (Cisco Defaults)
Directly connected: 0
Static route: 1
EIGRP summary route: 5
External BGP: 20
Internal EIGRP: 90
IGRP: 100
OSPF: 110
IS-IS: 115
RIP: 120
External EIGRP: 170
Internal BGP: 200
Unknown: 255 (unreachable)
How the Router Makes a Decision: Step by Step
Packet arrives with a destination IP address.
Longest prefix match: The router examines the routing table for routes that match the destination. It selects the route with the longest subnet mask. For example, if the destination is 10.1.1.5 and the router has routes 10.1.1.0/24 and 10.1.1.4/30, the /30 route is chosen because it is more specific.
If multiple routes have the same prefix length, the router compares AD values. The route with the lowest AD is installed in the routing table. If there is a tie in AD, the router compares metrics.
If multiple routes have the same AD and same metric, the router can load-balance (if the routing protocol supports equal-cost multipath).
Verification Commands
The primary command to view the routing table is:
show ip routeExample output:
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, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PBR
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
O 10.1.1.0/24 [110/20] via 10.0.0.2, 00:00:15, GigabitEthernet0/0
C 10.1.2.0/24 is directly connected, GigabitEthernet0/1
L 10.1.2.1/32 is directly connected, GigabitEthernet0/1
S 10.2.0.0/16 [1/0] via 10.0.0.3The code letter indicates the source: O = OSPF, C = connected, S = static.
The numbers in brackets are [AD/metric]. For OSPF, AD=110, metric=20.
The 'via' shows the next-hop IP address.
The '00:00:15' is the age of the route (hours:minutes:seconds).
The outgoing interface is shown last.
To see only a specific route:
show ip route 10.1.1.0To see the routing table for a specific protocol:
show ip route ospfInteraction with Related Protocols
Routing Information Base (RIB) vs Forwarding Information Base (FIB): The routing table (RIB) contains all routes learned from all sources. The best routes are then downloaded to the FIB, which is used for actual packet forwarding. Cisco Express Forwarding (CEF) uses the FIB.
Route Redistribution: When routes are redistributed between protocols, AD and metric can change, leading to confusion. For example, a route redistributed from OSPF (AD 110) into EIGRP (AD 90) will have AD 170 (external EIGRP) by default.
Floating Static Routes: A static route with a higher AD than the primary dynamic route acts as a backup. This is a common exam trap: candidates forget that the static route is not active until the dynamic route fails.
Common Exam Traps
Trap 1: Assuming that a static route always beats a dynamic route. Wrong! Static routes have AD 1, but if the static route has a longer prefix length than a dynamic route, it could still be chosen. However, if prefix lengths are equal, AD 1 beats AD 110 (OSPF). But if the dynamic route is directly connected (AD 0), it will beat the static route.
Trap 2: Confusing AD and metric. Remember: AD is compared first when the prefix length is the same and the route sources are different. Metric is only compared when AD is the same (i.e., same routing protocol).
Trap 3: Forgetting that directly connected routes have AD 0. They always win over any other route to the same prefix length.
Trap 4: Misreading the routing table output. The code letter 'O' means OSPF, but OSPF internal routes have AD 110. External OSPF routes also have AD 110 but may have different metrics (type 1 vs type 2).
Trap 5: Assuming that a route with a lower metric is always preferred. If two routes come from different protocols, AD is compared first. For example, an OSPF route with metric 10 will not beat an EIGRP route with metric 100 if the prefix length is the same, because OSPF AD 110 is higher than EIGRP AD 90.
IOS Configuration Example
Consider a router with two paths to 10.1.1.0/24: one via OSPF (metric 20) and one via a static route. We want the static route to be a backup.
! Configure OSPF
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
! Configure a floating static route with AD 120 (higher than OSPF's 110)
ip route 10.1.1.0 255.255.255.0 10.0.0.2 120The routing table will show the OSPF route as active (because AD 110 < 120). If OSPF fails, the static route will appear.
Verification
show ip route 10.1.1.0
Routing entry for 10.1.1.0/24
Known via "ospf 1", distance 110, metric 20
Last update from 10.0.0.1 on GigabitEthernet0/0, 00:00:15 ago
Routing Descriptor Blocks:
* 10.0.0.1, via GigabitEthernet0/0
Route metric is 20, traffic share count is 1If OSPF fails, the same command will show the static route:
Routing entry for 10.1.1.0/24
Known via "static", distance 120, metric 0
Last update from 10.0.0.2 on GigabitEthernet0/1
Routing Descriptor Blocks:
* 10.0.0.2, via GigabitEthernet0/1
Route metric is 0, traffic share count is 1Identify the Destination
When a packet arrives, the router first looks at the destination IP address. For example, destination 192.168.1.10. The router then searches the routing table for routes that match this address. The key is that the router performs a longest prefix match: it finds the route with the most specific subnet mask that includes the destination. So if the routing table has 192.168.1.0/24 and 192.168.1.0/28, the /28 route is more specific and will be used if it matches.
Check for Exact Match
If there is a host route (/32) that exactly matches the destination, that route is always used regardless of other routes. For example, if there is a route 192.168.1.10/32, it will be chosen over any less specific route. This is the ultimate longest prefix match. In the exam, be aware that a /32 route can be installed by various means, such as a static host route or a local route for the router's own interface IP.
Compare Prefix Lengths
If no exact host route exists, the router looks for routes with the longest prefix length that includes the destination. For instance, if the destination is 10.1.1.5, and routes are 10.1.1.0/24 and 10.1.1.4/30, the /30 route (which covers 10.1.1.4-10.1.1.7) is chosen because it has a longer mask (30 bits vs 24 bits). This is often a trap: candidates may think a route with a lower AD is chosen, but the longest prefix match is always evaluated first.
If Multiple Routes with Same Prefix Length, Compare AD
If two or more routes have the same prefix length and both match the destination, the router compares administrative distances. The route with the lowest AD is installed in the routing table. For example, a static route (AD 1) and an OSPF route (AD 110) to the same /24 network: the static route wins. However, if the static route is configured with a higher AD (floating static), it will lose to OSPF. Use 'show ip route' to see the AD in brackets: [1/0] means AD 1, metric 0.
If Same AD, Compare Metrics
If multiple routes have the same AD (meaning they come from the same routing protocol or are both static with same AD), the router compares metrics. The route with the lowest metric is chosen. For OSPF, metric is cost (based on bandwidth). For EIGRP, metric is a composite of bandwidth, delay, load, reliability. For RIP, metric is hop count. If metrics are equal, the router can load-balance across both paths (if the protocol supports ECMP). Use 'show ip route' to see the metric after the AD.
Verify with Show Commands
Always verify your understanding with 'show ip route' and 'show ip route <network>'. The output shows the code (source), AD/metric, next-hop, age, and interface. For troubleshooting, use 'show ip route ospf' to see only OSPF routes. Also, 'show ip protocols' can help understand which routing protocols are running and their AD values. Remember that the routing table only shows the best route; to see all routes (including backups), use 'show ip route <network> all' or 'show ip route <network> longer-prefixes'.
In a typical enterprise network, routing table confusion can lead to suboptimal traffic flows or complete outages. Consider a company with two internet connections: one primary (via OSPF to an MPLS provider) and one backup (via a static default route to a DSL modem). The network engineer configures the static default route with AD 1, thinking it will be a backup, but OSPF default route has AD 110. However, the OSPF route is learned from the provider and has a longer prefix (e.g., 0.0.0.0/0 from OSPF vs static 0.0.0.0/0). Both are default routes with the same prefix length, so AD decides: static (1) beats OSPF (110). Traffic goes out the DSL modem instead of the MPLS, causing poor performance. The fix is to make the static route floating: set AD to 120 so OSPF is preferred.
Another scenario: a network has multiple OSPF areas and redistribution from EIGRP. An engineer sees two routes to 10.10.10.0/24 in the routing table: one OSPF (AD 110, metric 20) and one EIGRP (AD 90, metric 158720). The EIGRP route is chosen because AD 90 < 110, but the OSPF path is actually faster. The engineer must adjust the EIGRP AD or use route tagging to prefer OSPF.
A third scenario: during a migration from RIP to OSPF, both protocols advertise the same networks. RIP has AD 120, OSPF has AD 110, so OSPF routes are preferred. But if the OSPF metric is high (e.g., cost 100) and RIP metric is low (1 hop), candidates might think RIP is better. However, AD is compared first, so OSPF wins. This can cause traffic to take a longer path if OSPF cost is not tuned.
When misconfigured, routing loops can occur. For example, if a router has a static route pointing to a next-hop that is reachable via a dynamic route, and that dynamic route points back to the original router, a loop forms. The routing table may show the static route as active, but the packet will loop until TTL expires.
Scale considerations: In large networks with hundreds of routes, the routing table can become complex. Engineers use route summarization to reduce table size and avoid confusion. Also, using a single routing protocol (e.g., OSPF everywhere) simplifies AD comparisons. Performance-wise, routers use CEF to cache forwarding decisions, so routing table lookups are fast even with many routes.
The CCNA 200-301 exam tests routing table interpretation under objective 3.1. You will be given a 'show ip route' output and asked which route will be used for a specific destination, or why a particular route is not in the table. The exam also tests the route selection order: longest prefix match -> lowest AD -> lowest metric.
Common wrong answers: 1. 'The route with the lowest metric is always chosen.' Wrong! Candidates forget that AD is compared first when routes come from different sources. For example, a RIP route with metric 1 will not beat an OSPF route with metric 10 because RIP AD 120 > OSPF AD 110. 2. 'A static route is always preferred over a dynamic route.' Wrong! A static route has AD 1, but a directly connected route has AD 0, so a connected route beats static. Also, a floating static route has higher AD and is not preferred. 3. 'The route with the shortest prefix length is chosen.' Wrong! It's the longest prefix match. 4. 'If two routes have the same AD, the one with the higher metric is chosen.' Wrong! Lower metric wins.
Specific values to memorize:
Directly connected: AD 0
Static: AD 1
OSPF: AD 110
EIGRP (internal): AD 90
RIP: AD 120
Calculation traps: In OSPF, metric is cost = 10^8 / bandwidth (bps). For FastEthernet (100 Mbps), cost = 1. For GigabitEthernet, cost = 1 if using default reference bandwidth (100 Mbps), but if reference is changed, cost may be different. The exam may ask you to calculate cost or compare costs.
Decision rule for scenario questions: 1. Identify the destination IP. 2. Find all routes that match, noting prefix lengths. 3. Select the route with the longest prefix length. If only one, done. 4. If multiple with same prefix length, compare AD. Lowest wins. 5. If same AD, compare metric. Lowest wins. 6. If same metric, load-balancing is possible (if protocol supports).
Always check the code letter in the routing table output. 'C' means connected (AD 0), 'S' means static (AD 1), 'O' means OSPF (AD 110), 'D' means EIGRP (AD 90). The code letter is the first character on the line.
Route selection order: longest prefix match → lowest AD → lowest metric.
Directly connected routes have AD 0 and always win if prefix length is equal.
Static routes have default AD 1, but can be set higher (floating static) for backup.
OSPF internal routes have AD 110; EIGRP internal have AD 90.
RIP has AD 120; external EIGRP has AD 170.
The 'show ip route' command shows code, AD/metric, next-hop, age, and interface.
A floating static route is a static route with a higher AD than the primary dynamic route.
These come up on the exam all the time. Here's how to tell them apart.
Administrative Distance (AD)
Trustworthiness of route source
Compared when prefix lengths are equal
Lower AD is better
Default values: connected 0, static 1, OSPF 110, EIGRP 90, RIP 120
Used to compare routes from different protocols
Metric
Cost or distance to destination
Compared only when AD is equal
Lower metric is better
Depends on protocol: OSPF cost, EIGRP composite, RIP hop count
Used to compare routes from the same protocol
Mistake
A static route is always preferred over any dynamic route.
Correct
A static route has AD 1, but directly connected routes have AD 0, so a connected route beats static. Also, if a dynamic route has a longer prefix length, it will be chosen before comparing AD.
Candidates often memorize that static routes have low AD but forget about the longest prefix match rule and that connected routes have even lower AD.
Mistake
The route with the lowest metric is always the best route.
Correct
Metric is only compared after AD. If two routes have different ADs, the one with lower AD wins regardless of metric. For example, an OSPF route with metric 1000 beats a RIP route with metric 1 because OSPF AD 110 < RIP AD 120.
Candidates confuse the order of comparison; they think metric is the primary factor.
Mistake
A route with a longer prefix length is always preferred, even if its AD is higher.
Correct
Longest prefix match is the first criterion. So a /24 route with AD 110 will beat a /16 route with AD 0. But if two routes have the same prefix length, then AD is compared.
Candidates sometimes think AD overrides prefix length, but the order is: prefix length first, then AD.
Mistake
The administrative distance of a static route is always 1.
Correct
The default AD for a static route is 1, but it can be configured to any value from 1 to 255. A floating static route uses a higher AD (e.g., 120) to act as a backup.
Candidates assume static routes are always primary because they think AD is fixed.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Administrative distance (AD) measures the trustworthiness of the route source (e.g., static, OSPF, EIGRP). Metric measures the cost or distance to the destination network. AD is compared first when two routes have the same prefix length but come from different sources. Metric is only compared when the AD is the same (i.e., same protocol). For example, a static route (AD 1) will always be preferred over an OSPF route (AD 110) to the same network, regardless of metric. Exam tip: Remember the order: prefix length, then AD, then metric.
The numbers in brackets are [AD/metric]. For example, [110/20] means administrative distance 110 and metric 20. The first number is the AD, the second is the metric. For connected routes, it shows [0/0] because AD is 0 and metric is 0. For static routes, it shows [1/0] by default. This is a common exam question: you may be asked to identify which route will be chosen based on these values.
Yes, by configuring a floating static route. The default AD for a static route is 1, but you can set it to any value between 1 and 255. For example, 'ip route 0.0.0.0 0.0.0.0 10.0.0.1 120' creates a static default route with AD 120. This route will only be used if no other route to the destination with a lower AD exists (e.g., an OSPF default route with AD 110). This is useful for backup links.
The code 'O' stands for OSPF. It indicates that the route was learned via the Open Shortest Path First routing protocol. OSPF internal routes have an administrative distance of 110. External OSPF routes (type 1 and type 2) also have AD 110 but may have different metric calculations. Other common codes: 'C' for connected, 'S' for static, 'D' for EIGRP, 'R' for RIP. The code is the first character on the line in 'show ip route' output.
If a router has two routes to the same destination with the same prefix length, same AD, and same metric, it will load-balance across both paths (if the routing protocol supports equal-cost multipath, or ECMP). In the routing table, you may see both routes listed with an asterisk (*) next to one of them indicating the active next-hop. The router alternates between them per packet or per flow, depending on the switching mode. This is common with OSPF and EIGRP.
The 'show ip route' command only shows the best routes that are installed in the routing table. To see all routes learned (including those that are not selected because of higher AD or metric), use 'show ip route <network> all' or 'show ip route <network> longer-prefixes'. For example, 'show ip route 10.1.1.0 255.255.255.0 all' will display all routes to that network, including those with higher AD. Alternatively, use 'show ip route database' on some IOS versions.
The longest prefix match rule states that when a router has multiple routes that match a destination IP address, it will choose the route with the most specific (longest) subnet mask. For example, if the destination is 10.1.1.5 and the router has routes 10.1.1.0/24 and 10.1.1.4/30, the /30 route is chosen because it has a 30-bit mask, which is longer than the 24-bit mask. This rule is applied before any comparison of AD or metric.
You've just covered Exam Trap: Routing Table Confusion — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.
Done with this chapter?