It’s time to take a look at VLAN trunking protocol ( VTP ). VTP is a protocol that provides VLAN configuration to spread to the whole network. Using the Layer – 2 frames, VTP provides us to change VLAN names, manage VLANs, adding or deletin VLANs etc.
First , all switches has a revision number of 0. When you add new VLANs revision number increases one. For example when you create VLAN 10 , revision number is 1 , when you create VLAN 20 too, revision number is 2 anymore. But what if we hard code a VTP revision number and plug that switch in the network ( As you can see in the figure , rev : 1302 ). Answer is that : All other switches change their VLAN databases according to the new switch.
VTP MODES
Server(Default)
–VLAN information can be changed. ( You can add or remove VLANs )
–Sends and receives VTP update.
–Can save VLAN config.
Client
–VLAN information can’t be changed. ( You can’t add or remove VLANs )
–Sends and receives VTP update
–Can’t save VLAN config.
Transprent
–VTP updates are forwarded.–VLAN information can be changed. ( You can add or remove VLANs )
–VTP advertisement isn’t accepted.
–Can save VLAN config.
VTP PRUNING
*VTP pruning provides that unnecessary traffic is blocked over the trunk links.
*Works only with VTP server mode.
Normally if a client makes broadcast which is in switch 1 and green vlan, that traffic goes to switch 3 too even if there is no green vlan created on it. This is actually what pruning does ! Pruning avoids this to happen. ( VTP Pruning is not active defaultly )
STEP BY STEP VTP CONFIGURATION
1- VTP status is verified :
SWITCH_A#show vtp status vtp version 2 config revision : 0 (There's no VLAN database or didn't receive any VTP updates) Number of existing VLAN:5 VTP operationg mode : Server VTP domain name : ( If you plug a new switch which has a domain name, this switch updates itselfs with that domain name and password. That's a dangerous situation. So if you don't use a port as a trunk, put it swiftly in the access mode ! )
2- VTP domain name is given. |
SWITCH_A(conf)#VTP domain name APPLE( Please pay attention that domain name is case sensitive ! ); As soon as you do this, domain name of switch B and switch C turns to "APPLE".
Let’s verify something too…
SWITCH_A(conf)#VLAN 10(exit) SWITCH_A(config)#VLAN 20(exit) SWITCH_A(config)#VLAN 30(exit) SWITCH_B(config)#VTP mode client SWITCH_C(config)#VTP mode client
After creating those vlans let’s verify the config revision number of SWITCH_A
SWITCH_A#show vtp status Config revision : 3
(VLAN 10-20 and 30 are added to the other switches databases too because SWITCH_A is server , others are client)