Associating a VLAN or port with a VRF instance
You can assign a VRF instance to a port or VLAN. You cannot associate a VLAN or port and a VRF instance if the VLAN or port has an IP address. You can configure the IP address after you associate the port and VRF instance.
Before you begin
Ensure the VRF is already configured.
Procedure
Example
Switch:1> enable Switch:1# configure terminal
Create a VRF named Two:
Switch:1(config-if)# ip vrf Two
Create a VLAN of type byport:
Switch:1(config-if)# vlan create 33 name vlan-30 type port-mstprstp 0
Enter VLAN Interface Configuration mode:
Switch:1(config-if)# interface vlan 33
Assign the VLAN to VRF Two:
Switch:1(config-if)# vrf Two
Give the VLAN an IP address:
Switch:1(config-if)# ip address 192.0.2.1 255.255.255.0
Enter VRF configuration mode:
Switch:1(config-if)# router vrf Two
Variable definitions
Use the data in the following table to use the vrf command.
Variable |
Value |
---|---|
vrf WORD<0-16> |
Specifies the VRF instance by name. |