Associating a port to a VRF instance

Associate a port to a Virtual Router Forwarding (VRF) instance so that the port becomes a member of the VRF instance.

Before you begin

  • The VRF instance must exist. For more information about the creation of VRFs, see Create a VRF Instance.

About this task

You can assign a VRF instance to a port after you configure the VRF. The system assigns ports to the Global Router, VRF 0, by default.

Procedure

  1. Enter Interface Configuration mode:

    enable

    configure terminal

    interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...]} or interface vlan <1–4059>

    Note

    Note

    If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

  2. Associate a VRF instance with a port:

    vrf <WORD 1-16>

Example

Switch:1> enable

Switch:1# configure terminal

Switch:1(config)# interface gigabitethernet 1/12

Switch:1(config-if)# vrf red