Wednesday, 31 August 2016

Configure VTP Server and Client in Switch


Configure VTP Server and Client in Switch


VLAN Trunk Protocol (VTP) is a Cisco proprietary protocol used to share VLAN configuration across the network. Cisco created this protocol to share and synchronize their VLAN information throughout the network. Main goal of VTP is to manage all configured VLANs across the network.

This is the third part of our article “VLAN, VTP, DTP, STP and Router on Stick Explained with Examples”. You can read other parts of this article here:-

VLAN Basic Concept Explained with Examples

This is the first part of this article. In this part we explained basic concepts of VLAN such as What VLAN is, Advantage of VLAN, VLAN membership Static and Dynamic, VLAN Connections; Access link and trunk links, trunk tagging and how VLAN add additional layer of security with examples.

VLAN Practice LAB Setup on Packet Tracer

This is the second part of this article. In this part we setup a practice lab in Packet Tracer. You could create practice lab by following the instruction or alternatively download pre created lab. This lab would be used to demonstrate the configuration part of VLAN, VTP, DTP, STP and router on stick.


VLAN Tagging Explained with DTP Protocol

This the fourth part of this article. In this part we will explain access link, trunk link, VLAN tagging process, VLAN tagging protocol ISL and 802.1Q, Dynamic trunking protocol and DTP mode with examples. After that we will configure trunking in our practice lab.

VLAN Configuration commands Step by Step Explained

This is the last part of this article. In this part we will provide a step by step guide to configure the VLAN. We will also configure the Intra VLAN communication with router on stick example. At end of this article we will provide a summary of all commands used in this tutorial to configure the VLAN VTP and DTP.

In this part we will explain basic concepts of VTP protocol and how to configure it in Cisco Switches.

Basic concepts of VTP Protocol

For this tutorial we assume that you have following topology running in packet tracer. You can create this topology by following the instruction given in second part of this article or alternatively download the pre created topology from there.


In our network we only have three switches. We can easily add or remove VLAN manually on all three switches. However this process could be more tedious and difficult if we have 50 switches. In a large network, we might make a mistake in VLAN configuration. We might forget to add VLAN on one of the switch, or we may assign wrong VLAN number. Vice versa we may forget to remove VLAN on one of the switch, while removing VLANs.

VTP is a life saver protocol in this situation. With VTP we can add or remove VLANs on one switch and this switch will propagate VLAN information to all other switches in network.

VTP Messages

VTP share VLANs information via VTP messages. VTP messages can only be propagate through the trunk connections. So we need to set up trunk connection between switches. VTP messages are propagated as layer 2 multicast frames.

VTP Domain

VTP domain is a group of switches that share same VLAN information. A switch can have a single domain. VTP messages include domain name.  Switch only update VLAN information if it receive VTP message from same domain.

VTP Mode

VTP can be configured in three different modes.

1.       Server

2.      Transparent

3.      Client

VTP Server Mode

VTP Server can add, modify, and delete VLANs. It will propagate a VTP message containing all the changes from all of its trunk ports. If server receives a VTP message, it will incorporate the change and forward the message from all remaining trunk ports.

VTP Transparent Mode

VTP Transparent switch can also make change in VLANs but it will not propagate these changes to other switches. If transparent switch receives a VTP message, it will not incorporate the change and forward the message as it receives, from all remaining trunk ports.

VTP Client Mode

VTP client switch cannot change the VLAN configurations itself. It can only update its VLAN configuration through the VTP messages that it receive from VTP server. When it receives a VTP message, it incorporates with the change and then forwards it from remaining trunk ports.

Configure VTP Server

We will configure Office 1 Switch as VTP Server. Double click on Office 1 Switch and Click CLI menu item and press Enter key to start CLI session.





By default all switches work as VTP server so we only need few commands to configure it. In following commands we will



Ø  Set hostname to S1

Ø  Set domain name to example

Ø  Set password to gaurav. (Password is case sensitive)

Switch>enable

Switch#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hostname S1

S1(config)#vtp mode server

Device mode already VTP SERVER.

S1(config)#vtp domain example

Changing VTP domain name from NULL to example

S1(config)#vtp password gaurav

Setting device VLAN database password to Gaurav

Configure VTP Client

We will configure Office 2 Switch and Office 3 Switch as VTP client switch. Access CLI prompts of Office 2 Switch and execute following commands

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S2
S2(config)#vtp mode client
Setting device to VTP CLIENT mode.
S2(config)#vtp domain example
Changing VTP domain name from NULL to example
S2(config)#vtp password gaurav
Setting device VLAN database password to gaurav
S2(config)#

Now access CLI prompts of Office3 Switch and enter following commands.

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vtp mode client
Setting device to VTP CLIENT mode.
S3(config)#vtp domain example
Changing VTP domain name from NULL to example
S3(config)#vtp password gaurav
Setting device VLAN database password to gaurav
S3(config)#


We have configured VTP server and VTP client. At this moment VTP client will not receive VTP messages from server. We need to configure DTP between switches. In next part of this article we will configure DTP.




No comments: