Specifications
Send document comments to nexus3k-docfeedback@cisco.com.
10-5
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, Release 5.0(3)U2(2)
OL-25782-02
Chapter 10 Configuring Static Routing
Configuring Static Routing
This example shows how to configure a static route:
switch# configure terminal
switch(config)# ip route 192.0.2.0/8 192.0.2.10
switch(config)# copy running-config startup-config
Use the no ip static-route command to remove the static route.
Configuring Virtualization
You can configure a static route in a VRF.
SUMMARY STEPS
1. configure terminal
2. vrf context vrf-name
3. ip route {ip-prefix | ip-addr ip-mask} {next-hop | nh-prefix | interface} [tag tag-value [pref]
4. (Optional) show ip static-route vrf vrf-name
5. (Optional) copy running-config startup-config
DETAILED STEPS
Step 3
show ip static-route
Example:
switch(config)# show ip static-route
(Optional) Displays information about static routes.
Step 4
copy running-config startup-config
Example:
switch(config)# copy running-config
startup-config
(Optional) Saves this configuration change.
Command Purpose
Command Purpose
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Enters configuration mode.
Step 2
vrf context vrf-name
Example:
switch(config)# vrf context StaticVrf
Creates a VRF and enters VRF configuration mode.
Step 3
ip route {ip-prefix | ip-addr ip-mask}
{next-hop | nh-prefix | interface} [tag
tag-value [pref]
Example:
switch(config-vrf)# ip route 192.0.2.0/8
ethernet 1/2
Configures a static route and the interface for this
static route. You can optionally configure the next-hop
address. The preference value sets the administrative
distance. The range is from 1 to 255. The default is 1.