实验条件
网络拓朴
需求
- SW1、SW2和SW3之间的线路需配置为Trunk,采用Dot1q封装协议
- SW1为VTP Server模式,SW2为VTP Transparent模式,SW3为VTP Client模式,Domain名为 SPOTO, VTP密码为 P@s5w0rd
- 在SW1上创建VLAN 10 名字为VTP-Server,在SW2上创建VLAN 20 名字为VTP-Transparent,观察SW1~3的VLAN数据库以及VTP状态
配置实现
1. 配置Trunk
SW1 & SW2 & SW3
SW1(config)#int e0/0
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#do sh interface trunk
Port Mode Encapsulation Status Native vlan
Et0/0 on 802.1q trunking 1
Port Vlans allowed on trunk
Et0/0 1-4094
Port Vlans allowed and active in management domain
Et0/0 1,10,30
Port Vlans in spanning tree forwarding state and not pruned
Et0/0 1,10,30
SW1(config-if)#
2.配置VTP服务
SW1
SW1(config-if)#vtp domain SPOTO
Domain name already set to SPOTO.
SW1(config)#vtp password P@s5w0rd
Password already set to P@s5w0rd
SW1(config)#vtp version 2
SW1(config)#vtp mode server
SW2
SW2(config-if)#vtp domain SPOTO
Domain name already set to SPOTO.
SW2(config)#vtp password P@s5w0rd
Password already set to P@s5w0rd
SW2(config)#vtp version 2
SW2(config)#vtp mode transparent
SW1
SW3(config-if)#vtp domain SPOTO
Domain name already set to SPOTO.
SW3(config)#vtp password P@s5w0rd
Password already set to P@s5w0rd
SW3(config)#vtp version 2
SW3(config)#vtp mode client
3.创建VLAN,查看同步状态
SW1
创建了Vlan会通过vtp-transparent同步给vtp-client
在这里插入代码片