Cisco vtp error

This document provides information on how to troubleshoot VLAN Trunk Protocol (VTP).

Contents

Introduction

This document provides information on how to troubleshoot VLAN Trunk Protocol (VTP).

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Understand VTP

Refer to Understanding VLAN Trunk Protocol (VTP) for more information on VTP.

Configure VTP

Refer to Configuring VLAN Trunk Protocol (VTP) for information to configure VTP.

VTP Troubleshooting and Caveats

This section discusses some common troubleshooting situations for VTP.

Unable to See VLAN Details in the show run Command Output

Configuration changes in CatOS are written to NVRAM immediately after a change is made. In contrast, Cisco IOS® Software does not save configuration changes to NVRAM unless you issue the copy running-config startup-config command. VTP client and server systems require VTP updates from other VTP servers to be immediately saved in NVRAM without user intervention. The VTP update requirements are met by the default CatOS operation, but the Cisco IOS update model requires an alternative update operation.

For this alteration, a VLAN database was introduced into Cisco IOS Software as a method to immediately save VTP updates for VTP clients and servers. In some versions of software, this VLAN database is in the form of a separate file in NVRAM, called the vlan.dat file. You can view VTP/VLAN information that is stored in the vlan.dat file for the VTP client or VTP server if you issue the show vtp status command.

VTP server/client mode switches do not save the entire VTP/VLAN configuration to the startup config file in the NVRAM when you issue the copy running-config startup-config command on these systems. It saves the configuration in the vlan.dat file. This does not apply to systems that run as VTP transparent. VTP transparent systems save the entire VTP/VLAN configuration to the startup config file in NVRAM when you issue the copy running-config startup-config command. For example, if you delete vlan.dat file after the configuration of the VTP in server or client mode and reload the switch, it resets the VTP configuration to default settings. However, if you configure VTP in transparent mode, delete the vlan.dat and reload the switch. This retains the VTP configuration.

This is an example of a default VTP configuration:

Switch#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                 : CISCO
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xD3 0x78 0x41 0xC8 0x35 0x56 0x89 0x97
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

You can configure normal-range VLANs (2 through 1000) when the switch is in either VTP server or transparent mode. However, you can only configure extended-range VLANs (1025 through 4094) in VTP transparent switches.

  • In order to display all the VLAN configurations, the VLAN ID, name, and so forth, that are stored in the binary file, you must issue the show vlan command.

  • You can display the VTP information, the mode, domain, and so forth, with use of the show vtp status command.

  • The VLAN information and the VTP information are not displayed in the show running-config command output when the switch is in the VTP server/client mode. This is normal behavior of the switch.

    Router#show run | include vlan
    vlan internal allocation policy ascending
    Router#show run | include vtp
    
  • Switches that are in VTP transparent mode display the VLAN and VTP configurations in the show running-config command output because this information is also stored in the configuration text file.

    Router#show run | include vlan
    vlan internal allocation policy ascending
    vlan 1
     tb-vlan1 1002
     tb-vlan2 1003
    vlan 20-21,50-51 
    vlan 1002
     tb-vlan1 1
     tb-vlan2 1003
    vlan 1003
     tb-vlan1 1
     tb-vlan2 1002
    vlan 1004
    vlan 1005 
    Router#show run | include vtp
    vtp domain cisco
    vtp mode transparent

Note:  Extended-range VLANs are not supported by 3500XL. The 2900XL and 3500XL can use only VLANs in the range of 1 to 1001, and they do not support extended-range VLANs. If you upgrade the software of the switch, it does not bring an enhancement to support the configuration of extended-range VLANs.

Catalyst Switches Do Not Exchange VTP Information

VTP allows switches to advertise VLAN information between other members of the same VTP domain. VTP allows a consistent view of the switched network across all switches. There are several reasons why the VLAN information can fail to be exchanged.

Verify these items if switches that run VTP fail to exchange VLAN information:

  • VTP information only passes through a trunk port. Make sure that all ports that interconnect switches are configured as trunks and are actually trunking.

    Make sure that if EtherChannels are created between two switches, only Layer 2 EtherChannels propagate VLAN information.

  • Make sure that the VLANs are active in all the devices.

  • One of the switches must be the VTP server in a VTP domain. All VLAN changes must be done on this switch in order to have them propagated to the VTP clients.

  • The VTP domain name must match and it is case sensitive. CISCO and cisco are two different domain names.

  • Make sure that no password is set between the server and client. If any password is set, make sure that the password is the same on both sides.

  • Every switch in the VTP domain must use the same VTP version. VTP V1 and VTP V2 are not compatible on switches in the same VTP domain. Do not enable VTP V2 unless every switch in the VTP domain supports V2.

    Note: VTP V2 is disabled by default on VTP V2-capable switches. When you enable VTP V2 on a switch, every VTP V2-capable switch in the VTP domain enables V2. You can only configure the version on switches in VTP server or transparent mode.

  • Switches that operate in transparent mode drop VTP advertisements if they are not in the same VTP domain.

  • The extended-range VLANs are not propagated. Therefore, you must configure extended-range VLANs manually on each network device.

    Note: In the future, the Catalyst 6500 Cisco IOS Software switches support VTP Version 3. This version is able to transmit extended-range VLANs. So far, VTP Version 3 is only supported on CatOS. Refer to the Understanding How VTP Version 3 Works section of Configuring VTP for more information on VTP Version 3.

  • The Security Association Identifier (SAID) values must be unique. SAID is a user-configurable, 4-byte VLAN identifier. The SAID identifies traffic that belongs to a particular VLAN. The SAID also determines to which VLAN each packet is switched. The SAID value is 100,000 plus the VLAN number. These are two examples:

    • The SAID for VLAN 8 is 100008.

    • The SAID for VLAN 4050 is 104050.

  • The updates from a VTP server do not get updated on a client if the client already has a higher VTP revision number. Also, the client does not allow these updates to flow to its downstream VTP clients if the client has a higher revision number than that which the VTP server sends.

Catalyst Switch Automatically Changes VTP Mode from Client to Transparent

Some Catalyst Layer 2 and Layer 3 fixed configuration switches change the VTP mode automatically from client to transparent with this error message:

%SW_VLAN-6-VTP_MODE_CHANGE: VLAN manager changing device mode from 
CLIENT to TRANSPARENT.

Either of these two reasons can cause the automatic VTP mode change in these switches:

  • More VLANs run on the Spanning Tree Protocol (STP) than the switch can support.

    Catalyst Layer 2 and Layer 3 fixed configuration switches support a different maximum number of instances of STP with the use of per-VLAN spanning tree+ (PVST+). For example, the Catalyst 2940 supports four instances of STP in PVST+ mode, while the Catalyst 3750 supports 128 instances of STP in PVST+ mode. If more than the maximum number of VLANs is defined in the VTP, the VLANs that remain operate with STP disabled.

    If the number of instances of STP that is already in use is greater than the maximum number, you can disable STP on one of the VLANs and enable it on the VLAN where you want STP to run. Issue the no spanning-tree vlan vlan-id global configuration command in order to disable STP on a specific VLAN. Then, issue the spanning-tree vlan vlan-id global configuration command in order to enable STP on the desired VLAN.

    Note: Switches that do not run STP still forward the bridge protocol data units (BPDUs) that they receive. In this way, the other switches on the VLAN that have a running STP instance can break loops. Therefore, STP must run on enough switches in order to break all the loops in the network. For example, at least one switch on each loop in the VLAN must run STP. You do not need to run STP on all switches in the VLAN. However, if you run STP only on a minimal set of switches, a change to the network can introduce a loop into the network and can result in a broadcast storm.

    Workarounds:

    • Reduce the number of VLANs that are configured to a number that the switch supports.

    • Configure the IEEE 802.1s Multiple STP (MSTP) on the switch in order to map multiple VLANs to a single STP instance.

    • Use switches and/or images (Enhanced Image [EI]) which support a greater number of VLANs.

  • The switch receives more VLANs from a connected switch than the switch can support.

    An automatic VTP mode change also can occur if the switch receives a VLAN configuration database message that contains more than a set number of VLANs. This normally happens in Catalyst Layer 2 and Layer 3 fixed configuration switches when they are connected to a VTP domain that has more VLANs than are supported locally.

    Workarounds:

    • Configure the allowed VLAN list on the trunk port of the connected switch in order to restrict the number of VLANs that are passed to the client switch.

    • Enable pruning on the VTP server switch.

    • Use switches and/or images (EI) which support a greater number of VLANs.

Data Traffic Blocked between VTP Domains

Sometimes it is required to connect to switches that belong to two different VTP domains. For example, there are two switches called Switch1 and Switch2. Switch1 belongs to VTP domain cisco1 and Switch2 belongs to VTP domain cisco2. When you configure trunk between these two switches with the Dynamic Trunk Negotiation (DTP), the trunk negotiation fails and the trunk between the switches does not form, because the DTP sends the VTP domain name in a DTP packet. Because of this, the data traffic does not pass between the switches.

Switch1#show vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 9
VTP Operating Mode              : Server
VTP Domain Name                 : cisco1
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled

Switch2#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 42
VTP Operating Mode              : Server
VTP Domain Name                 : cisco2
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled


Switch1#show interface fastethernet 1/0/23 trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa1/0/23    auto         802.1q         not-trunking  1

Port      Vlans allowed on trunk
Fa1/0/23    1

Port        Vlans allowed and active in management domain
Fa1/0/23    1

Port        Vlans in spanning tree forwarding state and not pruned
Fa1/0/23    1

It is possible that you can also see this error message.

Note: Some of the switches do not show this error message.

4w2d: %DTP-SP-5-DOMAINMISMATCH: Unable to perform trunk negotiation on port Fa3/
3 because of VTP domain mismatch.

The solution for this issue is to manually force the trunking instead in order to rely on the DTP. Configure the trunk ports between the switches with the switchport mode trunk command.

Switch1(config)#interface fastethernet 1/0/23
switch1(config-if)#switchport mode trunk

Switch2(config)#interface fastethernet 3/3
switch2(config-if)#switchport mode trunk


switch1#show interface fastethernet 1/0/23 trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa1/0/23    on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa1/0/23    1-4094

Port        Vlans allowed and active in management domain
Fa1/0/23    1-5

Port        Vlans in spanning tree forwarding state and not pruned
Fa1/0/23    1-5

CatOS Switch Changes to VTP Transparent Mode, VTP-4-UNSUPPORTEDCFGRCVD:

A recent change in CatOS incorporated a protective feature that causes a CatOS switch to go into VTP transparent mode in order to prevent the possibility of a switch reset because of a watchdog timeout. This change is documented in these Cisco bug IDs:

  • CSCdu32627 (registered customers only)

  • CSCdv77448 (registered customers only)

How Do I Determine If My Switch Might Be Affected?

The watchdog timeout can occur if these two conditions are met:

  • The Token Ring VLAN (1003) is translated to VLAN 1.

  • You make a change in VLAN 1.

Issue the show vlan command on the Catalyst in order to observe the Token Ring VLAN translation. This is an example of show vlan command output:

VLAN Type  SAID       MTU   Parent RingNo BrdgNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ ------ ---- -------- ------ ------
1    enet  100001     1500  -      -      -      -    -        1003

How Does CatOS Version 6.3(3) Protect My Switch from a Watchdog Timeout?

There is a protective feature in order to prevent a watchdog timeout in this CatOS version. The Catalyst switch switches from VTP server or client to VTP transparent mode.

How Do I Determine If My Switch Has Gone to VTP Transparent Mode in Order to Protect Against a Watchdog Timeout?

Your switch has gone to VTP transparent mode if the logging level for the VTP is raised to 4.

Console> (enable) set logging level vtp 4 default

You see this message when the switchover occurs:

VTP-4-UNSUPPORTEDCFGRCVD:Rcvd VTP advert with unsupported vlan config on 
trunk mod/port- VTP mode changed to transparent

What Are the Negative Effects When the Switch Goes to VTP Transparent Mode?

  • If pruning is enabled, the trunks go down.

  • If the trunks go down and no other ports are in that VLAN, the VLAN interface in the installed Multilayer Switch Feature Card (MSFC) goes down.

If these effects occur, and this switch is in the core of your network, your network can be negatively affected.

Where Does the Unsupported VTP Configuration Come From?

