VTP域对VLAN的管理

1.拓扑图

第一步: 把交换机相连的端口设置为trunk模式

第二步:在switch0上配置管理IP  192.168.0.1  ,创建vtp域名, 创建VLAN10  VLAN20 ,观察switch1 switch2交换机学习VLAN的情况,学习域名的情况,自身默认的VTP工作模式

 第三步:定义switch1 的工作模式为transparent,switch2的工作模式为client;在switch0上创建VLAN30 VLAN40 ,在switch2、switch3上观察他们VLAN的更新情况,vtp的状态

Switch0中的配置代码

Switch(config)#int vlan 1
Switch(config-if)#ip add 192.168.0.1 255.255.255.0
Switch(config-if)#no shutdown 
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
Switch(config)#vtp domain teach
Changing VTP domain name from NULL to teach
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#exit
Switch(config)#vlan 40
Switch(config-vlan)#

Switch1中的配置代码

Switch(config)#int range f0/1-2
Switch(config-if-range)#switchport mode trunk
Switch(config-if)#no shutdown 
Switch(config-if)#exit
Switch#show vlan brief

Switch#show vtp status 

Switch(config)#vtp mode transparent

 Switch2中的配置代码

Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.

Switch#show vtp status 

 

猜你喜欢

转载自blog.csdn.net/qq_62732552/article/details/120953710
VTP