Switch ports could be connected to a variety of devices – other switches, routers, trunk ports, PC’s, or VoIP phones. Each of these devices has a different configuration. When a device is connected to a switch port, the switch will attempt to negotiate settings to match this device.
These negotiations include ones for the Dynamic Trunk Protocol (DTP) (to see if the connected device wants to setup a trunk) and Spanning Tree Protocol (STP) (Used to ensure that the connection will not cause a loop).
These both take time and will delay the ability of your device (such as a PC) to transmit and receive data from the network. Most of the time, you are connecting a PC to a switch and you just want to be able to use the network as soon as possible, right?
The commands I recommend enabling on all PC/laptop/printer switch ports include these (All configured in interface configuration mode):
switch#
switch#conf t
switch(config)#int fa0/21
switch(config-if)#switchport mode access
switch(config-if)#
switchport mode access: Sets the switchport into a non-trunking mode
switchport nonegotiate (optional): Disables the switchport from negotiating
spanning-tree portfast: Disables STP negotiations which speeds switchport forwarding (ensure this switchport only connects to an endpoint device)
Friday, July 1, 2011
How to Setup VLAN Trunking Protocol (VTP) on Cisco Switches
How to Setup VLAN Trunking Protocol (VTP) on Cisco Switches
In our last article about VLAN’s (Read ore about it on the What is a VLAN? How to Setup a VLAN on a Cisco Switch article), we learned about how VLAN’s provide greater performance and security for your LAN. Unfortunately, if you have more than a couple of switches, configuring VLAN’s can be a real pain. To make life easier, Cisco developed VLAN Trunking Protocol (VTP). Let’s find out what VTP can do for you.
How can VTP help me?
Say that you have 20 switches in your large office building. On each of these switches, you have four VLAN’s. Without VTP, you have to create each of these four VLANs on each of these switches. With VTP, you only have to create the four VLANs once, on one switch, and all other switches learn about the four VLANs.
In other words, the job of VTP is to distribute VLAN configuration information between all the switches.
How does it work?
The job of VTP is best explained from the perspective of the VTP server. All switches, by default, are VTP servers. The VTP server is where you would create, remove, or modify VLANs.
This VTP server sends an advertisement, across the domain, every 5 minutes or whenever a change is made in the VLAN database. That advertisement contains all the different VLAN names, VLAN numbers, what switches have ports in what VLANs, and a revision number. Whenever a switch receives an update with a larger revision number than the last one it applied, it applies that revision.
Keep in mind that VTP is a Cisco proprietary protocol. So, to use VTP between your switches, you must have all Cisco switches.
VTP Modes
VTP switches can be in three different modes. Those modes are:
•Server – the default where all VLAN adds, changes, and removals are allowed
•Client – where no changes can be made, only new revisions can be received from the VTP server switches.
•Transparent – where local VLAN information can be changed but that information is not sent out to other switches. Transparent switches also do not apply VTP advertisements from other switches but they do forward those advertisements on.
Usually, you would want a few of your core switches to be servers and all remaining remote or access layer switches to be clients. You would only make changes on the server switches and those changes would be propagated to the client switches.
What about pruning?
VTP pruning is the process of not sending IP broadcast traffic for certain VLANs to switches that do not have any ports in that VLAN. The switches that choose not to send these broadcasts know that they can not do this because of VTP. With VTP telling them what ports the other switches have, this switch knows that they don’t have to send them broadcast packets, because they know that the other switches don’t need them.
Pruning saves LAN bandwidth because broadcasts don’t have to be sent to switches that don’t need them.
How do you configure VTP?
To configure VTP, you use the vtp global configuration mode command. With this command you can specify the following:
•VTP domain – the name of the VTP domain. All switches communicating with VTP in the same domain, must have the same VTP domain name.
•VTP mode – either server, client, or transparent
•VTP password – a password to control who can and cannot receive VTP information
•VTP pruning – VTP pruning is either turned on or off
Here is a sample configuration:
switch#
switch#conf t
switch(config)#vtp mode server
Device mode already VTP Server
switch(config)#vtp domain MyNetwork
Changing VTP domain name from null to MyNetwork
switch(config)#vtp password 1MyPass1
Setting device VLAN database password to 1MyPass1
switch(config)#
To see what is going on with VTP, you can use show vtp status, like this:
switch(config)#
switch(config)#sh vtp stat
information about the switch will be displayed.
Article Summary
In summary, here is what we have learned:
•VTP is used to distribute VLAN configuration information between switches
•VTP is Cisco proprietary and can only be used on Cisco switches.
•By using VTP, you can also prune your VLANs, saving bandwidth
•The command to configure VTP is the global configuration mode command, vtp
•The command to check status is the privileged mode command, show vtp status
In our last article about VLAN’s (Read ore about it on the What is a VLAN? How to Setup a VLAN on a Cisco Switch article), we learned about how VLAN’s provide greater performance and security for your LAN. Unfortunately, if you have more than a couple of switches, configuring VLAN’s can be a real pain. To make life easier, Cisco developed VLAN Trunking Protocol (VTP). Let’s find out what VTP can do for you.
How can VTP help me?
Say that you have 20 switches in your large office building. On each of these switches, you have four VLAN’s. Without VTP, you have to create each of these four VLANs on each of these switches. With VTP, you only have to create the four VLANs once, on one switch, and all other switches learn about the four VLANs.
In other words, the job of VTP is to distribute VLAN configuration information between all the switches.
How does it work?
The job of VTP is best explained from the perspective of the VTP server. All switches, by default, are VTP servers. The VTP server is where you would create, remove, or modify VLANs.
This VTP server sends an advertisement, across the domain, every 5 minutes or whenever a change is made in the VLAN database. That advertisement contains all the different VLAN names, VLAN numbers, what switches have ports in what VLANs, and a revision number. Whenever a switch receives an update with a larger revision number than the last one it applied, it applies that revision.
Keep in mind that VTP is a Cisco proprietary protocol. So, to use VTP between your switches, you must have all Cisco switches.
VTP Modes
VTP switches can be in three different modes. Those modes are:
•Server – the default where all VLAN adds, changes, and removals are allowed
•Client – where no changes can be made, only new revisions can be received from the VTP server switches.
•Transparent – where local VLAN information can be changed but that information is not sent out to other switches. Transparent switches also do not apply VTP advertisements from other switches but they do forward those advertisements on.
Usually, you would want a few of your core switches to be servers and all remaining remote or access layer switches to be clients. You would only make changes on the server switches and those changes would be propagated to the client switches.
What about pruning?
VTP pruning is the process of not sending IP broadcast traffic for certain VLANs to switches that do not have any ports in that VLAN. The switches that choose not to send these broadcasts know that they can not do this because of VTP. With VTP telling them what ports the other switches have, this switch knows that they don’t have to send them broadcast packets, because they know that the other switches don’t need them.
Pruning saves LAN bandwidth because broadcasts don’t have to be sent to switches that don’t need them.
How do you configure VTP?
To configure VTP, you use the vtp global configuration mode command. With this command you can specify the following:
•VTP domain – the name of the VTP domain. All switches communicating with VTP in the same domain, must have the same VTP domain name.
•VTP mode – either server, client, or transparent
•VTP password – a password to control who can and cannot receive VTP information
•VTP pruning – VTP pruning is either turned on or off
Here is a sample configuration:
switch#
switch#conf t
switch(config)#vtp mode server
Device mode already VTP Server
switch(config)#vtp domain MyNetwork
Changing VTP domain name from null to MyNetwork
switch(config)#vtp password 1MyPass1
Setting device VLAN database password to 1MyPass1
switch(config)#
To see what is going on with VTP, you can use show vtp status, like this:
switch(config)#
switch(config)#sh vtp stat
information about the switch will be displayed.
Article Summary
In summary, here is what we have learned:
•VTP is used to distribute VLAN configuration information between switches
•VTP is Cisco proprietary and can only be used on Cisco switches.
•By using VTP, you can also prune your VLANs, saving bandwidth
•The command to configure VTP is the global configuration mode command, vtp
•The command to check status is the privileged mode command, show vtp status
Subscribe to:
Posts (Atom)