Cisco Systems OL-14356-01 Network Router User Manual


 
Implementing Static Routes on Cisco IOS XR Software
Configuration Examples
RC-432
Cisco IOS XR Routing Configuration Guide
OL-14356-01
Configuration Examples
This section provides the following configuration examples:
Configuring Traffic Discard: Example
Configuring a Fixed Default Route: Example
Configuring a Floating Static Route: Example
Configuring a Static Route Between PE-CE Routers: Example
Configuring Traffic Discard: Example
Configuring a static route to point at interface null 0 may be used for discarding traffic to a particular
prefix. For example, if it is required to discard all traffic to prefix 2001:0DB8:42:1/64, the following
static route would be defined:
configure
router static
address-family ipv6 unicast
2001:0DB8:42:1::/64 null 0
end
Configuring a Fixed Default Route: Example
A default static route is often used in simple router topologies. In the following example, a route is
configured with an administrative distance of 110.
configure
router static
address-family ipv4 unicast
0.0.0.0/0 2.6.0.1 110
end
Configuring a Floating Static Route: Example
A floating static route is often used to provide a backup path if connectivity fails. In the following
example, a route is configured with an administrative distance of 201.
configure
router static
address-family ipv6 unicast
2001:0DB8::/32 2001:0DB8:3000::1 201
end
Configuring a Static Route Between PE-CE Routers: Example
In the following example, a static route between PE and CE routers is configured, and a VRF is
associated with the static route:
configure
router static
vrf vrf_A
address-family ipv4 unicast