Any Cisco IOS Software-based switch, such as the switches in this list, can supply the unsupported VTP configuration:

  • A Catalyst 2900/3500XL

  • A Cisco IOS Software Catalyst 6500

  • A Cisco IOS Software-based Catalyst 4000

These products translate the 1003 VLAN to VLAN 1 by default.

What Is the Solution?

The solution in CatOS-based switches enables the switches to handle this translated information properly. The solution for the Cisco IOS Software-based switches is to remove this default translation and match the behavior of the CatOS-based switches. These are the integrated fixed versions that are currently available:

Catalyst Switch Fixed Releases
CatOS switches 5.5(14) and later 6.3(6) and later 7.2(2) and later
Catalyst 4000 (Supervisor Engine III) Not affected
Catalyst 6500 (Supervisor Engine Cisco IOS Software) Cisco IOS Software Release 12.1(8a)EX and later
Catalyst 2900 and 3500XL Cisco IOS Software Release 12.0(5)WC3 and later

If you cannot upgrade to images that have these fixes integrated, you can modify the configuration in the Cisco IOS Software-based switches. Use this procedure if the switch is a VTP server:

goss#vlan data

goss(vlan)#no vlan 1 tb-vlan1 tb-vlan2

Resetting translation bridge VLAN 1 to default
Resetting translation bridge VLAN 2 to default

goss(vlan)#no vlan 1003 tb-vlan1 tb-vlan2

Resetting translation bridge VLAN 1 to default
Resetting translation bridge VLAN 2 to default

goss(vlan)#apply

APPLY completed.

goss(vlan)#exit

APPLY completed.
Exiting....

The 1002 VLAN can be translated, but you can also remove it if you include this in your configuration:

goss(vlan)#no vlan 1002 tb-vlan1 tb-vlan2

Resetting translation bridge VLAN 1 to default
Resetting translation bridge VLAN 2 to default

When Exactly Does My Switch Change to VTP Transparent Mode?

Some confusion exists about when this switchover to VTP transparent mode occurs. The scenarios in this section provide examples of when the switchover can happen.

tshoot-vlan1.gif

  • Example 1

    These are the initial conditions:

    • Both the Catalyst 6500 and the Catalyst 3500XL are VTP servers with the same VTP configuration revision number.

    • Both servers have the same VTP domain name and the same VTP password, if the password is configured.

    • The Catalyst 3500XL has the translated Token Ring VLAN.

    • You start the servers while they are disconnected.

    If you connect these two switches, the Catalyst 6500 goes to VTP transparent mode. Of course, this also happens if the Cisco 3500XL has a higher VTP configuration revision number than the Catalyst 6500 configuration revision number. Moreover, if the switch to VTP transparent mode occurs when you physically connect the two switches, you can reasonably assume that the change would also occur if you booted the Catalyst 6500 for the first time while the switch was already connected.

  • Example 2

    These are the initial conditions:

    • The Catalyst 6500 is a VTP server.

    • The Catalyst 3500XL is a VTP client.

    • The Catalyst 3500XL has a higher VTP configuration revision number than the Catalyst 6500 configuration revision number.

    • Both switches have the same VTP domain and the same VTP password, if the password is configured.

    • The Catalyst 3500XL has the translated Token Ring VLAN.

    • You start the servers while they are disconnected.

    If you connect these two switches, the Catalyst 6500 goes to VTP transparent mode. In this scenario, if the Catalyst 3500XL has a lower configuration revision number than the Catalyst 6500 configuration revision number, the Catalyst 6500 does not switch to VTP transparent mode. If the Catalyst 3500XL has the same configuration revision number, the Catalyst 6500 does not go to VTP transparent mode. However, the translation is still present in the Catalyst 3500XL.

What Is the Quickest Way to Recover After I Notice the Translation in My Network?

Even if you correct the Token Ring VLAN information in one switch, such as the switch that malfunctioned, the information can propagate throughout your network. You can use the show vlan command in order to determine if this occurred. Therefore, the quickest way to recover is to perform these steps:

  1. Take a Cisco IOS Software-based switch, such as a Catalyst XL that is connected to the network, and change the switch to a VTP server.

  2. Remove the translated VLANs.

  3. After you apply the change in the switch, reconnect the switch to the network.

    The change should be propagated to all the other VTP servers and clients.

    You can use the show vlan command in order to verify that the translation is gone in the network. At this point, you should be able to change the affected CatOS 6.3(3) switch back to a VTP server.

    Note: The Catalyst XL switches do not support as many VLANs as the Catalyst 6500s support. Ensure that all the VLANs in the Catalyst 6500 exist in the Catalyst XL switch before you reconnect them. For example, you do not want to connect a Catalyst 3548XL with 254 VLANs and a higher VTP configuration revision number to a Catalyst 6500 that has 500 VLANs configured.

How a Recently Inserted Switch Can Cause Network Problems

This problem occurs when you have a large switched domain that is all in the same VTP domain, and you want to add one switch in the network.

This switch was previously used in the lab, and a good VTP domain name was entered. The switch was configured as a VTP client and was connected to the rest of the network. Then, you brought the ISL link up to the rest of the network. In just a few seconds, the whole network was down. How did this happen?

The configuration revision number of the switch that you inserted was higher than the configuration revision number of the VTP domain. Therefore, your recently introduced switch, with almost no configured VLANs, erased all VLANs through the VTP domain.

This occurs whether the switch is a VTP client or a VTP server. A VTP client can erase VLAN information on a VTP server. You can tell that this has occurred when many of the ports in your network go into inactive state but continue to be assigned to a nonexistent VLAN.

Solution

Quickly reconfigure all of the VLANs on one of the VTP servers.

What to Remember

Always make sure that the configuration revision number of all switches that you insert into the VTP domain is lower than the configuration revision number of the switches that are already in the VTP domain.

If you have the output of a show tech-support command from your Cisco device, you can use the Output Interpreter (registered customers only) in order to display potential issues and fixes.

Example

Complete these steps in order to see an example of this problem:

  1. Issue these commands in order to see that clic has 7 VLANs (1, 2, 3, and the defaults), clic is the VTP server in the domain named test, and port 2/3 is in VLAN 3:

    clic (enable) show vlan
    
    1993 May 25 05:09:50 %PAGP-5-PORTTOSTP:Port 2/1 joined bridge port 2/1 lan
    VLAN Name                             Status    IfIndex Mod/Ports, Vlans
    ---- -------------------------------- --------- ------- ------------------------
    1    default                          active    65      2/2,2/4-50
    2    VLAN0002                         active    70
    3    VLAN0003                         active    71      2/3
    1002 fddi-default                     active    66
    1003 token-ring-default               active    69
    1004 fddinet-default                  active    67
    1005 trnet-default                    active    68      68
    
    clic (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    
    clic (enable) show port 2/3
    
    Port  Name               Status     Vlan       Level  Duplex Speed Type
    ----- ------------------ ---------- ---------- ------ ------ ----- ------------
     2/3                     connected 3          normal   10  half 10/100BaseTX
  2. Connect bing, which is a lab switch on which VLANs 4, 5, and 6 were created.

    Note: The configuration revision number is 3 in this switch.

    bing (enable) show vlan
    
    VLAN Name                             Status    IfIndex Mod/Ports, Vlans
    ---- -------------------------------- --------- ------- ------------------------
    1    default                          active    4       2/1-48
                                                            3/1-6
    4    VLAN0004                         active    63
    5    VLAN0005                         active    64
    6    VLAN0006                         active    65
    1002 fddi-default                     active    5
    1003 token-ring-default               active    8
    1004 fddinet-default                  active    6
    1005 trnet-default                    active    7
  3. Place bing in the same VTP domain (test).

    bing (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    8          1023             3               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    10.200.8.38     disabled disabled 2-1000
  4. Configure the trunk between the two switches in order to integrate bing in the network.

    Bing erased the clic VLAN, and now clic has VLANs 4, 5, and 6. However, clic no longer has VLANs 2 and 3, and port 2/3 is inactive.

    clic (enable) show vtp domain 
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    8          1023             3               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    10.200.8.38     disabled disabled 2-1000
    clic (enable)
    
    clic (enable) show vlan
    
    VLAN Name                             Status    IfIndex Mod/Ports, Vlans
    ---- -------------------------------- --------- ------- ------------------------
    1    default                          active    65      2/2,2/4-50
    4    VLAN0004                         active    72
    5    VLAN0005                         active    73
    6    VLAN0006                         active    74
    1002 fddi-default                     active    66
    1003 token-ring-default               active    69
    1004 fddinet-default                  active    67
    1005 trnet-default                    active    68      68
    
    clic (enable) show port 2/3
    
    Port  Name               Status     Vlan       Level  Duplex Speed Type
    ----- ------------------ ---------- ---------- ------ ------ ----- ------------
     2/3                     inactive   3          normal   auto  auto 10/100BaseTX

Recently Added Switch Does Not Get the VLANs From the VTP Server

Make sure that the newly added switch has a configuration revision number that is less than the current revision number of the domain. See the How a Recently Inserted Switch Can Cause Network Problems and Reset the Configuration Revision Number sections for more information.

The new switch might not immediately receive the list of configured VLANs from the VTP server. In order to overcome this, make any of these modifications to the VLAN database:

  • Create any VLAN.

  • Delete any VLAN.

  • Modify the properties of any current VLAN.

Make modifications to the VLAN database at any VTP server of the same domain.

Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 50

Switch(config-vlan)#name 50thVLAN

Switch(config-vlan)#end
Switch#

Once the modification is completed, the newly added switch receives the VLAN information from the VTP server.

Reset the Configuration Revision Number

You can easily reset the configuration revision number by either of the two procedures provided in this section.

Reset the Configuration Revision using Domain Name

Complete these steps in order to reset the configuration revision number with the change of the domain name:

  1. Issue this command in order to see that the configuration is empty:

    clic (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
                                     1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    5          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)
  2. Configure the domain name, which is test in this example, and create two VLANs.

    The configuration revision number goes up to 2:

    clic (enable) set vtp domain test
    
    VTP domain test modified
    
    clic (enable) set vlan 2
    
    Vlan 2 configuration successful
    
    clic (enable) set vlan 3
    
    Vlan 3 configuration successful
    
    clic (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             2               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)
  3. Change the domain name from test to cisco.

    The configuration revision number is back to 0, and all the VLANs are still present:

    clic (enable) set vtp domain cisco
    
    VTP domain cisco modified
    
    clic (enable) show vtp domain 
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    cisco                            1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
  4. Change the VTP domain name from cisco back to test.

    The configuration revision is 0. There is no risk that anything can be erased, and all the previously configured VLANs remain:

    clic (enable) set vtp domain test
    
    VTP domain test modified
    
    clic (enable) show vtp domain 
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)

Reset the Configuration Revision using VTP Mode

Complete these steps in order to reset the configuration revision number with the change of the VTP mode:

  1. Issue this command in order to see that the configuration is empty:

    clic (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
                                     1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    5          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)
  2. Configure the domain name, which is test in this example, and create two VLANs.

    The configuration revision number goes up to 2:

    clic (enable) set vtp domain test
    
    VTP domain test modified
    
    clic (enable) set vlan 2
    
    Vlan 2 configuration successful
    
    clic (enable) set vlan 3
    
    Vlan 3 configuration successful
    
    clic (enable) show vtp domain
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             2               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)
  3. Change the VTP mode from server to transparent.

    The configuration revision number is back to 0, and all the VLANs are still present:

    clic (enable) set vtp mode transparent
    
    VTP domain test modified
    
    clic (enable) show vtp domain 
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           transparent -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
  4. Change the VTP mode from transparent to server or client.

    The configuration revision is 0. There is no risk that anything can be erased, and all the previously configured VLANs remain:

    clic (enable) set vtp mode server
    
    VTP domain test modified
    
    clic (enable) show vtp domain 
    
    Domain Name                      Domain Index VTP Version Local Mode  Password
    -------------------------------- ------------ ----------- ----------- ----------
    test                             1            2           server      -
    
    Vlan-count Max-vlan-storage Config Revision Notifications
    ---------- ---------------- --------------- -------------
    7          1023             0               disabled
    
    Last Updater    V2 Mode  Pruning  PruneEligible on Vlans
    --------------- -------- -------- -------------------------
    0.0.0.0         disabled disabled 2-1000
    clic (enable)

All Ports Inactive After Power Cycle

