VLANs and VTP – The VLAN Trunking Protocol

In this post, we are going to be learning about Virtual Local Area Networks (VLANs) and the VLAN Trunking Protocol (VTP). A VLAN is a logical grouping of hosts that appear to be on the same LAN regardless of their physical location. The VLAN Trunking Protocol is a Cisco proprietary Layer 2 messaging protocol that manages the addition, deletion, and renaming of VLANs on a network-wide scale.

Understanding Virtual LANs (VLANs)

The integration of bridges and switches into the LAN allows administrators to segment the LAN and create multiple collision domains. Unlike bridges, switches provide the additional advantage of allowing individual hosts to be connected to their own dedicated ports. This concept is referred to as microsegmentation.

Despite this added advantage, by default, the implementation of switches still results in a single Broadcast domain. This means that any Broadcast frames that are generated by hosts connected to the LAN switch are propagated to all other hosts connected to the same switch as illustrated in Figure 1 below:

Broadcast Frames

Fig. 1. Broadcast Frames Are Sent to All Devices

Referencing Figure 1, a Broadcast frame sent by any host connected to the LAN switch will be forwarded out of all ports, except the port on which the frame is received. This is the default method of operation for all LAN switches.

On small LANs with a few hosts, this method of operation is typically not an issue. However, on larger LANs with hundreds, or even thousands, of hosts, the sheer number of Broadcast packets can result in packet loss, latency, and performance issues.

To address all of these issues, LAN switches can employ Virtual Local Area Networks (VLANs), which increase the number of Broadcast domains but reduce their overall size. A VLAN is a logical grouping of hosts that appear to be on the same LAN, regardless of their physical location. Each VLAN is its own separate Broadcast domain. Therefore, if a switched network has 10 VLANs, then there will be 10 separate Broadcast domains. By default, any Broadcast packets that are generated by hosts within the VLAN will not cross into any other VLAN. This concept is illustrated in Figure 2 below:

Broadcast Packets

Fig. 2. Broadcast Packets Never Leave the VLAN

Figure 2 illustrates hosts connected to a switch configured with three VLANs: the green VLAN, the red VLAN, and the yellow VLAN. While the implementation of VLANs on the LAN switch has increased the number of Broadcast domains, it has also resulted in an overall reduction of the VLANs as each contains fewer hosts.

For example, if the switch receives a Broadcast frame from a host connected to the green VLAN, that Broadcast frame will be flooded only to other ports associated with that VLAN, except for the port on which it was received, and will not cross over into any other VLAN. This concept is also applicable to all Broadcast frames that are sent in the red and yellow VLANs.

Switch Port Types and VLAN Membership

The two primary VLAN switch port types are as follows:

  1. Access Ports
  2. Trunk Ports

Access ports are switch ports that are assigned to a single VLAN. These ports can only belong to a single VLAN. Switch access ports are typically used to connect network hosts, such as printers, computers, IP phones, and wireless access points to the LAN switch. However, in some cases, access ports can also be used to interconnect LAN switches, although going into the details pertaining to this configuration is beyond the scope of the SWITCH certification requirements. The following two methods are used to assign individual switch access ports to a particular VLAN:

  • Static VLAN Assignment
  • Dynamic VLAN Assignment

Static VLAN assignment consists of the network administrator manually configuring a switch port to be part of a VLAN. This is the most common method of assigning ports on a switch to a particular VLAN. Static VLAN assignment is also referred to as port-based VLAN membership because each device connected to a particular switch port is automatically a member of the VLAN that the port has been assigned to.

Static VLAN membership must be manually implemented by the network administrator. This method of VLAN membership is typically handled via hardware in the switch, which negates the need for complex table lookups because all port mappings are done at the hardware level, resulting in increased switch performance. Static VLAN membership configuration and verification will be illustrated in detail later in this chapter.

Dynamic VLAN assignment consists of using a VLAN Management Policy Server (VMPS) to assign a desired VLAN to users connected to a switch. This dynamic assignment is based on the MAC address of the user machine or network device.

Dynamic VLAN assignment allows for centralized management in that network administrators simply enter the MAC addresses into a database on the VMPS. Therefore, when a user connects to the switch, the switch simply checks with the VMPS and the user is automatically assigned to the desired VLAN based on the MAC address of the connected end system. Flexibility is also afforded by this solution in that when a host moves from a port on one switch in the network to a port on another switch in the network, the switch dynamically assigns the new port to the proper VLAN for that host.

Despite the advantages of using dynamic VLAN assignment, it is also important to understand that this method requires considerable administrative overhead. For example, in a company with several thousand users and devices, populating and keeping the VMPS database correct and up-to-date becomes a labor- and resource-intensive task.

Unlike access ports, which can only belong to a single VLAN at any given time, trunk ports are ports on switches that are used to carry traffic from multiple VLANs. Trunk ports are typically used to connect switches to other switches or routers. Additionally, in some situations, trunk ports can be used to connect network hosts and devices, such as IP phones to LAN switches, especially in legacy networks. VLAN trunks and trunking configuration will be described in detail later in this chapter.

VLAN Numbers and Ranges

When VLANs are configured, they must be assigned a valid number within a specified range. Cisco Catalyst switches use VLANs in the range of 0 – 4095; however, only VLANs 1 – 4094 are user-configurable VLANs. Table 2-1 below illustrates VLAN numbers and ranges, along with their descriptions as supported in Cisco Catalyst switches:

Table 2-1. VLAN Numbers and Ranges

VLAN Number or Range Type Description
0 Reserved This VLAN is reserved and is not configurable; it is for IEEE 802.1p priority tagging for voice traffic. 802.1p will be described in detail later in this guide.
1 Normal This is the default Cisco native VLAN. It can be used but cannot be deleted.
2 – 1001 Normal By default, these VLANs can be created, used, and deleted on all Cisco Catalyst switches.
1002 – 1005 Normal These are the default Token Ring and FDDI VLANs. They cannot be deleted. Both Token Ring and FDDI are beyond the scope of the SWITCH certification requirements and will not be described further in this guide.
1006 – 4094 Extended This extended range is used for Ethernet VLANs only. These VLANs can be created, used, and deleted.
4095 Reserved This VLAN is reserved for system use and cannot be configured.


NOTE:
Although VLANs 0 and 4095 are reserved system VLANs, these VLANs cannot be seen in the output of any show commands that pertain to VLANs.

Extended and Internal VLANs

By default, switches are required to create a unique Bridge ID (BID) for each configured VLAN. The BID is comprised of the Bridge Priority and a unique MAC address. The format of the BID is illustrated in Figure 3 below:

Bridge ID Format

Fig. 3. Bridge ID Format

Because of this requirement, switches need up to 4096 different MAC addresses in order to create a unique BID for every VLAN that can be created.

When the extended system ID or MAC address reduction feature is enabled, the switch instead uses the extended system ID, (which is the VLAN ID), the switch priority, and a single MAC address to build a unique BID for all potential 4094 VLANs. All VLANs are thus able to have a unique BID because the VLAN ID used for each individual VLAN will be unique. Therefore, even though the same MAC address is used for all BIDs, the requirement that the BID be unique for all VLANs is still maintained.

While both Spanning Tree Protocol (STP) and BID will be described in detail later in this guide, Figure 2-4 below illustrates how the normal STP BID is built using the 2-byte Bridge Priority and a system MAC address (see Figure 3 above). When the extended system ID feature is enabled, the BID is built as follows:

Bridge ID with Extended System ID

Fig. 4.  Bridge ID with Extended System ID

In Figure 4, the BID becomes a 4-bit value when the extended system ID is enabled. Additionally, a 12-bit extended system ID field, which is the extended VLAN number, is now part of the BID. The MAC address used for all VLANs can now be the same, negating the need for so many MAC addresses, hence the term ‘MAC address reduction.’

The extended system ID or MAC address reduction feature is enabled by default in Cisco IOS switches via the spanning-tree extend system-id global configuration command.

Cisco’s flagship Catalyst switches, the Catalyst 6500 series switches, use certain VLAN numbers internally to represent Layer 3 ports. These VLANs are referred to as internal VLANs and are selected from the extended VLAN range (i.e. the range 1006 – 4094).

Once selected and in use by the switch, the extended VLAN can no longer be used for any other purpose. Figure 5 below illustrates how the different types of VLANs can be used, and are allocated internally, on Cisco Catalyst switches (depending on the model):

VLAN Use and Allocation

Fig. 5. VLAN Use and Allocation

Referencing Figure 5, keep in mind the following when implementing or designing an internetwork using Catalyst 6500 series switches:

  • Layer 2 Ethernet ports can be assigned into any VLAN – standard or extended
  • VLAN interface numbers can use any VLAN number – standard or extended
  • WAN interfaces consume one extended VLAN number
  • Layer 3 Ethernet ports consume one extended VLAN number
  • Subinterfaces consume one extended VLAN number

As previously stated, once an extended VLAN is used by a Layer 3 port, it cannot be used for any other purpose. This presents a problem in that the administrator might want to use certain VLANs for his or her design. To address this, Cisco Catalyst switches allow network administrators to configure the switch such that extended VLANs required for internal use can be allocated in an ascending or descending order as illustrated in Figure 6 below:

Extended VLANs

Fig. 6. Extended VLANs in Ascending or Descending Order

In Figure 6, Catalyst 6500 series switches can be configured for an ascending VLAN allocation policy, in which the switch will allocate internal VLANs from 1006 and up. Alternatively, the VLAN allocation policy can be configured for descending, causing the switch to allocate internal VLANs from 4094 and down.

By default, internal VLANs are allocated in ascending order. However, as previously stated, this can be changed. If the allocation order is changed, the switch must be rebooted before the change can take effect. To display information about the internal VLAN allocation, use the show vlan internal usage command as illustrated in the following output:

Cat6k#show vlan internal usage

VLAN Usage

—- ——————–

1006 online diag vlan0

1007 online diag vlan1

1008 online diag vlan2

1009 online diag vlan3

…

…

1016 GigabitEthernet5/1

1018 GigabitEthernet1/1

NOTE: Although internal VLAN configuration has been described in this section, keep in mind that the configuration of the internal VLAN allocation order is beyond the scope of the CCNP exam requirements and will not be illustrated in this guide. Extended VLANs, however, are within the scope of the CCNP exam requirements and will be illustrated later in this chapter.

VLAN Trunks

VLAN trunks are used to carry data from multiple VLANs. In order to differentiate one VLAN frame from another, all frames sent across a trunk link are specially tagged so that the destination switch knows which VLAN the frame belongs to. The following two primary methods can be used to ensure that VLANs that traverse a switch trunk link can be uniquely identified:

  • Inter-Switch Link
  • IEEE 802.1Q

Inter-Switch Link (ISL) is a Cisco proprietary protocol that is used to preserve the source VLAN identification information for frames that traverse trunk links. Although ISL is a Cisco proprietary protocol, it is not supported on all Cisco platforms. For example, Catalyst 2940 and 2950 series switches support only 802.1Q trunking and do not support ISL trunking.

ISL operates in a point-to-point environment and can support up to 1000 VLANs. When using ISL, the original frame is encapsulated and an additional header is added before the frame is carried over a trunk link. At the receiving end, the header is removed and the frame is forwarded to the assigned VLAN. This encapsulated frame may be anywhere between 1 and 24,575 bytes in order to accommodate Ethernet, Token Ring, and FDDI; however, if only Ethernet packets are encapsulated, the range of ISL frame size is between 94 and 1548 bytes.

The ISL protocol uses Per VLAN Spanning Tree (PVST), which allows for optimization of root switch placement for each VLAN and supports the load balancing of VLANs over multiple trunk links. PVST is a core CCNP exam concept that will be described in detail later in this chapter. The ISL frame consists of the following three primary fields:

  • The ISL header, which is used to encapsulate the original frame
  • The encapsulation frame, which is the original frame
  • The Frame Check Sequence (FCS), used for error checking at the end

