Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

IP Connectivity

Direct answer

IP connectivity at CCNA level: how a router chooses a route (longest prefix, then administrative distance, then metric), static and default routes, single-area OSPF, and first-hop redundancy for hosts' default gateway.

When to use this

Use it as the entry point when hosts in different subnets cannot reach each other or traffic takes the wrong path.

First 30 seconds

1. show ip route <dst> — is there a route? Which prefix and next hop?

2. No route → which protocol or static route should provide it?

3. Route present → ping the next hop; show ip cef <dst> — is it resolved?

4. traceroute from the source side — where does it stop?

5. Check the return route on the far side.

Operational verification

destination address → longest matching prefix → best source by administrative distance → lowest metric → next hop reachable → CEF entry → packet forwarded → return route on the far side

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes

Common mistakes include treating FULL adjacency as evidence of route installation, changing OSPF configuration before verifying interface/area/timer evidence, and reading one router's LSDB without comparing the expected advertising path.

Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Scope / prerequisiteUse it as the entry point when hosts in different subnets cannot reach each other or traffic takes the wrong path.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Troubleshooting approach Narrow the fault

Troubleshoot from the smallest failing step: interface state → Hello/neighbor state → parameter compatibility → LSDB presence → SPF/route selection → RIB → CEF/adjacency. Stop when the first missing state is confirmed.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Check in order: host gateway reachable → router has a route (show ip route <dest>) → next hop resolved → the far side has a return route. The most specific route always wins; administrative distance only decides between equally specific routes from different sources.

Key checks
  • show ip route <dst> — the route used for a destination.
  • show ip route — the whole table, with the source code of each route.
  • show ip cef <dst> — the forwarding entry actually used.
  • show ip protocols — routing protocols running and what they advertise.
  • traceroute <dst> source <interface> — the hops traffic takes.
ReferenceWhat it is1 section · depth on demand
ReferenceHow it works1 section · depth on demand

How it works

OSPF progresses through distinct evidence layers: interfaces participate in an area, neighbors exchange Hellos, compatible peers form adjacencies, LSAs synchronize into the LSDB, SPF calculates candidate paths, and selected routes may enter the RIB. Forwarding still depends on next-hop/FIB resolution.

Path: Networking → IP Connectivity. Local intent: Routing table logic, static routing, OSPF and first-hop redundancy.

ReferenceImportant terms & boundaries2 sections · depth on demand

Important terms and limits

Key boundaries: neighbor state, area, network type, Router ID, LSA, LSDB, SPF cost, ABR/ASBR, RIB and CEF. FULL describes adjacency state; it is not a synonym for installed route or working application.

In depth

How a router picks a route

IP connectivity comes down to how a router selects the route for each packet. RFC 1812 describes the rules. Among the routes that match a destination, longer prefixes are preferred ("selected in order of decreasing prefix length"), and the default route is simply the route with prefix length zero. Routers should also be able to rank routing sources by trustworthiness. RFC 1812 calls this administrative preference: 0 is the most preferred, 254 the least, and 255 means "never use".

The order of decisions on Cisco IOS

StepRuleExample
1. Prefix lengthThe longest match wins10.20.30.0/24 beats 10.20.0.0/16
2. Administrative distanceOnly between sources for the same prefixOSPF (110) beats RIP (120) for the same /24
3. MetricWithin one routing protocolThe lower OSPF cost wins
4. Equal-cost pathsSeveral entries are installedECMP over two paths

Cisco default administrative distances

SourceDistance
Connected0
Static1
eBGP20
EIGRP internal90
OSPF110
RIP120
EIGRP external170
iBGP200

IP connectivity topics in this reference

TopicFocus
Routing tableCodes, longest match, recursive lookups
Static routingFloating statics, tracking
OSPF, EIGRP, BGPDynamic routing
First-hop redundancyHSRP, VRRP, GLBP
VRFsSeparate routing tables
R1# show ip route 10.20.30.40
Routing entry for 10.20.30.0/24
  Known via "ospf 1", distance 110, metric 21, type intra area
  Routing Descriptor Blocks:
  * 10.0.12.2, from 10.255.0.2, via GigabitEthernet0/0/1
R1# show ip route longer-prefixes 10.20.0.0 255.255.0.0
R1# show ip cef 10.20.30.40
R1(config)# ip route 10.20.30.0 255.255.255.0 10.0.13.3 200

The last line is a floating static route. With distance 200, it is used only if the OSPF route (110) disappears.

A warning from RFC 1812

Administrative preferences can easily be misused to create routing loops. Change distances deliberately, and only with a clear picture of every router's resulting choice.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in IP Connectivity. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?