Switch ports move to the inactive state when they are members of VLANs that do not exist in the VLAN database. A common issue is that all the ports move to this inactive state after a power cycle. Generally, you see this when the switch is configured as a VTP client with the uplink trunk port on a VLAN other than VLAN 1. Because the switch is in VTP client mode, when the switch resets, it loses its VLAN database and causes the uplink port and any other ports that were not members of VLAN 1 to go into inactive mode.

Complete these steps in order to solve this problem:

  1. Temporarily change the VTP mode to transparent.

    switch (enable) set vtp mode transparent
    
    VTP domain austinlab modified
    switch (enable)
  2. Add the VLAN to which the uplink port is assigned to the VLAN database.

    Note: This example assumes that VLAN 3 is the VLAN that is assigned to the uplink port.

    switch (enable) set vlan 3
    
    VTP advertisements transmitting temporarily stopped,
    and will resume after the command finishes.
    Vlan 3 configuration successful
    switch (enable)
  3. Change the VTP mode back to client after the uplink port begins forwarding.

    switch (enable) set vtp mode client
    
    VTP domain austinlab modified

    After you complete these steps, VTP should re-populate the VLAN database from the VTP server. The re-population moves all ports that were members of VLANs that the VTP server advertised back into the active state.

Trunk Down, which Causes VTP Problems

Remember that VTP packets are carried on VLAN 1, but only on trunks (ISL, dot1q, or LAN emulation [LANE]).

If you make VLAN changes during a time when you have a trunk down or when LANE connectivity is down between two parts of your network, you can lose your VLAN configuration. When the trunk connectivity is restored, the two sides of the network resynchronize. Therefore, the switch with the highest configuration revision number erases the VLAN configuration of the lowest configuration revision switch.

VTP and STP (Logical Spanning Tree Port)

When you have a large VTP domain, you also have a large STP domain. VLAN 1 must span through the whole VTP domain. Therefore, one unique STP is run for that VLAN in the whole domain.

When VTP is used and a new VLAN is created, the VLAN is propagated through the entire VTP domain. The VLAN is then created in all switches in the VTP domain. All Cisco switches use PVST, which means that the switches run a separate STP for each VLAN. This adds to the CPU load of the switch. You must refer to the maximum number of logical ports (for the STP) that are supported on the switch in order to have an idea of the number of STPs that you can have on each switch. The number of logical ports is roughly the number of ports that run STP.

Note: A trunk port runs one instance of STP for each active VLAN on the trunk.

You can perform a rapid evaluation of this value for your switch with this formula:

(Number of active VLANs x Number of trunks) + Number of access ports

This number, which is the maximum number of logical ports for STP, varies from switch to switch and is documented in the release notes for each product. For example, on a Catalyst 5000 with Supervisor Engine 2, you can have a maximum of 1500 STP instances. Each time you create a new VLAN with VTP, the VLAN is propagated by default to all switches and is subsequently active on all ports. You might need to prune unnecessary VLANs from the trunk in order to avoid inflation of the number of logical ports.

Note: Pruning unnecessary VLANs from the trunk can be performed with one of two methods:

  • Manual pruning of the unnecessary VLAN on the trunk—This is the best method, and it avoids the use of the spanning tree. Instead, the method runs the pruned VLAN on trunks. The VTP Pruning section of this document describes manual pruning further.

  • VTP pruning—Avoid this method if the goal is to reduce the number of STP instances. VTP-pruned VLANs on a trunk are still part of the spanning tree. Therefore, VTP-pruned VLANs do not reduce the number of spanning tree port instances.

VTP Pruning

VTP pruning increases the available bandwidth. VTP pruning restricts flooded traffic to those trunk links that the traffic must use in order to access the appropriate network devices. By default, VTP pruning is disabled. The enablement of VTP pruning on a VTP server enables pruning for the entire management domain. The set vtp pruning enable command prunes VLANs automatically and stops the inefficient flooding of frames where the frames are not needed. By default, VLANs 2 through 1000 are pruning eligible. VTP pruning does not prune traffic from pruning-ineligible VLANs. VLAN 1 is always pruning ineligible; traffic from VLAN 1 cannot be pruned.

Note: Unlike manual VLAN pruning, automatic pruning does not limit the spanning tree diameter.

All devices in the management domain must support VTP pruning in order for VTP pruning to be effective. On devices that do not support VTP pruning, you must manually configure the VLANs that are allowed on trunks. You can perform manual pruning of the VLAN from the trunk with the clear trunk mod/port command and the clear trunk vlan_list command. For example, you can choose to only allow, on each trunk, a core switch to the VLANs that are actually needed. This helps to reduce the load on the CPUs of all switches (core switches and access switches) and avoids the use of STP for those VLANs that extend through the entire network. This pruning limits STP problems in the VLAN.

This is an example:

  • Topology—The topology is two core switches that are connected to each other, each with 80 trunk connections to 80 different access switches. With this design, each core switch has 81 trunks, and each access switch has two uplink trunks. This assumes that access switches have, in addition to the two uplinks, two or three trunks that go to a Catalyst 1900. This is a total of four to five trunks per access switch.

  • Platform—Core switches are Catalyst 6500s with Supervisor Engine 1A and Policy Feature Card 1 (PFC1) that run software release 5.5(7). According to the Release Notes for Catalyst 6000/6500 Software Release 5.x, this platform cannot have more than 4000 STP logical ports.

  • Access switches—Access switches are either:

    • Catalyst 5000 switches with Supervisor Engine 2, which do not support more than 1500 STP logical ports

    • Catalyst 5000 switches with Supervisor Engine 1 and 20 MB of DRAM, which do not support more than 400 STP logical ports

  • Number of VLANs—Remember to use VTP. A VLAN on the VTP server is created on all switches in the network. If you have 100 VLANs, the core must handle roughly 100 VLANs x 81 trunks = 8100 logical ports, which is above the limit. The access switch must handle 100 VLANs x 5 trunks = 500 logical ports. In this case, Catalysts in the core exceed the supported number of logical ports, and access switches with Supervisor Engine 1 are also above the limit.

  • Solution—If you assume that only four or five VLANs are actually needed in each access switch, you can prune all the other VLANs from the trunk on the core layer. For example, if only VLANs 1, 10, 11, and 13 are needed on trunk 3/1 that goes to that access switch, the configuration on the core is:

    Praha> (enable) set trunk 1/1 des
    
    Port(s) 1/1 trunk mode set to desirable.
    
    Praha> (enable) clear trunk 1/1 2-9,12,14-1005
    
    Removing Vlan(s) 2-9,12,14-1005 from allowed list.
    Port 1/1 allowed vlans modified to 1,10,11,13.
    
    Praha> (enable) clear trunk 1/1 2-9,12,14-1005
    

    Note: Even if you do not exceed the number of allowed logical ports, prune VLANs from a trunk. The reason is that an STP loop in one VLAN only extends where the VLAN is allowed and does not go through the entire campus. The broadcast in one VLAN does not reach the switch that does not need the broadcast. In releases that are earlier than software release 5.4, you cannot clear VLAN 1 from trunks. In later releases, you can clear VLAN 1 with this command:

    Praha> (enable) clear trunk 1/1 1
    
    Default vlan 1 cannot be cleared from module 1.

    The Case of VLAN 1 section of this document discusses techniques on how to keep VLAN 1 from spanning the whole campus.

VLANs are not pruned

If two switches, A and B, are connected with one port of Switch A, which is configured as trunk, and is connected to an IP phone, then the VTP joins the messages that pass from Switch A to Switch B. Therefore, Switch B is not able to prune the unused VLANS.

This issue can be resolved if you configure the port connected to IP Phone as an access port voice VLAN .

Switch#interface FastEthernet0/1
switchport access vlan <vlan number>
switchport voice vlan <vlan number>

The Case of VLAN 1

You cannot apply VTP pruning to VLANs that need to exist everywhere and that need to be allowed on all switches in the campus, in order to be able to carry VTP, Cisco Discovery Protocol [CDP] traffic, and other control traffic. However, there is a way to limit the extent of VLAN 1. The feature is called VLAN 1 disable on trunk. The feature is available on Catalyst 4500/4000, 5500/5000, and 6500/6000 series switches in CatOS software release 5.4(x) and later. The feature allows you to prune VLAN 1 from a trunk, as you do for any other VLAN. This pruning does not include all the control protocol traffic that is still allowed on the trunk (DTP, PAgP, CDP, VTP, and others). However, the pruning does block all user traffic on that trunk. With this feature, you can keep the VLAN from spanning the entire campus. STP loops are limited in extent, even in VLAN 1. Configure VLAN 1 to be disabled, as you would configure other VLANs to be cleared from the trunk:

Console> (enable) set trunk 2/1 desirable

Port(s)  2/1 trunk mode set to desirable.

Console> (enable) clear trunk 2/1 1

Removing Vlan(s) 1 from allowed list.
Port  2/1 allowed vlans modified to 2-1005.

UDLD uses native VLAN in order to talk to the neighbor. So, in a trunk port, the native VLAN must not be pruned in order for UDLD to work properly.

Troubleshoot VTP Configuration Revision Number Errors That Are Seen in the show vtp statistics Command Output

VTP is designed for an administrative environment in which the VLAN database for the domain is changed at only one switch at any one time. It assumes that the new revision propagates throughout the domain before another revision is made. If you change the database simultaneously on two different devices in the administrative domain, you can cause two different databases to be generated with the same revision number. These databases propagate and overwrite the existing information until they meet at an intermediate Catalyst switch on the network. This switch cannot accept either advertisement because the packets have the same revision number but a different MD5 value. When the switch detects this condition, the switch increments the No of config revision errors counter.

Note: The show vtp statistics command output in this section provides an example.

If you find that the VLAN information is not updated on a certain switch, or if you encounter other, similar problems, issue the show vtp statistics command. Determine if the count of VTP packets with configuration revision number errors is increasing:

Console> (enable) show vtp statistics

VTP statistics:
summary advts received          4690
subset  advts received          7
request advts received          0
summary advts transmitted       4397
subset  advts transmitted       8
request advts transmitted       0
No of config revision errors    5
No of config digest errors      0
VTP pruning statistics:
Trunk     Join Transmitted  Join Received  Summary advts received from
                                          non-pruning-capable device
--------  ---------------  -------------  ---------------------------
 1/1      0                0              0
 1/2      0                0              0
Console> (enable)

If you observe a configuration revision error, you can resolve this problem if you change the VLAN database in some way so that a VTP database with a higher revision number than the revision number of the competing databases is created. For example, on the switch that acts as the primary VTP server, add or delete a false VLAN in the administrative domain. This updated revision is propagated throughout the domain and overwrites the database at all devices. When all the devices in the domain advertise an identical database, the error no longer appears.

Troubleshoot VTP Configuration Digest Errors That Are Seen in the show vtp statistics Command Output

This section addresses how to troubleshoot VTP configuration digest errors that you see when you issue the show vtp statistics command. This is an example:

Console> (enable) show vtp statistics

VTP statistics:
summary advts received          3240
subset  advts received          4
request advts received          0
summary advts transmitted       3190
subset  advts transmitted       5
request advts transmitted       0
No of config revision errors    0 
No of config digest errors      2
VTP pruning statistics:
Trunk     Join Transmitted  Join Received  Summary advts received from
                                           non-pruning-capable device
--------  ---------------  -------------  ---------------------------
 1/1      0                0              0
 1/2      0                0              0
Console> (enable)

The general purpose of an MD5 value is to verify the integrity of a received packet and to detect any changes to the packet or corruption of the packet during transit. When a switch detects a new revision number that is different from the currently stored value, the switch sends a request message to the VTP server and requests the VTP subsets. A subset advertisement contains a list of VLAN information. The switch calculates the MD5 value for the subset advertisements and compares the value to the MD5 value of the VTP summary advertisement. If the two values are different, the switch increases the No of config digest errors counter.

A common reason for these digest errors is that the VTP password is not configured consistently on all VTP servers in the VTP domain. Troubleshoot these errors as a misconfiguration or data corruption issue.

When you troubleshoot this problem, ensure that the error counter is not historical. The statistics menu counts errors since the most recent device reset or the VTP statistics reset.

Unable to Change the VTP Mode of a Switch from Server / Transparent

If the switch is a standalone (that is, not connected to the network), and you want to configure the VTP mode as the client, after reboot, the switch comes up either as a VTP server or VTP transparent, dependent upon the VTP mode of the switch before it was configured as the VTP client. The switch does not allow itself to be configured as a VTP client when there is no VTP server nearby.

