All topic guides
Layer 2 SwitchingAmalgamated guide

VLANs, Trunks & DTP

Broadcast domains, 802.1Q, native VLAN, voice VLAN, VTP awareness, and DTP negotiation.

How the sources were combined

Panagiss VLAN.md explains the problem/solution with access/trunk/native VLAN config. jdepew88 adds VTP depth, voice VLAN security rationale, and DTP tables — synthesized with Panagiss trunk diagrams and jdepew88 operational cautions (VTP revision traps, DTP auto/desirable).

Overview

VLANs segment broadcast domains; trunks carry multiple VLANs with 802.1Q tags. CCNA covers access vs trunk ports, native VLAN mismatches, voice VLAN, VTP awareness, and DTP negotiation traps.

Why VLANs exist

A campus switch network without VLANs is one large Layer 2 broadcast domain. Switches flood broadcast traffic (ARP, DHCP, unknown unicast) to every port — including across IP subnets. That wastes bandwidth, forces every host to process irrelevant traffic, and bypasses router/firewall security policies because broadcast frames never reach a Layer 3 enforcement point.

VLANs (Virtual LANs) segment the LAN into separate broadcast domains at Layer 2. There is typically a one-to-one relationship between a VLAN and an IP subnet: Engineering in VLAN 10 / 10.10.10.0/24, Sales in VLAN 20 / 10.10.20.0/24. Hosts in different VLANs must route through a Layer 3 device (router, firewall, or L3 switch SVI) to communicate.

VLAN advantages (exam framing)

BenefitWhat it means on the exam
SegmentationDepartments, guests, servers, and voice each get isolated broadcast domains
FlexibilityMove a host to another VLAN by changing port config — no recabling
SecurityCombine VLAN isolation with inter-VLAN ACLs; voice VLAN keeps PC traffic off the call path
PerformanceBroadcasts stay within their VLAN instead of flooding the entire campus
Info

VLAN assignment can be static (admin configures switchport access vlan) or dynamic (VMPS — rarely tested at CCNA depth). Voice VLAN is a special static case for IP phones.

Access ports

Access ports connect end hosts. Each access port belongs to exactly one VLAN. The host is not VLAN-aware — the switch assigns membership when untagged frames arrive.

Create VLAN and assign access port

vlan 10 name ENGINEERING ! interface GigabitEthernet0/1 switchport mode access switchport access vlan 10

Verify access ports

show vlan brief show interfaces GigabitEthernet0/1 switchport

VLAN ID ranges: Normal VLANs 1–1005; extended 1006–4094. VLAN 1 is the default on Cisco switches — avoid using it as your production data or native VLAN when policy allows.

Trunk ports and 802.1Q

When multiple VLANs must cross a link between switches (or to a router), use a trunk. 802.1Q inserts a 4-byte tag naming the VLAN ID (12-bit VID → 4094 usable VLANs). The receiving switch forwards only to ports in that VLAN and strips the tag before sending to an access host.

ISL (Inter-Switch Link) was Cisco-proprietary and is obsolete — CCNA expects 802.1Q only.

802.1Q trunk configuration

interface GigabitEthernet0/24 description Trunk to SW2 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20,30

Allowed VLAN list: Restrict which VLANs cross the trunk — security and loop containment. If VLAN 30 is allowed on SW1 but not SW2, you get one-way connectivity (classic exam symptom).

Native VLAN

The native VLAN is the VLAN for untagged frames on a trunk. Default is VLAN 1. Both trunk ends must agree on native VLAN and allowed VLANs.

Warning

Native VLAN mismatch is a top CCNA trap. If SW1 native = VLAN 1 and SW2 native = VLAN 99, untagged traffic lands in different VLANs on each side. CDP reports a mismatch; connectivity for untagged/native traffic fails even when tagged VLANs work.

Best practice: change native VLAN to an unused VLAN (not VLAN 1) on both ends.

Native VLAN change

vlan 199 name NATIVE ! interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk native vlan 199

Voice VLAN

IP phones typically use a data VLAN for the PC plugged into the phone and a separate voice VLAN for call traffic. This provides QoS priority for voice and security separation so the PC cannot easily capture phone packets on the same broadcast domain.

Access + voice VLAN on phone port

