# How do you configure and verify default, network, and host static routes in Cisco IOS XE?

Exam: 200-301 — Implementing and Administering Cisco Solutions
Knowledge domain: IP Connectivity
Updated: 2026-11-25T05:30:53.501749+00:00
HTML: https://learningpathx.com/faq/200-301/ccna200301-ipv4-ipv6-static-routes.html

## Also asked as

- What are examples of IPv4 and IPv6 default, network, and host static routes on Cisco IOS XE?
- How can I set and check three different static route prefix lengths on Cisco IOS XE?

Use `ip route` with a destination and dotted-decimal mask for IPv4, and `ipv6 route` with an address and prefix length for IPv6\. The destination prefix determines how much of the address must match. A default route uses length zero, a network route names a subnet, and a host route has length 32 for IPv4 or 128 for IPv6.

These Cisco IOS XE 17.15.x examples assume a Catalyst 9300 with routing enabled, `ipv6 unicast-routing` enabled for IPv6, operational Layer 3 interfaces for both address families, and the given next hops reachable on the lab transit links. With those prerequisites in place, enter the routes in global configuration mode using addresses that match your lab topology.

```text
ip route 0.0.0.0 0.0.0.0 192.0.2.1
ip route 198.51.100.0 255.255.255.0 192.0.2.1
ip route 203.0.113.9 255.255.255.255 192.0.2.1
ipv6 route ::/0 2001:db8:1::1
ipv6 route 2001:db8:2::/64 2001:db8:1::1
ipv6 route 2001:db8:3::9/128 2001:db8:1::1
```

On Ethernet, specify the next-hop address. An interface-only IPv4 route can cause the router to try to resolve every covered destination as on-link. An adjacent IPv6 link-local next hop also requires the exit interface, for example `ipv6 route 2001:db8:2::/64 GigabitEthernet1/0/1 fe80::1`. Verify the installed choice for a test destination with `show ip route 203.0.113.9` or `show ipv6 route 2001:db8:3::9`, then confirm the next hop and end-to-end reachability from the intended source. IOS, IOS XE, and Packet Tracer images can differ in supported command forms and interface names.

### References

* [Catalyst 9300 IPv4 routing, IOS XE 17.15.x](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-15/configuration_guide/rtng/b_1715_rtng_9300_cg/configuring_ip_unicast_routing.html)
* [Catalyst 9300 IPv6 unicast and static routing](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-15/configuration_guide/rtng/b_1715_rtng_9300_cg/configuring_ipv6_unicast_routing.html)
* [Cisco static route next-hop and floating-route behavior](https://www.cisco.com/c/en/us/support/docs/dial-access/floating-static-route/118263-technote-nexthop-00.html)
* [Cisco IOS XE IPv4 and IPv6 routing-table display commands](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_pi/command/iri-cr-book/iri-cr-s1.html)

Source: [Routing Tables, Forwarding Decisions, and Static Routes](https://learningpathx.com/news/routing-tables-forwarding-decisions-and-static-routes.html)
