Skip to content

VTP

VTP (Virtual Trunking Protocol) is a Cisco proprietary protocol that manages the addition, deletion, and renaming of VLANs across a switched network. It enables centralized VLAN management where one switch (VTP server) can propagate VLAN configuration changes to other switches (VTP clients) in the same VTP domain. This reduces administrative overhead and ensures VLAN consistency across the network infrastructure.

Diagram

Diagram

Classes

configuration (iosxe.devices)

NameTypeConstraintMandatoryDefault Value
vtpClass[vtp]No

vtp (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
fileStringNo
versionIntegermin: 1, max: 3No
interface_typeChoiceLoopback, Vlan, GigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernet, PortChannelNo
interface_idStringNo
interface_onlyBooleantrue, falseNo
passwordStringNo
password_hiddenBooleantrue, falseNo
password_secretBooleantrue, falseNo
pruningBooleantrue, falseNo
domainStringNo
modeChoiceclient, off, server, transparentNo
mode_instanceChoicemst, unknown, vlanNo

By centralizing VLAN management, VTP reduces administrative overhead and ensures consistent VLAN configurations across all switches in a VTP domain, preventing misconfigurations and improving network stability.

VTP Parameters

  • VTP domain name
  • VTP mode (server, client, transparent)
  • VTP version
  • VTP password
  • VTP pruning
  • VTP database file
  • Interface type/ID (for interface-specific VTP settings)

You can use these VTP parameters to define how your network manages VLANs centrally. Customize the domain, mode, version, and other settings to fit your network’s VLAN management and operational needs. Adjusting these parameters lets you tailor VLAN propagation and consistency for your environment.

Examples

vtp mode server
  • Sets the VTP operational mode to server, allowing the switch to create, modify, and delete VLANs and propagate these changes.
vtp domain CiscoNet
  • Configures the VTP management domain name, which must match across all switches intended to share VLAN information.
vtp password mysecret
  • Sets the VTP password for authentication, ensuring only authorized switches can participate in the VTP domain.
vtp version 2
  • Specifies the VTP protocol version to be used, affecting compatibility and feature support (e.g., VTPv3 supports extended VLANs).
vtp pruning
  • Enables VTP pruning, which prevents unnecessary broadcast, unknown unicast, and multicast traffic from being sent over trunk links to switches that do not have active ports for a particular VLAN.

Sample Configuration

The following configuration describes how to set up VTP on a Cisco device. It includes setting the VTP mode, domain name, password, version, and enabling pruning for efficient VLAN management.

vtp mode server
vtp domain COMPANY-DOMAIN
vtp password VtpSecurePassword123
vtp version 3
vtp pruning

Example YAML Code

The following YAML code sets up VTP on an IOS-XE device, specifying the VTP mode, domain, version, password, and pruning settings for centralized VLAN management.

iosxe:
devices:
- name: Device1
configuration:
vtp:
file: vtp-database
version: 3
interface_type: GigabitEthernet
interface_id: "0/0/1"
interface_only: false
password: VtpSecurePassword123
password_hidden: true
password_secret: true
pruning: true
domain: COMPANY-DOMAIN
mode: server
mode_instance: vlan