Sunday, May 13, 2012

VLAN Transport Protocol (VTP)

VLANs are very imporant because it allows secure separations of LANs  and  provides better bandwidth due to less broadcast traffic. In a large network, managing VLAN can become overwhelming, Cisco has a protocol called VLAN Transport Protocol to help the management of VLANs.VTP uses domains and a server client mechanism to keep VLAN information accurate within your network.

VTP modes

  • Server- a switch by default is in server mode, it may create and delete VLANs locally or within a domain. When part of a domain, the server is where all VLANs must be created or deleted. VLAN database is stored in NVRAM.
  • Client- a switch in client mode must be part of a VTP domain to get a VLAN database to use. VLANs can't be created on client switches and are only stored in RAM, a reboot will lose defined VLANs until it contacts the server.
  • Transparent- a switch in transparent mode will pass VTP advertisements out its trunk ports but keeps its own VLAN database and can create/delete VLANs
The VTP domain command sets the name of the domain, the name is case-sensitive and must match exactly for clients. A password is set using the VTP password command (passwords must match exactly for clients to join domain) and mode using the VTP mode command. I got a message below when I tried to configure S1 into server mode, switches start as servers.

S1(config)#vtp domain Ant
Changing VTP domain name from NULL to Ant
S1(config)#vtp password cisco
Setting device VLAN database password to cisco
S1(config)#vtp mode server
Device mode already VTP SERVER.

S2(config)#vtp mode client
Setting device to VTP CLIENT mode.
S2(config)#vtp domain Ant
S2(config)#vtp password cisco
Setting device VLAN database password to cisco

I created two vlans with names on the VTP server (S1), VLANs can not be created on the client (S2).

S1(config)#vlan 51
S1(config-vlan)#name Sales
S1(config-vlan)#vlan 27
S1(config-vlan)#name HR

S1# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/11, Fa0/12, Fa0/13
                                                Fa0/14, Fa0/15, Fa0/16, Fa0/17
                                                Fa0/18, Fa0/19, Fa0/20, Fa0/21
                                                Fa0/22, Fa0/23, Fa0/24, Gig1/1
                                                Gig1/2
27   HR                               active    
51   Sales                            active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    


S2(config)#vlan 98
VTP VLAN configuration not allowed when device is in CLIENT mode.


We can see that S2 does have the VLANs that were created on the VTP server

S2#show vlan brief 

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/11, Fa0/12, Fa0/13
                                                Fa0/14, Fa0/15, Fa0/16, Fa0/17
                                                Fa0/18, Fa0/19, Fa0/20, Fa0/21
                                                Fa0/22, Fa0/23, Fa0/24, Gig1/1
                                                Gig1/2
27   HR                               active    
51   Sales                            active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    

The command show VTP status will show the revision number along with the mode , domain name and if pruning is enabled. The revision number is used to keep track of the newest VLAN information, if a VTP server joins this domain and has a newer revision number all clients and servers in this domain will overwrite their VLAN information. VTP pruning is a interface command that allows trunks ports to only forward VLAN traffic when a connected switch has those VLANs in use

S1#show vtp status 
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : Ant
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x91 0xEA 0x6C 0x5E 0x06 0x53 0x1E 0x31 
Configuration last modified by 0.0.0.0 at 3-1-93 00:15:28
Local updater ID is 0.0.0.0 (no valid interface found)


S1(config-if)#switchport trunk pruning 7 vlan 27,30



No comments:

Post a Comment