When further expanded, the ISL header includes many more fields as illustrated in Figure 7 below, showing the encapsulation of a SNAP (AAAA03) frame using ISL:

SNAP Frame Using ISL

Fig. 7. SNAP Frame Using ISL

  • The Destination Address (DA) field of the ISL packet is a 40-bit destination address. The DA is a Multicast address and is set to either 0x01-00-0C-00-00 or 0x03-00-0C-00-00. The first 40 bits of the DA field signal to the receiver that the packet is in ISL format.
  • The Type field consists of a 4-bit code that indicates the type of frame that is encapsulated. This field can also be used in the future to indicate alternative encapsulations. A Type Code of 0000 indicates an Ethernet Frame, a Type Code of 0001 indicates a Token Ring frame, and a Type Code of 0010 indicates an FDDI frame.
  • The User field consists of a 4-bit code that is used to extend the meaning of the TYPE field. The default USER field value is 0000. For Ethernet frames, the USER field bits “0” and “1” indicate the priority of the packet as it passes through the switch. Whenever traffic can be handled in a manner that allows it to be forwarded more quickly, the packets with this bit-set should take advantage of the quick path.
  • The Source Address (SA) field is the source address of the ISL packet. The field should be set to the 802.3 MAC address of the switch port that transmits the frame. It is a 48-bit value. The receiving device may ignore the SA field of the frame.
  • The Length field stores the size of the original packet as a 16-bit value. This field represents the length of the packet in bytes, with the exclusion of the DA, TYPE, USER, SA, LENGTH, and FCS fields. The total length of the excluded fields is 18 bytes, so the LENGTH field represents the total length minus 18 bytes.
  • The AAAA03 SNAP field is a 24-bit constant value of 0xAAAA03.
  • The High Bits of Source Address (HSA) field is a 24-bit value that represents the manufacturer ID portion of the SA field. This field contains the value 0x00-00-0C.
  • The VLAN field contains the VLAN ID of the packet. This is a 15-bit value that is used to distinguish frames. The VLAN ID is commonly referred to as the color of the frame.
  • The bit in the BPDU field is set for all BPDU packets that are encapsulated by the ISL frame. The BPDUs are used by the Spanning Tree Algorithm (STA) to determine information about the topology of the network. This bit is also set for CDP and VLAN Trunk Protocol (VTP) frames that are encapsulated.
  • The Index field indicates the port index of the source of the packet as it exits the switch. This field is used for diagnostic purposes only and may be set to any value by other devices. It is a 16-bit value and is ignored in received packets.
  • The Reserved field is a 16-bit value that is used when Token Ring or FDDI packets are encapsulated with an ISL frame. For Ethernet packets, this field should be set to all zeros.

The ISL header is 26 bytes in length, while the FCS is 4 bytes in length, which means that the ISL frame encapsulation is a total of 30 bytes in length. The FCS is generated over the DA, SA, Length or Type, and Data fields. When an ISL header is attached, a new FCS is calculated over the entire ISL packet and added to the end of the frame. Additionally, a second FCS is calculated after the packet has been encapsulated in ISL.

However, the addition of the new FCS by ISL does not alter the original FCS that is contained within the encapsulated frame; instead, the encapsulated frame includes its own cyclical redundancy check (CRC) value that remains completely unmodified during encapsulation. Therefore, if the original data does not contain a valid CRC, the invalid CRC is not detected until the ISL header is stripped off and the end device checks the original data FCS. This typically is not a problem for switching hardware but can be difficult for devices such as routers and network servers.

Because ISL both prepends and appends a ‘tag’ to the front and the back of the frame, it is often referred to as a double-tagging or two-level tagging mechanism. Before moving on to the next method of VLAN identification, the following is a summary of ISL capabilities:

  • ISL can support up to 1000 VLANs
  • ISL is a Cisco-proprietary protocol
  • ISL encapsulates the frame; it does not modify the original frame in any way
  • ISL operates in a point-to-point environment

802.1Q is an IEEE standard for VLAN tagging. Unlike ISL, 802.1Q, or dot1q as it is commonly referred to as, inserts a single 4-byte tag into the original frame between the SA field and the Type or Length fields, depending on the Ethernet frame type. For this reason, 802.1Q is also referred to as a one-level, internal-tagging or single-tagging mechanism.

Given that the length of the 802.1Q tag is 4 bytes, the resulting Ethernet frame can be as large as 1522 bytes, while the minimum size of the Ethernet frame with 802.1Q tagging is 68 bytes. In addition, it is important to remember that because the frame has been modified, the trunking device must recalculate the FCS before it sends the frame over the trunk link. Figure 8 below illustrates how the 802.1Q tag is inserted into a frame:

802.1Q Tag

Fig. 8. 802.1Q Tag Inserted into a Frame

  • The Tag Protocol Identifier (TPID) is a 16-bit field. It is set to a value of 0x8100 in order to identify the frame as an IEEE 802.1Q-tagged frame.
  • The User Priority, or simply Priority, field is a 3-bit field that refers to the IEEE 802.1p priority. This field indicates the frame priority level that can be used for the prioritization of traffic. The field can represent 8 levels (0 through 7). 802.1p will be described in detail later in this guide.
  • The Canonical Format Indicator (CFI) field is a 1-bit field. If the value of this field is 1, the MAC address is in non-canonical format. Alternatively, if the value is 0, then the MAC address is in canonical format. Ethernet uses a canonical format while Token Ring uses a non-canonical format.
  • The VLAN Identifier (VID) field is a 12-bit field that uniquely identifies the VLAN to which the frame belongs. The field can have a value between 0 and 4095; keep in mind that VLAN 0 and VLAN 4095 are reserved VLANs.

802.1Q differs from ISL in several ways. The first significant difference is that 802.1Q supports up to 4096 VLANs. Another significant difference is that of the native VLAN concept used in 802.1Q. By default, all frames from all VLANs are tagged when using 802.1Q. The only exception to this rule is frames that belong to the native VLAN, which are not tagged. By default, in Cisco LAN switches, the native VLAN is VLAN 1. Therefore, by default, frames from VLAN 1 are not tagged.

However, keep in mind that it is possible to specify which VLAN will not have frames tagged by specifying that VLAN as the native VLAN on a particular trunk link. For example, to prevent tagging of frames in VLAN 400 when using 802.1Q, you would configure that VLAN as the native VLAN on a particular trunk. IEEE 802.1Q native VLAN configuration will be illustrated in detail later in this chapter. The following summarizes some 802.1Q features:

  • It can support up to 4096 VLANs
  • It uses an internal tagging mechanism, modifying the original frame
  • It is an open standard protocol developed by the IEEE
  • It does not tag frames on the native VLAN; however, all other frames are tagged
Additional Real-World Technologies

Yet another VLAN tagging mechanism can be used. This mechanism is called 802.1Q-in-802.1Q, or QinQ, and it adds another layer of IEEE 802.1Q tag (referred to as the metro tag or PE-VLAN) to the 802.1Q tagged packets that enter the network.

The purpose is to expand the VLAN space by tagging the tagged packets, resulting in double-tagged frames, which allows the Service Provider to provide certain services, such as Internet access on specific VLANs for specific customers, yet still allows other types of services for their other customers on other VLANs. QinQ configuration is beyond the scope of the SWITCH certification requirements and will not be illustrated in this guide.

By default, Cisco’s ISL and 802.1Q are not interoperable; however, there may be cases in which networks are comprised of both ISL and 802.1Q VLANs. This may be the case, for example, when migrating from ISL to IEEE 802.1Q. In such networks, Cisco Catalyst 6500 series switches can be configured to map 802.1Q VLANs to ISL VLANs. These mappings are then stored in a mapping table. This concept is illustrated in Figure 9 below:

802.1Q Mappings

Fig. 9. 802.1Q Mappings

The show vlan mapping command can be used to display the VLAN mapping table information as illustrated in the following output:

Cat6k#show vlan mapping

802.1q vlan     ISL vlan        Effective

——————————————

3000            300             true

NOTE: The configuration of VLAN mapping is beyond the scope of the SWITCH certification requirements; however, ensure that you are familiar with the basic concept. 

VLANs and Network Addressing

While VLANs pertain to Layer 2, it is important to understand that from a design perspective, Layer 3 must also be considered when designing the LAN. The following two methods can be used when designing a Network Layer addressing schema for VLAN-based networks:

  • Assigning a single subnet to each individual VLAN
  • Assigning multiple subnets per VLAN

The most common practice when designing LANs is to assign a single, unique network to each individual VLAN. The size of the network depends on the number of network hosts that will reside in the VLAN. This solution allows for all hosts within the same VLAN to communicate, at both Layer 2 and Layer 3; however, in order for hosts within one VLAN (and network) to communicate with hosts in another VLAN (and network), a Layer 3 device, such as a router or a Multilayer switch, must be used in the LAN as illustrated in Figure 10 below:

Layer 3 Device Required

Fig. 10. Layer 3 Device Required for Inter-VLAN Communication

In some networks, however, it is possible for multiple IP subnets to be allocated to the same VLAN. In such networks, hosts using the same network address space within the VLAN can communicate with each other; however, a Layer 3 device is still required to allow communication between the subnets, even though the hosts reside in the same VLAN. This concept is illustrated in Figure 11 below:

Layer 3 Device Required

Fig. 11. Layer 3 Device Required for Communication between Subnets

Although both techniques do have their advantages and disadvantages, Cisco recommends that a one-to-one mapping between VLANs and subnets be maintained when designing and implementing the switched LAN. Instead of using multiple subnets per VLAN, the preferred solution would be to use a subnet mask that accommodates the actual number of hosts that will reside in the VLAN or VLANs. 

Implementing VLANs

Following are two ways of implementing VLANs that should be taken into consideration when designing the switched LAN:

  • End-to-End VLANs
  • Local VLANs

End-to-end VLANs are VLANs that span the entire switch fabric of a network. These VLANs are also commonly referred to as campus-wide VLANs, as they sometimes span the entire campus LAN so that network hosts and their servers remain in the same VLAN (logically), even though the devices may physically reside in different buildings, for example. End-to-end VLAN implementation is based on the 80/20 rule and therefore requires that each VLAN exist at the access layer in every switch block.

The primary reason for end-to-end VLAN implementation is to support maximum flexibility and the mobility of end devices. These VLANs have the following characteristics:

  • They allow the grouping of users into a single VLAN independent of physical location
  • They are difficult to implement and troubleshoot
  • Each VLAN provides common security and resource requirements for members
  • They becomes extremely complex to maintain as the campus network grows

Unlike end-to-end VLANs, local VLANs are based on geographic locations by demarcation at a hierarchical boundary. These VLANs are designed for modern-day networks that adhere to the 80/20 rule, where end users typically require greater access to resources outside of their local VLAN. With local VLANs, up to 80% of the traffic is destined to the Internet or other remote network locations while no more than 20% of the traffic remains local.

Despite the name, local VLANs are not restricted to a single switch and can range in size from a single switch in a wiring closet to an entire building. This VLAN implementation method provides maximum availability by using multiple paths to destinations, maximum scalability by keeping the VLAN within a switch block, and maximum manageability.

Configuring and Verifying VLANs

In this section, we are going to be learning about the configuration of VLANs and some of their characteristics in Cisco IOS Catalyst switches. When configuring Ethernet VLANs, keep in mind that Ethernet VLAN 1 uses only default values. This means that you cannot change the default values assigned to VLAN 1 as illustrated in the output below:

VTP-Switch-1(config)#vlan 1

VTP-Switch-1(config-vlan)#mtu 1518

Default VLAN 1 may not have its MTU changed.

VTP-Switch-1(config-vlan)#name TEST

Default VLAN 1 may not have its name changed.

VTP-Switch-1(config-vlan)#

NOTE: In order to configure VLANs, the switch must be in either VTP server mode, which is the default, or the VTP must be disabled. In order to configure extended range VLANs, the VTP must be disabled. VTP will be described in detail in the following section. This section is restricted to the configuration of VLANs only. Additionally, all VLAN configuration examples will be illustrated on a switch acting as a VTP server.

Creating and Naming VLANs

VLANs are configured by issuing the vlan [number] global configuration command. Although the VLAN number can be either a standard or an extended range VLAN number, keep in mind that extended VLANs can only be configured on a switch that has the VTP disabled. This will be illustrated in detail later in this post.

When configuring a VLAN, it is always good practice to assign the VLAN a meaningful name via the name VLAN configuration command. The assigned VLAN name must be in the form of an ASCII string from 1 to 32 characters and must be unique within the administrative domain. The following output illustrates how to configure several standard range VLANs on a Cisco Catalyst switch running IOS software:

VTP-Server(config)#vlan 10

VTP-Server(config-vlan)#name Test-VLAN-10

VTP-Server(config-vlan)#exit

VTP-Server(config)#vlan 20

VTP-Server(config-vlan)#name Test-VLAN-20

VTP-Server(config-vlan)#exit

VTP-Server(config)#vlan 30

VTP-Server(config-vlan)#name Test-VLAN-30

VTP-Server(config-vlan)#exit

VTP-Server(config)#vlan 40

VTP-Server(config-vlan)#name Test-VLAN-40

VTP-Server(config-vlan)#exit

VTP-Server(config)#vlan 50

VTP-Server(config-vlan)#name Test-VLAN-50

VTP-Server(config-vlan)#exit

Once the VLANs have been configured, the show vlan brief command can be used to view a summary of these configured VLANs, along with default VLANs, on the switch as illustrated in the following output:

VTP-Server#show vlan brief

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, Gi0/1

Gi0/2

10   Test-VLAN-10                     active

20   Test-VLAN-20                     active

30   Test-VLAN-30                     active

40   Test-VLAN-40                     active

50   Test-VLAN-50                     active

1002 fddi-default                     active

1003 trcrf-default                    active

1004 fddinet-default                  active

1005 trbrf-default                    active

To view detailed information on a VLAN, such as the MTU, ports assigned to the VLAN, state of the VLAN, name, and the type of VLAN, the show vlan id [number] command is used as illustrated in the following output:

VTP-Server#show vlan id 10

VLAN Name                             Status    Ports

—- ——————————– ——— —————————–

10   Test-VLAN-10                     active    Fa0/1

VLAN Type  SAID     MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

—- —– ——– —– —— —— ——– —- ——– —— ——

10   enet  100010   1500  –      –      –        –    –        0      0

Remote SPAN VLAN

—————-

Disabled

Primary Secondary Type              Ports

——- ——— —————– —————————————–

This same information can also be provided by issuing the show vlan name [name] command as illustrated in the following output:

VTP-Server#show vlan name Test-VLAN-10

VLAN Name                             Status    Ports

—- ——————————– ——— —————————–

10   Test-VLAN-10                     active    Fa0/1

VLAN Type  SAID     MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

—- —– ——– —– —— —— ——– —- ——– —— ——

10   enet  100010   1500  –      –      –        –    –        0      0

Remote SPAN VLAN

—————-

Disabled

Primary Secondary Type              Ports

——- ——— —————– —————————————–

Assigning Ethernet Ports to Configured VLANs

Once the VLAN has been created, the next configuration step is to assign one or more access ports to the VLAN. By default, only trunk ports are assigned to VLANs since they carry traffic for multiple VLANs; however, access ports must be statically assigned to VLANs by the administrator or dynamically assigned using dynamic VLAN assignment (VMPS). Trunk ports will be described in detail later in this chapter, but VMPS configuration is beyond the scope of the CCNP exam requirements and will not be illustrated in this guide.

VLANs pertain to the Data Link Layer, and therefore only Layer 2 ports can be assigned to VLANs. This is typically not an issue in Layer 2-only switches, such as the Catalyst 2950 switches; however, on Layer 3-capable and Multilayer switches, such as Catalyst 3750 and Catalyst 6500 series switches, ports on the switch must be designated as Layer 2 before they can be assigned to a particular VLAN. This is performed by issuing the switchport interface configuration command.

By default, ports on Cisco Catalyst switches default to a dynamic desirable mode, which means that the switch will attempt to convert the link into a trunk link if possible. In production networks, this is not a desirable trait; therefore, it is always recommended that all ports that will be used on the switch always be statically configured as either access ports or trunk ports. This default setting can be viewed in the output of the show interfaces [name] switchport command as illustrated in the following output:

VTP-Server#show interfaces gigabitethernet 0/1 switchport

Name: Gi0/1

Switchport: Enabled

Administrative Mode: dynamic desirable

Operational Mode: down

Administrative Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

Voice VLAN: none

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Operational private-vlan: none

Trunking VLANs Enabled: ALL

Pruning VLANs Enabled: 2-1001

Capture Mode Disabled

Capture VLANs Allowed: ALL

Protected: false

Voice VLAN: none (Inactive)

Appliance trust: none

NOTE: This is the default for all ports, regardless of whether they are connected.

Statically configuring a switch port as an access port requires that the switchport mode access interface configuration command be issued under the desired port (interface).

Next, the port can then be assigned to the desired VLAN by issuing the switchport access vlan [number] interface configuration command. The following output illustrates how to configure and assign a Layer 2 access port (interface) to a VLAN on a Layer 2-only switch:

VTP-Server(config)#interface fastethernet0/2

VTP-Server(config-if)#switchport mode access

VTP-Server(config-if)#switchport access vlan 20

VTP-Server(config-if)#exit

The following output illustrates how to configure and assign a Layer 2 access port (interface) to a VLAN on a Layer 2-capable or Multilayer switch:

VTP-Server(config)#interface fastethernet0/2

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport mode access

VTP-Server(config-if)#switchport access vlan 20

VTP-Server(config-if)#exit

Once configured, the show interfaces [name] switchport command can be used to validate the configuration on the switch as illustrated in the following output:

VTP-Server#show interfaces fastethernet 0/2 switchport

Name: Fa0/2

Switchport: Enabled

Administrative Mode: static access

Operational Mode: static access

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: native

Negotiation of Trunking: Off

Access Mode VLAN: 20 (Test-VLAN-20)

Trunking Native Mode VLAN: 1 (default)

Voice VLAN: none

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Operational private-vlan: none

Trunking VLANs Enabled: ALL

Pruning VLANs Enabled: 2-1001

Capture Mode Disabled

Capture VLANs Allowed: ALL

Protected: false

Voice VLAN: none (Inactive)

Appliance trust: none

Suspending Configured VLANs

When a VLAN is configured, it can be in one of two states: active or suspended. By default, all VLANs are in an active state when configured. However, Cisco IOS software allows administrators to change this default behavior after the VLAN is configured by suspending it.

In an active state, a VLAN passes all packets that are sent within it. However, if a VLAN is suspended, it will cease to pass any packets. This state will be replicated throughout the VTP domain and no packets will be passed within that VLAN on a network-wide basis.

Suspending the VLAN retains the configuration, such as all access ports assigned to the VLAN, but prevents the VLAN from passing traffic until it is manually transitioned to an active state. This makes VLAN suspension a powerful tool for administrators who understand its capabilities; however, it can also make it a very dangerous tool for those who do not. VLANs can be suspended in VLAN configuration mode by issuing the state suspend command.

NOTE: Extended range VLANs cannot be suspended; this applies only to standard VLAN ranges.

Although VTP will be described in the following section, the following network, illustrated in Figure 12, is comprised of two switches (VTP server and VTP client) and will be used to demonstrate the effect of suspending a VLAN on switches within the same VTP domain:

Suspending a VLAN

Fig. 12. Suspending a VLAN on Switches in the Same VTP Domain

In the switched LAN diagram illustrated in Figure 2-12, a trunk is configured between the VTP server and VTP client switches. VLAN 254 is configured on the VTP server switch and is propagated to the VTP client switch via the trunk link. Hosts 1 and 2 are connected to ports FastEthernet0/2 and FastEthernet0/3, respectively, on the VTP server switch, while Hosts 3 and 4 are connected to ports FastEthernet0/1 and FastEthernet0/2.

The VLAN information on the VTP server switch is is illustrated in the following output:

VTP-Server#show vlan brief

VLAN Name                           Status    Ports

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

1    default                        active    Gi0/1, Gi0/2

10   Test-VLAN-10                   active    Fa0/4, Fa0/5, Fa0/6

20   Test-VLAN-20                   active    Fa0/7, Fa0/8, Fa0/9

30   Test-VLAN-30                   active    Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15

40   Test-VLAN-40                   active    Fa0/16, Fa0/17, Fa0/18, Fa0/19

50   Test-VLAN-50                   active    Fa0/20, Fa0/21, Fa0/22, Fa0/23

Fa0/24

254  VLAN_Suspension_Example        active    Fa0/2, Fa0/3

1002 fddi-default                   active

1003 trcrf-default                  active

1004 fddinet-default                active

1005 trbrf-default                  active

On the VTP client switch, the same VLAN information is present as illustrated in the following output:

VTP-Client#show vlan brief

VLAN Name                             Status    Ports

—- ——————————– ——— —————————–

1    default                          active    Fa0/4, Fa0/10, Fa0/11, Gi0/1,

Gi0/2

10   Test-VLAN-10                     active    Fa0/6

20   Test-VLAN-20                     active    Fa0/7

30   Test-VLAN-30                     active    Fa0/8

40   Test-VLAN-40                     active    Fa0/3, Fa0/9

50   Test-VLAN-50                     active    Fa0/5

254  VLAN_Suspension_Example          active    Fa0/1, Fa0/2

1002 fddi-default                     active

1003 trcrf-default                    active

1004 fddinet-default                  active

1005 trbrf-default                    active

As can be seen in the output above, the VLAN is active on both the VTP server and the VTP client. This means that Hosts 1, 2, 3, and 4 can all communicate with each other, as the VLAN allows packets by default.

If a VLAN is suspended on the VTP server, this suspended state information will be propagated throughout the entire VTP domain and the VLAN will also be suspended on the VTP client switch. The following configuration illustrates the suspension of VLAN 254 on the VTP server:

VTP-Server(config)#vlan 254

VTP-Server(config-vlan)#state suspend

VTP-Server(config-vlan)#exit

The suspended state can be validated by issuing the show vlan brief, show vlan id [number] or show vlan name [name] commands on the VTP server switch. The following output shows the suspended state in the output of the show vlan id [number] command:

VTP-Server#show vlan id 254

VLAN Name                           Status    Ports

—- —————————— ——— —————————–

254  VLAN_Suspension_Example        suspended Fa0/1, Fa0/2, Fa0/3

VLAN Type  SAID     MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

—- —– ——– —– —— —— ——– —- ——– —— ——

254  enet  100254   1500  –      –      –        –    –        0      0

Remote SPAN VLAN

—————-

Disabled

Primary Secondary Type              Ports

——- ——— —————– —————————————–

The same state for this single VLAN is also propagated to the VTP client in the following output:

VTP-Client#show vlan brief

VLAN Name                             Status    Ports

—- ——————————– ——— —————————–

1    default                          active    Fa0/4, Fa0/10, Fa0/11, Gi0/1,

Gi0/2

10   Test-VLAN-10                     active    Fa0/6

20   Test-VLAN-20                     active    Fa0/7

30   Test-VLAN-30                     active    Fa0/8

40   Test-VLAN-40                     active    Fa0/3, Fa0/9

50   Test-VLAN-50                     active    Fa0/5

254  VLAN_Suspension_Example          suspended Fa0/1, Fa0/2

1002 fddi-default                     active

1003 trcrf-default                    active

1004 fddinet-default                  active

1005 trbrf-default                    active

