Configure VTP in a cisco switch
VTP is a Cisco-proprietary protocol used to synchronize the VLAN database (vlan.dat) across multiple switches in a network. For VTP to work all switches must be connected via Trunk links (802.1Q). VTP advertisements are only sent across trunk port using VLAN 1.
1. VTP Server Configuration
Section titled “1. VTP Server Configuration”1.1 Set the domain name:
Section titled “1.1 Set the domain name:”Switch(config)# vtp domain MY_NETWORK1.3 Set the VTP mode:
Section titled “1.3 Set the VTP mode:”By default, all Cisco Switches act as VTP Servers
Switch(config)# vtp mode server1.4 Set the VTP password (optional):
Section titled “1.4 Set the VTP password (optional):”To prevent rogue switches from accidentally joining the domain
Switch(config)# vtp password cisco1231.5 Set the VTP version
Section titled “1.5 Set the VTP version”Switch(config)# vtp version 21.6 Verification commands
Section titled “1.6 Verification commands”Switch# show vtp statusSwitch# show vtp passwordEvery time you add, delete or rename a VLAN, the configuration revision number goes up by 1. When the switches exchange VTP messages, they look at this number. The switch with the highest revision number “wins”, and all other switches will overwrite their VLAN database to match it.
2. VTP Client Configuration
Section titled “2. VTP Client Configuration”Switch(config)# vtp mode clientA VTP Client receives the VLAN database from the Server. You cannot create, modify or delete VLANs on a VTP Client.
3. VTP Transparent Mode Configuration
Section titled “3. VTP Transparent Mode Configuration”Switch(config)# vtp mode transparentA switch in Transparent mode ignores VTP updates.
VTP Version 1: A transparent switch will ONLY forward VTP packets if its configured domain name matches the domain name in the VTP packet.
VTP Version 2: A transparent switch will forward VTP packets regardless of its domain name.