Usage Guidelines
Use a static route when the Cisco IOS software cannot dynamically build a route to the destination.
If you specify an administrative distance when you set up a route, you are flagging a static route that can be overridden
by dynamic information. For example, Interior Gateway Routing Protocol (IGRP)-derived routes have a default administrative
distance of 100. To set a static route to be overridden by an IGRP dynamic route, specify an administrative distance greater
than 100. Static routes each have a default administrative distance of 1.
Static routes that point to an interface are advertised through the Routing Information Protocol (RIP), IGRP, and other
dynamic routing protocols, regardless of whether the routes are redistributed into those routing protocols. That is, static
routes configured by specifying an interface lose their static nature when installed into the routing table.
However, if you define a static route to an interface not defined in a network command, no dynamic routing protocols advertise
the route unless a redistribute static command is specified for these protocols.
Supported Static Route Configurations
When you configure static routes in a Multiprotocol Label Switching (MPLS) or MPLS VPN environment, note that some variations
of the ip route and ip route vrf commands are not supported. These variations of the commands are not supported in Cisco IOS releases that support the Tag
Forwarding Information Base (TFIB), specifically Cisco IOS releases 12.x
T, 12.x
M, and 12.0S. The TFIB cannot resolve prefixes when the recursive route over which the prefixes travel disappears and then
reappears. However, the command variations are supported in Cisco IOS releases that support the MPLS Forwarding Infrastructure
(MFI), specifically Cisco IOS release 12.2(25)S and later releases. Use the following guidelines when configuring static routes.
Supported Static Routes in an MPLS Environment
The following ip route command is supported when you configure static routes in an MPLS environment:
ip
route
destination-prefix
mask
interface
next-hop-address
The following ip route commands are supported when you configure static routes in an MPLS environment and configure load sharing with static nonrecursive
routes and a specific outbound interface:
ip
route
destination-prefix
mask
interface1
next-hop1
ip
route
destination-prefix
mask
interface2
next-hop2
Unsupported Static Routes in an MPLS Environment That Uses the TFIB
The following ip route command is not supported when you configure static routes in an MPLS environment:
ip
route
destination-prefix
mask
next-hop-address
The following ip route command is not supported when you configure static routes in an MPLS environment and enable load sharing where the next hop
can be reached through two paths:
ip
route
destination-prefix
mask
next-hop-address
The following ip route command is not supported when you configure static routes in an MPLS environment and enable load sharing where the destination
can be reached through two next hops:
ip
route
destination-prefix
mask
next-hop1
ip
route
destination-prefix
mask
next-hop2
Use the interface and next-hop arguments when specifying static routes.
Supported Static Routes in an MPLS VPN Environment
The following ip route vrf commands are supported when you configure static routes in an MPLS VPN environment, and the next hop and interface are in
the same VRF:
-
-
ip
route
vrf
vrf-name
destination-prefix
mask
next-hop-address
-
ip
route
vrf
vrf-name
destination-prefix
mask
interface
next-hop-address
-
ip
route
vrf
vrf-name
destination-prefix
mask
interface1
next-hop1
ip
route
vrf
vrf-name
destination-prefix
ma
sk
interface2
next-hop2
The following ip route vrf commands are supported when you configure static routes in an MPLS VPN environment, and the next hop is in the global table
in the MPLS cloud in the global routing table. For example, these commands are supported when the next hop is pointing to
the Internet gateway.
-
-
ip
route
vrf
vrf-name
destination-prefix
mask
next-hop-address
global
-
ip
route
vrf
vrf-name
destination-prefix
mask
interface
next-hop-address
(This command is supported when the next hop and interface are in the core.)
The following ip route commands are supported when you configure static routes in an MPLS VPN environment and enable load sharing with static nonrecursive
routes and a specific outbound interface:
ip
route
destination-prefix
mask
interface1
next-hop1
ip
route
destination-prefix
mask
interface2
next-hop2
Unsupported Static Routes in an MPLS VPN Environment That Uses the TFIB
The following ip route command is not supported when you configure static routes in an MPLS VPN environment, the next hop is in the global table
in the MPLS cloud within the core, and you enable load sharing where the next hop can be reached through two paths:
ip
route
vrf
destination-prefix
mask
next-hop-address
global
The following ip route commands are not supported when you configure static routes in an MPLS VPN environment, the next hop is in the global table
in the MPLS cloud within the core, and you enable load sharing where the destination can be reached through two next hops:
ip
route
vrf
destination-prefix
mask
next-hop1
global
ip
route
vrf
destination-prefix
mask
next-hop2
global
The following ip route vrf commands are not supported when you configure static routes in an MPLS VPN environment, and the next hop and interface are
in the same VRF:
ip
route
vrf
vrf-name
destination-prefix
mask
next-hop1
ip
route
vrf
vrf-name
destination-prefix
mask
next-hop2
Supported Static Routes in an MPLS VPN Environment Where the Next Hop Resides in the Global Table on the CE Router
The following ip route vrf command is supported when you configure static routes in an MPLS VPN environment, and the next hop is in the global table
on the customer equipment (CE) side. For example, the following command is supported when the destination prefix is the CE
router’s loopback address, as in external BGP (EBGP) multihop cases.
ip
route
vrf
vrf-name
destination-prefix
mask
interface
next-hop-address
The following ip route commands are supported when you configure static routes in an MPLS VPN environment, the next hop is in the global table on
the CE side, and you enable load sharing with static nonrecursive routes and a specific outbound interfaces:
ip
route
destination-prefix
mask
interface1
nexthop1
ip
route
destination-prefix
mask
interface2
nexthop2