{"id":169329,"date":"2026-06-21T12:00:53","date_gmt":"2026-06-21T09:00:53","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=169329"},"modified":"2026-06-21T12:00:53","modified_gmt":"2026-06-21T09:00:53","slug":"cisco-ip-routing-table-explained","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/cisco-ip-routing-table-explained\/","title":{"rendered":"How to Read the Cisco IP Routing Table (show ip route)"},"content":{"rendered":"<p>A router makes one decision over and over, millions of times a second: which way to send this packet. The routing table is how it decides, and <code>show ip route<\/code> is how you read that decision for yourself. Every routing topic that follows, <a href=\"https:\/\/computingforgeeks.com\/cisco-ipv4-static-routes-configuration\/\">static routes<\/a>, OSPF, troubleshooting, comes back to this one screen, so reading it fluently is the single most useful skill in the whole IP Connectivity domain.<\/p>\n\n<p>This breaks down a real Cisco routing table line by line: the source codes, the numbers in brackets, why one route beats another, and how the router actually picks a path for a packet. If the routing protocols themselves are still hazy, the <a href=\"https:\/\/computingforgeeks.com\/what-is-ip-routing-and-routing-protocols-in-networking\/\">IP routing and routing protocols overview<\/a> covers those; here the focus is the table. <em>Captured on Cisco IOS 15.2 in June 2026, on two c7200 routers in GNS3.<\/em><\/p>\n\n<h2>What the routing table holds<\/h2>\n\n<p>The table is built from three kinds of routes: networks the router is directly connected to, static routes you type in, and routes learned from a dynamic protocol like OSPF. Each line starts with a one or two letter code naming its source. The legend prints at the top of every <code>show ip route<\/code>, and the codes that matter for the CCNA are a short list: <code>C<\/code> connected, <code>L<\/code> local, <code>S<\/code> static, and <code>O<\/code> for OSPF.<\/p>\n\n<p>The lab behind this is two <a href=\"https:\/\/computingforgeeks.com\/network-devices-routers-switches-firewalls-explained\/\">routers<\/a>, R1 and R2, joined by a \/30 and running OSPF in area 0. Each has a couple of loopbacks, and R1 also carries a static route and a default route, so its table shows every CCNA code at once.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"560\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-ospf-topology.png\" alt=\"R1 and R2 over an OSPF area 0 link with loopbacks, plus R1 static and default routes, behind the routing table\" class=\"wp-image-169324\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-ospf-topology.png 1460w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-ospf-topology-300x115.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-ospf-topology-1024x393.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-ospf-topology-768x295.png 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/figure>\n\n\n<p>That topology was built and captured on two c7200 routers in GNS3:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"480\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-gns3-canvas.png\" alt=\"GNS3 canvas showing two c7200 routers R1 and R2 connected on Gi0\/0 running OSPF\" class=\"wp-image-169325\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-gns3-canvas.png 1100w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-gns3-canvas-300x131.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-gns3-canvas-1024x447.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-routing-table-gns3-canvas-768x335.png 768w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/figure>\n\n\n<p>Here are the route codes you will actually meet, with what each one means:<\/p>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Source<\/th><\/tr><\/thead><tbody>\n<tr><td>C<\/td><td>Directly connected network (an up\/up interface with an IP)<\/td><\/tr>\n<tr><td>L<\/td><td>Local: the \/32 host route for the router&#8217;s own interface address<\/td><\/tr>\n<tr><td>S<\/td><td>Static route you configured<\/td><\/tr>\n<tr><td>O<\/td><td>Learned from OSPF (D is EIGRP, R is RIP, B is BGP)<\/td><\/tr>\n<tr><td>S*<\/td><td>A static default route, the candidate default<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n\n<h2>Reading a single route line<\/h2>\n\n<p>Run the command on R1 and the whole table prints under the legend:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>show ip route<\/code><\/pre>\n\n\n<p>Every code from the table above shows up in the real output:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"1152\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output.png\" alt=\"show ip route on R1 showing connected, local, OSPF, static, and default route codes with administrative distance and metric\" class=\"wp-image-169326\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output-300x157.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output-1024x536.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output-768x402.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output-1536x804.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-output-2048x1072.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>Take one line: <code>O 192.168.20.0\/24 [110\/2] via 10.0.12.2, 00:00:09, GigabitEthernet0\/0<\/code>. Read it left to right. <code>O<\/code> is the source: OSPF learned it. <code>192.168.20.0\/24<\/code> is the destination network and its prefix length. The bracket <code>[110\/2]<\/code> is the part people misread, so it is worth committing to memory: it is always <strong>[administrative distance \/ metric]<\/strong>. So 110 is the administrative distance (OSPF&#8217;s default) and 2 is the OSPF metric. After <code>via<\/code> comes the next-hop address, then how long the route has been in the table, then the interface the router will send the packet out of.<\/p>\n\n<h2>Administrative distance: which source wins<\/h2>\n\n<p>Administrative distance answers a single question: when two different sources offer a route to the same network, which one does the router believe? Lower is more trusted. A directly connected network (AD 0) always beats a static (1), which beats OSPF (110), which beats RIP (120). The router installs only the winner in the table.<\/p>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Route source<\/th><th>Default administrative distance<\/th><\/tr><\/thead><tbody>\n<tr><td>Connected<\/td><td>0<\/td><\/tr>\n<tr><td>Static<\/td><td>1<\/td><\/tr>\n<tr><td>External BGP (eBGP)<\/td><td>20<\/td><\/tr>\n<tr><td>EIGRP (internal)<\/td><td>90<\/td><\/tr>\n<tr><td>OSPF<\/td><td>110<\/td><\/tr>\n<tr><td>RIP<\/td><td>120<\/td><\/tr>\n<tr><td>Internal BGP (iBGP)<\/td><td>200<\/td><\/tr>\n<tr><td>Unusable<\/td><td>255<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n\n<p>This is why the static route to 203.0.113.0\/24 in the lab sits in the table as an <code>S<\/code> with AD 1. If OSPF later learned the same prefix, the static would still win on its lower distance.<\/p>\n\n<h2>Metric: which route within a protocol<\/h2>\n\n<p>Administrative distance only compares different sources. When a single protocol knows two routes to the same network, AD is identical, so the tie breaks on the metric, the protocol&#8217;s own measure of cost. Lower wins. OSPF derives its metric from bandwidth (it calls it cost), EIGRP uses a bandwidth-and-delay composite, and RIP just counts hops. In the bracket <code>[110\/2]<\/code>, the 2 is that OSPF cost.<\/p>\n\n<h2>Longest-prefix match: how the router actually forwards<\/h2>\n\n<p>Here is the part that trips people up, because it is a different rule from the two above. Administrative distance and metric decide which route to <em>install<\/em> for a given prefix. But when an actual packet arrives, the router chooses among the installed routes by <strong>longest-prefix match<\/strong>: the most specific route that matches the destination wins, regardless of AD or metric.<\/p>\n\n<p>If the table holds both <code>192.168.20.0\/24<\/code> and a default <code>0.0.0.0\/0<\/code>, a packet to 192.168.20.5 follows the \/24, because \/24 is a longer (more specific) match than \/0. The default route is the loosest possible match, so it only catches packets that nothing more specific does. Order of operations: longest-prefix match first to choose among different prefixes, then lowest AD and lowest metric only to settle competing routes to the <em>same<\/em> prefix.<\/p>\n\n<h2>The gateway of last resort<\/h2>\n\n<p>At the top of the lab table is the line <code>Gateway of last resort is 10.0.12.2 to network 0.0.0.0<\/code>, paired with an <code>S* 0.0.0.0\/0 [1\/0] via 10.0.12.2<\/code> entry. That is the default route. It matches any destination, but as the loosest possible prefix it is used only when no specific route fits. Most edge routers point a default at the next hop toward the internet, so anything not in the table heads that way instead of being dropped.<\/p>\n\n<h2>Inspecting one route<\/h2>\n\n<p>The table is the summary. To see everything the router knows about one destination, add the prefix to the command:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>show ip route 192.168.20.0<\/code><\/pre>\n\n\n<p>That expands into the full record for the route, including the source, the distance and metric, and where it was learned:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"644\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor.png\" alt=\"show ip route for one prefix showing OSPF distance 110 metric 2, and the OSPF neighbor in FULL state\" class=\"wp-image-169327\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor-300x88.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor-1024x300.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor-768x225.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor-1536x450.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-ip-route-detail-ospf-neighbor-2048x600.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>The detail spells out what the one-line entry compresses: <code>Known via \"ospf 1\", distance 110, metric 2, type intra area<\/code>, and the descriptor block naming the next hop and exit interface. When a route is in the table but traffic still fails, this is the command that shows you whether the router learned it the way you expected. The neighbor output below confirms the OSPF adjacency that fed it is fully up.<\/p>\n\n<h2>Practice the Cisco routing table<\/h2>\n\n<p>The two-router OSPF lab is paste-ready for GNS3, Cisco Packet Tracer, or real gear in the companion repo: <a href=\"https:\/\/github.com\/c4geeks\/ccna-labs\/tree\/main\/routing-table\" target=\"_blank\" rel=\"noreferrer noopener\">c4geeks\/ccna-labs<\/a>. Build R1 and R2, paste the configs, and <code>show ip route<\/code> fills in exactly as above. It assumes the routers already have their <a href=\"https:\/\/computingforgeeks.com\/cisco-device-base-configuration\/\">base configuration<\/a> and IP addressing in place; if subnets and masks are shaky, review <a href=\"https:\/\/computingforgeeks.com\/ipv4-addressing-explained\/\">IPv4 addressing<\/a> first. The routing table is the foundation of the IP Connectivity domain on the <a href=\"https:\/\/computingforgeeks.com\/quickly-prepare-for-ccna-200-301-exam\/\">CCNA 200-301 study roadmap<\/a>.<\/p>\n\n<p>Test the codes, the distance-versus-metric distinction, and longest-prefix match with the quiz:<\/p>\n\n<div class=\"cfg-quiz\" data-quiz=\"{\n  &quot;id&quot;: &quot;ip-routing-table&quot;,\n  &quot;title&quot;: &quot;Cisco IP routing table (show ip route) quiz&quot;,\n  &quot;objective&quot;: &quot;3.1 Interpret the components of a routing table&quot;,\n  &quot;intro&quot;: &quot;Ten questions on reading the Cisco routing table: the route codes, administrative distance versus metric, longest-prefix match, and the gateway of last resort. Every answer is doc-checked or verified in a two-router OSPF lab.&quot;,\n  &quot;questions&quot;: [\n    {&quot;type&quot;: &quot;match&quot;, &quot;q&quot;: &quot;Match each show ip route code to its source.&quot;, &quot;pairs&quot;: [{&quot;left&quot;: &quot;C&quot;, &quot;right&quot;: &quot;Directly connected network&quot;}, {&quot;left&quot;: &quot;L&quot;, &quot;right&quot;: &quot;Local (the \/32 for the router&#039;s own interface IP)&quot;}, {&quot;left&quot;: &quot;O&quot;, &quot;right&quot;: &quot;Learned from OSPF&quot;}, {&quot;left&quot;: &quot;S&quot;, &quot;right&quot;: &quot;Static route you configured&quot;}], &quot;explanation&quot;: &quot;C is a connected subnet, L is the \/32 host route for the interface address, O is an OSPF-learned route, and S is a static route. The codes legend prints at the top of show ip route.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;What does administrative distance rank?&quot;, &quot;options&quot;: [&quot;The speed of a link&quot;, &quot;The trustworthiness of a route&#039;s SOURCE when two sources offer the same prefix&quot;, &quot;The number of hops to a network&quot;, &quot;The size of the routing table&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;Administrative distance ranks how trustworthy a route source is. When two protocols (or a protocol and a static) offer the same prefix, the router installs the one with the lowest AD.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;type&quot;: &quot;numeric&quot;, &quot;q&quot;: &quot;What is the default administrative distance of OSPF? Type the number.&quot;, &quot;answer&quot;: &quot;110&quot;, &quot;hint&quot;: &quot;RIP is 120.&quot;, &quot;placeholder&quot;: &quot;e.g. 90&quot;, &quot;explanation&quot;: &quot;OSPF has a default AD of 110. For reference: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120, internal BGP 200.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;type&quot;: &quot;numeric&quot;, &quot;q&quot;: &quot;What is the default administrative distance of a static route? Type the number.&quot;, &quot;answer&quot;: &quot;1&quot;, &quot;hint&quot;: &quot;Just above directly connected (0).&quot;, &quot;placeholder&quot;: &quot;e.g. 0&quot;, &quot;explanation&quot;: &quot;A static route has an AD of 1, just above a directly connected route (0). That is why a static route is preferred over OSPF (110) or RIP (120) for the same prefix.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;In the route O 192.168.20.0\/24 [110\/2], what do 110 and 2 mean?&quot;, &quot;options&quot;: [&quot;110 is the metric, 2 is the AD&quot;, &quot;110 is the administrative distance, 2 is the metric&quot;, &quot;110 is the VLAN, 2 is the hop count&quot;, &quot;110 and 2 are both port numbers&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;The bracket is [administrative distance \/ metric]. So 110 is the AD (OSPF) and 2 is the OSPF metric (cost) for this route.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;When forwarding a packet, how does a router choose which route to use?&quot;, &quot;options&quot;: [&quot;The route with the lowest administrative distance&quot;, &quot;The route with the lowest metric&quot;, &quot;The most specific matching route (longest-prefix match)&quot;, &quot;The first route in the table&quot;], &quot;answer&quot;: 2, &quot;explanation&quot;: &quot;Forwarding uses longest-prefix match: the router picks the most specific route that matches the destination, regardless of AD or metric. AD and metric only break ties between routes to the SAME prefix.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;q&quot;: &quot;What is the gateway of last resort?&quot;, &quot;options&quot;: [&quot;The default route (0.0.0.0\/0), used when no more-specific route matches&quot;, &quot;The closest connected router&quot;, &quot;The route with the highest metric&quot;, &quot;The management interface&quot;], &quot;answer&quot;: 0, &quot;explanation&quot;: &quot;The gateway of last resort is the default route, 0.0.0.0\/0, shown with an S* code and a &#039;Gateway of last resort is...&#039; header. The router uses it only when nothing more specific matches.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;What is the difference between a C route and an L route?&quot;, &quot;options&quot;: [&quot;They are identical&quot;, &quot;C is the connected subnet; L is the \/32 host route for the router&#039;s own interface address&quot;, &quot;C is for copper, L is for fiber&quot;, &quot;C is configured, L is learned&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;An up\/up interface with an IP creates a C route for its subnet and an L route, a \/32, for the interface&#039;s own address. Both point at the same interface.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;OSPF and a static route both offer 10.0.0.0\/8. Which does the router install?&quot;, &quot;options&quot;: [&quot;OSPF, because it is dynamic&quot;, &quot;The static route, because its AD (1) is lower than OSPF (110)&quot;, &quot;Both, load-balanced&quot;, &quot;Neither, it is a conflict&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;Same prefix from two sources is decided by administrative distance: the static route&#039;s AD of 1 beats OSPF&#039;s 110, so the static route is installed.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;q&quot;: &quot;Two OSPF routes reach the same prefix. Which one wins?&quot;, &quot;options&quot;: [&quot;The one with the lower administrative distance&quot;, &quot;The one with the lower metric (cost)&quot;, &quot;The one learned first&quot;, &quot;Both are installed and the AD is summed&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;When two routes to the same prefix come from the SAME protocol, AD is equal, so the lower metric wins. For OSPF that is the lower cost.&quot;, &quot;validated&quot;: &quot;doc&quot;}\n  ]\n}\n\"><div class=\"cfg-quiz-loading\">Loading quiz...<\/div><\/div>\n\n\n<p>Then drill the route codes and the administrative distance values with the flashcards, or load the deck into Anki:<\/p>\n\n<div class=\"cfg-fc\" data-fc=\"{\n  &quot;id&quot;: &quot;ip-routing-table&quot;,\n  &quot;title&quot;: &quot;Cisco IP Routing Table Flashcards&quot;,\n  &quot;objective&quot;: &quot;3.1 Interpret the components of a routing table&quot;,\n  &quot;intro&quot;: &quot;The routing-table facts worth knowing cold: the route codes, the route-line format, administrative distance versus metric, longest-prefix match, and the gateway of last resort. Tap a card to flip it, then mark whether you knew it.&quot;,\n  &quot;cards&quot;: [\n    {&quot;front&quot;: &quot;What is the routing table?&quot;, &quot;back&quot;: &quot;The router&#039;s forwarding map, shown with show ip route. It is built from directly connected networks, static routes, and routes learned from dynamic protocols like OSPF.&quot;},\n    {&quot;front&quot;: &quot;Route source codes (CCNA)&quot;, &quot;back&quot;: &quot;C connected, L local (the \/32 for the router&#039;s own interface IP), S static, O OSPF. Also D EIGRP, R RIP, B BGP, * candidate default. The legend prints at the top of show ip route.&quot;},\n    {&quot;front&quot;: &quot;How does a route line read?&quot;, &quot;back&quot;: &quot;code  prefix\/len  [AD\/metric]  via next-hop, age, exit-interface. Example: O 192.168.20.0\/24 [110\/2] via 10.0.12.2, 00:00:09, GigabitEthernet0\/0.&quot;},\n    {&quot;front&quot;: &quot;What is administrative distance (AD)?&quot;, &quot;back&quot;: &quot;A ranking of how trustworthy a route SOURCE is. When two sources offer the same prefix, the router installs the one with the lowest AD.&quot;},\n    {&quot;front&quot;: &quot;Administrative distance defaults&quot;, &quot;back&quot;: &quot;Connected 0, Static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120, External EIGRP 170, internal BGP 200, unusable 255. Lower is more trusted.&quot;},\n    {&quot;front&quot;: &quot;What is a metric?&quot;, &quot;back&quot;: &quot;A value that compares multiple routes to the same prefix from the SAME protocol. Lower wins. OSPF uses cost (from bandwidth), EIGRP a bandwidth+delay composite, RIP hop count.&quot;},\n    {&quot;front&quot;: &quot;AD vs metric: which is compared first?&quot;, &quot;back&quot;: &quot;For the same prefix from different sources, AD decides. For the same prefix from the same protocol, AD is equal so the lower metric decides.&quot;},\n    {&quot;front&quot;: &quot;What is longest-prefix match?&quot;, &quot;back&quot;: &quot;How the router actually forwards a packet: it picks the most specific matching route (the longest prefix \/ largest mask), regardless of AD or metric. AD and metric only break ties between routes to the same prefix.&quot;},\n    {&quot;front&quot;: &quot;What is the gateway of last resort?&quot;, &quot;back&quot;: &quot;The default route, 0.0.0.0\/0, shown with an S* code and a &#039;Gateway of last resort is X to network 0.0.0.0&#039; header. Used only when no more-specific route matches.&quot;},\n    {&quot;front&quot;: &quot;Connected (C) vs Local (L)&quot;, &quot;back&quot;: &quot;An up\/up interface with an IP produces a C route for its subnet and an L route, a \/32, for the interface&#039;s own address. Both point at that interface.&quot;},\n    {&quot;front&quot;: &quot;Reading [110\/2] on an OSPF route&quot;, &quot;back&quot;: &quot;110 is the administrative distance (OSPF&#039;s default) and 2 is the OSPF metric (cost). The bracket is always [AD\/metric].&quot;},\n    {&quot;front&quot;: &quot;Static route beats OSPF for the same prefix. Why?&quot;, &quot;back&quot;: &quot;Administrative distance. A static route&#039;s AD is 1, far below OSPF&#039;s 110, so for the same prefix the static route is installed.&quot;},\n    {&quot;front&quot;: &quot;Why does a connected route always win?&quot;, &quot;back&quot;: &quot;Connected routes have AD 0, the lowest possible, so a directly connected network is preferred over any learned or static route to the same prefix.&quot;},\n    {&quot;front&quot;: &quot;Inspect one route in detail&quot;, &quot;back&quot;: &quot;show ip route &lt;prefix&gt; prints &#039;Routing entry for ...&#039;: the source (Known via ospf 1), the distance and metric, the last update time, and the next hop and exit interface.&quot;},\n    {&quot;front&quot;: &quot;Why do OSPF loopbacks show as \/32?&quot;, &quot;back&quot;: &quot;OSPF advertises a loopback as a \/32 host route by default. Set ip ospf network point-to-point on the loopback to advertise its real mask (for example a \/24).&quot;},\n    {&quot;front&quot;: &quot;Order the router uses to choose a route&quot;, &quot;back&quot;: &quot;1) Longest-prefix match (most specific) for the destination. 2) Among routes to the same prefix, lowest AD. 3) Among same-protocol routes, lowest metric.&quot;}\n  ]\n}\n\" data-fc-anki=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ccna-ip-routing-table-flashcards.apkg\"><div class=\"cfg-fc-loading\">Loading flashcards...<\/div><\/div>\n\n\n<h2>Three ways the routing table trips people up<\/h2>\n\n<p>Most routing-table mistakes come from confusing the three selection rules. Keep them straight:<\/p>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reading the bracket backwards.<\/strong> <code>[110\/2]<\/code> is [AD\/metric], not [metric\/AD]. The first number is always the administrative distance.<\/li>\n<li><strong>Thinking the lowest AD forwards the packet.<\/strong> AD and metric only decide which route gets <em>installed<\/em> for a prefix. The packet itself follows longest-prefix match, so a \/24 with a high metric still beats a \/0 default.<\/li>\n<li><strong>Expecting an OSPF loopback to appear with its real mask.<\/strong> OSPF advertises loopbacks as \/32 host routes by default. The lab sets <code>ip ospf network point-to-point<\/code> on the loopback so 192.168.20.0 shows up as the \/24 you configured.<\/li>\n<\/ul>\n\n\n<p>Get those three straight and <code>show ip route<\/code> stops being a wall of text. It becomes the first place you look, on every routing problem you will ever troubleshoot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Read the Cisco IP routing table with show ip route: route codes, administrative distance vs metric, longest-prefix match, and the gateway of last resort.<\/p>\n","protected":false},"author":3,"featured_media":169328,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,55],"tags":[524,525],"cfg_series":[39888],"class_list":["post-169329","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-networking","tag-ccna","tag-cisco","cfg_series-ccna-200-301"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=169329"}],"version-history":[{"count":1,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169329\/revisions"}],"predecessor-version":[{"id":169344,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169329\/revisions\/169344"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/169328"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=169329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=169329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=169329"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=169329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}