Switch # vlan database
Switch (vlan) # vtp domain-name
Switch (vlan) # vtp domain-name password-value
Switch (vlan) # vtp server
Switch (vlan) # show vtp status
To Disable VTP, you only need to change the VTP mode to transparent.
That is, Switch (vlan) # vtp transparent
2. Activate VTP V2 switch VTP V1 by default ).
Switch # vlan database
Switch (vlan) # vtp v2-mode
Switch # show vtp status
3. Add a VLAN. The Catalyst 2900XL series switches support a maximum of 64 active VLANs,
The vlan id ranges from 1 to 1005.
Switch # vlan database
Switch (vlan) # vlan-id name vlan-name
Switch # show vlan name vlan-name
Switch (vlan) # no vlan-id // Delete VLAN
4. Add the port to the VLAN.
Switch # configure terminal
Switch (config) # interface
Switch (config-if) # switchport mode access
Switch (config-if) # switchport access vlan-id
Switch (config-if) # show interface-id switchport
5. Configure the trunk port.
Switch # configure terminal
Switch (config) # interface
Switch (config-if) # switchport mode trunk
Switch (config-if) # switchport trunk encapsulation isl
Switch (config-if) # end
Switch # show interface switchport
Switch # copy running-config startup-config
6. Configure the VLAN allowed on the trunk.
Switch (config) # interface
Switch (config-if) # switchport mode trunk
Switch (config-if) # switchport trunk allowed vlan remove vlan-id-range
Switch (config-if) # switchport trunk allowed vlan add vlan-id-range
Switch (config-if) # end
Switch # show interface switchport allowed-vlan
To cancel the trunk port
Switch (config-if) # no switchport mode
7. Use STP for load.
There are two methods to achieve load balancing:
1) use port priority.
Configuration:
Switch_1 (config-if) # interface fa0/1
Switch_1 (config-if) # spanning-tree vlan 8 9 10 port-priority 10
Switch_1 (config) # interface fa0/2
Switch_1 (config-if) # spanning-tree vlan 3 4 5 6 port-priority 10
2) use the PATH value. For example:
Switch_1 (config) # interface fa0/1
Switch_1 (config-if) # spanning-tree vlan 2 3 4 cost 30
Switch_1 (config) # interface fa0/2
Switch_1 (config-if) # spanning-tree vlan 8 9 10 cost 30