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
NameTypeConstraintMandatoryDefault Value
vtpClass[vtp]No

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.

Key Components:

  • VTP Domain Name (domain): The management domain for VTP. All switches sharing VLAN information must have the same domain name.

  • VTP Mode (mode): Determines the switch’s role in VTP. Options include:

    • server: Can create, modify, and delete VLANs a nd propagate changes.
    • client: Receives VLAN information but cannot modify VLANs.
    • transparent: Forwards VTP advertisements but does not participate in VLAN management.
  • VTP Version (version): Specifies the VTP protocol version (e.g., 1, 2, or 3). Higher versions support more features, such as extended VLANs.

  • VTP Password (password, password_hidden, password_secret): Authenticates VTP messages between switches. Only switches with the correct password can join the domain.

    • password: The actual password string.
    • password_hidden: Indicates if the password is hidden in configuration.
    • password_secret: Indicates if the password is stored as a secret.
  • VTP Pruning (pruning): Enables pruning to prevent unnecessary VLAN traffic on trunk links, optimizing bandwidth.

  • VTP Database File (file): Specifies the filename for the VTP database, which stores VLAN information.

  • Interface Type/ID (interface_type, interface_id, interface_only): Allows VTP configuration to be applied to specific interfaces.

    • interface_type: The type of interface (e.g., GigabitEthernet).
    • interface_id: The identifier for the interface.
    • interface_only: If true, applies VTP only to the specified interface.

Key Parameters Briefly Explained:

  • domain: Sets the VTP management domain name.
  • mode: Configures the switch’s VTP operational mode.
  • version: Selects the VTP protocol version.
  • password: Sets the VTP password for authentication.
  • password_hidden: Hides the password in configuration output.
  • password_secret: Stores the password as a secret.
  • pruning: Enables VTP pruning for efficient VLAN traffic management.
  • file: Specifies the VTP database file.
  • interface_type, interface_id, interface_only: Apply VTP settings to specific interfaces.

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.

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

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