vlan-config

Configures Virtual Local Area Network (VLAN) tasks such as all or selective ports to a VLAN, moving untagged port membership between VLANs, and removing ports from a VLAN.
Syntax
vlan-config add [ all-tagged | tagged-vlan ]
vlan-config move [ untagged VLAN ID ]
vlan-config remove [ all | vlan VLAN ID ]
Command Default

Active VLAN preconfiguration is not a mandatory for vlan-config add tagged-vlan command. This command can create new VLAN even if it is not present. Maximum allowed discrete or set of VLAN(s) is 1024.

Parameters
add
Adds a port to all the configured active VLANs.
all-tagged
Adds an interface to all VLANs as tagged members.
tagged-vlan
Adds an interface to selective VLANs as tagged members.
move
Moves an untagged port from one VLAN to another VLAN.
untagged VLAN ID
Moves the specific untagged VLAN port to another VLAN. It also moves the default VLAN of a dual mode port to another VLAN. The VLAN ID ranges from 1 to 4095.
remove
Removes a tagged or an untagged port from the VLAN.
all
Removes all VLANs from the physical port.
vlan VLAN ID
Removes the VLAN as specified by the VLAN ID from the physical port. The VLAN ID ranges from 1 to 4095.
Modes

Interface configuration mode

Usage Guidelines

Using the vlan-config add command, you can create a new VLAN and add the interface to it, if interface being added is the first interface. The command will also add port to non-active and non configured VLAN. It is not available on a private VLAN-enabled port and is not applicable to VLAN groups, MCT VLANs, GVRP, and flex-auth ports. The command is available in MIF mode. The maximum VLAN or VLAN range supported in a single input is 300.

Note: The command line prompt will not be available for the next command until the port is added to all VLANs in the system. The command is a non-savable command, which adds the interface as a tagged member. Command will not be available on a PVLAN Enabled port.

Using the vlan-config move command, you can move untagged ports from one VLAN to another without having to remove an untagged port from the old VLAN and to again add it to the new VLAN. This command can run on a multiple interface command mode.

    Note:
  • If a new VLAN is not configured, the system allows creation of a new VLAN and the port is added to it.
  • The VLAN port that is being moved should either be a dual mode port or should be part of a non-default VLAN. A port cannot be moved to or from a private VLAN.

Examples

The following example adds an interface to all tagged VLANs in the system.

device(config)# interface ethernet 1/1/9
device(config-if-e1000-1/1/9) vlan-config add all-tagged

The following example adds an interface to selective VLANs in the system.

device(config-if-e40000-1/1/1)#vlan-config add tagged-vlan
  	DECIMAL   VLAN number
   <cr>
device(config-if-e40000-1/1/1)#vlan-config add tagged-vlan 101 102 103
INFO : Command may take approximately 0 Seconds
device(config-if-e40000-1/1/1)#
Port(s) ethe 1/1/1  add to 1 vlan(s) complete.....
device(config-if-e40000-1/1/1)#

The following example moves the specific untagged membership of 1/1/9 from a VLAN to VLAN 40 in the system.

device# configure terminal
device(config)# interface ethernet 1/1/9
device(config-if-e1000-1/1/9) vlan-config move untagged 40

The following example removes all VLANs from the physical port in the system.

device# configure terminal
device(config)# interface ethernet 1/1/9
device(config-if-e1000-1/1/9) vlan-config remove all

The following example removes selective VLANs from the physical port in the system.

device(config-if-e40000-1/1/1)#vlan-config remove vlan 107 108 109 110
device(config-if-e40000-1/1/1)#
History
Release version Command history
08.0.50 This command was introduced.
08.0.70 This command was modified.