OSPF Hellos Blocked in a VTP Domain

Open Shortest Path First (OSPF) Hellos can get blocked and the adjacency can be dropped if a switch in the VTP domain is changed from the server or client mode to transparent mode. This issue can occur if VTP pruning is enabled in the domain.

Use any of these options in order to resolve the issue:

  • Hard code the OSPF neighbors.

  • Disable VTP pruning in the domain.

  • Revert the VTP mode of the switch to server or client.

SW_VLAN-4-VTP_USER_NOTIFICATION

This section talks about the commonly occuring variants of this error message:

%SW_VLAN-4-VTP_USER_NOTIFICATION : VTP protocol user notification: [chars]

%SW_VLAN-4-VTP_USER_NOTIFICATION: VTP protocol user notification: Version 1 device detected on [int] after grace period has ended

By default, the VLAN Trunking Protocol (VTP) Version on Cisco switches is Version 2 and is compatible with Version 1. This message is just a notification that indicates that there is a switch connected on port Gig0/10 that runs VTP Version 1. Everything continues to work fine, unless you run IPX, and there is nothing harmful for the switch.

In order to resolve this issue, change the VTP version with these commands.

For Cisco IOS switches, use these commands:

Switch#vlan database
Switch(vlan)#vtp v2-mode

For CatOS switches, use this command:

Console> (enable) set vtp version 2 enable

%SW_VLAN-SP-4-VTP_USER_NOTIFICATION: VTP protocol user notification: MD5 digest checksum mismatch on receipt of equal revision summary on trunk: [int]

In order to know more the cause and to resolve the issue, see the Troubleshoot VTP Configuration Digest Errors That Are Seen in the show vtp statistics Command Output section.

%SW_VLAN-4-VTP_USER_NOTIFICATION: VTP protocol user notification: Error detected in VTP Revision Number for VTP Domain Index [dec]

In order to know more the cause and to resolve the issue, see the Troubleshoot VTP Configuration Revision Number Errors That Are Seen in the show vtp statistics Command Output section.

Single Switchport Trunk That Allowed the vlan command Appears as Multiple Commands in the show running-config command Output

When the number of allowed VLANs extends past a certain number of characters, which is the default terminal width, the show running-config command wraps the line and adds the switchport trunk allowed vlan add command to the line. This is the way Cisco IOS handles long lists in the switchport trunk allowed vlan command.

Switch#configure terminal
Switch(config)#int fa3/30
Switch(config-if)#switchport trunk allowed vlan 14, 105, 110, 115, 120, 125, 130-132, 
140, 150, 155, 200, 210, 220, 222, 230, 232, 240, 301-309, 840, 860-862, 870, 880, 
881, 884-886, 889, 896, 898, 411, 412, 413, 421

!--- The previous command should be in a single line. It has been wrapped into three lines for proper formatting.

The output of show running-config looks similar to this:

Switch#show running-config | begin 3/30
interface FastEthernet3/30
 switchport
 switchport trunk allowed vlan 14,105,110,115,120,125,130-132,140,150,155,200
 switchport trunk allowed vlan add 210,220,222,230,232,240,301-309,411-413,421
 switchport trunk allowed vlan add 840,860-862,870,880,881,884-886,889,896,898
!

!--- rest of output elided

You can also notice that the VLAN list has been order in ascending order and displayed in the output.

Remove VLAN 1 from the allowed list so you can disable VLAN 1 on any individual VLAN trunk port in order to reduce the risk of spanning-tree loops or storms. When you remove VLAN 1 from a trunk port, the interface continues to send and receive management traffic, for example, Cisco Discovery Protocol (CDP), Port Aggregation Protocol (PAgP), Link Aggregation Control Protocol (LACP), Dynamic Trunking Protocol (DTP), and VLAN Trunking Protocol (VTP) in VLAN 1.

The no form of the allowed vlan command resets the list to the default list, which allows all VLANs.

Internal VLAN Usage

All packets sent to the EARL must be prefixed by a VLAN ID, because that is the packet format the EARL expects. Routed ports do not have a visible VLAN ID since one is not explicitly configured, so the switch borrows a VLAN from the pool of 4096 that it has. You can instruct the Catalyst 6500 series switch to start to borrow VLANs from the top, and descend from 4096, or from bottom, and ascend from 1006, with the use the global config mode vlan allocation policy command.

Switch(config)#vlan internal allocation policy {ascending | descending}

Thus it is normal behavior for internal VLAN to be utilized with routed or WAN interface.

Related Information

  • LAN Product Support
  • LAN Switching Technology Support
  • Technical Support & Documentation — Cisco Systems

Добрый день дорогие читатели. Поздравляю вас с прошедшими майскими праздниками и надеюсь, что вы провели их так же хорошо, как и я. Но праздники позади, и пора нам с вами обсудить, что нибудь новенькое, например протокол VTP (VLAN Trunking Protocol).

Если вы помните, то ранее мы с вами уже обсуждали настройку VLAN на коммутаторах фирмы Cicso. Для этого, первым делом, мы создавали на каждом коммутаторе требуемые нам VLANы. Делалось это с помощью довольно простых команд (в данном случае создаем только один vlan с номером 7 и именем god_lan):

  Switch(config)#vlan 7

  Switch(config-vlan)#name god_lan

Конечно, когда необходимо ввести эти команды на одном – двух коммутаторах, то никаких проблем это не составляет. Но что если нам необходимо добавить не одну виртуальную сеть, а скажем с десяток, и это требуется сделать не на одном коммутаторе, а скажем на 10 или нет даже на 100, что тогда? Вводить сотни строк кода каждый раз когда нам необходимо изменить присутствующие на коммутаторах VLAN? К счастью нет, избавиться от такой нудной и кропотливой работы нам поможет протокол VTP.

Протокол VTP отвечает за распространение сведений о VLAN существующих на одних коммутаторах,  между  остальными коммутаторами определенной группы (такую группу коммутаторов обычно называют VTP доменом) и сильно упрощает процесс реконфигурации виртуальных локальных сетей на коммутаторах фирмы Cisco.

Все коммутаторы, на которых функционирует протокол VTP, могут работать в одном из трех режимов: сервер, клиент, прозрачный режим. Коммутаторы, работающие в режиме сервера, позволяют вносить изменения в конфигурацию VLAN на текущем коммутаторе, а так же способны распространять данную конфигурацию между другими  коммутаторами VTP домена, передавая данные о внесенных изменениях через магистральные порты. Коммутаторы, работающие в режиме клиента, способны принимать данные об изменениях в составе виртуальных локальных сетей отправленные коммутаторами, работающими в режиме VTP серверов, и способны на основание этих данных перестраивать свои списки существующих VLAN. Коммутаторы работающие в прозрачном режиме пропускают через свои магистральные порты данные об изменение в конфигурации VLAN, но не применяют их по отношению к своей конфигурации VLAN.



Давайте рассмотрим процесс конфигурации протокола VTP на конкретном примере. Пусть у нас есть сеть следующего вида:

Тестовая сеть
Тестовая сеть

Устройства имеют следующую конфигурацию:

Коммутатор Switch0:

  Switch(config)#interface range fastEthernet 0/1-2

  Switch(config-if-range)#switchport mode trunk

Коммутатор Switch1:

  Switch(config)#interface fastEthernet 0/1

  Switch(config-if)#switchport mode trunk

Коммутатор Switch2:

  Switch(config)#interface fastEthernet 0/1

  Switch(config-if)#switchport mode trunk

Как легко понять с помощью данной конфигурации мы связываем коммутаторы 1 и 2 с коммутатором 0 с помощью магистральных (транковых) портов. Если схема настроена верна то при выполнение команды show interfaces trunk на коммутаторе Switch0, то мы должны увидеть следующую картину:

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

Fa0/2       on           802.1q         trunking      1

Теперь допустим нам необходимо добавить на все эти три коммутатора какой то новый VLAN, пусть это будет все тот же VLAN 7 — god_lan. Конечно это можно сделать обычным способом с помощью команды vlan в режиме конфигурации, но не торопитесь так делать, ведь мы все таки разбираем протокол VTP, и по этому для решения данной задачи мы будем использовать именно его возможности.

Как мы говорили выше все коммутаторы в протоколе VTP играют определенные роли: сервер, клиент и т.д. Поэтому нам необходимо определиться с тем какие роли будут выполнять коммутаторы нашей сети. Сначала выберем коммутатор играющий роль сервер. Обычно в качестве такого коммутатора выбирают устройство приблизительно равноудаленное от всех остальных устройств VTP домена, для того чтобы сократить хоть и небольшую, но нагрузку, возникающую в сети при распространении обновлений протокола VTP между коммутаторам (обновления рассылаются при изменение конфигурации VLAN сетей на сервере, а так же каждые 300 секунд).Так же необходимо отметить что в сети может быть несколько VTP серверов.

В нашем случае в качестве VTP сервера удобно выбрать коммутатор Switch0 (Хотя если вам очень хочется можете выбрать любой другой). Для того чтобы сконфигурировать Switch0 в качестве VTP сервера выполним на нем следующие команды:

  Switch(config)#vtp domain TEST

  Switch(config)#vtp password 123

  Switch(config)#vtp version 2

Грубо говоря обязательная из этих команд только первая. Остальные при желание можно опустить. Но обо всем по порядку. С помощью первой команды мы задаем имя нашему VTP домену, аккуратнее регистр имеет значение. По умолчанию каждый коммутатор сконфигурирован в качестве VTP сервера и пустым именем VTP домена. С помощью второй команды мы задаем пароль необходимый для того чтобы коммутатор мог вступить в VTP домен. С помощью третьей команды мы задаем используемую версию протокола VTP (по умолчанию и так используется версия 2, об отличие версий протокола VTP поговорим в следующих статьях ).

Далее сконфигурируем коммутаторы Switch1 и Switch2 в качестве клиентов VTP, для этого выполним на них команды:

  Switch(config)#vtp domain TEST

  Switch(config)#vtp password 123

  Switch(config)#vtp version 2

  Switch(config)#vtp mode client

Опять же здесь обязательные только первые две команды. Причем первая из них тоже может не понадобиться в том случае если вы подключаете к VTP домену коммутатор с пустым именем VTP домена, так как в этом случае он подхватит имя VTP домена автоматически от существующих в домене серверов. Последняя команда указывает коммутатору что ему необходимо функционировать в качестве клиента в VTP домене.

После введения данных команд базовую конфигурацию нашего VTP домена можно считать законченной. Настало время проверить его работу. Для этого мы выполним на коммутаторе Switch0 команды:

  Switch(config)#vlan 7

  Switch(config-vlan)#name god_lan

А затем посмотрим вывод команды sho vlan brief на коммутаторе Switch1 или Switch0, если протокол VTP работает то мы должны увидеть следующую картину:

VLAN Name                             Status    Ports

—- ——————————— ——— ——————————-

1    default                          active    Fa0/2, Fa0/3, 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, Gig1/1

                                                Gig1/2

7    god_lan                          active   

1002 fddi-default                     active   

1003 token-ring-default               active   

1004 fddinet-default                  active   

1005 trnet-default                    active 

Как можно увидеть из данного вывода команды, хотя мы и не выполняли команды добавления VLAN с номером 7 на коммутаторах Switch1 или Switch2, он все же присутствует на них и происходит это благодаря работе протокола VTP.

Теперь для интереса попробуем добавить новый VLAN на коммутаторе Switch1 выполнив команду:

  Switch(config)#vlan 8

После ввода данной команды мы получим сообщение вида:

VTP VLAN configuration not allowed when device is in CLIENT mode.

Прямо говорящее нам о том, что мы не можем добавлять VLANы на коммутаторах функционирующих в качестве клиентов в VTP домене.

И так мы научились выполнять базовую конфигурацию протокола VTP, которая уже позволяет нам распространять обновления конфигурации VLAN на коммутаторах нашей сети. О других фишках протокола VTP мы поговорим в следующих статьях.

Всем привет! Сегодня я хочу предложить вам решить лёгкую задачку на устранение неполадок VTP (Vlan Trunking Protocol).

Схема сети:

Топология

Топология

Скачать схему можно отсюда: Бдымс! (Искренне надеюсь, что схема откроется. У меня 6.0.2.0052).

Стартап-конфиг SW1:

Развернуть »

!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
!
interface FastEthernet0/3
switchport access vlan 10
!
interface FastEthernet0/4
switchport access vlan 10
!
interface FastEthernet0/5
switchport access vlan 10
!
interface FastEthernet0/6
switchport access vlan 20
!
interface FastEthernet0/7
switchport access vlan 20
!
interface FastEthernet0/8
switchport access vlan 20
!
interface FastEthernet0/9
switchport access vlan 20
!
interface FastEthernet0/10
switchport access vlan 20
!
interface FastEthernet0/11
switchport access vlan 50
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end

Стартап-конфиг SW2:

Развернуть »

!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW2
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end

Стартап-конфиг SW3:

Развернуть »

!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW3
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode trunk
switchport nonegotiate
!
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
switchport access vlan 30
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end

Итак, начинающий системный администратор Пётр Петрович соединил три коммутатора в кольцо и хочет убедиться, что протокол VTP работает как надо. Для проверки обновления базы VLAN на коммутаторах он создал на SW1 несколько VLAN (10, 20, 50) и ждёт, что они распространятся на остальные коммутаторы.

Попутно он зачем-то сделал VLAN 30 на коммутаторе SW3.

Вопреки его ожиданиям, VLAN-ы не распространяются на соседние устройства.

Помогите Петру Петровичу решить все проблемы в этой топологии.


Попутные вопросы:

  1. Где хранятся конфигурации протокола VTP?
  2. Почему VLAN-ы не распространились с коммутатора SW1 на устройство SW2?
  3. Почему VLAN-ы не распространились с коммутатора SW1 на устройство SW3?
  4. Почему VLAN-ы не распространились с коммутатора SW3 на коммутатор SW2?
  5. Что произойдёт с VLAN 30 на устройстве SW3, когда все проблемы в сети будут решены?

Я не буду спрашивать “Хотите ли вы ещё видеть подобные TroubleShoot-задачки?”, потому что в комментах всё равно почти никто не пишет :)

Всем бобра.

А вот и ответы!

Развернуть »

  1. Где хранятся конфигурации протокола VTP?
    Конфигурация VTP сохраняется в файле flash:vlan.dat на коммутаторе; В конфиге эти настройки не отображаются.
  2. Почему VLAN-ы не распространились с коммутатора SW1 на устройство SW2?
    Потому что между SW1 и SW2 нет trunk канала. Это видно из конфига соответствующих портов. Нужно добавить команды (config-if)# switchport mode trunk  для SW1:fa0/1 и SW2:fa0/1
  3. Почему VLAN-ы не распространились с коммутатора SW1 на устройство SW3?
    Потому что в SW3 настроен VTP домен с другим именем (LitlAdmin) против litladmin у остальных. Нужно поменять имя домена: (config)# vtp domain litladmin
  4. Почему VLAN-ы не распространились с коммутатора SW3 на коммутатор SW2?
    По той же самой причине (см. пункт 3).
  5. Что произойдёт с VLAN 30 на устройстве SW3, когда все проблемы в сети будут решены?
    Все настройки VLAN на SW3 будут утрачены, так как ревизия VTP меньше, чем ревизия на SW1. Чтобы настройки не были утрачены, нужно или перевести режим VTP в Transparent или поднять ревизию выше, чем у SW1 (но тогда затёрты будут настройки на SW1).

I am trying to make a C2811 (yes, with switching ports, thank you very much) join a VTP domain. This fails with the syslog message

VTP LOG RUNTIME: DRAM failed for domain

This is rare, but google does turn up nothing for that. Checked the VTP version (2), password and domain name (yes did make a mistake with that, at first) but the C2811 downgrades from client to transparent the moment I set the domain name. The previous mentioned message is preceded by:

VTP LOG RUNTIME: Subset packet received, domain = [DELETED], rev = 43, seq = 1, length = 612
%SW_VLAN-6-VTP_MODE_CHANGE: VLAN manager changing device mode from CLIENT to TRANSPARENT.
VTP LOG RUNTIME: VTP mode changed to Transparent.

The C2811 does have a limit of max 36 vlans, but the number to be passed through VTP is 25. Another switch joined the domain nicely.

The DRAM message let me to check memory, but that didn’t reveal anything either:

sh mem sum
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   4813DE60   118235552    44749540    73486012    69242144    68504536
      I/O   3F200000    14680064     7002632     7677432     7262336     7610556

I am at a loss, anybody know something how to solve this?

Added for @hertitu :

Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(24)T, RELEASE SOFTWARE (fc1)    

c2811# sh vtp stat  
VTP Version : 2  
Configuration Revision : 0  
Maximum VLANs supported locally : 36  
Number of existing VLANs : 5  
VTP Operating Mode : Transparent  
VTP Domain Name : MYCOMPANY  
VTP Pruning Mode : Disabled  
VTP V2 Mode : Enabled  
VTP Traps Generation : Disabled 
MD5 digest : 0xC3 0x66 0xAA 0x9A 0x4C 0x6C 0x22 0x97
Configuration last modified by 192.168.160.254 at 10-14-16 07:03:14 
c2811#  

c3750# sh vtp stat  
VTP Version : 2  
Configuration Revision : 43  
Maximum VLANs supported locally : 1005  
Number of existing VLANs : 25  
VTP Operating Mode : Server  
VTP Domain Name : MYCOMPANY  
VTP Pruning Mode : Disabled  
VTP V2 Mode : Enabled  
VTP Traps Generation : Disabled  
MD5 digest : 0xC2 0x15 0x21 0xDF 0x96 0xA9 0xD9 0xAC  
Configuration last modified by 192.168.160.1 at 10-14-16 12:03:57 –  
Local updater ID is 192.168.160.1 on interface Vl1 (lowest numbered     VLAN interface found)  
c3750#

Another clue: router that I claimed joined the domain nicely (a WS-C3650-24TS/(CAT3K_CAA-UNIVERSALK9-M), Version 03.03.05SE) did indeed join -same revision number and sh vl brief matches-, but gives a MD5 mismatch:

`c3650#sh vtp status  
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : MYCOMPANY
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : 0035.1aa8.cb80
Configuration last modified by 192.168.160.1 at 10-14-16 12:03:57

Feature VLAN:
--------------
VTP Operating Mode                : Client
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 25
Configuration Revision            : 43
MD5 digest                        : 0xA2 0x76 0x9C 0xF7 0x0A 0x1A 0x0D 0xBF 
                                    0x13 0xEE 0x4A 0x25 0x59 0x9F 0xF0 0xA7 
*** MD5 digest checksum mismatch on trunk: Gi1/0/24 ***
c3650#`

rigeek

Ars Tribunus Angusticlavius


  • Add bookmark

  • #1

Having some connectivity issues lately, so I did something we should have done a long time ago and turned on logging on all our Cisco switches and installed a syslog server for them all to log to. This was enabled here years ago but had since fallen apart. Not noticing anything yet as relates to the dropping of traffic, but keep seeing this one thing logged.. from my initial research, it doesn’t seem like a big deal, but can’t find much.. before I call Cisco I figured I’d throw it out here. The log:<BR><BR>%SW_VLAN-3-VTP_PROTOCOL_ERROR: VTP protocol internal error: Version 1 device detected on Fa0/23<BR><BR>I checked all the switches and they are all running VTP version 2 that I can see. If there is a switch running Version 1 I can’t find it.<BR><BR>I have no idea if this is new or not, as I said we were not logging anything prior to my turning on the syslog and changing the logging on the switches to the «new» syslog. Not getting any other messages like this on any other switches that I know of. It’s logging this every ~6 minutes. I can post the running-config if it would help.

  • Add bookmark

  • #2

Find out whats on F0/23 on that switch and figure out why its trying to use VTP version 1. <BR><BR>The show runs will help.

rigeek

Ars Tribunus Angusticlavius


  • Add bookmark

  • #3

F0/23 is setup as a trunk port .. I believe it is a backhaul to another switch .. which is VTP V2.<BR><BR>Sh Run:<BR>Building configuration…<BR><BR>Current configuration:<BR>!<BR>version 12.0<BR>no service pad<BR>service timestamps debug uptime<BR>service timestamps log datetime<BR>no service password-encryption<BR>service sequence-numbers<BR>!<BR>hostname sw-rsvault-26<BR>!<BR>enable secret 5 <removed><BR>enable password <removed><BR>!<BR>!<BR>!<BR>!<BR>!<BR>!<BR>ip subnet-zero<BR>!<BR>!<BR>!<BR>interface FastEthernet0/1<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/2<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/3<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/4<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/5<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/6<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/7<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/8<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/9<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/10<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/11<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/12<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/13<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/14<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/15<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/16<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/17<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/18<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/19<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/20<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/21<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/22<BR> switchport access vlan 5<BR>!<BR>interface FastEthernet0/23<BR> switchport mode trunk<BR>!<BR>interface FastEthernet0/24<BR> switchport mode trunk<BR>!<BR>interface FastEthernet0/25<BR>!<BR>interface FastEthernet0/26<BR>!<BR>interface VLAN1<BR> ip address 10.10.1.26 255.255.255.0<BR> no ip directed-broadcast<BR> no ip route-cache<BR>!<BR>logging 10.10.10.226<BR>snmp-server engineID local 0000000902000005DCD29BC0<BR>snmp-server community <removed> RO<BR>snmp-server community <removed> RO<BR>snmp-server community <removed> RW<BR>snmp-server enable traps snmp authentication linkdown linkup coldstart<BR>snmp-server enable traps config<BR>snmp-server enable traps entity<BR>snmp-server enable traps hsrp<BR>snmp-server enable traps c2900<BR>snmp-server enable traps vlan-membership<BR>snmp-server enable traps vtp<BR>snmp-server enable traps cluster<BR>snmp-server host 10.10.1.100 trap <removed> <BR>!<BR>line con 0<BR> transport input none<BR> stopbits 1<BR>line vty 0 4<BR> password <removed><BR> login<BR>line vty 5 15<BR> password <removed><BR> login<BR>!<BR>ntp server 192.100.100.76 key 0 prefer<BR>end

  • Add bookmark

  • #4

Whoa, someone is using VTP? Did you do that intentionally?

  • Add bookmark

  • #5

Im using VTP at my workplace, whats wrong with that. It works great.

  • Add bookmark

  • #7

From an enable prompt issue the following command on both devices to check things out:<BR><BR>Show vtp status<BR><BR>Version 2 is if you need token ring, 1 is if you don’t.<BR><BR>To change the VTP mode, from global config enter:<BR><BR>Vtp version 1 or 2

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #8

I’ve never understood the seething hatred some people have for VTP. It’s great when deployed properly.<BR><BR>And before the people chime in with ‘it’s Cisco proprietary and therefore bad’, there’s an open standard version of VTP for doing VLAN management as well.

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #9

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by GeekusMaximus:<BR>From an enable prompt issue the following command on both devices to check things out:<BR><BR>Show vtp status<BR><BR>Version 2 is if you need token ring, 1 is if you don’t.<BR><BR>To change the VTP mode, from global config enter:<BR><BR>Vtp version <put a 1 or 2 here> </div></BLOCKQUOTE><BR><BR>VTP versions have nothing to do with token ring or not.<BR><BR>VTP version 2 enables extra features and cut down on VTP traffic.

  • Add bookmark

  • #10

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Arbelac:<BR><BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by GeekusMaximus:<BR>From an enable prompt issue the following command on both devices to check things out:<BR><BR>Show vtp status<BR><BR>Version 2 is if you need token ring, 1 is if you don’t.<BR><BR>To change the VTP mode, from global config enter:<BR><BR>Vtp version <put a 1 or 2 here> </div></BLOCKQUOTE><BR><BR>VTP versions have nothing to do with token ring or not.<BR><BR>VTP version 2 enables extra features and cut down on VTP traffic. </div></BLOCKQUOTE><BR><BR>I am wrong, he’s correct. Token ring is for V2, not version 2.

rigeek

Ars Tribunus Angusticlavius


  • Add bookmark

  • #11

I checked every switch I can find, and they’re all Version 2. I have no other gear that would be connected directly to that switch other than end-user equipment (PC’s, printers) other than a backhaul to another switch (which is VTP2).<BR><BR>Honestly, I don’t know why we use it, our VLAN’s were setup by the previous network manager, and he tended to do things the super complicated way, so it’s possible he’s overcomplicated things. I’m more of an MS backend guy, but I know enough Cisco to survive (this is over my head.)

  • Add bookmark

  • #12

