Guide
IP routing basics: the routing table, static routes, RIP and EIGRP (CCNA and CCNP)
Routers learn routes from connected interfaces, static configuration and routing protocols. This guide explains how IOS chooses routes, how to configure and troubleshoot static routes, and the RIP and EIGRP details needed for CCNA and ENCOR questions.
4 parts ยท 58 practice questions
Routing fundamentals: route selection and forwarding
The control plane learns candidate routes, selects eligible routes and builds forwarding information. The data plane uses that information to forward each packet. Forwarding is hop by hop: each router uses its own table, so the return path can differ from the outbound path. A router decrements IPv4 TTL at each forwarding hop; when TTL reaches zero it drops the packet and normally sends ICMP Time Exceeded. If no route or default route matches an ordinary unicast destination, the router drops the packet and may send ICMP Destination Unreachable, subject to suppression and rate limits. It does not flood the packet like an Ethernet unknown unicast.
- OSPF default AD
- 110
- Internal EIGRP default AD
- 90
- RIP default AD
- 120
- External EIGRP default AD
- 170
When several installed prefixes match a destination, forwarding chooses the longest prefix, meaning the most specific match. For 10.1.1.55, 10.1.1.0/24 beats 10.1.0.0/16 and 0.0.0.0/0. Administrative distance (AD) is used earlier to choose between route sources advertising the same prefix; it does not let a less-specific route defeat a more-specific installed route. Within one protocol, its metric compares paths to the same prefix. Lower OSPF cost is preferred. Metrics from different protocols are not compared; AD is.
IOS route output commonly displays [AD/metric]. Thus [110/65] for OSPF means AD 110 and OSPF path cost 65. Default AD values used in these questions are connected 0, static 1, EIGRP summary 5, internal EIGRP 90, OSPF 110, RIP 120, external EIGRP 170, and unknown/untrusted 255, which is not installed. Lower AD is preferred because lower values indicate more trusted route sources; Cisco assigns directly connected interfaces 0, the lowest value. An external EIGRP route is a route redistributed into EIGRP from another routing domain. A directly connected route exists only while its interface is operational; shutting the interface removes it. IOS normally shows C for the connected subnet and L for the interface's own /32 address.
If multiple eligible paths to the same prefix have equal cost and AD, the router may install equal-cost multipath (ECMP) routes when the platform and maximum-path settings allow it. Cisco Express Forwarding commonly distributes flows using a hash, so traffic need not alternate packet by packet. Each destination packet is still forwarded according to the installed forwarding entries.
A static route with a configured AD above the competing protocol's AD is a floating static route. For example, AD 115 loses to OSPF's default 110 for the same prefix and can take over after OSPF withdraws its route, provided the static next hop resolves and no better route exists. Merely configuring a backup does not prove that the path works end to end.
show ip route
show ip protocols
show ip route 192.0.2.0Static routes: next hops, defaults and summaries
A static route is configured manually. The IOS form is ip route destination-network subnet-mask next-hop-address [administrative-distance]; an exit interface can be specified instead of, or in supported forms alongside, a next hop. For example, the destination and mask come first, followed by the next-hop router. The default static-route AD is 1. Prefixing the exact route command with no removes it from the running configuration.
- Default route
- 0.0.0.0/0
- Default static-route AD
- 1
- Backup route example AD
- 115
A default route is 0.0.0.0/0 and matches any IPv4 destination for which no more-specific route exists. When it is installed, show ip route reports its next hop as the gateway of last resort. A summary route represents many component subnets with one less-specific entry and can reduce table size when those destinations share a next hop. Longest-prefix match still selects a more-specific component route when one is installed.
Two resolvable static routes to the same prefix with different ADs normally install only the lower-AD route; the higher-distance route is the backup. Two equal-distance routes can both install as ECMP if maximum-path settings permit. CEF can distribute flows among their next hops. This does not guarantee both paths are healthy beyond the next hop.
A recursive static route names a next-hop IP address. IOS must resolve that address through another route to an output interface. If resolution fails, the route is removed from the routing table but remains configured and can return when resolution works again. A route tied to an interface is also removed if that interface goes down. To diagnose a missing connected subnet, inspect interface and line protocol state, cabling and the peer's state; down/down with the peer administratively shut means the link is not operational. A missing route alone does not prove which physical fault caused it.
For troubleshooting, use show ip route to confirm what is installed, show running-config to see what is configured, and show ip interface brief plus interface details to check operational state. A configured route can be absent because a competing route has a better AD or its next hop cannot resolve. Routing is independently decided at each hop, so asymmetric return paths are valid, although stateful firewalls, NAT, policy routing or path-MTU constraints can make asymmetry relevant.
ip route 192.168.30.0 255.255.255.0 10.0.0.2
ip route 10.1.0.0 255.255.0.0 10.0.0.2
ip route 0.0.0.0 0.0.0.0 203.0.113.2
ip route 10.5.0.0 255.255.0.0 192.168.1.2 115
no ip route 10.1.1.0 255.255.255.0 10.0.0.2
show ip route
show ip interface briefRIP and classic EIGRP: configuration and verification
RIP is a distance-vector protocol whose metric is hop count. A directly connected network has hop count zero; 16 means infinity and is unreachable, so the largest usable RIP distance is 15 hops. RIPv1 is classful and omits subnet masks from updates, so it cannot carry VLSM subnet information. RIPv2 carries masks and uses multicast 224.0.0.9. On IOS, router rip starts RIP; version 2 selects RIPv2, and network identifies networks whose interfaces participate. RIP has no configured networks by default. An interface not covered by a network statement does not send or receive RIP updates as part of that process.
- RIP infinity
- 16
- Largest usable RIP distance
- 15 hops
- RIPv2 multicast
- 224.0.0.9
- RIP automatic summarization
- enabled by default
RIPv2 automatic summarization is enabled by default on the cited IOS XE implementation. It summarizes subnets at classful network boundaries, which can hide discontiguous subnet information. Under router rip, no auto-summary disables this behavior so subnet routes can be advertised across those boundaries. Use show ip protocols to inspect the configured networks, version, timers and passive interfaces; RIP-learned routes have code R in show ip route.
Classic EIGRP is configured with router eigrp <AS> and network <network> [wildcard-mask]. The AS number and K-values must match between neighbors. Its route code is D, for DUAL. By default internal EIGRP has AD 90, external EIGRP has AD 170, and OSPF has AD 110; therefore EIGRP wins an equal-prefix contest with OSPF by default, while OSPF beats RIP's AD 120. EIGRP's default metric uses minimum path bandwidth and cumulative delay, not hop count. Modern IOS versions have auto-summary disabled by default.
DUAL chooses a successor, the best route used for forwarding, from EIGRP's topology information. A feasible successor is a loop-free backup satisfying the strict feasibility condition: the neighbor's reported distance to the destination is less than the local feasible distance of the current successor (RD < FD). If that backup exists, DUAL can use it to avoid route recomputation. Without a feasible successor, DUAL must recompute a new successor, and that recomputation's duration affects convergence, so failover time is not guaranteed to be near-instant. The topology table can contain feasible alternatives that are not installed in the main routing table.
Use show ip eigrp neighbors to inspect neighbor addresses, interfaces, hold times and uptime, and show ip eigrp topology to inspect learned paths and feasible successors. If an adjacency is missing, check reachability and interface state, whether the interface participates and is not passive, the AS number and K-values. A K-value mismatch prevents adjacency; make metric weights identical on both peers rather than changing just one side.
router rip
version 2
network 192.168.1.0
no auto-summary
show ip protocols
router eigrp 100
network 10.0.0.0
show ip eigrp neighbors
show ip eigrp topologyCCNP depth: EIGRP feasibility, stubs and named mode
EIGRP's feasibility condition is strict: a neighbor's reported (also called advertised) distance must be less than the feasible distance, RD < FD. Equality does not qualify. The condition guarantees the alternate path is loop-free. Feasible distance is the best metric to the destination, or the best metric known when the route went active; reported distance is the neighbor's metric to the destination before the local link is included.
Classic EIGRP's default K-values are K1=1, K2=0, K3=1, K4=0 and K5=0. K1 weights bandwidth and K3 weights delay; the remaining values weight load and reliability and are zero by default. In the classic metric formula, bandwidth is scaled as 10^7 divided by minimum path bandwidth in kilobits per second, delay is cumulative delay in tens of microseconds, and the default metric is 256 times their sum. MTU is carried as a vector attribute but is not part of the default metric. Every neighbor in the process must use identical K-values.
An EIGRP stub limits what a branch advertises and tells neighbors that it is not a transit router. eigrp stub connected advertises eligible connected routes and suppresses learned EIGRP, static and summary routes. eigrp stub connected summary advertises both eligible connected and summary routes. The connected routes must be included by EIGRP configuration. Stub options such as static, summary and redistributed add those route categories when selected.
EIGRP named mode places address-family settings under a named router process. An IPv4 instance uses address-family ipv4 unicast autonomous-system <AS>; its af-interface <interface> submode holds interface-level settings such as hello timers and authentication. The hierarchy can contain IPv4 and IPv6 address families and VRF-specific configuration. Cisco IOS XE implementations support 64-bit wide metrics for higher-speed links; exact feature availability and syntax depend on platform and release.
EIGRP for IPv4 sends Hello and Update multicast traffic to 224.0.0.10. EIGRP for IPv6 uses the interface link-local address for protocol source addressing and learned IPv6 route next hops; its multicast group is FF02::A. OSPFv3 Link LSAs provide each device's link-local address to other devices on that link, which is used as the link-scoped next hop for IPv6 routes. Cisco IOS XE supports EIGRP for IPv6 without requiring a global IPv6 address on the interface. Do not confuse the local link-scoped next hop with a global destination prefix.
Manual EIGRP summarization installs a local summary route to Null0, normally with AD 5. This discard route catches traffic for unassigned subnets covered by the summary, preventing it from following a less-specific route back toward the summarizing router and looping. Verify platform and release behavior when applying the concept to a particular device.
router eigrp branch
address-family ipv4 unicast autonomous-system 100
network 10.0.0.0 0.255.255.255
eigrp stub connected summary
af-interface GigabitEthernet0/0
hello-interval 5
show ip eigrp topology
show ip route eigrpReferences (7)
- IP Routing Configuration Guide, Cisco IOS XE: EIGRP
- IP Routing: EIGRP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850)
- Troubleshoot EIGRP Common Issues, Cisco IOS: Metrics and K-values
- IP Routing Configuration Guide, Cisco IOS XE 17.x: IPv6 Routing, EIGRP Support
- Troubleshooting EIGRP, Cisco IOS
- Cisco IOS IP Routing: EIGRP Command Reference, ip summary-address eigrp
- IP Routing Configuration Guide, Cisco IOS XE 17.x: IPv6 Routing: OSPFv3
Check your understanding
IP routing basics: the routing table, static routes, RIP and EIGRP (CCNA and CCNP)
All 4 sections ยท no timer
Unlimited retries
Questions from every section are combined into one assessment. Answer them all correctly to complete the article.
Your completion saves in this browser. Sign in to sync it to your account.