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 1 below illustrates the forwarding of traffic in a network that does not have VTP pruning enabled:

vtp pruning

Fig. 1. Traffic Forwarding With No VTP Pruning

In Figure 1, 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.

We cover VTP pruning in our Cisco CCNA certification training course.

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 2 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:

vtp pruning

Fig. 2. 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.

According to Cisco:

“The VLAN architecture requires all flooded traffic for a VLAN to be sent across a trunk port even if it leads to switches that have no devices that are active in the VLAN. This method leads to wasted network bandwidth.

VTP pruning optimizes the usage of network bandwidth by restricting the flooded traffic to only those trunk ports that can reach all the active network devices. When this protocol is in use, a trunk port does not receive the flooded traffic that is meant for a certain VLAN unless an appropriate join message is received. A join message is defined as a new message type in addition to the ones already supported by version 1 of the VTP protocol. A VTP implementation indicates that it supports this extension by appending a special TLV at the end of the summary advertisement messages that it generates. In VTP transparent mode, VTP relays all VTP packets, and pruning requires that the switch processes TLVs in the VTP summary packets. You cannot use pruning in VTP transparent mode.”

You can also refer to the Cisco VTP Pruning pages.

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 to be 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

Subscription Form