Skip to content
Guide: Switch protocolsSwitch
CCNA learning path

Guide

Switch protocols: VTP, DTP, CDP and LLDP

This guide explains how Cisco switches share VLAN information, negotiate trunks, and discover directly connected neighbors.

2 parts · video · 19 practice questions

VTP and DTP

VLAN Trunking Protocol (VTP) distributes VLAN database changes among switches in the same VTP domain. A VTP server can add, delete, or rename VLANs, and advertises those changes over trunk links so the switches do not need identical VLANs entered one by one. Set the same domain name on participating switches with vtp domain <name>; a different domain prevents them from synchronizing.

VTP versions 1 and 2 normal-range VLANs
IDs 1 through 1005
VTP versions 1 and 2 extended-range VLANs
1006 through 4094
DTP dynamic auto
Two auto ports remain access links
DTP dynamic desirable
Can form a trunk with an auto or desirable peer
DTP negotiating a trunk, as a 22 second clip. Watch on its own page

In server mode, a switch can change the VLAN database and advertise the changes. A client receives and applies server updates but cannot locally add, delete, or rename VLANs. Transparent mode keeps a separate, locally editable VLAN database and does not synchronize received updates or advertise its own VLAN changes. In VTP versions 2 and 3, a transparent switch forwards received advertisements across trunks. Managing VLANs locally in transparent mode avoids the classic revision-number overwrite risk, but VLAN changes must then be managed on each switch.

In VTP versions 1 and 2, the configuration revision number identifies the VLAN database update level. VLAN changes increase it, and switches use a higher revision to decide that an update is newer. Adding a device with a higher revision to a VTP version 1 or 2 domain can cause the domain to replace its VLAN database with that device's database. Before connecting a switch to a production domain, inspect its VTP status and verify its revision; transparent mode lets you edit local VLAN information without affecting other devices. VTP version 3 does not have this overwrite behavior.

VTP versions 1 and 2 propagate normal-range VLANs, IDs 1 through 1005, but do not propagate extended-range VLANs 1006 through 4094. VLANs 1002 through 1005 are reserved and cannot be modified. Configure extended-range VLANs locally on each switch when using versions 1 and 2. show vtp status reports the domain, mode, revision, VTP version, and VLAN count for verification.

Dynamic Trunking Protocol (DTP) negotiates whether a switch link becomes a trunk. dynamic auto is passive: two auto ports remain access links because neither initiates trunking. dynamic desirable actively tries to form a trunk and can do so with an auto or desirable peer. A statically configured trunk can be used when negotiation is not wanted. On user-facing access ports, explicitly set access mode and disable DTP frame generation with switchport nonegotiate, a setting Cisco identifies for security use because an attacker can send DTP frames to force a port into trunking mode; for a non-DTP peer that must trunk, configure both ends as trunks manually. Verify the resulting port mode before relying on a link as a trunk.

IOS XE
vtp domain <name>
vtp mode {server | client | transparent}
show vtp status
interface <interface>
switchport mode access
switchport nonegotiate
switchport mode dynamic auto
switchport mode dynamic desirable
Practice this part:CCNA: VTP & DTP (12)
References (2)

CDP and LLDP

Cisco Discovery Protocol (CDP) is Cisco proprietary. It advertises neighbor details such as device ID, local interface, remote port ID, platform, software version, and available network addresses. show cdp neighbors gives a summary; it shows devices that advertise CDP and whose entries remain in the cache, not a guaranteed inventory of every cable. A disconnected neighbor can remain listed until its advertised holdtime expires. Check interface state and correlate live discovery output with the physical connection before changing a working cable or updating documentation.

LLDP standard
IEEE 802.1AB
Catalyst 9200 IOS XE version
26.x
LLDP global default
Disabled
LLDP interface transmit and receive default
Disabled

Use show cdp entry <device-id> to inspect one named neighbor, including its advertised details and software version. show cdp neighbors detail provides detailed information for all learned neighbors. If CDP should remain enabled elsewhere but must not advertise on user-facing ports, use no cdp enable on those interfaces. no cdp run disables CDP globally.

Link Layer Discovery Protocol (LLDP), IEEE 802.1AB, is the vendor-neutral neighbor discovery standard and supports multi-vendor discovery. CDP output being empty does not prove that a link is disconnected: a third-party device may not send CDP. On Catalyst 9200 IOS XE 26.x, LLDP is disabled globally by default, and interface transmit and receive are also disabled by default. Enable LLDP globally with lldp run and enable transmit and receive on the relevant interfaces on both devices. Check show lldp neighbors and the physical interface state when validating a documented connection.

IOS XE
show cdp neighbors
show cdp entry <device-id>
show cdp neighbors detail
interface <interface>
no cdp enable
no cdp run
lldp run
lldp transmit
lldp receive
show lldp neighbors
Practice this part:CCNA: CDP & LLDP (7)
References (3)

Check your understanding

Switch protocols: VTP, DTP, CDP and LLDP

All 2 sections · no timer

Unlimited retries

Questions from every section are combined into one assessment. Answer them all correctly to complete the article.

Your completion saves in this browser. Sign in to sync it to your account.