Changing the Primary VLAN (CLI)

For more information on Primary VLANs, see The primary VLAN.

To change the Primary VLAN (CLI), use the following command:

primary-vlan vid <ascii-name-string>
In the default VLAN configuration, the port-based default VLAN (DEFAULT_VLAN) is the Primary VLAN. This command reassigns the Primary VLAN function to an existing, port-based, static VLAN. The switch cannot reassign the Primary VLAN function to a protocol VLAN.

If you reassign the Primary VLAN to a non-default VLAN, to delete the Primary VLAN from the switch, you must assign the Primary VLAN to another port-based static VLAN.

To identify the current Primary VLAN and list the available VLANs and their respective VIDs, use show vlans.

Reassigning, renaming and displaying the VLAN command sequence

The following example shows how to reassign the Primary VLAN to VLAN 22 (first command line), rename the VLAN 22-Primary (second command line) and then display the result (third command line):
switch(config)# primary-vlan 22
switch(config)# vlan 22 name 22-Primary
switch(config)# show vlans

Status and Counters - VLAN Information
Maximum VLANs to support : 8
Primary VLAN : 22-Primary
Management VLAN :

VLAN ID Name                 Status       Voice Jumbo
------- -------------------- ------------ ----- -----
1       DEFAULT_VLAN         Static       No    No
22      22-Primary           Static       No    No