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.