Configuring VTP

Virtual Trunking Protocol is a Cisco Proprietary protocol that is used to propagate VLAN information across switches in a VTP Domain. VTP is very useful in managing VLAN’s across a very large network were administration of creating VLAN’s on each switch becomes impossible.

There are three modes of VTP:

1. Server

It is the default mode of all Cisco Catalyst Switches  and a switch with VTP mode as server send our VLAN information to other switches in its VTP domain. In this mode switch can add, delete vlans.

2. Client

In this mode switch receives and stores vlan information from server . Also, in this mode  switch cannot add or delete VLAN’s.

3. Transparent

This is a special type of mode in which switch processes and forwards VTP information to other switches. In this mode Switch can add and delete VLAN’s but that information cannot propagate to other switches.

So let us configure VTP . In this blog post , we will use below diagram to configure and verify VTP.

In this example, we will use Switch 4 as VTP client and Switch 3 also as VTP client . However Switch 3 will connect to Switch 1 (VTP Server) through Switch 2 which is VTP Transparent and hence we will prove the concept of Transparent Mode.

vtp

Switch 1 Configuration:

!
interface FastEthernet0/1
description “Connected to Switch 4″
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
description “Connected to Switch 2″
switchport trunk encapsulation dot1q
switchport mode trunk
!

interface Vlan1
ip address 192.168.1.1 255.255.255.0

Switch1(config)#vtp mode server
Setting device to VTP SERVER mode.
Switch1(config)#vtp domain ABC
Switch1(config)#

Switch 2 Configuration:

interface FastEthernet0/2
description “Connected to Switch 1″
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
description “Connected to Switch 3″
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan1
ip address 192.168.1.2 255.255.255.0

Switch2(config)#vtp mode transparent
Setting device to VTP TRANSPARENT mode.
Switch2(config)#vtp dom
Switch2(config)#vtp domain ABC
Switch2(config)#

 Switch 3 Configuration :

interface FastEthernet0/3
description “Connected to Switch 2″
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan1
ip address 192.168.1.3 255.255.255.0

Switch3(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch3(config)#vtp domain ABC
Switch3(config)#

Switch 4 Configuration: 

!
interface FastEthernet0/1
description “Connected to Switch 1″
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan1
ip address 192.168.1.4 255.255.255.0

Switch4(config)#vtp mode client 
Setting device to VTP CLIENT mode.
Switch4(config)#vtp domain ABC
Switch4(config)#

Next We will create two VLAN’s on Switch 1.

Switch1(config-vlan)#name Sales
Switch1(config-vlan)#vlan 200
Switch1(config-vlan)#name
Switch1(config-vlan)#name Finance

Now let us see the status of VTP on each Switch

Switch 2:

1

 

In Above output , you can see the transparent switch has not stored any VLANs  but will forward it to other switches :

2

 

In above switch we can see it is client and has stored VLAN information.

Also in Client mode , if we try to create a VLAN we will not be able to create the same and switch will throw an error:

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

However, In case of Transparent mode switch we can create the VLAN which will be stored locally and not propagated to other switches.

Switch2(config)#vlan 300
Switch2(config-vlan)#
Switch2(config-vlan)#exit^Z
Switch2#
%SYS-5-CONFIG_I: Configured from console by console

Switch2#sh vl
Switch2#sh vlan

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/4, Fa0/5, 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, Gig0/1, Gig0/2
300 VLAN0300 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup