Question

Difficulty: MediumInterswitch Connectivity and Trunking (802.1Q)

A network engineer needs to manually configure an IEEE 802.1Q trunk link on a Cisco Catalyst switch interface (GigabitEthernet1/0/1) while following security best practices to disable Dynamic Trunking Protocol (DTP) and restrict active VLANs. What is the correct sequence of Cisco IOS CLI commands to accomplish this configuration on an interface supporting multi-protocol trunk encapsulation?

  1. 1interface GigabitEthernet1/0/1
  2. 2switchport trunk encapsulation dot1q
  3. 3switchport mode trunk
  4. 4switchport nonegotiate
  5. 5switchport trunk allowed vlan 10,20,30

Answer

The correct order of commands begins with entering interface configuration mode (`interface GigabitEthernet1/0/1`), setting 802.1Q encapsulation (`switchport trunk encapsulation dot1q`), enabling trunk mode statically (`switchport mode trunk`), turning off DTP negotiation (`switchport nonegotiate`), and finally restricting the allowed VLAN list (`switchport trunk allowed vlan 10,20,30`).
The correct sequence respects Cisco IOS CLI syntax dependency rules: interface mode must be accessed first, followed by defining 802.1Q encapsulation prior to setting static trunk mode. Static trunking must be active before DTP frame transmission can be disabled with `switchport nonegotiate`, and allowed VLAN parameters are applied to restrict trunk traffic.

Step-by-Step Solution

1
Enter interface configuration mode
Access the interface context for GigabitEthernet1/0/1.
CLI commands affecting a specific switchport can only be applied within interface configuration mode.
2
Specify 802.1Q encapsulation protocol
Set trunk encapsulation type to dot1q.
On multi-encapsulation Catalyst switches, Cisco IOS requires explicit encapsulation definition before allowing the port mode to be changed to trunk.
3
Set port mode to static trunking
Force port state into unconditional trunk mode.
Static trunk mode disables dynamic negotiation behavior requirement and prepares the port for non-negotiation.
4
Disable Dynamic Trunking Protocol (DTP)
Stop sending DTP frames out of the interface.
The `switchport nonegotiate` command prevents DTP negotiation but is rejected by Cisco IOS if the interface is still set to dynamic auto or dynamic desirable.
5
Configure allowed VLAN list
Restrict VLAN traffic traversing the trunk to VLANs 10, 20, and 30.
Prunes unauthorized VLAN traffic from crossing the interswitch trunk link as part of security hardening.

Key Concept

Cisco IOS CLI trunk configuration sequence and DTP operational state requirements for 802.1Q trunking
Estimated Time:1m 30s
Rate this question