Chapter 8
Configuring Static Routing
S e n d d o c u m e n t c o m m e n t s t o n e x u s 3 k - d o c f e e d b a c k @ c i s c o . c o m
Command
Step 3
show ip static-route
Example:
switch(config)# show ip static-route
Step 4
copy running-config startup-config
Example:
switch(config)# copy running-config
startup-config
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.
2.
3.
4.
5.
DETAILED STEPS
Command
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Step 2
vrf context vrf-name
Example:
switch(config)# vrf context StaticVrf
Step 3
ip route { ip-prefix | ip-addr ip-mask }
{ next-hop | nh-prefix | interface } [tag
t ag-value [ pref ]
Example:
switch(config-vrf)# ip route 192.0.2.0/8
ethernet 1/2
configure terminal
vrf context vrf-name
ip route {ip-prefix | ip-addr ip-mask} {next-hop | nh-prefix | interface} [tag tag-value [pref]
(Optional) show ip static-route vrf vrf-name
(Optional) copy running-config startup-config
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, NX-OS Release 5.0(3)U1(1)
Purpose
(Optional) Displays information about static routes.
(Optional) Saves this configuration change.
Purpose
Enters configuration mode.
Creates a VRF and enters VRF configuration mode.
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.
Configuring Static Routing
8-5