VLAN Trunking Protocol (VTP)

VLAN Trunking Protocol (VTP) is the basic goals of VLAN Trunking Protocol (VTP)are to manage all configured VLANs across a switched internetwork and to maintain consistency throughout that network VTP allows you to add, delete, and rename VLANs—information that is then propagated to all other switches in the VTP domain.

VTP Modes of Operation

  • Server

    This is the default mode for all Catalyst switches. We need at least one server in your VTP domain to propagate VLAN information throughout that domain. Also important: The switch must be in server mode to be able to create, add, and delete VLANs in a VTP domain. VTP information has to be changed in server mode, and any change made to a switch in server mode will be advertised to the entire VTP domain. In VTP server mode, VLAN configurations are saved in NVRAM.
  • Client

    In client mode, switches receive information from VTP servers, but they also send and receive updates, so in this way, they behave like VTP servers. The difference is that they can’t create, change, or delete VLANs. Plus, none of the ports on a client switch can be added to anew VLAN before the VTP server notifies the client switch of the new VLAN. Also good to know is that VLAN information sent from a VTP server isn’t stored in NVRAM, which is important because it means that if the switch is reset or reloaded, the VLAN information willbe deleted. Here’s a hint: If you want a switch to become a server, first make it a client so it receives all the correct VLAN information, then change it to a server—so much easier! So basically, a switch in VTP client mode will forward VTP summary advertisements and process them. This switch will learn about but won’t save the VTP configuration in the running configuration, and it won’t save it in NVRAM. Switches that are in VTP client mode will only learn about and pass along VTP information.
  • Transparent

    Switches in transparent mode don’t participate in the VTP domain or share its VLAN database, but they’ll still forward VTP advertisements through any configured trunk links. They can create, modify, and delete VLANs because they keep their own database onethey keep secret from the other switches. Despite being kept in NVRAM, the VLAN database in transparent mode is actually only locally significant. The whole purpose of transparent mode is to allow remote switches to receive the VLAN database from a VTP server-configured switch through a switch that is not participating in the same VLAN assignments.

VTP Pruning

VTP gives you a way to preserve bandwidth by configuring it to reduce the amount of broadcasts, multicasts, and unicast packets. This is called pruning. VTP pruning enabled switches sends broadcasts only to trunk links that actually must have the information.

When you enable pruning on a VTP server, you enable it for the entire domain. By default,VLANs 2 through 1001 are pruning eligible, but VLAN 1 can never prune because it’s an administrative VLAN. VTP pruning is supported with both VTP version 1 and version 2By using the show interface trunk command, we can see that all VLANs are allowed across a trunked link by default:

S1#sh int trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       auto         802.1q         trunking      1
Fa0/2       auto         802.1q         trunking      1
Port        Vlans allowed on trunk
Fa0/1       1-4094
Fa0/2       1-4094
Port        Vlans allowed and active in management domain
Fa0/1       1
Fa0/2       1
Port        Vlans in spanning tree forwarding state and not pruned
Fa0/1       1
Fa0/2       none

Looking at the preceding output, you can see that VTP pruning is disabled by default. It only takes one command and it is enabled on your entire switched network for the listed VLANs.

S1#config t
S1(config)#int f0/1
S1(config-if)#switchport trunk ?
allowed Set allowed VLAN characteristics when interface isin trunking mode native Set trunking native characteristics when interface is in trunking mode pruning Set pruning VLAN characteristics when interface is in trunking mode
S1(config-if)#switchport trunk pruning ? vlan Set VLANs enabled for pruning when interface is intrunking mode
S1(config-if)#switchport trunk pruning vlan 3-4

The valid VLANs that can be pruned are 2 to 1001. Extended-range VLANs (VLAN IDs 1006 to 4094) can’t be pruned, and these pruning-ineligible VLANs can receive a flood of traffic.

how to configure VLANs on the S1 switch by creating three VLANs for three different departments again, remember that VLAN 1 isthe native and administrative VLAN by default:

S1#config t
S1(config)#vlan ?
WORD      ISL VLAN IDs 1-4094
internal  internal VLAN
S1(config)#vlan 2
S1(config-vlan)#name Sales
S1(config-vlan)#vlan 3
S1(config-vlan)#name Marketing
S1(config-vlan)#vlan 4
S1(config-vlan)#name Accounting

From the preceding above, you can see that you can create VLANs from 2 to 4094
Remember that a created VLAN is unused until it is assigned to a switch portor ports and that all ports are always assigned in VLAN 1 unless set otherwise.Once the VLANs are created, verify your configuration with the show vlan command (sh vlan for short):

VLAN Name                  Status    Ports
---- -----------------------------------------------------------
1    default                active    Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Gi0/1
2    Sales                  active
3    Marketing              active
4    Accounting             active

