Interface type | Description |
---|---|
Physical interface |
|
Virtual interface |
The interface for the next hop must have at least one IP address configured on it. The address does not need to be in the same subnet as the destination network. |
VRF |
|
device# configure terminal
device(config)# ip route 10.128.2.69/24 ethernet 1/4
device(config)# ip route 10.128.2.0/24 ve 3
device(config)# ip route 10.0.0.0/24 next-hop-vrf red ethernet 1/1
This example configures an IP static route to destination network addresses beginning with 10.0.0.0 through the next-hop interface 2/1.
device(config)# ip route 10.0.0.0/24 ethernet 2/1
This example configures an IP static route with a destination address of 10.128.2.0, a prefix-length of /24, and a virtual interface (ve 3) as the next hop.
device(config)# ip route 10.128.2.0/24 ve 3
This example routes traffic for IP address 10.0.0.0/24 through VRF red over IP address 11.1.2.3.
device(config)# ip route 10.0.0.0/24 next-hop-vrf red 11.1.2.3
device(config)# ip route 10.0.0.0/24 next-hop-vrf red ve 3
This example discards the traffic for IP address 10.0.0.0/24 through VRF red using a null route.
device(config)# ip route 10.0.0.0/24 next-hop-vrf red null 0