Command
Exit
Use
This command exits the VLAN database and applies any changes. Leaving the VLAN database by any other method will discard any changes.
Syntax
Switch(vlan)#exit
Example
In the below example we will enter the VLAN database, configure VLAN 99 and exit without using the exit command. Looking at show vlan brief afterwards, we see that VLAN99 was not created.
Cat1#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Cat1(vlan)#vlan 99 VLAN 99 added: Name: VLAN0099 Cat1(vlan)#^Z Cat1# 02:36:15: %SYS-5-CONFIG_I: Configured from console by console Cat1#show vlan br VLAN Name Status Ports —- ——————————– ——— ——————————- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Gi0/2 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup
This time we will use the exit command after creating vlan 99. Now, we see the vlan was properly created.
Cat1#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Cat1(vlan)#vlan 99 VLAN 99 added: Name: VLAN0099 Cat1(vlan)#exit APPLY completed. Exiting…. Cat1#show vlan VLAN Name Status Ports —- ——————————– ——— ——————————- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Gi0/2 99 VLAN0099 active 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup