Skip to content

VTP

VLAN Trunking Protocol (VTP) configuration manages the global VTP settings on NX-OS devices. VTP propagates VLAN definitions across switches that share the same VTP domain over trunk links. Settings include the VTP domain name, the operating mode (server, client, transparent or off), the protocol version, an optional domain password and the file used to store the VLAN database. VTP is enabled with feature vtp, and individual Ethernet and port-channel interfaces can opt out with no vtp.

Diagram
NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
vtpClassvtpNo

NameTypeConstraintMandatoryDefault Value
domainStringNo
modeChoiceclient, server, transparent, offNo
versionIntegermin: 1, max: 2No
passwordStringNo
fileStringNo

Example 1: VTP server with domain, version 2 and password

nxos:
devices:
- name: LEAF1
configuration:
feature:
vtp: true
vtp:
domain: CAMPUS
mode: server
version: 2
password: VtpSecret123

Example 2: VTP transparent mode with a custom VLAN database file and VTP disabled on an uplink

nxos:
devices:
- name: LEAF1
configuration:
feature:
vtp: true
vtp:
domain: CAMPUS
mode: transparent
file: bootflash:/vtp.dat
interfaces:
ethernets:
- id: 1/49
switchport:
mode: trunk
vtp: false