Use it as the entry point when hosts in different subnets cannot reach each other or traffic takes the wrong path.
IP Connectivity
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.
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.
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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
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.
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.
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
What it is
Routing table logic, static routing, OSPF and first-hop redundancy.
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
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
| Step | Rule | Example |
|---|---|---|
| 1. Prefix length | The longest match wins | 10.20.30.0/24 beats 10.20.0.0/16 |
| 2. Administrative distance | Only between sources for the same prefix | OSPF (110) beats RIP (120) for the same /24 |
| 3. Metric | Within one routing protocol | The lower OSPF cost wins |
| 4. Equal-cost paths | Several entries are installed | ECMP over two paths |
Cisco default administrative distances
| Source | Distance |
|---|---|
| Connected | 0 |
| Static | 1 |
| eBGP | 20 |
| EIGRP internal | 90 |
| OSPF | 110 |
| RIP | 120 |
| EIGRP external | 170 |
| iBGP | 200 |
IP connectivity topics in this reference
| Topic | Focus |
|---|---|
| Routing table | Codes, longest match, recursive lookups |
| Static routing | Floating statics, tracking |
| OSPF, EIGRP, BGP | Dynamic routing |
| First-hop redundancy | HSRP, VRRP, GLBP |
| VRFs | Separate 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%