Assigning Switch Ports to VLANs

  • S1#config t
    S1(config)#int fa0/3
    S1(config-if)#switchport ?
    access         Set access mode characteristics of the interface
    backup         Set backup for the interface
    block          Disable forwarding of unknown uni/multi cast addresses
    host           Set port host
    mode           Set trunking mode of the interface
    nonegotiate    Device will not engage in negotiation protocol on this
    port-security  Security related command
    priority       Set appliance 802.1p priority
    protected      Configure an interface to be a protected port
    trunk          Set trunking characteristics of the interface
    voiceVoice appliance attributes
    S1(config-if)#switchport mode ?
    access   Set trunking mode to ACCESS unconditionally
    dynamic  Settrunking mode to dynamically negotiate access ortrunk mode
    trunk    Set trunking mode to TRUNK unconditionally

    S1(config-if)#switchport mode access
    S1(config-if)#switchport access vlan 3


Configuring Trunk Ports

  • The following switch output shows the trunk configuration on interface fa0/8 as set to trunk on:

    S1#config t
    S1(config)#int fa0/8
    S1(config-if)#switchport mode trunk
    The following list describes the different options available when configuring a switch interface:


Configuring VTP

  • All Cisco switches are configured to be VTP servers by default. To configure VTP, first you have to configure the domain name you want to use. And of course, once you configure the VTP information on a switch, you need to verify it.

    When you create the VTP domain, you have a bunch of options, including setting the domain name, password, operating mode, and pruning capabilities of the switch. Use the vtp global configuration mode command to set all this information. In the following example, I’ll set the S1 switch to vtp server, the VTP domain to Amit, and the VTP password to mannu:
    S1#config t
    S1#(config)#vtp mode server
    Device mode already VTP SERVER.
    S1(config)#vtp domain Amit
    Changing VTP domain name from null to Amit
    S1(config)#vtp password mannu
    Setting device VLAN database password to mannu
    S1(config)#do show vtp password
    VTP Password: amit
    S1(config)#do show vtp status
    VTP Version                     : 2
    Configuration Revision          : 0
    Maximum VLANs supported locally : 255
    Number of existing VLANs        : 8
    VTP Operating Mode              : Server
    VTP Domain Name                 : Amit
    VTP Pruning Mode                : Disabled
    VTP V2 Mode                     : Disabled
    VTP Traps Generation            : Disabled
    MD5 digest                      : 0x15 0x54 0x88 0xF2 0x50 0xD9 0x03 0x07
    Configuration last modified by at 3-14-93 15:47:32
    Local updater ID is on interface Vl1 (lowest numbered VLAN
    interface found)
    Core#config t
    Core(config)#vtp mode client
    Setting device to VTP CLIENT mode.
    Core(config)#vtp domain Amit
    Changing VTP domain name from null to Amit
    Core(config)#vtp password mannu
    Setting device VLAN database password to mannu
    Core(config)#do show vtp status
    VTP Version                     : 2
    Configuration Revision          : 0
    Maximum VLANs supported locally : 1005
    Number of existing VLANs        : 5
    VTP Operating Mode              : Client
    VTP Domain Name                 : Amit
    VTP Pruning Mode                : Disabled
    VTP V2 Mode                     : Disabled
    VTP Traps Generation            : Disabled
    MD5 digest                      : 0x02 0x11 0x18 0x4B 0x36 0xC5 0xF4 0x1F
    Configuration last modified by at 0-0-00 00:00:00
    Nice—now that all our switches are set to the same VTP domain and password, the VLANs I created earlier on the S1 switch should be advertised to the Core and S2 VTP client switches.

    Let’s take a look using the show vlan brief command on the Core and S2 switch:

    Core#sh vlan brief
    VLAN Name                 Status    Ports
    ---- ------------------ --------- ---------------------
    1    default              active    Fa0/1,Fa0/2,Fa0/3,Fa0/4
    Fa0/16,Fa0/17, Fa0/18, Fa0/19,
    Fa0/20,Fa0/21, Fa0/22, Fa0/23,
    Fa0/24, Gi0/1, Gi0/2
    2    Sales                 active
    3    Marketing             active
    4    Accounting            active

    [output cut]
    S2#sh vlan bri
    VLAN Name                   Status    Ports
    ---- ---------------------- --------- ---------------------
    1    default                active    Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Gi0/1
    2    Sales                  active
    3    Marketing              active
    4    Accounting             active
    [output cut]

    The VLAN database that I created on the S1 (2960) switch earlier in this chapter was uploaded to the Core and S2 switch via VTP advertisements. VTP is a great way to keep VLAN naming consistent across the switched network. We can now assign VLANs to the ports on the Core and S1 switches and they’ll communicate with the hosts in the same VLANs on the S1 switch across the trunked ports between switches.It’s imperative that you can assign a VTP domain name, set the switch to VTPserver mode, and create a VLAN!

h4 ExamMATE

Online Personalised Exam Preparation Tool to score higher using Assessment, Analytics & Artificial Intelligence

Copyright ©2015 h4exammate.com, All Rights Reserved. h4 ExamMATE™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.
Need help? Ask h4 ExamMATE Bot