vrf attach

Syntax

vrf attach <VRF-NAME>

no vrf attach <VRF-NAME>

Description

Attaches the interface to the VRF with the name <VRF-NAME>. The command can be entered in several different command contexts.

CAUTION:

The no form of the command detaches the interface from the named VRF and will remove all configurations from the interface and attach the interface to the default VRF. A warning message is displayed that prompts you whether to proceed: All Layer 3 configurations associated with the VRF will be deleted. Continue (y/n)?

Command context

config-if

config-if-vlan

config-lag-if

config-gre-if

Parameters

<VRF-NAME>

Specifies the VRF name. Required. Length: Up to 32 alpha numeric characters.

Authority

Administrators

Examples

switch# configure terminal
switch(config)# interface 1/1/29
switch(config-if)# vrf attach test
switch# configure terminal
switch(config)# vlan 3
switch(config-vlan)# exit
switch(config)# interface vlan 3
switch(config-if-vlan)# vrf attach test
switch(config)# vrf test
switch(config)# interface lag 3
switch(config-lag-if)# no shutdown
switch(config-lag-if)# vrf attach test
switch# configure terminal
switch(config)# interface 1/1/29
switch(config-if)# no vrf attach test