The result of this configuration is that all hosts in VLAN 254 will not be able to communicate since suspended VLANs do not pass packets. However, all other hosts in all other VLANs that are still in the active state are still able to communicate.

The primary advantage of suspending a VLAN is that it blocks traffic while negating the need to delete the VLAN manually, to shut down ports assigned to the VLAN, or to filter the propagation of the VLAN throughout the switched LAN. When administrators want to allow hosts in the VLAN to resume communication, the state can simply be changed to active.

Shutting Down Configured VLANs

In the previous section, we learned about suspending VLANs. While VLAN suspension does have its advantages, the fact that this state change is propagated throughout the entire VTP domain may be viewed as a disadvantage, especially in cases where the objective is simply to prevent packets from passing in a particular VLAN on the local switch, versus the entire network.

To prevent packets from being forwarded in a VLAN on the local switch without affecting the forwarding of packets for all other hosts in that VLAN throughout the entire switched LAN, administrators can simply shut down the VLAN. This can be performed in global configuration mode via the shutdown vlan [number] command, or in VLAN configuration mode via the shutdown command. Either command performs the same action.

The following output illustrates how to shut down VLAN switching in global configuration mode:

VTP-Server(config)#shutdown vlan ?

<2-1001>  VLAN ID of the VLAN to shutdown

The following output illustrates how to shut down VLAN switching in VLAN configuration mode:

VTP-Server(config)#vlan 254

VTP-Server(config-vlan)#shutdown ?

<cr>

The VLAN shutdown feature is illustrated in Figure 13 below:

VLAN Shutdown Feature

Fig. 13. VLAN Shutdown Feature

Figure 13 is the same topology as that used in Figure 12. This time, instead of suspending VLAN 254, it will be shut down on the VTP server, preventing only locally connected hosts from communicating but not affecting the hosts residing in the same VLAN on the VTP client switch. This is performed as follows:

VTP-Server(config)#shutdown vlan 254

NOTE: The same action can be performed in VLAN configuration mode as follows:

VTP-Server(config)#vlan 254

VTP-Server(config-vlan)#shutdown

The VLAN state can then be validated on the VTP server as follows:

VTP-Server#show vlan brief

VLAN Name                           Status    Ports

—- —————————— ——— —————————–

1    default                        active    Gi0/1, Gi0/2

10   Test-VLAN-10                   active    Fa0/4, Fa0/5, Fa0/6

20   Test-VLAN-20                   active    Fa0/7, Fa0/8, Fa0/9

30   Test-VLAN-30                   active    Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15

40   Test-VLAN-40                   active    Fa0/16, Fa0/17, Fa0/18, Fa0/19

50   Test-VLAN-50                   active    Fa0/20, Fa0/21, Fa0/22, Fa0/23

Fa0/24

254  VLAN_Suspension_Example        act/lshut Fa0/2, Fa0/3

1002 fddi-default                   active

1003 trcrf-default                  active

1004 fddinet-default                active

1005 trbrf-default                  active

The act/lshut status indicates that the VLAN is still active but is locally shut down. This state, therefore, does not affect any other switch in the network, as can be seen on the VTP client in the following output:

VTP-Client#show vlan brief

VLAN Name                             Status    Ports

—- ——————————– ——— —————————–

1    default                          active    Fa0/4, Fa0/10, Fa0/11, Gi0/1,

Gi0/2

10   Test-VLAN-10                     active    Fa0/6

20   Test-VLAN-20                     active    Fa0/7

30   Test-VLAN-30                     active    Fa0/8

40   Test-VLAN-40                     active    Fa0/3, Fa0/9

50   Test-VLAN-50                     active    Fa0/5

254  VLAN_Suspension_Example          active    Fa0/1, Fa0/2

1002 fddi-default                     active

1003 trcrf-default                    active

1004 fddinet-default                  active

1005 trbrf-default                    active

The result of the VLAN shutdown configuration is that only hosts that are locally connected to ports assigned to VLAN 254 on the VTP server will be unable to pass packets; however, all other hosts assigned to the same VLAN on any other switches in VLAN 254 will still be able to pass packets and communicate with each other.

Configuring and Verifying Trunk Links

A trunk is a switch port that can carry multiple traffic types, each tagged with a unique VLAN ID. As data is switched across the trunk port or trunk link, it is tagged (or colored) by the egress switch trunk port, which allows the receiving switch to identify that it belongs to a particular VLAN. On the receiving switch ingress port, the tag is removed and the data is forwarded to the intended destination.

The first configuration task when implementing VLAN trunking in Cisco IOS Catalyst switches is to configure the desired interface as a Layer 2 switch port. This is performed by issuing the switchport interface configuration command.

NOTE: This command is required only on Layer 3-capable or Multilayer switches. It is not applicable to Layer 2-only switches, such as the Catalyst 2950 series.

The second configuration task is to specify the encapsulation protocol that the trunk link should use. This is performed by issuing the switchport trunk encapsulation [option] command. The options available with this command are as follows:

Cat6-Distribution(config)#interface fastethernet 1/1

Cat6-Distribution(config-if)#switchport trunk encapsulation ?

dot1q      Interface uses only 802.1q trunking encapsulation when trunking

isl        Interface uses only ISL trunking encapsulation when trunking

negotiate  Device will negotiate trunking encapsulation with peer on

interface

The dot1q keyword forces the switch port to use IEEE 802.1Q encapsulation. The isl keyword forces the switch port to use Cisco ISL encapsulation. The negotiate keyword is used to specify that if the Dynamic Inter-Switch Link Protocol (DISL) and Dynamic Trunking Protocol (DTP) negotiation fail to successfully agree on the encapsulation format, then ISL is the selected format. DISL simplifies the creation of an ISL trunk from two interconnected Fast Ethernet devices. DISL minimizes VLAN trunk configuration procedures because only one end of a link needs to be configured as a trunk.

DTP is a Cisco proprietary point-to-protocol that negotiates a common trunking mode between two switches. DTP will be described in detail later in this chapter. The following output illustrates how to configure a switch port to use IEEE 802.1Q encapsulation when establishing a trunk:

Cat6-Distribution(config)#interface fastethernet 1/1

Cat6-Distribution(config-if)#switchport

Cat6-Distribution(config-if)#switchport trunk encapsulation dot1q

This configuration can be validated via the show interfaces [name] switchport command as illustrated in the following output:

Cat6-Distribution#show interfaces fastethernet 1/1 switchport

Name: Fa0/2

Switchport: Enabled

Administrative Mode: dynamic desirable

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

…

[Output Truncated]

The third trunk port configuration step is to implement configuration in order to ensure that the port is designated as a trunk port. This can be done in one of two ways:

  • Manual (Static) Trunk Configuration
  • Dynamic Trunking Protocol (DTP)

Manual (Static) Trunk Configuration

The manual configuration of a trunk is performed by issuing the switchport mode trunk interface configuration command on the desired switch port. This command forces the port into a permanent (static) trunking mode. The following configuration output shows how to configure a port statically as a trunk port:

VTP-Server(config)#interface fastethernet 0/1

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport trunk encapsulation dot1q

VTP-Server(config-if)#switchport mode trunk

VTP-Server(config-if)#exit

VTP-Server(config)#

This configuration can be validated via the show interfaces [name] switchport command as illustrated in the following output:

VTP-Server#show interfaces fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

…

[Truncated Output]

Although manual (static) configuration of a trunk link forces the switch to establish a trunk, Dynamic ISL and Dynamic Trunking Protocol (DTP) packets will still be sent out of the interface. This is performed so that a statically configured trunk link can establish a trunk with a neighboring switch that is using DTP, as will be described in the following section. This can be validated in the output of the show interfaces [name] switchport command as illustrated in the following output:

VTP-Server#show interfaces fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

…

[Truncated Output]

In the output above, the text in bold indicates that despite the static configuration of the trunk link, the port is still sending out DTP and DISL packets.

In some cases, this is considered undesirable. Therefore, it is considered good practice to disable the sending of DISL and DTP packets on a port statically configured as a trunk link by issuing the switchport nonegotiate interface configuration command as illustrated in the following output:

VTP-Server(config)#interface fastethernet 0/1

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport trunk encapsulation dot1q

VTP-Server(config-if)#switchport mode trunk

VTP-Server(config-if)#switchport nonegotiate

VTP-Server(config-if)#exit

VTP-Server(config)#

Again, the show interfaces [name] switchport command can be used to validate the configuration, as follows:

VTP-Server#show interfaces fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: Off

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

…

[Truncated Output]


Dynamic Trunking Protocol (DTP)

DTP is a Cisco proprietary point-to-protocol that negotiates a common trunking mode between two switches. This dynamic negotiation can also include the trunking encapsulation. The two DTP modes that a switch port can use, depending on the platform, are as follows:

  • Dynamic Desirable
  • Dynamic Auto

When using DTP, if the switch port defaults to a dynamic desirable state, the port will actively attempt to become a trunk if the neighboring switch is set to dynamic desirable or dynamic auto mode. If the switch ports default to a dynamic auto state, the port will revert to being a trunk only if the neighboring switch is set to dynamic desirable mode.

Figure 14 below illustrates the DTP mode combinations that will result in a trunk either establishing or not establishing between two Cisco Catalyst switches:

DTP Mode Combinations

Fig. 14. DTP Mode Combinations

Figure 15 below illustrates the valid combinations that will result in the successful establishment of a trunk link between two neighboring switches – one using DTP and the other statically configured as a trunk port:

DTP Mode Combinations

Fig. 15. DTP Mode Combinations 2

In addition to these various combinations that can be used to establish a trunk link between two neighboring switches, it is important to know that if the switches are both set to dynamic auto, they will not be able to establish a trunk between them.

This is because unlike dynamic desirable mode, dynamic auto mode is a passive mode that waits for the other side to initiate trunk establishment. Therefore, if two passive ports are connected, neither will ever initiate trunk establishment and the trunk will never be formed. Similarly, if a statically configured switch port is also configured with the switchport nonegotiate command, it will never form a trunk with a neighboring switch using DTP because this prevents the sending of DISL and DTP packets out of that port.

When using DTP in a switched LAN, the show dtp [interface <name>] command can be used to display DTP information globally for the switch or for the specified interface. The following output shows the information printed by the show dtp command:

VTP-Server#show dtp

Global DTP information

Sending DTP Hello packets every 30 seconds

Dynamic Trunk timeout is 300 seconds

4 interfaces using DTP

Based on the output above, the switch is sending DTP packets every 30 seconds. The timeout value for DTP is set to 300 seconds (5 minutes), and 4 interfaces are currently using DTP. The show dtp interface [name] command prints DTP information about the specified interface, which includes the type of interface (trunk or access), the current port DTP configuration, the trunk encapsulation, and DTP packet statistics as illustrated in the following output:

VTP-Server#show dtp interface fastethernet0/1

DTP information for FastEthernet0/1:

TOS/TAS/TNS:                              TRUNK/ON/TRUNK

TOT/TAT/TNT:                              802.1Q/802.1Q/802.1Q

Neighbor address 1:                       000000000000

Neighbor address 2:                       000000000000

Hello timer expiration (sec/state):       7/RUNNING

Access timer expiration (sec/state):      never/STOPPED

Negotiation timer expiration (sec/state): never/STOPPED

Multidrop timer expiration (sec/state):   never/STOPPED

FSM state:                                S6:TRUNK

# times multi & trunk                     0

Enabled:                                  yes

In STP:                                   no

Statistics

———-

0 packets received (0 good)

0 packets dropped

0 nonegotiate, 0 bad version, 0 domain mismatches, 0 bad TLVs, 0 other

764 packets output (764 good)

764 native, 0 software encap isl, 0 isl hardware native

0 output errors

0 trunk timeouts

2 link ups, last link up on Mon Mar 01 1993, 00:00:22

1 link downs, last link down on Mon Mar 01 1993, 00:00:20

