配置方法
<1>增加交换机
新加入的交换机的VTP配置号比所要加入的域中原来的VtP服务器上的配置号要低.
添加过程:
清除配置:(或其他的方法)
switch(config)#erase startup-config
switch(config)#end
switch#reload
配置VTP运行模式:
switch(config)#vtp domain test
配置VTP运行模式
switch(config)#vtp mode server
switch(config)#end
switch#show vtp status
<2>减少交换机
switch(config)#vtp domain test-a
switch(config)#end
switch#show vtp status
故障排查
很多时候按照常规配置完毕后,并不能学习到VLAN信息,通过show vtp status命来查看往前设备与VTP Server脚色的交换机对比,请重点排查以下点:
SW#show vtp status
VTP Version :2//VTP的版本是否一致,如果不一致需配置一下
Configuration Revision : 0
Maximum VLANs supported locally : 255
Number of existing VLANs : 5
VTP Operating Mode :Client//确认当前交换机的工作脚色
VTP Domain Name :cisco//交换机所在域是否和Server模式的交换机一致
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest :0xAA 0xB9 0x0C 0xCD 0xD7 0xE8 0xA6 0xE0//交换机密码是否与Server模式的交换机一致,如果不一致请确认后重新配置
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
确认以上信息一致后,再确认交换机之间的互联链路是否为Trunk模式,通过命令来查看:
SW#show int trunk
Port Mode Encapsulation Status Native vlan
Fa0/1on802.1qtrunking1
Port Vlans allowed on trunk
Fa0/11-1005
Port Vlans allowed and active in management domain
Fa0/11
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1none
SW#
如果异常请用一下命令来配置:
SW#conft
Enter configuration commands, one per line. End with CNTL/Z.
SW(config)#intf0/1
SW(config-if)#sw mo trunk
SW(config-if)#exit
SW(config)#
至此,仍然不能学习到VLAN信息,请首先关闭互联的Trunk链路
SW#conft
Enter configuration commands, one per line. End with CNTL/Z.
SW(config)#int f0/1
SW(config-if)#shutdown
清理VTP同步计数:
Switch#clear vtp counters
再打开互联的Trunk链路,即可正常学习到VLAN信息。