VTP配置
拓扑图
VTP 配置流程
一、在SW1配置VTP
1. Switch>en
2. Switch#conf t
3. Switch(config)ho sw1
4. SW1(config)#vtp domain hd
5. SW1(config)#vtp mode server
6. SW1(config)#in f0/23
7. SW1(config-if)#sw mo tr
8. SW1(config-if)#end
二、在SW2配置VTP
1. Switch>en
2. Switch#conf t
3. Switch(config)ho sw2
4. SW2(config)#vtp domain hd
5. SW2(config)#vtp mode transparent
6. SW2(config)#in f0/23
7. SW2(config-if)#sw mo tr
8. SW2(config-if)#exit
9. SW2(config)#in f0/24
10. SW2(config-if)#sw mo tr
11. SW2config-if)#end
三、在SW3配置VTP
1. Switch>en
2. Switch#conf t
3. Switch(config)ho sw3
4. SW3(config)#vtp domain hd
5. SW3(config)#vtp mode client
6. SW3(config)#in f0/24
7. SW3(config-if)#sw mo tr
8. SW3(config-if)#exit
9. SW3config-if)#end
四、在SW1上配置VLAN
9. SW1#vl da
10. SW1(vlan)#vl 2 na 17dz
11. SW1(vlan)#vl 3 na 18dz
12. SW1(vlan)#exit
13. SW1#conf t
14. SW1(config)#in ra f0/1-2
15. SW1(config)#sw mo ac
16. SW1(config-if-range)#sw ac vl 2
17. 17. SW1(config-if-range)#exit
18. 18. SW1(config)#in ra f0/3-4
19. SW1(config)#sw mo ac
20. 19. SW1(config-if-range)#sw ac vl 3
21. 20. SW1(config-if-range)#exit
22. 21. SW1(config)#in vl 1 //在VLAN1中配置管理IP
23. 22. SW1(config-if)#ip ad 192.168.1.1 255.255.255.0
24. 23. SW1(config-if)#no sh
25. 24. SW1(config-if)#end
26. 25. SW1#sh vl br //查看VLAN信息
27. 27. SW1#sh vtp status //查看SW1的VTP状态信息
五、查看SW2的VLAN信息和VTP状态信息
12. SW2#sh vl br //发现没有学习到VLAN2和VLAN3
13. SW2#sh vtp status //发现Number数字和SW1不同
六、查看SW3的VLAN信息和VTP状态信息
12. SW3#sh vl br //发现学习到VLAN2和VLAN3
13. SW3#sh vtp status //发现Number数字和SW1相同
七、在SW1配置VTP口令在后,再添加VLAV4
28. SW1#conf t
29. SW1(config)#vtp password lyj
30. SW1(config)#end
31. SW1#vl da
32. SW1(vlan)#vl 4 na 19dz
33. SW1(vlan)#exit
34. SW1#sh vl br //查看VLAN信息
35. SW1#sh vtp status //查看SW1的VTP状态信息配置修改编号加1,由7变8
八、在SW2配置VTP口令
14. SW2(config)#conf t
15. SW2(config)#vtp password lyj //不配密码就不会把更新消息转发到SW3
16. SW2(config)#end
九、给SW3配置配置VTP口令前后对比
14. SW3#sh vl br //查看VLAN信息没有学习到VL 4
15. SW3#sh vtp status //查看SW3的VTP状态信息配置修改编号还是7没变
16. Switch#conf t
17. SW3(config)#vtp password lyj
18. SW3(config)#end
19. SW3#sh vl br //查看VLAN信息学习到VL 4
20. SW3#sh vtp status //查看SW3的VTP状态信息配置修改编号和SW1一致为8
十、在SW1上配置VTP修剪
36. SW1#conf t
37. SW1(config)vtp pruning
38. SW1(config)end
39. SW1#sh vtp status //查看VTP Pruning Mode : Disabled是否变成Enabled
十一、把SW2设置成client模式,强调:在网络中间不能有不学习vlan的交换机存在。
17. SW2(config)#vtp mode client
18. SW2#sh vl br //查看VLAN信息学习到三个VLAN
19. SW2#sh vtp status //查看SW2的VTP状态信息配置修改编号和SW1一致