在实际配置二层交换机时,有时交换机不让你在它上面建立vlan,那是因为二层交换机上的vtp设置被设置成了Client模式可通过以下命令查看
/*
Switch#show vtp status
VTP Version                     : 2
Configuration Revision          : 19
Maximum VLANs supported locally : 128
Number of existing VLANs        : 10
VTP Operating Mode              : Client
VTP Domain Name                 : benet
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xA3 0xD7 0xE9 0xD5 0xB8 0xA6 0x4D 0xAF
Configuration last modified by 192.168.10.254 at 3-1-93 00:19:00
*/
如果遇到这种情况可通过以下命令来解决:no vtp mode
如下:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
/*
Switch(config)# no vtp mode
Resetting device to VTP SERVER mode.
*/
Switch(config)#exit
//显示一下结果
Switch#show vtp status
VTP Version                     : 2
Configuration Revision          : 19
Maximum VLANs supported locally : 128
Number of existing VLANs        : 10
VTP Operating Mode              : Server
VTP Domain Name                 : benet
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xA3 0xD7 0xE9 0xD5 0xB8 0xA6 0x4D 0xAF
Configuration last modified by 192.168.10.254 at 3-1-93 00:19:00
Local updater ID is 0.0.0.0 (no valid interface found)
通过这些配置之后,就可以在二层交换机上建立vlan了。