When you enter the
vlan-id command, a new VLAN is created with all default
parameters and causes the CLI to enter VLAN configuration mode. If the
vlan-id argument that you entered matches an existing VLAN,
nothing happens except that you enter VLAN configuration mode.
You can enter the
vlan-range using a comma (,), a dash
(-), and the number.
VLAN 1 parameters are factory configured and cannot be changed; you
cannot create or delete this VLAN. Additionally, you cannot create or delete
VLAN 4095 or any of the internally allocated VLANs.
When you delete a VLAN, all the access ports in that VLAN are shut
down and no traffic flows. On trunk ports, the traffic continues to flow for
the other VLANs allowed on that port, but the packets for the deleted VLAN are
dropped. However, the system retains all the VLAN-to-port mapping for that
VLAN, and when you reenable,
that specified VLAN, the switch automatically reinstates all the
original ports to that VLAN.
In Cisco NX-OS 5.0(2)N1(1), you can configure VLANs on a device
configured as a VLAN Trunking Protocol (VTP) server or transparent device. If
the VTP device is configured as a client, you cannot add a VLAN or enter the
VLAN configuration mode.
This example shows how to add a new VLAN and enter VLAN configuration
This example shows how to add a range of new VLANs and enter VLAN
switch(config)# vlan 2,5,10-12,20,25,4000
This example shows how to delete a VLAN:
switch(config)#no vlan 2