IEEE 802.1Q Native VLAN

Earlier in this chapter, we learned that 802.1Q, or VLAN tagging, inserts a tag into all frames and all frames, except those in the native VLAN, are tagged. The IEEE defined the native VLAN to provide for connectivity to old 802.3 ports that did not understand VLAN tags.

By default, an 802.1Q trunk uses VLAN 1 as the native VLAN. The default native VLAN on an 802.1Q trunk link can be verified by issuing the show interfaces [name] switchport or the show interfaces trunk command as illustrated in the following output:

VTP-Server#show interfaces fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

Voice VLAN: none

…

[Truncated Output]

The native VLAN is used by the switch to carry specific protocol traffic like Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP), Port Aggregation Protocol (PAGP), and Dynamic Trunking Protocol (DTP) information. CDP and PAGP will be described in detail later in this guide. Although the default native VLAN is always VLAN 1, the native VLAN can be manually changed to any valid VLAN number that is not in the reserved range of VLANs.

However, it is important to remember that the native VLAN must be the same on both sides of the trunk link. If there is a native VLAN mismatch, Spanning Tree Protocol (STP) places the port in a port VLAN ID (PVID) inconsistent state and will not forward the link. Additionally, CDP v2 passes native VLAN information between switches and will print error messages on the switch console if there is a native VLAN mismatch. The default native VLAN can be changed by issuing the switchport trunk native vlan [number] interface configuration command on the desired 802.1Q trunk link as illustrated in the following output:

VTP-Server(config)#interface fastethernet 0/1

VTP-Server(config-if)#switchport trunk native vlan ?

<1-4094>  VLAN ID of the native VLAN when this port is in trunking mode

 

Filtering VLANs on Trunk Links

By default, all trunk ports on Cisco Catalyst switches allow traffic from all VLANs as illustrated in the output of the show interfaces trunk command:

VTP-Server#show interfaces trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

Fa0/2       desirable    802.1q         trunking      1

Fa0/3       desirable    802.1q         trunking      1

Port        Vlans allowed on trunk

Fa0/1       1-4094

Fa0/2       1-4094

Fa0/3       1-4094

Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,30,40,50

Fa0/2       1,10,20,30,40,50

Fa0/3       1,10,20,30,40,50

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,30,40,50

Fa0/2       1

Fa0/3       none

In the output above, three trunk links have been established on the switch. By default, all three trunk links allow traffic from the entire range of VLANs without any explicit configuration. While this default behavior is generally acceptable, in some environments, such as those that require high levels of network security, for example, it may not be acceptable.

Cisco IOS software allows administrators to configure manually the VLANs that are allowed on specific trunk links via the switchport trunk allowed vlan interface configuration command. The options available with this command are as follows:

VTP-Server(config)#interface fastethernet0/1

VTP-Server(config-if)#switchport trunk allowed vlan ?

WORD    VLAN IDs of the allowed VLANs when this port is in trunking mode

add     add VLANs to the current list

all     all VLANs

except  all VLANs except the following

none    no VLANs

remove  remove VLANs from the current list

The first available option allows for specifying the VLANs that will be allowed to traverse the trunk link. The add keyword allows for adding additional VLANs to those that are already allowed to traverse the trunk link. The all keyword specifies that all VLANs are allowed across the trunk link. This is the default behavior. The except keyword is used to allow all VLANs except for the VLANs specified following this keyword. The none keyword prevents any VLANs from traversing the trunk link. The remove keyword removes previously allowed VLANs from the trunk link.

The following configuration output illustrates how to allow VLANs 1, 10, 20, 30, 40, and 50 to traverse a configured trunk link:

VTP-Server(config)#interface fastethernet 0/1

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport trunk encapsulation dot1q

VTP-Server(config-if)#switchport mode trunk

VTP-Server(config-if)#switchport trunk allowed vlan 1,10,20,30,40,50

VTP-Server(config-if)#exit

The following configuration output illustrates how to permit all VLANs except for VLANs 100 through 200 on a configured trunk link:

VTP-Server(config)#interface fastethernet 0/2

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport trunk encapsulation dot1q

VTP-Server(config-if)#switchport mode trunk

VTP-Server(config-if)#switchport trunk allowed vlan except 100-200

VTP-Server(config-if)#exit

The following configuration output illustrates how to remove VLANs 1, 3, 5, and 7–9 from the VLANs permitted to traverse a trunk link:

VTP-Server(config)#interface fastethernet 0/3

VTP-Server(config-if)#switchport

VTP-Server(config-if)#switchport trunk encapsulation dot1q

VTP-Server(config-if)#switchport mode trunk

VTP-Server(config-if)#switchport trunk allowed vlan remove 1,3,5,7-9

These configurations can be validated by issuing the show interfaces trunk command as illustrated in the following output:

VTP-Server#show interfaces trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

Fa0/2       desirable    802.1q         trunking      1

Fa0/3       desirable    802.1q         trunking      1

Port        Vlans allowed on trunk

Fa0/1       1,10,20,30,40,50

Fa0/2       1-99,201-4094

Fa0/3       2,4,6,10-4094

Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,30,40,50

Fa0/2       1,10,20,30,40,50

Fa0/3       10,20,30,40,50

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,30,40,50

Fa0/2       1

Fa0/3       none

VLAN Trunking Protocol (VTP)

VTP is a Cisco proprietary Layer 2 messaging protocol that manages the addition, deletion, and renaming of VLANs on switches in the same VTP domain. VTP allows VLAN information to propagate through the switched network, which reduces administration overhead in a switched network, while enabling switches to exchange and maintain consistent VLAN information. Figure 16 below shows a packet capture of a VTP frame:

VTP Frame

Fig. 16. VTP Frame

VTP Domain

The VTP domain consists of a group of adjacent connected switches that are part of the same VTP management domain. A switch can belong to only one VTP domain at any one time and will reject or drop any VTP packets received from switches in any other VTP domains.

Figure 17 below illustrates how the VLAN Trunking Protocol is used to propagate VLAN information between switches within the same VTP domain:

VTP Propagating VLAN Information

Fig. 17. VTP Propagating VLAN Information

Referencing FigurE 17, 4 switches – switch 1, switch 2, switch 3, and switch 4 – all reside within the VTP domain howtonetwork.net. VLAN 100 is configured on switch 1. Using VTP, this information is dynamically propagated throughout the VTP domain so that in the end, switches 2, 3, and 4 receive this information and add VLAN 100 to their VLAN databases. In order to pass VTP advertisements, the links configured between the switches must all be trunk links.

Two methods via which a switch can be configured within the VTP domain are dynamic domain assignment and, the most common method, manual configuration. Dynamic VTP domain configuration occurs on switches that have no default VTP domain configured. When the switch is added to the switched network and establishes a trunk link with another switch in defined VTP domain, it becomes part of the VTP domain that is identified in the update that they receive from their adjacent connected switch. This concept is illustrated in Figure 18 below:

Dynamic VTP

Fig. 18. Dynamic VTP

In Figure 18, switch 1 and switch 2 belong to the VTP domain howtonetwork.net. Switch 3 is added to the network and a trunk connection is configured between it and switch 2. Because switch 2 has no default VTP domain information configured, when it receives its first VTP update from an adjacent switch, it will become part of the VTP domain identified in the update. In this case, the switch will automatically join the howtonetwork.net VTP domain.

Using this same automatic method, if the switch is connected to two switches in two different VTP domains, it will join the VTP domain listed in the first VTP update that it receives. This concept is illustrated in Figure 19 below:

Switch Joins VTP Domain Sending First VTP Update

Fig. 19. Switch Joins VTP Domain Sending First VTP Update

Referencing Figure 19, switch 2 is connected to switch 1 and switch 3 via trunk links. This switch has no default VTP domain information. If this switch receives VTP updates from switch 1 and switch 3, it will join the VTP domain based on the first VTP update that it receives. If, for example, switch 3 sends the first VTP update, switch 2 will join VTP domain SWITCH and reject updates from switch 1 because it is in another VTP domain. This is illustrated in Figure 20 below:

VTP Updates Rejected

Fig. 20. VTP Updates Rejected

Manual VTP domain configuration is the most commonly used method of assigning a switch to a VTP domain. In Cisco IOS software, this is performed by manually configuring the VTP domain name on each individual switch that will be in that domain via the vtp domain [name] global configuration command as illustrated in the following output:

VTP-Server(config)#vtp domain ?

WORD  The ascii name for the VTP administrative domain.

The VTP domain can be any ASCII string from 1 to 32 characters. In addition to this, it is also important to remember that the domain name is case sensitive. Once configured, the VTP domain, as well as other VTP parameters (which will be described later in this chapter), can be viewed by issuing the show vtp status command as illustrated below:

VTP-Server#show vtp status

…

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

VTP V2 Mode                     : Enabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x3B 0x6E 0xE4 0x6A 0x41 0xE1 0xA5 0x73

Configuration last modified by 10.1.1.1 at 3-1-93 02:28:44

Local updater ID is 10.1.1.1 on interface Vl10 (lowest numbered VLAN interface found)

VTP Modes

In order to participate in the VTP domain, switches must be configured for a specific VTP mode, each with its own characteristics. A switch can be configured by one of the following three VTP modes:

  • VTP Server
  • VTP Client
  • VTP Transparent

VTP server mode is the default VTP mode for all Cisco Catalyst switches. VTP server switches control VLAN creation, modification, and deletion for their respective VTP domain. Switches operating in VTP server mode store the VLAN database in NVRAM and advertise VTP information to all other switches within the VTP domain. Although each VTP domain must have at least a single VTP server switch, there is no restriction on the number of VTP server switches that can exist within the VTP domain. However, it is considered good practice to have no more than two switches configured as VTP servers – one primary and the other secondary.

VTP clients advertise and receive VTP information; however, they do not allow VLAN creation, modification, or deletion. This means that VTP clients cannot modify or store the VTP database in NVRAM. Additionally, it is important to remember that VTP client switches can receive VLAN information only from VTP server switches within the same VTP domain.

VTP transparent mode is not really a true VTP mode in that it is actually the disabling of VTP on the switch. While a switch that is configured for VTP transparent allows for the creation, modification, and deletion of VLANs in the same manner as on a VTP server switch, it is different in that it ignores VTP updates, and all VLANs that are created on the switch are locally significant and are not propagated to other switches in the VTP domain.

NOTE: VTP can only support up to 1000 VLANs. In order to support the expanded range of VLANs, VTP must be disabled on the switch. This operation is referred to as VTP transparent mode. However, even though VTP is disabled, switches still relay VTP messages.

Table 2-2 below summarizes the capabilities of switches in these three VTP modes:

Table 2-2. Switch Capabilities

Capability VTP Server VTP Client VTP Transparent
Sending VTP Messages Yes Yes No
Listening to VTP Messages Yes Yes No
Creating VLANs Yes No Yes (locally)
Deleting VLANs Yes No Yes (locally)
Modifying VLANs Yes No Yes (locally)
Storing VLANs Yes No Yes (locally)

Figure 21 below illustrates the roles played by several switches operating in different modes within the VTP domain howtonetwork.net:

Switch Roles in Different Modes

Fig. 21. Switch Roles in Different Modes

VTP Advertisements

VTP advertisements are sent out periodically by each switch in the VTP domain via its trunk(s) link to the reserved Multicast address 01-00-0C-CC-CC-CC.  These packets are sent with an LLC code of SNAP AA and a type of 0x2003. This information is illustrated in Figure 2-22 below, a screenshot that displays a VTP frame showing advertisement:

VTP Frame Showing Advertisement

Fig. 22. VTP Frame Showing Advertisement

Switches use the configuration revision number to keep track of the most recent information in the VTP domain. Every switch in the VTP domain stores the configuration revision number that it last heard from a VTP advertisement and this number is incremented every time new information is received.

The configuration revision number will always begin at zero. Within the VTP domain, the switch with the highest configuration revision number is considered the switch with the most up-to-date information. When any switch in the VTP domain receives an advertisement message with a higher configuration revision number than its own, it will overwrite any stored VLAN information and synchronize its own stored VLAN information with the information received in the advertisement message.

This means that if a new, non-configured switch is introduced into the VTP domain and it has a configuration revision number that is greater than the other switches in the domain, they will all overwrite their local VLAN information and replace it with the information received in the advertisement message. This is referred to as a VTP synchronization problem and it can wreak havoc in the VTP domain if administrators do not reset the configuration revision number of any new switches to 0 prior to integrating them into the network. This is done by performing one of two actions on the new switch, as follows:

  • Changing the switch to VTP transparent mode and then changing it back to VTP server mode via the vtp mode [mode] global configuration command; or
  • Changing the VTP domain name to a temporary name and then changing it back to the desired VTP domain name via the vtp domain [name] global configuration command

 NOTE: Although VTP clients do not store VLAN information in NVRAM, they still retain the VTP configuration number. Therefore, simply rebooting a VTP client will not reset the configuration revision number. In other words, even on a VTP client, the configuration revision number must be manually reset using one of the two methods listed in the previous section.

The VLAN Trunking Protocol uses three types of messages to communicate VLAN information throughout the VTP domain. These three message types, which are collectively referred to simply as VTP advertisements, are as follows:

  1. VTP Advertisement Requests
  2. VTP Summary Advertisements
  3. VTP Subset Advertisements

VTP advertisement requests are requests for configuration information. These messages are sent by VTP clients to VTP servers to request VLAN and VTP information they may be missing. A VTP advertisement request is sent out when the switch resets, the VTP domain name changes, or in the event that the switch has received a VTP summary advertisement frame with a higher configuration revision than its own.

Unlike VTP clients, VTP servers store the VTP database in NVRAM, in the vlan.dat file. This file is located in Flash memory as illustrated in the following output:

Cat2950-VTP-Server#show flash

Directory of flash:/

2  -rwx    2888547   Mar 01 1993 00:03:33  c2950-i6q4l2-mz.121-13.EA1.bin

3  -rwx        273   Jan 01 1970 00:01:35  env_vars

    4  -rwx        924   Mar 01 1993 02:28:44  vlan.dat

5  -rwx       2477   Mar 03 1993 02:45:24  config.text

6  -rwx          5   Mar 03 1993 02:45:24  private-config.text

7  drwx        832   Mar 01 1993 00:04:29  html

21  -rwx        109   Mar 01 1993 00:04:31  info

22  -rwx        109   Mar 01 1993 00:04:31  info.ver

7741440 bytes total (2867200 bytes free)

This means that the VLAN and VTP information is retained across VTP server switches reboots, which is not the case for VTP client switches. After receiving the VTP advertisement request message(s) from the VTP client, VTP servers respond via summary and subset advertisements. Figure 23 below shows the format of a VTP advertisement request:

VTP Advertisement Request

Fig. 23. VTP Advertisement Request

  • Within the VTP advertisement request, the version field is used to indicate the VTP version number, which can be either version 1 or version 2.
  • The type or code field contains the value 0x03, which indicates that this is an advertisement request frame.

These same fields are illustrated in Figure 24 below, a screenshot that shows the format of an advertisement request:

Format of Advertisement Request

Fig. 24. Format of Advertisement Request

  • The management domain length field is used to specify the length of the VTP management domain, while the management domain name field specifies the actual name of the VTP management domain
  • The starting advertisement field, or start byte, as it is sometimes referred to, contains the starting VLAN ID of the first VLAN for which information is requested.

VTP summary advertisements are sent out by VTP servers every 5 minutes, by default. VTP summary advertisement messages are used to tell an adjacent switch of the current VTP domain name, the configuration revision number, and the status of the VLAN configuration, as well as other VTP information, which includes the time stamp, the MD5 hash, and the number of subset advertisements to follow. Figure 25 below illustrates the format of this message type:

VTP Summary Advertisement

Fig. 25. VTP Summary Advertisement

  • The version field indicates the version number, which is version 1 or version 2.
  • The type or code field indicates that this is a summary advertisement. The value contained in this field is 0x01.
  • The followers field indicates that this packet is followed by a VTP Subset Advertisement packet.
  • The management domain length field is used to specify the length of the VTP management domain, while the management domain name field specifies the actual name of the VTP management domain.
  • The configuration revision number field contains the revision number of this configuration update.
  • The updater identity field contains the IP address of the switch that is the last to have incremented the configuration revision.
  • The update timestamp field contains the timestamp of the last update, which is essentially the date and time of the last increment of the configuration revision.
  • The MD5 digest field carries the VTP password, if MD5 is configured and is used for VTP authentication.

VTP subset advertisements are sent out by VTP servers when VLAN configuration changes, such as when a VLAN is added, suspended, changed, deleted, or other VLAN-specific parameters, such as the VLAN MTU, have changed. One or several VTP subset advertisements will be sent following the VTP summary advertisement.

A VTP subset advertisement contains a list of VLAN information. If there are several VLANs, more than one subset advertisement may be required in order to advertise all the VLANs. Figure 26 below illustrates the frame format of the VTP subset advertisement:

VTP Subset Advertisement

Fig. 26. VTP Subset Advertisement

NOTE: For brevity, only the fields unique to this frame will be described in the section below.

  • The type or code field indicates that this is a subset advertisement. The value contained in this field is 0x02.
  • The sequence number field contains the sequence of the packet in the stream of packets that follow a summary advertisement. The sequence starts with 1.

Each VLAN information field contains information for a different VLAN. It is ordered so that lowered-valued ISL VLAN IDs occur first. Figure 27 below illustrates the information that is contained in the VLAN information field of each subset advertisement:

VLAN Information Field

Fig. 27. VLAN Information Field

As can be seen in the figure above, these fields are self-explanatory. Although going into further detail on VTP packets is beyond the scope of the CCNP exam requirements, ensure that you are familiar with the different messages and what they are used for. To assist with this, Figure 28 below summarizes the usage of the different packet types described in this section:

VTP Packet Type Usage

Fig. 28. VTP Packet Type Usage

VTP Passwords

VTP passwords are embedded in messages and are used to authenticate incoming VTP messages. It is important to know that although a password is configured locally on the switch, the actual password itself is not actually sent out. Instead, an MD5 hash code is generated and sent out in VTP advertisements. This hash code is then used by the local switch to validate incoming VTP messages.

VTP passwords can only be configured on VTP servers and clients. Because servers send out VTP advertisements and clients receive them, it is always recommended that if you are planning to secure the VTP domain using a password, you configure the password on the server first, and then on the client switches.

The VTP password can be an ASCII string from 1 to 32 characters. When configuring the VTP password, it is important to remember that it is case sensitive.

VTP Versions

There are three versions of VTP, which are versions 1, 2, and 3. As of the time of this writing, the default version used by Cisco Catalyst switches is VTP version 1. This can be validated in the output of the show vtp status command as illustrated below:

Catalyst2950-VTP-Server#show vtp status

VTP Version                     : 2  

Configuration Revision          : 16

Maximum VLANs supported locally : 250

Number of existing VLANs        : 11

VTP Operating Mode              : Server

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

VTP V2 Mode                     : Disabled 

VTP Traps Generation            : Disabled

MD5 digest                      : 0x35 0xB6 0x39 0xCD 0x53 0x40 0x79 0x4F

Configuration last modified by 10.1.1.1 at 3-1-93 22:25:33

Local updater ID is 10.1.1.1 on interface Vl10 (lowest numbered VLAN interface found)

The first line in bold text is confusing, as it shows that the VTP version is VTP version 2. However, this line simply indicates that this switch is version 2-capable. To determine whether VTP version 2 is enabled, the ‘VTP V2 Mode’ line should be referred to. In the output printed above, this shows ‘Disabled’, meaning that even though the switch is version 2-capable, as is stated in the first line, it is still running the default version (1) and version 2 is disabled.

VTP version 2 is similar in basic operation to version 1 but provides additional capabilities and features over version 1. The first additional feature supported in VTP version 2 is Token Ring support. VTP version 2 supports Token Ring switching and Token Ring Bridge Relay Function (TrBRF) and Token Ring Concentrator Relay Function (TrCRF). Token Ring is beyond the scope of the CCNP exam requirements and will not be described any further in this guide.

The second VTP version 2 feature is version-dependent transparent mode. When using VTP version 1, switches in transparent mode forward only VTP packets that match their domain name and VTP version. This is because version 1 supports multiple domains.

VTP version 2 supports only a single VTP domain, which means that all switches assume that they are in the same VTP domain. If the domain name is not the same, DTP will not be able to successfully establish a trunk link and VTP packets will not be relayed by . If VTP debugging is enabled on the switch, the following error messages will be printed on the console:

Catalyst2950-VTP-Server#debug sw-vlan vtp packets

Catalyst2950-VTP-Server#debug sw-vlan vtp events

%DTP-5-DOMAINMISMATCH: Unable to perform trunk negotiation on port Fa0/8 because of VTP domain mismatch.

VTP LOG RUNTIME: Dropping packet received on trunk Fa0/8 – not in domain VTP-V2-DOMAIN

VTP LOG RUNTIME: Dropping packet received on trunk Fa0/8 – not in domain VTP-V2-DOMAIN

However, although the domain name must be the same, with VTP version 2, Catalyst switches in Transparent mode ignore the VTP version and forward VTP messages regardless. This concept is illustrated in Figure 29 below:

VTP Version Ignored in Transparent Mode

Fig. 29. VTP Version Ignored in Transparent Mode

In summation, version-dependent mode means that while the VTP domain name must match, the VTP version does not have to be the same for a version 2 transparent switch to relay received VTP packets.

The third VTP feature is that unlike VTP version 1, VTP version 2 also provides consistency checks. This means that when a VLAN change is entered via CLI or SNMP, VTP version 2 will check that VLAN names and values entered are consistent with its current VLAN knowledge. This feature prevents errors from being propagated to other switches within the VTP domain. Keep in mind, however, that consistency checks are not performed on incoming VTP messages or when the switch reads VLAN information from its local NVRAM.

The final feature available in VTP version 2 that is not available in version 1 is unrecognized Type/Length/Value (TLV) support. In version 2, a VTP server will propagate TLVs, even those it does not understand. It also saves them in NVRAM when the switch is in VTP server mode. This could be useful if not all devices are at the same version or release level.

IMPORTANT NOTE:

Although VTP version 3 is technically beyond the scope of the SWITCH certification exam because of its limited support in Cisco switches, it is still important to have a basic understanding of some of the differences between this and versions 1 and 2. The section that follows provides an overview of VTP version 3.

VTP version 3 is the third version of the VLAN trunk protocol. This version of VTP enhances its initial functions well beyond the handling of VLANs. VTP version 3 adds a number of enhancements to VTP version 1 and VTP version 2, which include the following:

  • Support for a structured and secure VLAN environment (Private VLAN, or PVLAN)
  • Support for up to 4000 VLANs
  • Feature enhancement beyond support for a single database or VTP instance
  • Protection from unintended database overrides during insertion of new switches
  • Option of clear text or hidden password protection
  • Configuration option on a per-port basis instead of only a global scheme
  • Optimized resource handling and more efficient transfer of information

VTP version 3 differs from VTP versions 1 and 2 in that it distributes a list of opaque databases over an administrative domain in situations where VTP version 1 and VTP version 2 interacted with the VLAN process directly. By offering a reliable and efficient transport mechanism for a database, usability can be expanded from just serving the VLAN environment.

VTP version 3 uses the same concept of domains as those used in VTP versions 1 and 2, where only devices belonging to the same VTP domain are able to exchange and process VTP information. However, unlike versions 1 and 2, which allow a new switch with the default domain name to configure itself with the domain name in the first received VTP message, VTP version 3 requires that the domain name be explicitly configured on each switch. This means that the VTP domain name must be configured before VTP version 3 can be enabled.

