Pcornel
H3 · Practical network exams · Cisco IOS / IOS XE

802.1Q Trunking · Finals

Configuration first, verification second, theory third. Reference templates require task-specific adaptation.

Content version 1.1-draft

Keyboard shortcuts

/ Finals search · Ctrl K global command palette · Alt E Exam Mode · Alt G Golden Scripts · Alt T Exam Topics · Alt V Verify · Esc close dialog.

Case Skills Exam

Quick explanation

An 802.1Q trunk transports multiple VLANs across one link. Frames are tagged except for native VLAN traffic under the usual native VLAN behavior.

Configuration

Replace highlighted placeholders. Configure only the variants required by the task.

Prerequisites and dependency links
  • Create the required VLANs.
  • Use compatible settings on both endpoints.
Static 802.1Q trunk Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link
  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end

Show / Verify

Primary verification Section link
show interfaces trunk
Example output
Port      Mode   Encapsulation  Status    Native vlan
Gi0/1     on     802.1q         trunking  99

Confirm operational trunking, encapsulation and native VLAN. Inspect allowed, active and forwarding VLAN lists.

Detailed verification Section link
show interfaces [INTERFACE] switchport
Example output
Administrative Mode: trunk
Operational Mode: trunk

The interface is operating as a trunk, not only administratively configured as one.

Connectivity verification

Layer 2 endpoint test

After sending traffic between the intended hosts, verify that the expected MAC addresses are learned on the correct VLAN and interface.

show mac address-table vlan [VLAN-ID]
show interfaces [INTERFACE] switchport

Common mistakes

  • Native VLAN differs between endpoints.
  • Required VLAN missing from allowed list.
  • Access mode on one endpoint.
  • Using encapsulation selection on a fixed-encapsulation platform.

Quick reference and default values

DTP compatibility
LocalRemoteTrunk?
DesirableAutoYes
DesirableDesirableYes
AutoAutoNo
Trunk (DTP on)Auto or desirableYes
Trunk (nonegotiate)Static trunkYes
AccessAnyNo negotiated trunk
Remove configuration — separate, potentially disruptive actions

Return to an access port

Stops trunk transport; only the selected access VLAN remains.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 exit
end

Related reference

Networking technical reference · Interface types · Connectivity verification
Documentation references consulted

Reset checklist?

Command block

Back to Top

Confirmation

Confirm action

Continue?