interface FastEthernet0/10 description IP Phone + PC switchport mode access switchport access vlan 10 switchport voice vlan 20

The phone learns the voice VLAN via CDP or LLDP-MED from the switch. See the Voice VLAN topic for phone boot and CUCME context.

Dynamic Trunking Protocol (DTP)

DTP is Cisco-proprietary and negotiates whether a link becomes a trunk or stays access. CCNA expects you to know the modes and the resulting link type — then disable DTP in production.

Dynamic Trunking Protocol - Trunk Vs Access

DTP mode combinations — know what forms a trunk vs access.

From study charts · jdepew88 CCNA notes

DTP modeBehavior
dynamic autoTrunks if neighbor is trunk or desirable; two autos = access (default on newer switches)
dynamic desirableTrunks if neighbor is trunk, desirable, or auto (default on older switches)
trunkForces trunk; negotiates if neighbor uses DTP
accessForces access
nonegotiateDisables DTP frames — use with switchport mode trunk
Tip

Exam best practice: switchport mode trunk plus switchport nonegotiate on known uplinks. Never rely on DTP auto/auto or auto/desirable surprises in a security-sensitive design.

Explicit trunk — disable DTP

interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk switchport nonegotiate switchport trunk allowed vlan 10,20,30 switchport trunk native vlan 199

VLAN Trunking Protocol (VTP)

VTP propagates VLAN create/delete/rename across switches in a VTP domain over trunk links. It saves typing on large campuses but carries serious operational risk.

VTP modeCan edit VLANs locally?Advertises / syncs?
ServerYesYes — default mode
ClientNoYes — syncs from highest revision
TransparentYes (local only)Passes VTP through; does not participate

VTP messages flood to multicast 01-00-0C-CC-CC-CC (shared with CDP). Revision numbers increment on each VLAN database change.

Warning

VTP revision trap: A new switch with VTP client mode and a higher revision number from another domain can overwrite the entire VLAN database on your production domain — potentially deleting VLANs network-wide. Before adding switches: set revision to 0 (vtp mode transparent then back), or use transparent/off mode. Many admins disable VTP entirely.

VTP verification

vtp domain CORP vtp mode server ! show vtp status

VTP updates the VLAN database only — you still configure switchport access vlan on each port manually.

Inter-VLAN routing (brief)

Hosts in different VLANs need a Layer 3 gateway:

  1. Router with separate interfaces — one physical leg per VLAN
  2. Router-on-a-stick — one trunk/subinterface per VLAN on a single cable
  3. Layer 3 switch (SVIs)interface vlan 10 with ip routing enabled; intra-campus routing stays on the backplane
Router-on-a-stick subinterfaces

interface GigabitEthernet0/0.10 encapsulation dot1Q 10 ip address 10.10.10.1 255.255.255.0 ! interface GigabitEthernet0/0.20 encapsulation dot1Q 20 ip address 10.10.20.1 255.255.255.0

Exam checklist

TrapWhat goes wrong
Native VLAN mismatchUntagged traffic in wrong VLAN; CDP mismatch
Allowed VLAN list mismatchOne-way VLAN connectivity
DTP auto + autoLink stays access when you expected trunk
VTP high revision clientVLAN database wiped across domain
Forgetting voice VLANPhone registers but no audio / wrong QoS
Trunk vs access on uplinkAll VLANs missing on downstream switch

Verification commands

Trunk and VLAN troubleshooting

show interfaces trunk show interfaces GigabitEthernet0/1 switchport show vlan brief show dtp interface GigabitEthernet0/1 show vtp status

Quick lab workflow

  1. Create VLANs and names on all switches (or sync via VTP if you accept the risk)
  2. Assign access ports to data VLANs; add switchport voice vlan on phone ports
  3. Configure trunks with matching native VLAN, allowed list, and explicit mode trunk
  4. Add inter-VLAN routing (SVI or router-on-a-stick)
  5. Verify with show vlan brief, show interfaces trunk, and ping across VLANs from a host

Related lessons on this site

Continue in this domain

Layer 2 Switching · guide 1 of 4

Sources & further reading

Panagiss CCNAmd

jdepew88 CCNA Notes (markdown)

This page is an amalgamated study guide synthesized from the markdown sources above, cross-checked against Cisco's official CCNA exam topics. Verify scope before your exam date.