In addition to the traditional VTP roles of sever, client, and transparent, VTP version 3 supports an additional switch role called ‘off.’ This mode is similar to transparent mode; however, unlike a transparent mode switch that relays any received VTP messages, a switch in off mode simply terminates the received messages and does not relay or forward them. With VTP version 3, off mode can be configured globally or on a per-port basis. Turning VTP to off allows a VTP domain to connect to devices in a different administrative domain.

VTP Pruning

 VTP pruning is the process of removing VLANs from the VLAN database of the local switch when no local ports are part of that VLAN. The primary goal of VTP pruning is to increase the efficiency of trunk links by eliminating unnecessary Broadcast, Multicast, and unknown traffic from being propagated across the network. VTP pruning is a feature that is used in order to eliminate or prune this unnecessary traffic. Figure 30 below illustrates the forwarding of traffic in a network that does not have VTP pruning enabled:

Traffic Forwarding With No VTP Pruning

Fig. 30. Traffic Forwarding With No VTP Pruning

In Figure 30, Host 1 and Host 2 reside in VLAN 5, which is propagated throughout the VTP domain. Without pruning enabled in the VTP domain, all switches forward traffic for this VLAN on their trunk links, even though they have no hosts connected to this VLAN locally.

When VTP pruning is enabled on the VTP server, pruning is enabled for the entire management domain. Each switch will advertise which VLANs it has active to neighboring switches. The neighboring switches will then prune VLANs that are not active across that trunk, thus saving bandwidth. If a VLAN is then added to one of the switches, the switch will then re-advertise its active VLANs so that pruning can be updated by its neighbors.  Figure 31 below illustrates the propagation of a Broadcast frame sent by Host 1 in VLAN 5 when VTP pruning has been enabled in the management domain:

Forwarding with VTP Pruning

Fig. 31. Forwarding with VTP Pruning

This time, the Broadcast is not forwarded to all switches that do not have attached devices in VLAN 5. When implementing VTP pruning, it is important to remember that VLAN 1 and VLANs 1002 to 1005 are always pruning-ineligible. In other words, traffic from these VLANs cannot be pruned. Traffic from any other VLAN, however, can be pruned.

Configuring and Verifying VTP Operation

VTP configuration is very straightforward and is performed by issuing the vtp [keyword] global configuration command. The keywords available with this command are illustrated in the following switch output:

VTP-Server(config)#vtp ?

domain     Set the name of the VTP administrative domain.

file       Configure IFS filesystem file where VTP configuration is stored.

interface  Configure interface as the preferred source for the VTP IP

updater address.

mode       Configure VTP device mode

password   Set the password for the VTP administrative domain

pruning    Set the administrative domain to permit pruning

version    Set the administrative domain to VTP version

The options printed above will be described in the following section.

Configuring the VTP Domain Name

The VTP domain is configured via the vtp domain [name] global configuration command. The domain name is a case sensitive ASCII string from 1 to 32 characters. The following output illustrates how to configure a switch with the VTP domain name howtonetwork.net:

VTP-Server(config)#vtp domain howtonetwork.net

Changing VTP domain name from cisco to howtonetwork.net

VTP-Server(config)#exit

The configuration VTP domain name can be viewed in the output of the show vtp status command as illustrated below:

VTP-Server#show vtp status

…

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x8E 0x85 0x23 0xAA 0x6E 0x7F 0xBF 0x16

Configuration last modified by 10.1.1.1 at 3-2-93 05:53:25

…

Renaming the VTP Database

By default, VTP and VLAN information is stored in the vlan.dat file in Flash memory. This file can be seen in the output of the show flash command as illustrated below:

VTP-Server#show flash

Directory of flash:/

2  -rwx    2888547   Mar 01 1993 00:03:33  c2950-i6q4l2-mz.121-13.EA1.bin

3  -rwx        273   Jan 01 1970 00:01:35  env_vars

    4  -rwx        916   Mar 02 1993 05:44:29  vlan.dat

5  -rwx       2477   Mar 03 1993 02:45:24  config.text

6  -rwx          5   Mar 03 1993 02:45:24  private-config.text

7  drwx        832   Mar 01 1993 00:04:29  html

21  -rwx        109   Mar 01 1993 00:04:31  info

22  -rwx        109   Mar 01 1993 00:04:31  info.ver

7741440 bytes total (2867200 bytes free)

The vtp filename [name] global configuration command can be used to change this default name to any other desired name. Although the file name can be changed, it is important to remember that this command cannot be used to load a new database. In other words, the same information is retained, only in a file with a different name. The following output illustrates how to rename the VLAN configuration file:

VTP-Server(config)#vtp file myvlaninfo

Setting device to store VLAN database at filename myvlaninfo.

VTP-Server(config)#exit

Again, the show flash command can be used to verify the file in Flash memory as follows:

VTP-Server#show flash

Directory of flash:/

2  -rwx    2888547   Mar 01 1993 00:03:33  c2950-i6q4l2-mz.121-13.EA1.bin

3  -rwx        273   Jan 01 1970 00:01:35  env_vars

    4  -rwx        916   Mar 02 1993 05:44:29  vlan.dat

5  -rwx       2477   Mar 03 1993 02:45:24  config.text

6  -rwx          5   Mar 03 1993 02:45:24  private-config.text

7  drwx        832   Mar 01 1993 00:04:29  html

21  -rwx        109   Mar 01 1993 00:04:31  info

22  -rwx        109   Mar 01 1993 00:04:31  info.ver

   23  -rwx        916   Mar 02 1993 05:50:02  myvlaninfo

NOTE: In the output above, notice that the vlan.dat file is also still present. The renamed file contains all the VLAN information from the vlan.dat file but all new changes, etc., are stored in the new file and not the vlan.dat file. For example, if several new VLANs were created on the switch, only the size of the newly named file would increment as illustrated below:

VTP-Server(config-vlan)#vlan 60

VTP-Server(config-vlan)#name Test-VLAN-60

VTP-Server(config-vlan)#vlan 70

VTP-Server(config-vlan)#name Test-VLAN-70

VTP-Server(config-vlan)#vlan 80

VTP-Server(config-vlan)#name Test-VLAN-80

VTP-Server(config-vlan)#vlan 90

VTP-Server(config-vlan)#name Test-VLAN-90

VTP-Server(config-vlan)#end

VTP-Server#

VTP-Server#show flash:

Directory of flash:/

2  -rwx    2888547   Mar 01 1993 00:03:33  c2950-i6q4l2-mz.121-13.EA1.bin

3  -rwx        273   Jan 01 1970 00:01:35  env_vars

    4  -rwx        916   Mar 02 1993 05:44:29  vlan.dat  <<<<< File size same

                         as before

5  -rwx       2477   Mar 03 1993 02:45:24  config.text

6  -rwx          5   Mar 03 1993 02:45:24  private-config.text

7  drwx        832   Mar 01 1993 00:04:29  html

21  -rwx        109   Mar 01 1993 00:04:31  info

22  -rwx        109   Mar 01 1993 00:04:31  info.ver

   23  -rwx       1156   Mar 02 1993 05:53:25  myvlaninfo <<<<< File size has

                         increased

7741440 bytes total (2865664 bytes free)

Changing the VTP IP Updater Address

The vtp interface [name] [only] global configuration command is used to specify the name of the interface providing the VTP ID updated for this device. The [only] keyword provides an additional capability to force the switch to use only the IP address of the specified interface as the VTP IP updater. The following output illustrates how to force the switch to use only the IP address of interface VLAN 10 as the VTP IP updater:

VTP-Server#conf t

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

VTP-Server(config)#vtp interface vlan10 only

VTP-Server(config)#exit

This option allows administrators to specify a desired interface, such as the IP address of the management VLAN, on switches with multiple interfaces. This configuration can be validated in the following output illustrating the show vtp status command:

VTP-Server#show vtp status

…

[Truncated Output]

Configuration last modified by 10.1.1.1 at 3-2-93 05:53:25

Local updater ID is 10.1.1.1 on interface Vl10 (preferred interface)

Preferred interface name is vlan10 (mandatory)

Configuring the VTP Mode

By default, all Cisco Catalyst switches default to a VTP mode of server. This default behavior can be adjusted via the vtp mode [mode] global configuration command. The following configuration output illustrates how to disable VTP on the switch (i.e. transparent mode):

VTP-Server(config)#vtp mode transparent

Setting device to VTP TRANSPARENT mode.

VTP-Server(config)#exit

The configured VTP mode can be viewed in the following output illustrating the show vtp status command:

VTP-Server#show vtp status

…

VTP Operating Mode              : Transparent

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x8E 0x85 0x23 0xAA 0x6E 0x7F 0xBF 0x16

Configuration last modified by 10.1.1.1 at 3-2-93 05:53:25

Configuring the VTP Password

The vtp password [password] global configuration command is used to set the administrative domain password for the generation of the 16-byte secret value used in MD5 digest calculation to be sent in VTP advertisements and to validate received VTP advertisements. The VTP password can be an ASCII string from 1 to 32 characters. The password is case sensitive. The following output illustrates how to configure the VTP password on a switch:

VTP-Server(config)#vtp password ccnp-here-i-come

Setting device VLAN database password to ccnp-here-i-come

VTP-Server(config)#exit

The show vtp password command is used to view the current VTP password in plaintext as follows:

VTP-Server#show vtp password

VTP Password: ccnp-here-i-come

Configuring VTP Pruning

VTP pruning is enabled globally on the VTP server via the vtp pruning global configuration command. By default, VLAN 1 and VLANs 1002 to 1005 are always pruning-ineligible; however, any other VLANs can be pruned. The following configuration output demonstrates how to enable VTP pruning on a VTP server:

VTP-Server#conf t

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

VTP-Server(config)#vtp pruning

Pruning switched on

VTP-Server(config)#exit

This configuration can be validated using the show vtp status command as follows:

VTP-Server#show vtp status

…

VTP Operating Mode              : Server

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

…

This same state can also be verified on all VTP clients in the management domain as illustrated in the following output:

VTP-Client#show vtp status

…

VTP Operating Mode              : Client

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

…

In some cases, administrators may want to change the default pruning of all prune-eligible VLANs. Cisco IOS software provides this flexibility via the use of the switchport trunk pruning vlan interface configuration command. The options available with this command are as follows:

VTP-Server(config)#interface fastethernet 0/1

VTP-Server(config-if)#switchport trunk pruning vlan ?

WORD    VLAN IDs of the allowed VLANs when this port is in trunking mode

add     add VLANs to the current list

except  all VLANs except the following

none    no VLANs

remove  remove VLANs from the current list

The VLAN list allows administrators to manually specify the VLANs they want pruned when pruning has been enabled. The add keyword is used to add to the current list of VLANs being pruned. The except keyword excludes the specified VLANs from being pruned. The none keyword prevents all VLANs from being pruned on the trunk link. The remove keyword removes prune-eligible VLANs from the current pruned VLAN list.

The following output illustrates how to prevent all VLANs from being pruned on a trunk interface (port):

VTP-Server(config)#interface fastethernet0/1

VTP-Server(config-if)#switchport trunk pruning vlan none

VTP-Server(config-if)#exit

The following output illustrates how to allow only VLANs 10, 20, and 30 to be pruned:

VTP-Server(config)#interface fastethernet 0/2

VTP-Server(config-if)#switchport trunk pruning vlan 10,20,30

VTP-Server(config-if)#exit

Pruning configuration applied to trunk ports can be validated by issuing the show interfaces [name] switchport command as illustrated in the following output:

VTP-Server#show interfaces fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

…

Trunking VLANs Enabled: 1,10,20,30,40,50

Pruning VLANs Enabled: NONE

…

VTP-Server#

VTP-Server#

VTP-Server#show interfaces fastethernet 0/2 switchport

