- SW1>enable
- configure terminal
- interface fa 0/2
- switchport trunk encapsulation dot1q
- switchport mode trunk
- exit
vlan 100 划分 vlan100
name v100 命名为 v100
- vlan 200
- name v200
- vlan 300
- name v300
- exit
vtp mode server 设置 VTP 主机模式
vtp domain idcqq 设置 VTP 域名为 idcqq
vtp password xxwj 设置 vtp 域名密码为 xxwj
exit
show vtp status 查看 VTP 情况
show vlan 查看 vlan 情况 , 检测上面配置的情况是否正确
第一台主交换机 VTP server 配置完成, 现在配置其它的交换机.
- SW3>enable
- configure terminal
- interface fa 0/2
- switchport trunk encapsulation dot1q
- switchport mode trunk
- exit
- vtp mode client
- vtp domain idcqq
- vtp password xxwj
- exit
- show vtp status
- show vlan
因为 SW3 并没有配置 VLAN, 发现自动学习到 vlan 了
同理 SW2 也是和 SW3 一样配置, 一样能自动学习到 VLAN
现在我在 SW1 VTP server 上删除 vlan 100 , 新加入一个 vlan 111 看看其它 2 台, 马上就可以学到.
来源: http://www.bubuko.com/infodetail-3118342.html