3.3 IPv4 and IPv6 Static Routing
Key Takeaways
- Static routes are manually configured and have an AD of 1 by default.
- A default static route (0.0.0.0/0) is the gateway of last resort—matches all destinations.
- A floating static route uses a higher AD to serve as a backup when a dynamic route is preferred.
- A host route (/32 for IPv4, /128 for IPv6) matches a single specific IP address.
- IPv6 static routes use the link-local address of the next hop (not the global unicast address).
IPv4 and IPv6 Static Routing
Static routes are manually configured routes that tell the router exactly where to send traffic for specific destinations. They do not change automatically—if the network topology changes, an administrator must update the static routes.
When to Use Static Routes
| Scenario | Why Static? |
|---|---|
| Small networks | Simple, no protocol overhead |
| Default route to ISP | Only one exit point, no need for dynamic routing |
| Stub networks | Networks with only one way in/out |
| Backup routes | Floating static routes as failover |
| Specific host routes | Direct path to a critical server |
IPv4 Static Route Configuration
Basic Syntax
Router(config)# ip route <destination-network> <subnet-mask> <next-hop-ip | exit-interface> [AD]
Static Route Types
Network Route
Routes to a specific subnet:
Router(config)# ip route 192.168.20.0 255.255.255.0 10.0.0.2
This tells the router: "To reach 192.168.20.0/24, send packets to next-hop 10.0.0.2."
Default Route
Routes ALL traffic that doesn't match a more specific route:
Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1
This sets 10.0.0.1 as the gateway of last resort. The /0 prefix means "match everything."
Host Route
Routes to a single specific IP address (/32):
Router(config)# ip route 192.168.20.100 255.255.255.255 10.0.0.2
Used for traffic to a specific server or device.
Floating Static Route
A backup route with a higher AD than the primary route:
Router(config)# ip route 192.168.20.0 255.255.255.0 10.0.1.2 200
The "200" at the end sets the AD to 200. If OSPF (AD 110) has a route to 192.168.20.0/24, the OSPF route is preferred. If OSPF loses the route, the floating static route (AD 200) takes over.
Next-Hop Options
| Option | Example | Behavior |
|---|---|---|
| Next-hop IP | ip route 10.1.0.0 255.255.0.0 10.0.0.2 | Recursive lookup—router finds exit interface for 10.0.0.2 |
| Exit interface | ip route 10.1.0.0 255.255.0.0 Gi0/0 | Directly connected—sends ARP for destination on Gi0/0 |
| Both | ip route 10.1.0.0 255.255.0.0 Gi0/0 10.0.0.2 | Fully specified—best practice for Ethernet links |
On the Exam: For point-to-point links (serial), using exit interface alone works fine. For multi-access networks (Ethernet), always use a next-hop IP (or both next-hop IP and exit interface) to avoid unnecessary ARP broadcasts.
IPv6 Static Route Configuration
Basic Syntax
Router(config)# ipv6 route <destination-prefix/prefix-length> <next-hop | exit-interface> [AD]
IPv6 Static Route Examples
! Network route
Router(config)# ipv6 route 2001:DB8:2::/64 2001:DB8:1::2
! Default route
Router(config)# ipv6 route ::/0 2001:DB8:1::1
! Using link-local next-hop (requires exit interface)
Router(config)# ipv6 route 2001:DB8:2::/64 GigabitEthernet0/0 FE80::2
! Floating static route (AD 200)
Router(config)# ipv6 route 2001:DB8:2::/64 2001:DB8:1::2 200
Important: When using a link-local address as the next hop in IPv6, you must also specify the exit interface. This is because link-local addresses are not unique—the same FE80:: address could exist on multiple interfaces.
Verification Commands
! IPv4
Router# show ip route
Router# show ip route static
Router# show ip route 192.168.20.0
! IPv6
Router# show ipv6 route
Router# show ipv6 route static
Static Route Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Route not in table | Next-hop is unreachable | Verify next-hop connectivity (ping) |
| Route in table but traffic fails | Next-hop router doesn't have a return route | Configure return route on the remote router |
| Floating static not activating | Primary route still exists | Verify primary route has been withdrawn |
| Incorrect forwarding | Wrong next-hop or wrong mask | Verify with show ip route and correct the entry |
What command configures a default static route on a Cisco router?
What is a floating static route?
When configuring an IPv6 static route with a link-local next-hop address, what additional parameter is required?