NetworkingCCNA

Static Routing and Administrative Distance Explained for CCNA

Before a router can forward a packet somewhere, it needs to know how to get there. Static routes give it that knowledge explicitly, one network at a time, configured by a human. Dynamic routing protocols like OSPF automate this by sharing route information between routers, but static routes still matter for small networks, specific traffic engineering needs, and as a failover option when dynamic protocols are not configured. Administrative Distance is the tiebreaker when a router learns about the same destination from multiple sources. Understanding both is essential for CCNA troubleshooting and design questions.

7 min
3 sections · 5 exam key points
5 practice questions

Static routes and how routers forward packets

A routing table tells a router where to send packets destined for networks it does not directly connect to. A static route adds a line to that table manually. The configuration specifies a destination network and either the next-hop IP address (the upstream router's IP) or the outgoing interface. The router forwards any packet matching that destination out toward that next hop or interface.

The default route, written as 0.0.0.0/0 in IPv4 or ::/0 in IPv6, matches any destination not covered by a more specific route. Configuring a default route on a router tells it where to send unknown traffic. A router without a default route and without a specific route to the destination will drop the packet and send an ICMP Destination Unreachable message back to the sender.

Longest prefix match is how routers choose between overlapping routes. If a routing table has entries for 10.0.0.0/8 and 10.1.0.0/16, a packet destined for 10.1.2.3 matches both. The router uses the /16 route because it is more specific. More specific always wins over less specific, regardless of which routing protocol installed the route.

Administrative Distance

Administrative Distance (AD) is a number assigned to each routing information source that tells the router how much to trust it. When two routing protocols both know a route to the same destination, the route with the lower AD wins and is installed in the routing table. AD is not a metric: it does not measure the quality of the path to the destination, only the trustworthiness of the source.

Key AD values to memorize: Directly connected networks = 0. Static routes = 1. EIGRP = 90. OSPF = 110. RIP = 120. External EIGRP = 170. Unknown = 255 (never used).

A floating static route is a static route configured with a higher AD than the dynamic protocol providing the same route. Normally the dynamic route wins and the static route stays out of the routing table. If the dynamic route disappears because the routing protocol fails, the floating static route becomes active as a backup. This is a common exam design question.

How to choose the correct answer

Route selection priority: lowest AD wins between different sources. If AD is equal, lowest metric wins within a protocol. Longest prefix match happens before considering AD or metric.

Static route next-hop: use the next-hop IP if you want the route to stay active only while the next hop is reachable (recursive lookup). Use the exit interface if you want it always present regardless.

Floating static route: set AD higher than the dynamic protocol. If OSPF (AD 110) provides the route, set the floating static to AD 115. When OSPF loses the route, the static at 115 becomes active.

Default route on a stub router: ip route 0.0.0.0 0.0.0.0 [next-hop or interface]. Forwards everything unknown toward the upstream router.

Administrative Distance values

SourceAdministrative Distance
Directly connected0
Static route1
EIGRP (internal)90
OSPF110
IS-IS115
RIP120
EIGRP (external)170
Unusable / unknown255

Key exam facts — CCNA

  • AD: lower = more trusted. Directly connected = 0. Static = 1. OSPF = 110. RIP = 120.
  • Longest prefix match: most specific route wins regardless of AD or metric.
  • Default route: 0.0.0.0/0 matches any destination not in the routing table.
  • Floating static route: higher AD than dynamic protocol, used as backup when dynamic route fails.
  • AD compares routing sources. Metric compares paths within the same routing protocol.

Common exam traps

A lower metric always means the route is preferred over another route.

Metric is only compared between routes from the same routing protocol. Administrative Distance determines which protocol's routes are preferred when two protocols both have a route to the same destination. Longest prefix match happens before either AD or metric is considered.

Static routes are more reliable than OSPF routes because they have lower AD.

Lower AD means the router trusts the source more, not that the path is better. Static routes have AD 1 because the administrator configured them deliberately. But a static route pointing to a dead next hop stays in the routing table until manually removed. OSPF dynamically removes routes when links fail.

A router without a default route will ask another router where to send unknown packets.

Routers do not ask other routers for help with unknown destinations. Without a matching route, the router drops the packet and sends an ICMP Destination Unreachable message back to the source. A default route is the correct solution for handling unknown destinations.

Practice questions — Static Routing & AD

These questions are representative of what you will see on CCNA exams. The correct answer and explanation are shown immediately below each question.

Q1.A router has both an OSPF route and a static route to the 10.1.1.0/24 network. Which route is installed in the routing table?

A.OSPF route, because dynamic routes are always preferred
B.Static route, because it has a lower Administrative Distance (AD) of 1 vs OSPF's 110
C.Both routes are installed and traffic is load-balanced
D.The route with the lower metric is installed regardless of AD

Explanation: Administrative Distance determines which routing source is trusted when multiple sources know a route to the same destination. Static routes have AD 1, OSPF has AD 110. Lower AD wins. The static route is installed in the routing table and OSPF's route is not used (it exists in OSPF's database but not the routing table). AD is compared before metric — metric only compares paths within the same protocol.

Q2.A packet destined for 10.1.2.5 arrives at a router. The routing table contains: 10.0.0.0/8 via OSPF, 10.1.0.0/16 via EIGRP, and 10.1.2.0/24 via RIP. Which route is used?

A.10.0.0.0/8 because OSPF has the lowest AD (110)
B.10.1.2.0/24 because it is the longest (most specific) prefix match
C.10.1.0.0/16 because EIGRP has lower AD than RIP
D.Traffic is load-balanced across all three routes

Explanation: Longest prefix match is evaluated BEFORE Administrative Distance or metric. All three routes match the destination 10.1.2.5, but /24 is more specific than /16, which is more specific than /8. The /24 route (10.1.2.0/24) wins regardless of which routing protocol installed it.

Q3.An engineer configures a static route: 'ip route 0.0.0.0 0.0.0.0 192.168.1.1'. What is the purpose of this route?

A.It matches traffic destined for the 0.0.0.0 network only
B.It is a default route that forwards all unmatched traffic to 192.168.1.1
C.It blocks all traffic from the 0.0.0.0 subnet
D.It creates a loop between this router and 192.168.1.1

Explanation: 0.0.0.0/0 is the default route (also called the gateway of last resort). It matches any destination IP address not covered by a more specific route in the routing table. Any packet for which no specific route exists is forwarded to the next-hop 192.168.1.1. This is typically configured on edge routers pointing toward an ISP.

Q4.A network engineer wants OSPF to be the primary routing protocol for all networks, but wants a static route to serve as a backup if OSPF loses the route to 172.16.0.0/16. How should the static route be configured?

A.'ip route 172.16.0.0 255.255.0.0 [next-hop]' with default AD of 1 — this overrides OSPF
B.'ip route 172.16.0.0 255.255.0.0 [next-hop] 115' as a floating static route with AD higher than OSPF's 110
C.'ip route 172.16.0.0 255.255.0.0 [next-hop] 1' with the lowest possible AD
D.Configure two routes with equal AD and use load balancing

Explanation: A floating static route has its AD manually set higher than the dynamic protocol. Since OSPF has AD 110, setting the static route to AD 115 means OSPF's route is preferred when available. When OSPF loses the route (link failure), the static route at AD 115 becomes the only option and is installed. The syntax is 'ip route [network] [mask] [next-hop] [AD]'.

Q5.What is the Administrative Distance of a directly connected network on a Cisco router?

A.0
B.1
C.5
D.100

Explanation: Directly connected networks have an AD of 0 — the most trusted possible source because the router itself is physically connected to that network. Static routes have AD 1. EIGRP is 90, OSPF is 110, RIP is 120. An AD of 255 means the route is unreachable and is never installed in the routing table.

Frequently asked questions — Static Routing & AD

What is Administrative Distance and why does it matter?

Administrative Distance (AD) is a number (0-255) that represents how trustworthy a routing information source is. When multiple routing protocols (or static routes) all know a route to the same destination, the router uses the source with the lowest AD. Key values: Directly connected = 0, Static = 1, EIGRP = 90, OSPF = 110, RIP = 120. AD is not a path quality metric — it's a source trust level. Metric compares paths within the same protocol.

What is a floating static route?

A floating static route is a static route configured with a higher AD than the dynamic routing protocol providing the same route. Normally the dynamic route wins and the static route stays out of the routing table (it 'floats'). If the dynamic protocol fails and the route disappears, the floating static becomes active automatically as a backup. Example: if OSPF provides a route (AD 110), configure the floating static with AD 115.

What is the default route and when is it used?

The default route (0.0.0.0/0 in IPv4, ::/0 in IPv6) matches any destination not covered by a more specific route — it's the 'catch-all' route. Without a default route, a router drops packets for unknown destinations and sends an ICMP Unreachable message back. Typically configured on edge routers pointing toward an ISP, or on any router that should forward unknown traffic to a hub router.

What is longest prefix match in routing?

Longest prefix match means the router uses the most specific route that matches the destination IP address. /24 is more specific than /16, which is more specific than /8, which is more specific than /0. Longest prefix match is evaluated BEFORE Administrative Distance or metric — even if a less specific route was installed by a more trusted source, the most specific matching route always wins.

How is static routing and administrative distance tested on CCNA?

CCNA tests AD values for common routing protocols (memorize: directly connected=0, static=1, EIGRP=90, OSPF=110, RIP=120), floating static route configuration (higher AD than the dynamic protocol), default route configuration (0.0.0.0/0), longest prefix match for route selection, and troubleshooting scenarios where the wrong route is being used due to AD or prefix length issues.

Practice this topic

Test yourself on Static Routing & AD

JT Exams routes you to questions in your exact weak areas — automatically, after every session.

No credit card · Cancel anytime

Related certification topics