Changing the number of VLANs allowed on the switch (CLI)


max-vlans<max number of vlans>

Use this command to specify the maximum number of VLANs allowed on the switch. The minimum value is 16. The maximum value varies according to the switch series.

For the 2930 switch series you can enter a max-vlans value of between 16–2048.

The total number of allowed IP VLANs (IPv6 + IPv4) is 512.

If GVRP is enabled, this setting includes any dynamic VLANs on the switch. As part of implementing a new setting, you must execute a write memory command to save the new value to the startup-config file and then reboot the switch.


If multiple VLANs exist on the switch, you cannot reset the maximum number of VLANs to a value smaller than the current number of VLANs.

The following example shows the command sequence for changing the number of VLANs allowed to 20. You can execute the commands to write memory and boot at another time.

Example of changing the number of allowed VLANs

switch(config)# max-vlans 20
This command will take effect after saving the configuration 
and rebooting the system.
switch(config)# write memory
switch(config)# boot
This will reboot the system from the primary image, do you want to continue [y/n]? Y

Error Messages

An error message will be displayed, if you set the max-vlans value to a number that exceeds the allowable value for the switch series.

If you set the max-vlans and later try to downgrade to an earlier version of the switch software that does not allow that number of max-vlans, successful downgrade may be prevented.