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?
- 1interface GigabitEthernet1/0/1
- 2switchport trunk encapsulation dot1q
- 3switchport mode trunk
- 4switchport nonegotiate
- 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
Key Concept
Cisco IOS CLI trunk configuration sequence and DTP operational state requirements for 802.1Q trunking
Estimated Time:1m 30s