RoutingGlobal Config

ip route [net] [mask] [hop] [ad]

Configures a static route with an administrative distance to create a floating static route that serves as a backup when the primary dynamic route fails.

Syntax·Global Config
ip route [net] [mask] [hop] [ad]

When to Use This Command

  • Backup WAN link: Configure a floating static route via a secondary ISP with higher AD so it only appears in the routing table when the primary OSPF/EIGRP route goes down.
  • Dual-homed branch office: Use floating static routes to provide failover between two connections to different providers.
  • Load balancing with preference: Set a floating static route with AD 200 to act as a last-resort backup for a dynamic routing protocol.
  • Testing redundancy: Temporarily add a floating static route to verify failover behavior without removing the primary route.

Command Examples

Floating static route as backup for OSPF

ip route 10.0.0.0 255.255.255.0 192.168.2.1 200

This command adds a static route to network 10.0.0.0/24 via next-hop 192.168.2.1 with an administrative distance of 200. Since OSPF has a default AD of 110, this route will only be used if the OSPF route disappears.

Floating default route for backup internet

ip route 0.0.0.0 0.0.0.0 10.0.0.1 200

Creates a floating default route via 10.0.0.1 with AD 200. This will only be used if the primary default route (e.g., from DHCP or a lower AD static route) is removed.

Understanding the Output

The 'ip route' command itself does not produce output; it configures the route in the running configuration. To verify, use 'show ip route' or 'show running-config | include ip route'. In 'show ip route', floating static routes appear only when the primary route is absent. Look for the route with the higher AD (e.g., 200) in the routing table. If the primary route is present, the floating route will not be listed. A successful failover shows the floating route with its AD, and the next-hop should be reachable. Watch for routes that unexpectedly appear or disappear, indicating network instability.

CCNA Exam Tips

1.

CCNA exam tip: Floating static routes use a higher AD than the primary dynamic protocol; default ADs: OSPF 110, EIGRP 90/170, static 1, floating static > 1.

2.

CCNA exam tip: The AD must be higher than the primary route's AD but lower than 255 (unreachable). Common values: 200 for backup.

3.

CCNA exam tip: Exam may ask which route is preferred when multiple routes exist; the lowest AD wins.

4.

CCNA exam tip: Floating static routes are not redistributed into dynamic protocols by default; you must configure redistribution if needed.

Common Mistakes

Mistake 1: Setting AD too low (e.g., 100) causing the static route to override OSPF (AD 110) unintentionally.

Mistake 2: Forgetting to specify the next-hop IP or exit interface, leading to an incomplete route.

Mistake 3: Using the same AD as the primary route, causing equal-cost load balancing instead of failover.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions