Introduction
Static routing allows an administrator to manually define paths to destination networks. Static routes are useful in small networks, stub networks, backup paths, and situations where predictable routing is required.
Learning Goals
By the end of this module, you should be able to:
- Describe different types of static routes.
- Configure IPv4 and IPv6 static routes.
- Compare next-hop, directly connected, and fully specified static routes.
- Configure default static routes.
- Configure floating static routes.
- Configure static host routes.
- Verify static route operation.
Types of Static Routes
Common static route types include:
- Standard static route: route to a specific remote network.
- Default static route: route used when no more specific route matches.
- Floating static route: backup route with a higher administrative distance.
- Static host route: route to one specific host address.
- Summary static route: route that represents multiple networks with one entry.
Next-Hop Options
A static route can identify the path in different ways:
- Next-hop route: specifies the next router IP address.
- Directly connected route: specifies the exit interface.
- Fully specified route: specifies both exit interface and next-hop address.
On multiaccess networks such as Ethernet, a fully specified static route can reduce ambiguity because the router knows both the outgoing interface and the next-hop address.
IPv4 and IPv6 Static Route Commands
IPv4 syntax:
ip route destination-network subnet-mask {next-hop-ip | exit-interface} [administrative-distance]
IPv6 syntax:
ipv6 route destination-prefix/prefix-length {next-hop-ipv6 | exit-interface} [administrative-distance]
IPv6 routing must be enabled on the router with ipv6 unicast-routing for IPv6 forwarding.
Activity: Configure IPv4 Next-Hop Static Routes
Activity: Configure IPv6 Next-Hop Static Routes
Directly Connected Static Routes
A directly connected static route uses only the exit interface. This can work well on point-to-point links. On Ethernet links, it may cause extra address resolution behavior because many devices can exist on the same segment.
Activity: Configure Directly Connected Static Routes
Fully Specified Static Routes
A fully specified static route includes both the exit interface and the next-hop address. This is especially useful on Ethernet links.
Activity: Configure Fully Specified Static Routes
Verify a Static Route
A configured static route should appear in the routing table if the next hop or exit interface is reachable.
Activity: Static Route Verification
Default Static Routes
A default static route is used when no more specific route exists. It is commonly configured on edge routers or stub routers.
IPv4 default route:
ip route 0.0.0.0 0.0.0.0 next-hop-ip
IPv6 default route:
ipv6 route ::/0 next-hop-ipv6
Activity: Configure Default Static Routes
Floating Static Routes
A floating static route is a backup route. It has a higher administrative distance than the primary route, so it is used only if the preferred route disappears from the routing table.
Activity: Configure a Floating Static Route
Host Routes
A host route points to one exact host. In IPv4, host routes use a /32 mask. In IPv6, host routes use /128.
Routers may automatically install local host routes for their own interface addresses. Administrators can also configure static host routes for specific devices.
Activity: Configure Static Host Routes
IPv6 Static Route with Link-Local Next Hop
IPv6 link-local addresses are only unique on a local link. When using a link-local address as the next hop, specify the exit interface so the router knows which link the address belongs to.
Activity: Configure IPv6 Route Using Link-Local Next Hop
Static Routing Troubleshooting
Check these items when a static route fails:
- Is the destination network and mask/prefix correct?
- Is the next-hop address reachable?
- Is the exit interface up/up?
- Is IPv6 unicast routing enabled for IPv6 routes?
- Is a more specific route overriding the expected route?
- Is the return path configured on the remote router?
- Are ACLs or firewalls blocking tests?
Activity: End-to-End Static Routing Lab
Summary
Static routes manually define paths through the network. They can point to a next hop, an exit interface, or both. Default routes handle unknown destinations, floating static routes provide backups, and host routes target individual devices.