配置方法
<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信息。