Name: Fa0/2

Switchport: Enabled

Administrative Mode: dynamic desirable

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

…

Trunking VLANs Enabled: 1-99,201-4094

Pruning VLANs Enabled: 10,20,30

…

Additionally, the show interfaces trunk command can be used to view trunking information, including pruning configuration, for all configured trunks on the switch:

VTP-Server#show interfaces trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

Fa0/2       desirable    802.1q         trunking      1

Fa0/3       desirable    802.1q         trunking      1

Port        Vlans allowed on trunk

Fa0/1       1,10,20,30,40,50

Fa0/2       1-99,201-4094

Fa0/3       2,4,6,10-4094

Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,30,40,50

Fa0/2       1,10,20,30,40,50,60,70,80,90,254

Fa0/3       10,20,30,40,50,60,70,80,90,254

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,30,40,50

Fa0/2       1,40,50,60,70,80,90,254

Fa0/3       none

Configuring the VTP Version

The default VTP version used in Cisco Catalyst switches is VTP version 1. To change the default VTP version, the vtp version [version] global configuration command can be used as illustrated in the following output:

VTP-Server(config)#vtp version ?

<1-2>  Set the administrative domain VTP version number

NOTE: Keep in mind that VTP version 3 is available only in a select few Cisco Catalyst switches, such as the Catalyst 6500 series switches.

Troubleshooting and Debugging VTP

The show vtp status command provides information on VTP defaults and configuration. This information includes the VTP version enabled on the switch, the VTP domain name (if one is configured), the IP address of the updater, the configuration revision number, the number of VLANs, and the VTP operating mode of the switch. The information printed by this command is illustrated in the following output:

Catalyst2950-VTP-Server#show vtp status

VTP Version                     : 2

Configuration Revision          : 23

Maximum VLANs supported locally : 250

Number of existing VLANs        : 15

VTP Operating Mode              : Server

VTP Domain Name                 : howtonetwork.net

VTP Pruning Mode                : Enabled

VTP V2 Mode                     : Enabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x82 0xCD 0xAE 0xE1 0x20 0x44 0x71 0xE0

Configuration last modified by 10.1.1.1 at 3-2-93 06:54:09

Local updater ID is 10.1.1.1 on interface Vl10 (lowest numbered VLAN interface found)

In addition to the show vtp status command, the show vtp counters command is also a useful VTP troubleshooting tool. This command prints local VTP statistics, such as the number of messages sent and received, as well as errors and VTP pruning packet statistics as illustrated in the following output:

Catalyst2950-VTP-Server#show vtp counters

VTP statistics:

Summary advertisements received    : 526

Subset advertisements received     : 50

Request advertisements received    : 0

Summary advertisements transmitted : 543

Subset advertisements transmitted  : 58

Request advertisements transmitted : 4

Number of config revision errors   : 2

Number of config digest errors     : 1

Number of V1 summary errors        : 0

VTP pruning statistics:

Trunk            Join Transmitted Join Received   Summary advts received from

non-pruning-capable device

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

Fa0/1               14447            14452            0

Fa0/2               15082            15071            0

Fa0/3               15073            15082            0

As is the case with all forms of troubleshooting, debugging should be considered when all other troubleshooting mechanisms have been exhausted. VTP debugging is enabled by issuing the debug sw-vlan vtp privileged EXEC command. The available options with this command are as follows:

Catalyst2950-VTP-Server#debug sw-vlan vtp ?

events   vtp events

packets  vtp packets

pruning  vtp pruning events

xmit     vtp packets transmitted

The following shows a sample output of the information printed on the console when VTP debugging is enabled on a VTP server switch:

Catalyst2950-VTP-Server#show debugging

Generic VLAN Manager:

vtp packets debugging is on

vtp events debugging is on

Catalyst2950-VTP-Server#

1d07h: VTP LOG RUNTIME: Transmit vtp summary, domain howtonetwork.net, rev 26, followers 1

MD5 digest calculated = 2B 94 D7 D4 BD A0 ED AA 5F 2B 9E A9 82 F5 36 C7

1d07h: VTP LOG RUNTIME: Transmit vtp summary, domain howtonetwork.net, rev 26, followers 1

MD5 digest calculated = 2B 94 D7 D4 BD A0 ED AA 5F 2B 9E A9 82 F5 36 C7

1d07h: VTP LOG RUNTIME: Transmit vtp summary, domain howtonetwork.net, rev 26, followers 1

MD5 digest calculated = 2B 94 D7 D4 BD A0 ED AA 5F 2B 9E A9 82 F5 36 C7

1d07h: %SYS-5-CONFIG_I: Configured from console by console

1d07h: VTP LOG RUNTIME: Summary packet received, domain = howtonetwork.net, rev = 26, followers = 1

1d07h:

1d07h: summary: 02 01 01 10 68 6F 77 74 6F 6E 65 74 77 6F 72 6B   ….howtonetwork

1d07h: summary: 2E 6E 65 74 00 00 00 00 00 00 00 00 00 00 00 00   .net…………

1d07h: summary: 00 00 00 00 00 00 00 1A 0A 01 01 01 39 33 30 33   …………9303

1d07h: summary: 30 32 30 37 31 31 31 36 2B 94 D7 D4 BD A0 ED AA   02071116+.WT= m*

1d07h: summary: 5F 2B 9E A9 82 F5 36 C7 00 00 00 01 06 01 00 01   _+.).u6G……..

1d07h:

1d07h: VTP LOG RUNTIME: Summary packet rev 26 equal to domain howtonetwork.net rev 26

1d07h: VTP LOG RUNTIME: Subset packet received, domain = howtonetwork.net, rev = 26, seq = 1, length = 484

1d07h: subset: 02 02 01 10 68 6F 77 74 6F 6E 65 74 77 6F 72 6B   ….howtonetwork

1d07h: subset: 2E 6E 65 74 00 00 00 00 00 00 00 00 00 00 00 00   .net…………

1d07h: subset: 00 00 00 00 00 00 00 1A 14 00 01 07 00 01 05 DC   ……………\

1d07h: subset: 00 01 86 A1 64 65 66 61 75 6C 74 00 18 00 01 0C   …!default…..

1d07h: subset: 00 0A 05 DC 00 01 86 AA 54 65 73 74 2D 56 4C 41   …\…*Test-VLA

1d07h: subset: 4E 2D 31 30 18 00 01 0C 00 14 05 DC 00 01 86 B4   N-10…….\…4

 

 Chapter Summary

 The following section is a summary of the major points you should be aware of in this chapter.

Understanding Virtual LANs (VLANs)

  • There are two primary types of switch VLAN port types:
  1. Access Ports
  2. Trunk Ports
  • Access ports are switch ports that are assigned to a single VLAN
  • Access ports can only belong to a single VLAN
  • The two methods that can be used to assign access port to VLANs are:
  1. Static VLAN Assignment
  2. Dynamic VLAN Assignment
  • Trunk ports are ports on switches that are used to carry traffic from multiple VLANs
  • Trunk ports are typically used to connect switches to other switches or routers
  • Cisco Catalyst switches use VLANs in the range of 0 – 4095
  • VLANs 1 – 4094 are user-configurable VLANs
  • VLANs 0 and 4096 are reserved system VLANs
  • Extended VLANs requires that the switch be enabled to use the extended system-id
  • The extended system ID feature is based on the 802.1t standard
  • Catalyst 6500 series switches use extended VLANs for internal VLAN assignments
  • In Catalyst 6500 switches, the following use extended VLANs for internal use:
  1. WAN interfaces
  2. Layer 3 Ethernet ports
  3. Subinterfaces
  • VLAN trunks are used to carry data from multiple VLANs
  • The two most common trunk encapsulation methods are:
  1. Inter-Switch Link
  2. IEEE 802.1Q
  • Inter-Switch Link (ISL) is a Cisco proprietary protocol
  • The ISL header is 26 bytes in length, while the FCS is 4 bytes in length
  • The following is a summary of ISL capabilities:
  1. ISL can support up to 1000 VLANs
  2. ISL is a Cisco-proprietary protocol
  3. ISL encapsulates the frame, it does not modify the original frame in any way
  4. ISL operates in a point-to-point environment
  • 1Q is an IEEE standard for VLAN tagging
  • 1Qinserts a single 4-byte tag into the original frame
  • The following summarizes some 802.1Q features:
  1. It can support up to 4096 VLANs
  2. It uses an internal tagging mechanism, modifying the original frame
  3. It is an open standard protocol developed by the IEEE
  4. It does not tag frames on the native VLAN, however, all other frames are tagged
  • Two methods that can be used to address VLANs are:
  1. Assigning a single subnet to each individual VLAN
  2. Assigning multiple subnets per VLAN
  • The two methods of implementing VLANs are:
  1. End-to-end VLANs
  2. Local VLANs

Configuring and Verifying VLANs

  • The following should be taken into consideration when configuring VLANs:
  1. In Cisco Catalyst switches, Ethernet VLAN 1 uses only default values
  2. Except for the VLAN name, Ethernet VLANs 1006 through 4094 use only default values
  3. You can configure the VLAN name for Ethernet VLANs 1006 through 4094

Configuring and Verifying Trunk Links

  • DISL simplifies the creation of an ISL trunk from two interconnected Fast Ethernet devices
  • DTP is a Cisco proprietary point-to-protocol that negotiates trunking between two switches
  • Trunk ports can be configured using one of two methods:
  1. Manual (Static) Trunk Configuration
  2. Dynamic Trunking Protocol (DTP)

VLAN Trunking Protocol (VTP)

  • VTP is a Cisco proprietary Layer 2 messaging protocol
  • VTP manages addition, deletion, and renaming of VLANs on switches in the same domain
  • The VTP domain consists of a group of adjacent connected switches
  • The three VTP modes are:
  1. VTP Server
  2. VTP Client
  3. VTP Transparent
  • VTP server mode is the default VTP mode for all Cisco Catalyst switches
  • VTP clients receive VTP information from VTP servers
  • VTP transparent mode disables VTP on the switch
  • VTP advertisements are sent out periodically by each switch in the VTP domain
  • VTP packets are sent to the Multicast address 01-00-0C-CC-CC-CC
  • Switches use the configuration revision number to keep track of the most recent information
  • There are three types of VTP messages:
  1. VTP Advertisement Requests
  2. VTP Summary Advertisements
  3. VTP Subset Advertisements
  • Advertisement requests are requests for configuration information
  • Summary advertisement messages are used to provide current VTP information
  • VTP summary advertisements are sent out by VTP servers every 5 minutes
  • VTP subset advertisements are sent out by VTP servers when VLAN configuration changes
  • A VTP subset advertisement contains a list of VLAN information
  • VTP passwords are embedded in messages
  • VTP passwords are used to authenticate incoming VTP messages
  • VTP passwords can only be configured on VTP servers and clients
  • The VTP password can be an ASCII string from 1 to 32 characters
  • There are three versions of VTP, which are versions 1, 2, and 3
  • The default version used by Cisco Catalyst switches is VTP version 1
  • VTP version 2 provides additional capabilities over version 1 which include:
  1. Token Ring support
  2. Version-dependent transparent mode
  3. Consistency checks
  4. Unrecognized Type/Length/Value (TLV) support

VTP version 3 adds a number of enhancements to VTP which include:

  1. Support for a structured and secure VLAN environment (Private VLAN, or PVLAN)
  2. Support for up to 4000 VLANs
  3. Feature enhancement beyond support for a single database or VTP instance
  4. Protection from unintended database overrides during insertion of new switches
  5. Option of clear text or hidden password protection
  6. Configuration option on a per port base instead of only a global scheme
  7. Optimized resource handling and more efficient transfer of information
  • VTP pruning is a feature that you use in order to eliminate or prune this unnecessary traffic

Cisco VTP page. Learn more about VTP on our CCNP ENCOR course.

Subscription Form