Static Routing, OSPFv2 & First Hop Redundancy

CCNA 200-301 · IP Connectivity

By Abu Anns · Last updated 20 November 2026Exam version: 200-301 v1.1 (current until 2 Feb 2027)

Static routing and OSPF are the two ways the CCNA expects you to fill a routing table, and the exam tests them very differently. Static routes are tested as configuration — can you write the command, with the right next hop, for a default route, a network route, a host route, or a floating static route? OSPF is tested as understanding — can you explain how neighbours become adjacent, how the DR and BDR are elected, and how cost is calculated? This guide covers both, plus the first hop redundancy protocols that keep a network's default gateway alive when a router fails.

Static routing

A static route is a route you configure by hand. The command is ip route [destination network] [mask] [next hop or exit interface]. A network route points to a whole subnet: ip route 10.1.1.0 255.255.255.0 192.168.1.2 sends traffic for the 10.1.1.0/24 network to the next-hop router at 192.168.1.2. A default route uses 0.0.0.0 for both the network and the mask: ip route 0.0.0.0 0.0.0.0 192.168.1.2 catches everything that matches no more specific route. A host route uses a /32 mask to point at a single device: ip route 10.1.1.5 255.255.255.255 192.168.1.2.

The next hop can be an IP address or an exit interface, and the choice matters. On a multi-access network such as Ethernet, use a next-hop IP address: if you use an exit interface, the router must send an ARP request for every destination address, which is inefficient. On a point-to-point link, an exit interface is fine, because there is only one possible neighbour. Static routes have an administrative distance of 1, so they beat every dynamically learned route to the same destination.

A floating static route is a static route with a deliberately raised administrative distance, so it stays out of the routing table while a better route exists and appears only when that route fails. The classic use is a backup path: if OSPF (AD 110) provides the primary route, a floating static route with AD 200 — ip route 10.1.1.0 255.255.255.0 192.168.2.2 200 — sits unused until the OSPF route disappears, at which point it is installed automatically. The exam tests this by asking which AD value makes a route float: the answer is always a value higher than the protocol it backs up. IPv6 static routes work the same way: ipv6 route 2001:db8:1::/64 2001:db8::2, with a default route of ipv6 route ::/0 2001:db8::2.

Single-area OSPFv2

OSPF (Open Shortest Path First) is a link-state routing protocol: each router builds a complete map of the network (the link-state database) and runs Dijkstra's shortest path algorithm to compute the best route to every destination. The CCNA covers single-area OSPFv2 — OSPF version 2, for IPv4, with all routers in area 0, the backbone area. OSPF's administrative distance is 110, and its metric is cost, calculated as the reference bandwidth divided by the interface bandwidth. The default reference bandwidth is 100 Mbps, so a 100 Mbps link has a cost of 1, a 10 Mbps link has a cost of 10, and a 1 Gbps link has a cost of 1 (costs are integers, with a minimum of 1). Because modern links are far faster than 100 Mbps, real networks raise the reference bandwidth with auto-cost reference-bandwidth so that a 10 Gbps link is preferred over a 1 Gbps link — with the default reference, both cost 1 and OSPF cannot tell them apart.

Before routers exchange routes, they must become neighbours. Two routers form an adjacency when they agree on the area number, the subnet, the hello and dead timers (hello 10 seconds, dead 40 seconds on broadcast and point-to-point networks), authentication settings, and stub-area flags, and when each has a unique router ID. The adjacency progresses through states — Down, Init, 2-Way, ExStart, Exchange, Loading, Full — and only in the Full state do routers exchange complete link-state information. The router ID is a 32-bit identifier chosen as the highest loopback IP address, or the highest active interface address if no loopback exists; best practice is to set it manually with the router-id command and use a loopback interface, so the ID never changes when a physical interface goes down.

On multi-access networks such as Ethernet, OSPF elects a designated router (DR) and a backup designated router (BDR) to reduce adjacency overhead: instead of every router forming adjacencies with every other router, all routers form adjacencies with the DR and BDR only. The election is won by the highest OSPF priority (default 1, set with ip ospf priority; a priority of 0 means the router never becomes DR or BDR), with the highest router ID breaking ties. On point-to-point links there is no election — the two routers simply become adjacent. The DR and BDR listen on the multicast address 224.0.0.6, while all OSPF routers listen on 224.0.0.5. Basic configuration is router ospf 1 followed by network 192.168.1.0 0.0.0.255 area 0 (note the wildcard mask), and passive-interface stops OSPF hellos on LAN interfaces that have no neighbours. Verify with show ip ospf neighbor, which shows the neighbour's state (Full is healthy), and show ip route ospf.

First hop redundancy protocols

A host's default gateway is a single point of failure: if its gateway router dies, the host loses all off-subnet connectivity. First hop redundancy protocols (FHRPs) solve this by letting two or more routers share a virtual IP address (and a virtual MAC address) that hosts use as their gateway. One router is active and forwards traffic; the others stand by, and if the active router fails, a standby takes over the virtual address within seconds — transparently to the hosts, which never change their gateway configuration.

HSRP (Hot Standby Router Protocol) is Cisco's proprietary FHRP: routers in a group elect an active router (highest priority, default 100; preemption lets a higher-priority router reclaim the role when it recovers) and a standby. VRRP (Virtual Router Redundancy Protocol) is the open-standard equivalent, working the same way with a master and backup routers. GLBP (Gateway Load Balancing Protocol) is Cisco's enhancement: instead of one active router and idle standbys, GLBP load-balances traffic across all routers in the group by having the active virtual gateway assign different virtual MAC addresses to different hosts. The exam tests the purpose of FHRPs and the differences between the three — remember that only GLBP load-balances, and only VRRP is an open standard.

Advertisement

Exam traps to watch for

Practice questions

Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.

Q1.Which command configures a default static route through the next-hop router at 192.168.1.2?

Report an error

Q2.An engineer wants a static route to 10.1.1.0/24 to act as a backup that is only used if the OSPF route to the same network fails. Which command achieves this?

Report an error

Q3.Two OSPF routers on the same Ethernet segment have priorities of 1 and 0. Which router can become the DR, and why?

Report an error

Q4.With the default OSPF reference bandwidth of 100 Mbps, what is the OSPF cost of a 10 Mbps link?

Report an error

Q5.Which two conditions must be true for two routers to form an OSPF adjacency? (Choose the best pair.)

Report an error

Q6.A router has a loopback interface with IP address 1.1.1.1 and physical interfaces with higher IP addresses. No router-id is configured manually. What is the OSPF router ID?

Report an error

Q7.Which multicast address do OSPF routers use to send hello packets to all other OSPF routers on a segment?

Report an error

Q8.What is the purpose of the passive-interface command in OSPF configuration?

Report an error

Q9.Which first hop redundancy protocol load-balances traffic across all routers in the group, rather than using one active router and idle standbys?

Report an error

Q10.A host uses 192.168.1.1 as its default gateway. That address is the virtual IP of an HSRP group, and the active router fails. What happens to the host's traffic?

Report an error