Send document comments to nexus3k-docfeedback@cisco.com
9-7
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, NX-OS Release5.0(3)U1(1)
Chapter 9 Configuring Layer 3 Virtualization
Configuring VRFs
DETAILED STEPS
Use the no vrf context command to delete the VRF and the associated configuration:
Any commands available in global configuration mode are also available in VRF configuration mode.
This example shows how to create a VRF and add a static route to the VRF:
switch# configure terminal
switch(config)# vrf context Enterprise
switch(config-vrf)# ip route 192.0.2.0/8 ethernet 1/2
switch(config-vrf)# exit
switch(config)# copy running-config startup-config
Assigning VRF Membership to an Interface
You can make an interface a member of a VRF.
Command Purpose
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Enters configuration mode.
Step 2
vrf context
name
Example:
switch(config)# vrf definition
Enterprise
switch(config-vrf)#
Creates a new VRF and enters VRF configuration
mode. The name can be any case-sensitive,
alphanumeric string up to 32 characters.
Step 3
ip route {
ip-prefix
|
ip-addr
ip-mask
}
{[
next-hop
|
nh-prefix
] | [
interface
next-hop
|
nh-prefix
]} [tag
tag-value
[
pref
]
Example:
switch(config-vrf)# ip route 192.0.2.0/8
ethernet 1/2 192.0.2.4
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.
Step 4
show vrf [
vrf-name
]
Example:
switch(config-vrf)# show vrf Enterprise
(Optional) Displays VRF information.
Step 5
copy running-config startup-config
Example:
switch(config)# copy running-config
startup-config
(Optional) Saves this configuration change.
Command Purpose
no vrf context
name
Example:
switch(config)# no vrf context Enterprise
Deletes the VRF and all associated configuration.