Management of VLAN by VTP domain

1. Topology map

 

Step 1: Set the port connected to the switch to trunk mode

Step 2: configure the management IP 192.168.0.1 on switch0, create a vtp domain name, create VLAN10 VLAN20, observe the situation of switch1 switch2 learning VLAN, learning domain name, and its default VTP working mode

 Step 3: Define the working mode of switch1 as transparent, and the working mode of switch2 as client; create VLAN30 and VLAN40 on switch0, and observe their VLAN updates and vtp status on switch2 and switch3

Configuration code in 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)#

Configuration code in 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

 Configuration code in 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 

 

 

 

Guess you like

Origin blog.csdn.net/qq_62732552/article/details/120953710