Maybe a corrupt vlan.dat file somewhere <BR><BR>delete the vlan.dat file and reload the switch

  • Add bookmark

  • #13

It sure seems like something is sending V1 announcements. <BR><BR>It might be worthwhile to sweep for rogue switches.<BR><BR>Other than that, problems I remember with VTP included bringing up a new switch with a newer database version number, but no actual VLANs within. <BR><BR>Any switch that doesn’t need to be participating could be forced to transparent (IIRC) with regards to VTP. It will pass info along, but will not participate.

rigeek

Ars Tribunus Angusticlavius


  • Add bookmark

  • #14

Welp, I pay Cisco a shitton of money for SmartNet every year and hardly ever use it. I’ll open up a case with them tomorrow and see what they say. Much appreciate all the answers! I’ll share here what Cisco says.

Fint

Ars Scholae Palatinae


  • Add bookmark

  • #15

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Arbelac:<BR>I’ve never understood the seething hatred some people have for VTP. It’s great when deployed properly.<BR> </div></BLOCKQUOTE><BR><BR>Given certain rare corner cases*, VTP can eat your network. Because of this, some people are scared of it, but I don’t see the problem either.<BR><BR>* Someone takes a switch with your valid VTP domain and password offline, bumps the config revision number to be higher than yours, deletes all the VLANs or other such silliness, and then adds it back to your network. Because the domain and password are valid, and the config revision is higher than everything else, it pushes its «there are no vlans» config out to everything, causing you to update your resume and hit up Monster/Dice.

  • Add bookmark

  • #16

Modern VTP is great IMHO. I really don’t like it when I have to deal with a large network where every single little access switch needs to have vlans created on it manually. <BR><BR>If you put a shared secret that you keep safe on and you only set your core switches to server mode and the rest as client, it works quite well. <BR><BR>VTP3 which I’ve found is seldom deployed adds additional protection that makes the problem of rouge switches overwriting the vlan database less of an issue, but really having a password in v2 should be enough.

  • Add bookmark

  • #17

I have a fun VTP story. A couple of years ago an L2 Metro E customer of ours called in a ticket about a site that disappeared. Our techs isolated the issue to customer network weirdness within a couple of hours, but the customers weren’t convinced. This trouble ended escalating to ridiculous heights and the customer worked around the clock <I>with our techs</I> for over 24 hours. <BR><BR>I worked on it at a couple of times and luckily I was on the conference with three of the customer’s techs, two of our managers and another of our techs when the customer found he deleted that site’s VLAN from the VTP server.<BR><BR>When all was said and done, we charged the customer $6,000 for that call. Easily mismanaged VTP <I>can</I> eat your network and cost a lot of time, money, and respect.

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #18

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Fint:<BR><BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Arbelac:<BR>I’ve never understood the seething hatred some people have for VTP. It’s great when deployed properly.<BR> </div></BLOCKQUOTE><BR><BR>Given certain rare corner cases*, VTP can eat your network. Because of this, some people are scared of it, but I don’t see the problem either.<BR><BR>* Someone takes a switch with your valid VTP domain and password offline, bumps the config revision number to be higher than yours, deletes all the VLANs or other such silliness, and then adds it back to your network. Because the domain and password are valid, and the config revision is higher than everything else, it pushes its «there are no vlans» config out to everything, causing you to update your resume and hit up Monster/Dice. </div></BLOCKQUOTE><BR><BR>This is the commonly trotted out corner case, and it’s certainly something to be aware of, but any trained network admin should be aware of what to do, and what NOT to do with -any- given technology.<BR><BR>Too many people blame the technology when it’s really a lack of understanding and proper procedures.

  • Add bookmark

  • #19

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>This is the commonly trotted out corner case, and it’s certainly something to be aware of, but any trained network admin should be aware of what to do, and what NOT to do with -any- given technology.<BR><BR>Too many people blame the technology when it’s really a lack of understanding and proper procedures. </div></BLOCKQUOTE><BR><BR><BR>I agree. VTP is no different in this case than, say, deleting a static route from your OSPF database, or turning of redistributes of some kind. <BR><BR>PEBKAC isn’t an issue with the technology. <BR><BR>In an environment with frequently changing topology (say, lots of building moves/department re-orgs/acquisitions/etc.) then VTP can greatly reduce your administrative burden.

  • Add bookmark

  • #20

to OP: do a «show cdp neighbors» command on your switch make sure you know whats on the other end of your trunk ports. On the switch in question whats the «show vtp status» output?<BR><BR><BR>We successfully run VTP on over 600 switches in our L2 network. We have a core VTP domain for core equipment then a VTP domain for each building on campus.<BR><BR>Only been bitten once with the VTP overwrite due to higher version switch being installed. But that was due to a tech who didnt know what he was doing and shouldn’t have been installing the switch in the first place.

rigeek

Ars Tribunus Angusticlavius


  • Add bookmark

  • #21

Output of «show cdp neighbors» on the offending switch:<BR><BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»><BR>sw-rsvault-26#show cdp neighbors<BR>Capability Codes: R — Router, T — Trans Bridge, B — Source Route Bridge<BR> S — Switch, H — Host, I — IGMP, r — Repeater<BR> <BR>Device ID Local Intrfce Holdtme Capability Platform Port ID<BR>sw-rswh-20 Fas 0/24 141 S I WS-C2950G-Fas 0/48<BR>sw-vault-02 Fas 0/23 128 T S WS-C2950-2Fas 0/24<BR> </div></BLOCKQUOTE><BR><BR>sw-vault-02 is one of the switches in a remote area that backhauls to this switch. <BR><BR>»show vtp status» output from sw-vault-02:<BR><BR><BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»><BR>sw-vault-02#show vtp status<BR>VTP Version : 2<BR>Configuration Revision : 0<BR>Maximum VLANs supported locally : 68<BR>Number of existing VLANs : 6<BR>VTP Operating Mode : Server<BR>VTP Domain Name : [deleted]<BR>VTP Pruning Mode : Disabled<BR>VTP V2 Mode : Disabled<BR>VTP Traps Generation : Enabled<BR>MD5 digest : 0x76 0x8F 0xC8 0x0F 0x91 0x2B 0xED 0xCB<BR>Configuration last modified by 10.10.1.32 at 3-16-93 14:46:50<BR> </div></BLOCKQUOTE><BR><BR>So it’s definitely VTP v2.

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #22

Your config rev is really at zero?<BR><BR>Also, you may have a device plugged into that switch somewhere that is issuing VTP packets? A server or network analyzer that speaks VTP perhaps?

  • Add bookmark

  • #23

Try setting it to vtp client then back to vtp server. I’ve had this problem before. If that doesn’t fix it. Try vtp transparent then server. I don’t remember which did it.<BR><BR><BR>Also, I just noticed «VTP V2 Mode : Disabled?» v2 is in the domain, but not on the switch. You should be able to add «vtp v 2» to fix it. I would add and remove a vlan from a different vtp server first just to bump the revision.<BR><BR>And I hope my last edit…<BR>Get the clock set or a preferably use ntp. Vtp without accurate time is a poor choice of roads to your destination.

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #24

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Pablito74:<BR>Try setting it to vtp client then back to vtp server. I’ve had this problem before. If that doesn’t fix it. Try vtp transparent then server. I don’t remember which did it.<BR><BR><BR>Also, I just noticed «VTP V2 Mode : Disabled?» v2 is in the domain, but not on the switch. You should be able to add «vtp v 2» to fix it. I would add and remove a vlan from a different vtp server first just to bump the revision.<BR><BR>And I hope my last edit…<BR>Get the clock set or a preferably use ntp. Vtp without accurate time is a poor choice of roads to your destination. </div></BLOCKQUOTE><BR><BR>VTP V2 is not related to the version.

  • Add bookmark

  • #25

sw-vault-02#show vtp status<BR>VTP Version : 2 <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>Configuration Revision : 0<BR>Maximum VLANs supported locally : 68<BR>Number of existing VLANs : 6<BR>VTP Operating Mode : Server<BR>VTP Domain Name : [deleted]<BR>VTP Pruning Mode : Disabled<BR>VTP V2 Mode : Disabled <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>VTP Traps Generation : Enabled<BR>MD5 digest : 0x76 0x8F 0xC8 0x0F 0x91 0x2B 0xED 0xCB<BR>Configuration last modified by 10.10.1.32 at 3-16-93 14:46:50<BR><BR>from the cisco lan switching config guide:<BR><BR>To enable VLAN Trunk Protocol (VTP) version 2 mode, use the vtp v2-mode command<BR><BR>This switch is in a v2 domain but running v1 mode.<BR><BR><BR>Edit:<BR><BR>This isn’t from Cisco, but:<BR><BR>IOS 12.2(37)SE1<BR><BR>CAT3(config)#vtp version 1<BR>VTP mode already in V1.<BR>CAT3(config)#do show vtp status<BR>VTP Version : running VTP1 (VTP2 capable) <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>Configuration Revision : 0<BR>Maximum VLANs supported locally : 1005<BR>Number of existing VLANs : 13<BR>VTP Operating Mode : Transparent<BR>VTP Domain Name : dotit-lab9<BR>VTP Pruning Mode : Disabled<BR>VTP V2 Mode : Disabled <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>VTP Traps Generation : Disabled<BR>MD5 digest : 0×98 0×87 0×41 0×6D 0×12 0×0C 0×6A 0xB6<BR>Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00<BR><BR>CAT3(config)#vtp version 2 <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>CAT3(config)#do show vtp status<BR>VTP Version : running VTP2 <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>Configuration Revision : 0<BR>Maximum VLANs supported locally : 1005<BR>Number of existing VLANs : 13<BR>VTP Operating Mode : Transparent<BR>VTP Domain Name : dotit-lab9<BR>VTP Pruning Mode : Disabled<BR>VTP V2 Mode : Enabled <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″> <BR>VTP Traps Generation : Disabled<BR>MD5 digest : 0×26 0×72 0×63 0xDB 0×70 0×43 0xD2 0×34<BR>Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00<BR><BR>Another edit:<BR>this looks like you are on older code 12.0 possibly, it will say:<BR><BR>VTP Version : 2<BR><BR>instead of:<BR><BR>VTP Version : running VTP1 (VTP2 capable)

  • Add bookmark

  • #26

The main reason Cisco recommends against VTP in most environments is that when following best practices it’s more of an overhead detriment than time saver.<BR><BR>Best practice wise each VLAN should appear on the distribution/aggreation layer switch, and 1 access layer switch at most. VTP only saves you creating the VLAN in 1 place in this instance and creates it on potentially dozens on switches that don’t need it. Best practice wise you’d have to touch both switches to configure the VLANs allowed on the trunk anyway. Even with VTP pruning the switches still run a PVSTP instance for the pruned VLANs, you also have a larger failure domain when adding/removing VLANs. Combine that with the idea that if you aren’t spanning VLANs across multiple access layer switches your VLAN usage should be fairly static.<BR><BR>Not suggesting all of that is right, or a big deal, just laying out the case. In my experience though, if VTP seems like a huge time saver in a network it probably has underlying design issues.

Arbelac

Ars Tribunus Angusticlavius


  • Add bookmark

  • #27

VTP is a huge time saver in a network where the access-layer VLAN requirements change often.

  • Add bookmark

  • #28

I have to admit I do enjoy using vtp on some networks. While I try to follow Cisco best practices, I have yet to find a client that is happy to hear:<BR><BR>We will need you to rerun all your in-wall cable to a central location. You will need to purchase a 3750 stack or 4k/6k chassis to run your 124 phones with 100mbit pc’s. We could use a bunch of poe 2900’s and save $1000’s, but the vlans will need to be different for each switch, plus you will need to re ip everything to accomodate those vlans.<BR><BR>At each site… <img src=»http://episteme.arstechnica.com/groupee_common/emoticons/icon_smile.gif» alt=»Smile» width=»15″ height=»15″>

  • Add bookmark

  • #29

<BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Fint:<BR>Given certain rare corner cases*, VTP can eat your network. Because of this, some people are scared of it, but I don’t see the problem either.<BR><BR>* Someone takes a switch with your valid VTP domain and password offline, bumps the config revision number to be higher than yours, deletes all the VLANs or other such silliness, and then adds it back to your network. Because the domain and password are valid, and the config revision is higher than everything else, it pushes its «there are no vlans» config out to everything, causing you to update your resume and hit up Monster/Dice. </div></BLOCKQUOTE><BR><BR>A misconfiguration or a rogue switch installed by a known tech taking down your network is a better-case scenario when it comes to VTP. The worst-case scenarios might involve notifying your board of directors about a security incident that’s going to need to be reported in public SEC filings.<BR><BR><BLOCKQUOTE class=»ip-ubbcode-quote»><div class=»ip-ubbcode-quote-title»>quote:</div><div class=»ip-ubbcode-quote-content»>Originally posted by Facekhan:<BR>VTP3 which I’ve found is seldom deployed adds additional protection that makes the problem of rouge switches overwriting the vlan database less of an issue, but really having a password in v2 should be enough. </div></BLOCKQUOTE><BR><BR>Are there situations where VTP is the least-bad option? Certainly. I haven’t run into any of them yet, but then VLANs should only be as complex as they need to be, and no more. The networkers I know avoid VTP for a reason.

EricP

Ars Legatus Legionis


  • Add bookmark

  • #30

We use VTP primarily because we have multiple separate wireless networks that don’t interact with each other. Adding an AP to a switch means adding 2 vlans. If they want 2 different APs, that’s 4 VLANs. And so on.

I have a 3560 switch. The config is.

version 12.2
no service pad
service timestamps debug uptime
service timestamps log datetime
no service password-encryption
service sequence-numbers
!
hostname awccsw
!
enable secret 5 $1$y0F/$LskrU2W5hPk381h3LtqIr1
enable password 123456
!
no aaa new-model
vtp domain cisco
vtp mode transparent
ip subnet-zero
!
cluster enable test 0
!
!
no file verify auto
!
spanning-tree mode pvst
spanning-tree extend system-id
no spanning-tree vlan 1
!
vlan internal allocation policy ascending
!
!
interface FastEthernet0/1
no switchport
ip address 192.168.44.115 255.255.255.0
!

interface FastEthernet0/2
!
interface FastEthernet0/3
(……………….output cut…………………)
interface FastEthernet0/47
!
interface FastEthernet0/48
!

interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface Vlan1
no ip address
!
ip classless
ip http server
ip http secure-server
!
!
snmp-server community public RO
snmp-server community [email protected] RO
!
control-plane
!
!
line con 0
line vty 0 4
password 123456
login
line vty 5 15
password 123456
login
!
end

Now, FastEthernet 0/5 is connected to a D-Link switch. This port is showing the following error message:

000195: *Mar 1 02:45:45: %DTP-5-DOMAINMISMATCH: Unable to perform trunk negotia
tion on port Fa0/5 because of VTP domain mismatch.

My point is:

1. If the VTP domain mode in the switch is transparent, where is the error coming from?

2. The other end is just a D-link switch, why its asking for trunk negotiation. I tried with setting it as a trunk port which did not solve the error.

At first, the port was not working at all (orange) and showing «Inconsistent port type«. I turned off STP for the default vlan (I mean the vlan1, there is no other vlan configured here). Now the port is working, still its showing the above error.

How can I solve this issue?

Привет.

Протокол VTP (VLAN Trunk Protocol) является одним из самых известных вендорских протоколов, занимающихся L2-задачами в корпоративных сетях. Знания и навыки работы с VTP нужны по многим причинам – ну, по крайней мере чтобы понимать, что из функционала реально приобретается, если в сети есть поддержка этого протокола, а что – нет. Это необходимо для ухода от крайностей как вида “раз цисковский протокол, то без него / его поддержки жить нельзя в принципе, надо сразу удавиться”, так и “раз его не смогло разработать опенсорсное коммунити, то это не нужный протокол”.

История протокола VTP достаточно продолжительна – первый раз он появляется в CatOS 2.1 (это Cisco Catalyst 2900 и 5000), после чего слегка модернизируется до второй версии и живёт очень долго. Третья версия, в которой реально много полезных изменений, вышла несколько лет назад, но до сих пор не поддерживается на многих устройствах начального уровня. Однако это не обозначает, что её не нужно изучать.

Изучение данного протокола то добавляется фирмой Cisco в треки CCNA Routing and Switching и CCNP Routing and Switching, то убирается – поэтому у нас он дополнительно изучается как на курсах Cisco ICND2 3.0 и Cisco SWITCH 2.0, так и в составе трека Advanced CCNA и в части углублённых вопросов – в отдельном занятии трека Advanced CCNP.

Поэтому имеет смысл разово изучить VTP, чтобы разобраться что и как.

Оглавление

  • Зачем нужен VTP
  • Как технически реализован VTP
  • Как работает протокол VTP
  • VTP pruning – что это?
  • Базовая настройка протокола VTP
  • Расширенная настройка протокола VTP
  • Типовые ошибки настройки VTP
  • Ситуация с добавлением нового коммутатора в существующую VTP-инфраструктуру
  • Протокол VTPv3

Зачем нужен VTP

Ключевое назначение протокола VTP – это решать вопрос синхронизации базы данных с информацией о VLAN’ах между коммутаторами в кампусной сети предприятия. В данном процессе, кстати, могут участвовать и маршрутизаторы – в случае, если у них установлена специальная карта, являющаяся по сути мини-коммутатором (т.н. switchboard – например, достопочтимая NM-16ESW, благодаря которой и dynamips иногда за коммутатор сойдёт).

Протокол VTP помогает упрощать операции с VLAN’ами в организации – добавление, удаление, изменение параметров, а также оптимизирует сетевой трафик, благодаря наличию функции vtp pruning. VTP современной версии – третьей – ещё и помогает жить протоколу MST (который 802.1s), плюс исправляет древние проблемы с безопасностью у VTP первой и второй версий.

Логическая модель работы VTP

Cisco VTP объединяет физически напрямую подключённые друг к другу коммутаторы (т.е. не через роутер или другой свич, не поддерживающий VTP) в именованные области, называемые доменами VTP. В одной организации таких доменов может быть несколько, главное – чтобы они непосредственно не контачили друг с другом, т.к. процедура междоменного взаимодействия не проработана. Предполагается, что VTP используется в “классической” кампусной сети, где много коммутаторов и есть задача “чтобы можно было подключить абонента в нужный VLAN на любом коммутаторе”. У современных сетей такая конструкция встречается всё реже и реже, она вытесняется L3-связями у distribution-коммутаторов и другими моделями взаимодействия, которые обеспечивают большую гибкость и скорость передачи данных по внутренней сети благодаря уходу от L2-доменов со Spanning Tree на топологии с L3-связями и ECMP.

Как технически реализован протокол VTP

Технологически протокол VTP реализован как SNAP-вложение в кадры ISL или 802.1Q. Работать может на 802.3 (Ethernet) и 802.5 (Token Ring). А также поверх LANE, но, надеюсь, эта некрофилия вас не коснётся.

Нужно отметить, что служебные данные VTP вкладываются не сразу в кадр 802.3, а после транкового заголовка. Выглядит это так:

  • Обычный заголовок стандартного 802.3 (Destination MAC, Source MAC, тип вложения – например, в случае 802.1Q это будет 0x8100)
  • Подзаголовок LLC-уровня (это “верхний” подуровень канального уровня – кто проходил CCNA, тот знает, что у уровней модели OSI бывают подуровни, подробнее есть в нашем бесплатном вебинаре про LLC и CNAP, входящем в трек Advanced CCNA), содержащий SSAP/DSAP коды 0xAA 0xAA, обозначающий, что далее идёт SNAP-вложение.
  • Подзаголовок SNAP – Subnetwork Access Protocol, показывающий, что после будет не заголовок сетевого уровня, а дальнейшее разделение на субпротоколы канального уровня. В нашем случае SNAP несёт уже конкретную информацию, что вложен будет протокол, идентифицируемый как Cisco’вский протокол VTP (OUI = Cisco, Protocol = 0x2003).

А далее – уже данные самого протокола VTP, относящиеся к одному из типов VTP-сообщений. Это могут быть:

  • Код 0x01 – Анонс-оглавление (Summary advertisement);
  • Код 0x02 – Данные для анонса (Subset advertisement);
  • Код 0x03 – Запрос на повторную информацию (Advertisement request);
  • Код 0x04 – Данные для pruning (VTP join message);

Замечу, что про 802.1Q можно почитать в статье про 802.1Q и 802.1ad или посмотреть на нашем YouTube вебинар из серии Advanced CCNA про типы транкинга.

Так вот, далее.

Весь трафик Cisco VTP идёт на специальный “cisco’вский” мультикастовый MAC-адрес 01-00-0C-CC-CC-CC – на этот же адрес идёт и трафик протокола CDP, например, т.к. он тоже разработан фирмой Cisco. Как их разделяют?
Используется схема разделения по SNAP полю “протокол” – для CDP он будет 0x2000, для VTP – 0x2003. Этакое мультиплексирование канального уровня.

Роли устройств в домене VTP

На уровне взаимодействия и ролей устройств протокол VTP достаточно прост. Все коммутаторы делятся на три вида или роли:

  • VTP Server – те, на которых можно создавать новые VLAN’ы, удалять старые, изменять существующие – в общем те, где можно полноценно изменять всю базу VLAN’ов. Устройства с Read+Write доступом к vlan database, говоря иначе.
  • VTP Client – те коммутаторы, которые будут получать по сети анонсы от других VTP-устройств и не будут иметь возможности локально исправлять информацию (устройства с Read-only доступом).
  • Те, кто во всём этом участвовать не хочет и хочет иметь свою, локальную базу VLAN’ов и свободно их настраивать – “прозрачные” для VTP коммутаторы. Их роль будет называться VTP Transparent.
  • Отдельно и только в VTPv3 – те, кто во всём этом участвовать не хочет и не собирается передавать на другие порты полученные по транкам VTP-кадры – VTP Off.

Понятное дело, что в сети надо иметь хотя бы 1 устройство с ролью VTP сервера – а если коммутатор в сети всего один, то имеет смысл включить его сразу в режим VTP transparent. Вообще, “прозрачный режим” удобен тем, что коммутатор, если принимает кадр протокола VTP на любом порту, сразу передаёт этот кадр на все остальные транковые порты – просто ретранслирует этот кадр, не обрабатывая его. Этим (переключением в vtp transparent mode) заранее ликвидируется потенциальная возможность, что какой-то другой коммутатор злонамеренно повлияет на конфигурацию. Как понятно, это всё – только на портах в режиме транка.

Хранение информации о VLAN’ах и их настройках

В разных ролях VTP это реализовано различными способами:

  • Коммутатор с ролью VTP Server будет хранить настройки в файле vlan.dat на указанном устройстве хранения (один из flash’ей устройства)
  • Коммутатор с ролью VTP Transparent или VTP Off будет хранить настройки в конфигурации (это config.text, или, говоря проще, NVRAM)
  • Коммутатор с ролью VTP Client будет хранить настройки в оперативной памяти (их не будет видно в конфигурации или на flash)

Домены VTP

Домены VTP, как уже указано выше – это подмножества непосредственно подключенных друг к другу коммутаторов.

Для идентификации принадлежности устройства к домену VTP используется сравнение названия домена и хэша пароля (безусловно, не друг с другом, а между устройствами – т.е. оба этих параметра должны совпадать, чтобы VTP-устройства могли корректно общаться). Название домена VTP – это текстовая строка длиной до 32 байт (в случае, если название короче, оно добивается нулями – zero-padding), пароль – тоже текстовая строка, в чистом виде в сети не передающаяся, хранящаяся в случае работы устройства в роли VTP Server в файле vlan.dat, а в случае работы в режиме VTP Transparent – в NVRAM.

Обратите внимание на следующие два важных момента. Первый – то, что название домена является case-sensitive, потому что строки сравниваются побайтово. Поэтому коммутаторы из домена Domain и из домена DOMAIN работать друг с другом не будут. Второй – работа с паролем. В кадрах передаётся хэш пароля, а не хэш кадра. Поэтому этот пароль нужен только для идентификации принадлежности к домену и никак не подтверждает целостность сообщения VTP. Его можно просто разово заснифить и добавлять в VTP-сообщения для придания им “легитимности”.

Что же передают друг другу коммутаторы, обладающие ролями VTP Client и VTP Server?

Как работает протокол VTP

