03 - IP Connectivity / Routing (Domain 3, 25%)¶
The largest exam domain. Master routing concepts, static routes, OSPF single-area, and FHRP concepts.
Routing fundamentals¶
How routers decide¶
- Look up destination IP in routing table.
- Pick the longest prefix match that covers the destination.
- Forward out the matching interface (or to the next-hop IP).
If multiple routes are equal-prefix-length, administrative distance (AD) is the tiebreaker:
| Source | AD |
|---|---|
| Connected | 0 |
| Static | 1 |
| EIGRP summary | 5 |
| External BGP | 20 |
| Internal EIGRP | 90 |
| OSPF | 110 |
| RIPv2 | 120 |
| External EIGRP | 170 |
| Internal BGP | 200 |
| Unknown / Untrusted | 255 |
If still tied (same AD), the routing protocol's metric is the tiebreaker.
show commands¶
show ip route # full routing table
show ip route 192.168.1.0 # specific
show ip route ospf
show ip route static
show ip route connected
show ip protocols # active routing protocols
show ip cef # FIB (forwarding info base)
show ip arp
Symbols in show ip route:
C- connectedL- local (router's own IP)S- staticS*- candidate defaultO- OSPF intra-areaO IA- OSPF inter-areaO E1,O E2- OSPF externalR- RIPD- EIGRPB- BGP
Static routing¶
Syntax¶
ip route <destination> <mask> <next-hop-ip-or-interface>
ip route 0.0.0.0 0.0.0.0 192.168.1.1 # default route
ip route 10.0.0.0 255.0.0.0 192.168.1.1
ip route 10.0.0.0 255.0.0.0 GigabitEthernet0/1
ip route 10.0.0.0 255.0.0.0 192.168.1.1 5 # AD 5 (floating static)
Floating static routes¶
A static route with higher AD than the dynamic route. It's installed only if the dynamic route fails.
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
! AD 110
ip route 10.0.0.0 255.0.0.0 192.168.99.1 200 ! AD 200; only used if OSPF dies
Default route¶
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip default-network 192.168.1.0 ! older syntax
For OSPF advertising default:
router ospf 1
default-information originate
IPv6 static¶
ipv6 unicast-routing ! enable IPv6 routing
ipv6 route 2001:db8:abcd::/48 2001:db8::1
ipv6 route ::/0 2001:db8::1 ! default
OSPF single-area¶
Concepts¶
- Type: Link-state
- Algorithm: Dijkstra (SPF)
- Metric: Cost = reference_bandwidth / interface_bandwidth (default ref = 100 Mbps; bump to 100 Gbps with
auto-cost reference-bandwidth 100000) - Hello / Dead intervals: 10/40s on broadcast LANs; 30/120s on NBMA
- Multicast: 224.0.0.5 (all OSPF), 224.0.0.6 (DR/BDR)
- Areas: All areas connect to area 0 (backbone). CCNA covers single-area.
- Router ID: Highest configured loopback IP, else highest active interface IP, or
router-idcommand.
Configure¶
router ospf 1
router-id 1.1.1.1
network 10.10.10.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
passive-interface default
no passive-interface gi0/1
no passive-interface gi0/2
network uses wildcard mask (inverted subnet mask).
passive-interface default then no passive-interface <intf> is the modern best practice (passive everything by default, enable on uplinks).
Neighbor states¶
Down β Init β 2-Way β Exstart β Exchange β Loading β Full
2-Wayis normal on multi-access (LAN) for non-DR/BDR neighbors.Fullmeans full LSDB sync.- Stuck in
InitorExstartusually means MTU mismatch, hello/dead mismatch, or area mismatch.
DR / BDR¶
On a multi-access (broadcast / Ethernet) network, OSPF elects a Designated Router (DR) and Backup DR (BDR) to avoid full mesh adjacencies.
- DR has the highest OSPF priority (default 1; tiebreaker is highest router-id).
- Priority 0 = will never become DR.
- DR election is non-preemptive - changing priorities doesn't trigger a re-election.
interface gi0/1
ip ospf priority 100 ! make this router preferred DR
To force re-election: clear ip ospf process on the affected router.
Common adjacency requirements¶
For two OSPF routers to become Full:
- Same area
- Same hello / dead intervals
- Same subnet (same OSPF interface)
- Same MTU (huge gotcha)
- Matching authentication (if configured)
- Compatible network type
- Matching stub area flags
show commands¶
show ip ospf
show ip ospf neighbor
show ip ospf interface
show ip ospf interface gi0/1
show ip ospf database
show ip protocols
debug ip ospf events ! use sparingly
debug ip ospf adj
OSPFv3 (IPv6)¶
ipv6 unicast-routing
interface gi0/1
ipv6 ospf 1 area 0
router ospfv3 1
router-id 1.1.1.1
address-family ipv6 unicast
passive-interface default
no passive-interface gi0/1
exit-address-family
First-Hop Redundancy (FHRP) - concept-level¶
CCNA tests recognition; full config is CCNP territory.
HSRP (Hot Standby Router Protocol)¶
- Cisco proprietary
- One active, one standby
- Virtual IP and virtual MAC (
0000.0c07.acXXwhere XX is group number) - Config snippet:
interface vlan 10
ip address 10.10.10.2 255.255.255.0
standby 1 ip 10.10.10.1
standby 1 priority 110
standby 1 preempt
VRRP (Virtual Router Redundancy Protocol)¶
- Open standard (RFC 5798)
- Master / backup
- Multicast 224.0.0.18
- Similar concept to HSRP
GLBP (Gateway Load Balancing Protocol)¶
- Cisco proprietary
- Active / active load balancing
- Single virtual IP, multiple virtual MACs
What you need to know on CCNA¶
- HSRP and VRRP are active/standby
- GLBP is active/active load-balanced
- HSRP and GLBP are Cisco-only; VRRP is open standard
- HSRP virtual MAC pattern (0000.0c07.acXX) is high-yield trivia
Common exam triggers¶
- "Add a default route via 192.168.1.1" β
ip route 0.0.0.0 0.0.0.0 192.168.1.1 - "Backup route used only if OSPF fails" β floating static with AD > 110
- "OSPF neighbors stuck in EXSTART" β MTU mismatch, check
show ip ospf interface - "Make this router the OSPF DR" β
ip ospf priority 255(and then clear ip ospf process on the segment) - "Don't form OSPF adjacency on user-facing port" β
passive-interface gi0/1 - "OSPF default route announcement" β
default-information originate - "Two OSPF neighbors won't form" β check area, hello/dead, MTU, subnet, auth
- "Active/active gateway redundancy" β GLBP
Troubleshooting workflow¶
When a route is missing or traffic doesn't flow:
show ip interface brief- interface up/up?ping <directly-connected>- L2/L1 working?show ip route <destination>- is the route there?- If not,
show ip route- look for the parent supernet show ip protocols- is the routing process running?show ip ospf neighbor- did neighbor form?show ip ospf interface- did the interface get included? Right area? Hello/dead matching?traceroute <destination>- where does the packet die?debug ip ospf events(use carefully)