S3#show vtp status VTP Version capable : 1 to 3 VTP version running : 1 VTP Domain Name : VTP Pruning Mode : Disabled VTP Traps Generation : Disabled Device ID : aabb.cc80.3000 Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00 Local updater ID is 0.0.0.0 (no valid interface found)
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/0, Et0/1, Et0/2, Et0/3 10 first_vlan active
S3#show vtp status | include Revision Configuration Revision : 1
S4#show vtp status | begin existing Number of existing VLANs : 5 Configuration Revision : 0
S5#show vtp status | begin existing Number of existing VLANs : 5 Configuration Revision : 0
这是因为必须要配置VTP domain才能正常同步。
在S4、S5上开启VTP debug。
1 2 3 4 5
S4#debug sw-vlan vtp events vtp events debugging is on
S5#debug sw-vlan vtp events vtp events debugging is on
在S3上配置vtp domain:
1 2 3 4
S3(config)#vtp domain rancho // 配置vtp domain Changing VTP domain name from NULL to rancho S3(config)# *Oct 11 08:02:34.648: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to rancho.
S5#show vtp status | begin existing Number of existing VLANs : 6 Configuration Revision : 1 // revision数值增减了,同步了S3的vlan配置
S5#show vlan brief // 确认配置信息同步,vlan10有了
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/2, Et0/3 10 first_vlan active
S4#show vlan brief
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/2, Et0/3 10 first_vlan active
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/2, Et0/3 10 first_vlan active 40 second_vlan active 50 third_vlan active
S3#show vtp status | include Revision Configuration Revision : 3 // 同步两次,revision从1增加到3
修改S3的模式为client:
1 2 3 4 5 6 7 8
S3(config)#vtp mode client S3#show vtp status | include Mode VTP Pruning Mode : Disabled VTP Operating Mode : Client
S3(config)#vlan 100 VTP VLAN configuration not allowed when device is in CLIENT mode. // client模式就不能配置valn了
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/2, Et0/3 10 first_vlan active 40 second_vlan active 50 third_vlan active 70 VLAN0070 active //但是S5依然能学到S4的vlan, 走的是S3的透传
S3#show vlan brief // 透传模式的S3并没有学到vlan70
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et0/2, Et0/3 10 first_vlan active 40 second_vlan active 50 third_vlan active 60 VLAN0060 active