Протокол VTP в основном занимается полезной вещью – он передаёт базу данных VLAN между устройствами. Делает он это в следующих случаях:

  • Если Вы изменили базу данных VLAN’ов на устройстве с ролью VTP Server (т.е. провели успешную запись – не важно, какую – добавили VLAN, удалили VLAN, переименовали VLAN), то изменение будет передано немедленно после проведения записи.
  • Если после последней успешной записи (см. выше) прошло 300 секунд.

VTP версий 1 и 2 передаёт только данные по VLAN’ам с номерами от 1 до 1005. Увы, наследие страшных времён, CatOS, десятибитовые номера vlan’ов, чугунные игрушки, соображения совместимости и прочие причины. Зато в VTPv3 это успешно решено и обмен данными про VLAN’ы охватывает весь диапазон – от 1 до 4094.

Заметьте, что хоть стартовым инициатором рассылки VTP может быть только устройство с ролью VTP Server, но пересылать обновление могут любые коммутаторы – т.е. устройству с ролью VTP Client совсем необязательно быть непосредственно подключённому к VTP Server. Клиент, получив от сервера рассылку с новой версией базы данных VLAN’ов, передаст её на все другие транковые порты, за которыми опять же могут быть другие VTP Client’ы и VTP Transparent, и так – до упора. Ограничения стандарта 802.1D на максимальный диаметр “поля” коммутаторов здесь не действуют.

Итак, обновление базы данных – штука достаточно несложная. Вы – VTP Server, на Вас обновлена БД vlan’ов, Вы разослали во все транковые порты анонс, все коммутаторы, поддерживающие VTP, его прочитали, и, если они VTP Client или VTP Server, то применили к себе и отправили дальше, а если VTP Transparent – то не применили к себе, но отправили дальше. Как же определяется, какая база данных актуальнее? При помощи системы версий.

У каждой базы vlan’ов будет своя версия. В случае, если устройством получено обновление, которое старше по номеру, чем имеющаяся БД, то имеющаяся БД заменяется новой. Целиком, без всяких join/merge.

Также весьма полезной функцией VTP будет являться т.н. pruning:

VTP Pruning

Задача этой функции проста – каждый коммутатор будет “считать” фактически используемые VLAN’ы, и в случае, когда по VTP приходит неиспользуемый VLAN, уведомлять соседа, что этот трафик не имеет смысла присылать. Под этот механизм будут подпадать только первые 1000 VLAN’ов, исключая самый первый (т.е. pruning работает только для VLAN’ов с номерами от 2 до 1001). Более того, под pruning будет подпадать только уникастовый и неизвестный мультикастовый трафик, поэтому, к примеру, BPDU протоколов семейства STP фильтроваться не будут.

Т.е. допустим, у нас есть два коммутатора – A и B. Коммутатор A имеет роль VTP Server, а B – VTP Client. Между ними – транковый канал, 802.1Q. На коммутаторе B включен vtp pruning.
Допустим, на коммутаторе A в базу VLAN добавлены VLAN 10 и VLAN 20. Соответственно, коммутатор A уведомит по протоколу VTP своего соседа – B – о новой ревизии базы VLAN’ов. Сосед B добавит эти VLAN’ы в базу и теперь, когда подключенный к коммутатору A клиент, например, передаст броадкаст в VLAN’е 10, этот броадкаст дойдёт и до коммутатора B. Невзирая на то, что у коммутатора B может вообще не быть ни одного порта и интерфейса в VLAN 10, а также не быть других транков (т.е. трафик 10го VLAN’а коммутатору B совсем не нужен). Вот в данном случае механизм pruning сможет сэкономить полосу пропускания канала между коммутаторами A и B просто не отправляя трафик неиспользуемого VLAN’а коммутатору B.

Как же всё это будет настраиваться?

Базовая настройка протокола VTP

Первым делом – нарисуйте топологию сети, в которой собираетесь применять протокол VTP. Посмотрите, какие версии протокола поддерживаются устройствами (обычно везде есть VTPv2). Выберите устройство, которое будет сервером (ему не надо быть каким-то особо быстрым, это не STP, специфической нагрузки на VTP Server нет, ему лишь желательно обладать максимальным uptime). Если не хотите использовать VTP (например, из соображений безопасности) – тогда просто переведите все устройства в режим VTP Transparent (либо off, если поддерживается оборудованием и ОС).

Настройка имени домена VTP

host(config)#vtp domain имя_домена

Стереть имя домена штатно нельзя, только сменить. Т.е. если стартово заменили дефолтное значение, которое NULL, на своё, то всё.

Настройка пароля VTP

host(config)#vtp password пароль

Пароль можно сбросить на пустой, если ввести команду no vtp password. Запомните, пароль VTP хранится небезопасно (у VTP Server – в файле vlan.dat, у VTP Transparent – в NVRAM), поэтому если пользуетесь VTP, делайте такой пароль, который более нигде не дублируется, т.к. получить пароль VTP – относительно несложно. Всё, от чего защищает этот пароль – это, например, случайное добавление в сеть неправильно настроенного коммутатора и последующие проблемы. Пароль VTP не защищает передаваемую между коммутаторами информацию.

Настройка версии VTP

host(config)#vtp version версия
На момент написания статьи версии были от 1й до 3й.

Настройка VTP pruning

Включение выполняется командой:

host(config)#vtp pruning

а выключение –

host(config)#no vtp pruning

Настройка режима VTP

host(config)#vtp mode режим

Где режим – это server, client, transparent или off. Режим off получится поставить только на устройствах, поддерживающих VTPv3; на коммутаторах, которые поддерживают только VTPv1 и VTPv2 отключить протокол нельзя.

Расширенная настройка протокола VTP

Настройка дополнительных полезных опций VTP

Коммутатор, находящийся в режиме vtp server, как уже упоминалось выше, хранит информацию на флэше. Если потенциальных мест хранения несколько, то нужное можно указать в явном виде, командой

host(config)#vtp file имя_файловой_системы

Понятное дело, для vtp client и vtp transparent это не имеет особого смысла.
Также имеется возможность упростить траблшутинг, указав в явном виде интерфейс, с которого будет браться IP-адрес, пишущийся в результатах вывода команды show vtp status. То есть это влияет на выбор того адреса, который будет указываться в у клиентов в строчке вида

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Делаться это будет такой командой:

host(config)#vtp interface интерфейс

Где интерфейс – это, например, loopback 0.

Устранение неисправностей (troubleshooting) протокола VTP

Неисправностей в VTP может быть очень, очень много. Давайте перечислим основные из них. Запомните эти лица, может пригодиться в дальнейшем.

Проверяем каналы между коммутаторами

  • Проверьте физическую доступность интерфейсов
  • Проверьте корректность режима дуплекса и скорости
  • Проверьте, что корректно согласовался транк
  • Проверьте, совпадают ли native vlan’ы

Проверяем настройки VTP

  • Участвующие коммутаторы должны быть непосредствено подключены друг к другу
  • Должен быть хотя бы один VTP Server
  • Версии VTP, а также имя домена и пароль должны быть идентичны у всех устройств

Теперь чуть подробнее об известном артефакте поведения протокола VTP

Проблема добавления нового коммутатора

Как Вам уже известно, новый коммутатор при добавлении делает следующее – он слушает трафик VTP и при получении первого же advertisement берёт из него настройки (имя домена и пароль). Также известно, что дефолтная настройка коммутатора – это режим VTP Server (т.е. когда Вы достаёте коммутатор из коробки, Вы сразу можете на нём создавать VLAN’ы, в случае VTP Client это было бы невозможно).

Соответственно, возможна неприятная ситуация. Состоит она в том, что можно взять коммутатор, заранее его сконфигурировать, внеся больше изменений, чем есть сейчас в инфраструктурном VTP, задать правильные параметры домена и подключить к сети. Тогда коммутатор своей базой затрёт существующую. Почему так произойдёт и как это может быть? Рассмотрим подробнее.

Вы покупаете новый коммутатор и вводите его в эксплуатацию. Отдельно от других, которые работают в VTP. Ну, вот так сложилось – допустим, в филиале организации его ставите, где он не является непосредственно подключенным к другим коммутаторам. ОК, начинаете с ним работать. Работаете интенсивно – добавляете на него vlan’ы, удаляете их, переименовываете. Каждое действие плюсует единицу к revision number. Вдруг через некоторое время возникает ситуация – филиал закрывается. Коммутатор перевозят в основной офис и Вы подключаете его к другим. И тут выясняется следующее. У данного коммутатора ревизия числовО выше, чем у местного VTP Server. Имя домена и пароль совпадают. Как только транк поднимается, новый коммутатор выстреливает advertisement, который начинают слушать все остальные коммутаторы и ретранслировать дальше. Это штатный функционал – Вы не можете ограничить получение VTP-данных только от одного, “правильного” сервера. Соответственно, эта волна накрывает все коммутаторы в режиме Client и тот, который в Server. Это тоже штатное поведение – VTP Server, получив VTP-данные с бОльшим номером ревизии, чем у себя, перезаписывает свою базу. И всё, Вы имеете большие проблемы – вместо Вашей базы VLAN’ов у Вас на всех коммутаторах та, которая была в филиале.

Чтобы избежать этого, можно поступить по-разному. Например, не делать у этого коммутатора имя домена и пароль, как в основной VTP-сети. Но можно и проще – ведь чтобы этого всего не произошло, надо просто сбросить номер ревизии. Для этого достаточно переименовать домен у коммутатора в какое-нибудь временное название и после вернуть назад. Ревизия сбросится. После не забудьте включить режим VTP Client.

Как понятно, именно из-за этой ситуации использование VTP в production-сети с высоким уровнем безопасности является нежелательным. Злоумышленник может провести достаточно простую атаку – ему хватит доступа к транковому порту и возможности отправить, допустим, vtp-уведомление о том, что пришла база с версией 10000 и одним vlan’ом, и всё – вся VTP-инфраструктура примет это как нормальное положение вещей и остальные vlan’ы пропадут. Поэтому в безопасных сетях все коммутаторы работают в VTP transparent, где такая ситуация невозможна в принципе.

Протокол VTPv3

Третья версия протокола принесла множество изменений и нововведений. Например:

Поддержка полного диапазона VID в 802.1Q

Протоколы VTP первой и второй версии поддерживали только первую тысячу VLAN’ов. VTPv3 работает со всем диапазоном, от 1 до 4094го.

Поддержка Private VLAN

Если Вы использовали private vlan (т.е. назначали порты как promiscuous / isolated / community и определяли их в отдельные группы), то Вы знаете, что VTP не работал с этим механизмом. Третья версия работает.

Поддержка 802.1s (MST)

Теперь через VTP можно обмениваться данными не только БД vlan’ов, но и базу маппингов MST, что значительно упрощает конфигурирование 802.1s

Настраиваем VTPv3

Первое, что нужно сделать, чтобы включить поддержку VTPv3 – задать имя vtp-домена в явном виде. В предыдущих версиях протокола это было не нужно – коммутатор стартово обладал именем vtp-домена “NULL” и менял его на другое, получив первое VTP-сообщение. Теперь же до включения протокола VTPv3 Вы должны задать не-дефолтное имя VTP домена в явном виде. Команда, впрочем та же – host(config)#vtp domain имя_vtp_домена.

Второе – надо включить поддержку 802.1t, называемого чаще extended system-id. Соответствие данному стандарту будет подразумевать, что в параметре BID во всех BPDU будет не два поля – приоритет и Base MAC, а три – приоритет, VLAN ID и Base MAC. То есть, если без 802.1t на приоритет отдавалось 16 бит, то после его включения формат bridge ID (BID) будет выглядеть так:

  • 4 бита на приоритет
  • 12 бит на VLAN ID
  • 48 бит на Base MAC

Про этот стандарт и его основное применение (в протоколах семейства Spanning Tree), думается, лучше написать отдельно, а для нас будет достаточно то, что он меняет формат BID и что его надо включать, чтобы можно было переключиться в VTPv3. Включается поддержка 802.1t командой host(config)#spanning-tree extend system-id.

После этого уже можно переключаться – host(config)#vtp version 3. Убедиться, что переключение произошло, можно сделав host#show vtp status и увидев в первых строчках такое:

VTP Version capable : 1 to 3
VTP version running : 3

Ну, а подробно разобрать VTPv3 придётся в отдельной статье – иначе эта превратится в мини-книжку.

Вот, кстати, ссылка на неё: Протокол VTPv3.

Возможно, вам будет также интересно почитать другие статьи про VTP на нашей Knowledge Base

Понравилась статья? Поделить с друзьями: