Creating an IP Static Route in a Non-Default VRF
You can configure an IP static route in a non-default VRF. If the VRF is not named,
the default VRF is used.
To create an IP static route with a next hop in a non-default VRF, follow these steps.
- Enter global configuration mode.
- Enter the
ip routecommand followed by the keyword vrf and the VRF name. On the same command line, enter the destination IP address, followed by the prefix-length or the address mask and then the IP address of the next hop.This example configures an IP static route through the non-default VRF "blue" with the next-hop address 10.1.1.1.
The following example configures a static route with a destination address 56.1.5.0/24. The route is configured in the non-default VRF "red" and uses tunnel 5 as the next-hop gateway.
device# configure terminal device(config)# ip route vrf red 56.1.5.0/24 tunnel 5
Note: When a tunnel is designated as the next-hop gateway for a non-default VRF destination,
the tunnel must already exist before the static route can be created.