vrf attach

Syntax

vrf attach <VRF-NAME>

no vrf attach <VRF-NAME>

Description

Assigns an IP tunnel to a VRF. By default, all tunnels are automatically assigned to the default VRF when they are created.

The no form of this command assigns a tunnel to the default VRF (default).

Command context

config-gre-if

config-ip-if

Parameters

<VRF-NAME>

Specifies the VRF name to which to assign the tunnel.

Authority

Administrators

Examples

Assigns GRE tunnel 33 to vrf1.

switch(config)# interface tunnel 33 mode gre ipv4
switch(config-gre-if)# vrf attach vrf1

Assigns GRE tunnel 33 to the default VRF.

switch(config)# interface tunnel 33
switch(config-gre-if)# no vrf attach vrf1

Assigns IPv6 in IPv4 tunnel 27 to vrf2.

switch(config)# interface tunnel 27 mode gre ipv4
switch(config-ip-if)# vrf attach vrf2

Assigns IPv6 in IPv4 tunnel 27 to the default VRF.

switch(config)# interface tunnel 27
switch(config-ip-if)# no vrf attach vrf2