VTP Pruning on switches Explained

A VLAN is a group of switch ports that share broadcast messages. By default, a trunk port is a member of all VLANs. It shares broadcast messages of all VLANs with the connected device.

VTP pruning automatically manages VLAN membership on a trunk connection. It keeps membership of active VLANs only. It automatically removes membership of inactive VLANs.

Let us take an example.

The following image shows a network. Switch1 and Switch2 have a trunk connection on Gig0/1. Switch1 has VLAN-10 and VLAN-20. Switch2 has VLAN-20 and VLAN-30. VTP pruning is not enabled on both switches.

vtp pruning example

By default, a trunk port is a member of all VLANs. Switch1's trunk port is a member of VLAN-10 and VLAN-20. It forwards broadcast messages from both VLANs to Switch2. Switch2's trunk port is a member of VLAN-20 and VLAN-30. It forwards broadcast messages from VLAN-20 and VLAN-30 to Switch1.

Switch1 has no member in VLAN-30. It drops all broadcast messages it receives for VLAN-30. Similarly, Switch2 drops all traffic it receives for VLAN-10.

vtp pruning example

With this configuration , both switches are wasting bandwidth and resources. To fix this issue, you can manually configure the VLAN membership on the trunk ports of both switches.

In this example, you need to remove VLAN-10's membership from Switch1's trunk port and VLAN-30's membership from Switch2's trunk port.

manual vlan update

The main problem with this approach is that if you add a VLAN-10 member to Switch2 or a VLAN-30 member to Switch1, you need to add these VLAN memberships to trunk ports again.

This is a complex and confusing task in a multi-switched network with multiple VLANs, where every VLAN is not necessarily active on every switch. You may accidentally prune a VLAN from a trunk, creating connectivity problems.

VTP pruning

VTP pruning solves this problem. It dynamically manages VLAN membership on trunk ports based on the configured VLANs.

If we enable VTP pruning on both switches, Switch1 will not forward VLAN-10's broadcast messages to Switch2, and Switch2 will not forward VLAN-30's broadcast messages to Switch1.

VTP pruning enabled trunk ports share VLAN information. Switch1's trunk port shares Switch1's VLAN information with Switch2. Switch2's trunk port shares Switch2's VLAN information with Switch1. From the shared information, Switch2 learns about Switch1's VLANs, and Switch1 learns about Switch2's VLANs.

vlan information broadcast

Based on the remote switch's configured VLANs, VTP Pruning automatically updates VLAN membership on the local trunk port.

In this example, Switch1 removes VLAN-10, and Switch2 removes VLAN-30 from the trunk ports. They exchange only VLAN-20's broadcast messages.

manual vlan update

If you add a VLAN to a switch, the switch shares that information with all connected switches. From the shared information, connected switches automatically update VLAN information on their trunk ports.

For example, if you add a VLAN-10 member to Switch2, Switch2 shares this information with Switch1, and Switch1 adds VLAN-10 to the trunk port.

If you remove all members of VLAN-20 from Switch1, Switch1 shares this information with Switch2, and Switch2 removes VLAN-20 from the trunk port connected to Switch1.

This way switches automatically update VLAN membership on trunk ports based on the active VLANs on the remote switches.

VTP modes

You can enable VTP pruning in VTP server mode only. A VTP server shares VTP pruning information only with other VTP servers and clients. A switch in transparent mode can not incorporate VTP messages. In transparent mode, you need to manually manage VLAN information on trunk ports.

ComputerNetworkingNotes CCNA Study Guide VTP Pruning on switches Explained