On a Cisco switch, which command must be entered on an interface to configure the IEEE 802.1Q standard method of inserting VLAN membership information into Ethernet frames on a trunk link?

Difficulty: Easy

Correct Answer: Switch(config-if)#switchport trunk encapsulation dot1q

Explanation:


Introduction / Context:
Virtual Local Area Networks allow logical segmentation of a switched network. When VLANs span multiple switches, trunk links are required to carry traffic for several VLANs across a single physical link. The IEEE 802.1Q standard defines a method of tagging Ethernet frames with VLAN information. Cisco switches can use 802.1Q encapsulation for trunks. The question asks for the exact interface configuration command that enables this standard trunk encapsulation on a switch port.


Given Data / Assumptions:

  • We are configuring a Cisco switch running IOS.
  • The goal is to use the IEEE 802.1Q encapsulation on a trunk link.
  • The correct mode is configured under interface configuration, not global configuration.
  • The command format begins with switchport trunk encapsulation.


Concept / Approach:
On platforms that support multiple trunk encapsulation types, such as 802.1Q and Cisco Inter Switch Link, you must specify which encapsulation to use with the switchport trunk encapsulation command at interface configuration level. The syntax is Switch(config-if)#switchport trunk encapsulation dot1q for 802.1Q. The configuration prompt shows (config-if) because the command is applied per interface. Global configuration mode commands do not attach to specific ports and therefore are not suitable for trunk encapsulation settings.


Step-by-Step Solution:
1. Enter global configuration mode with configure terminal. 2. Enter interface configuration mode for the desired port, for example interface fastethernet0/1 or interface gigabitethernet0/1. 3. At the Switch(config-if)# prompt, specify the trunk encapsulation type. 4. To use IEEE 802.1Q, enter the command switchport trunk encapsulation dot1q. 5. Optionally, enable trunk mode with switchport mode trunk after setting encapsulation. 6. The interface now uses 802.1Q tagging to carry multiple VLANs across the trunk link.


Verification / Alternative check:
After configuration, you can verify the encapsulation type with show interfaces trunk or show running-config interface commands. These outputs show that the port is in trunk mode and that the encapsulation is dot1q. Some newer switch models support only 802.1Q and do not require the switchport trunk encapsulation command. In that case, dot1q is implied. However, on platforms that do support multiple encapsulations, this command is required for correct operation and for passing certification exam questions.


Why Other Options Are Wrong:
Switch(config)#switchport trunk encapsulation ietf: This is in global configuration mode and uses an invalid encapsulation keyword. Encapsulation settings must be applied under interface configuration mode and IEEE standard 802.1Q uses dot1q, not ietf.
Switch(config)#switchport trunk encapsulation dot1q: This is still in global configuration mode, not interface configuration mode, so it is syntactically incorrect.
Switch(config-if)#switchport trunk encapsulation ietf: The ietf keyword is not used for VLAN trunk encapsulation on Cisco switches; Cisco uses dot1q or isl where supported.
Switch(config-if)#switchport mode access: This command places the port in access mode and disables trunking, which is the opposite of what is required for carrying multiple VLANs.


Common Pitfalls:
A frequent mistake is forgetting that encapsulation configuration belongs at the interface level or confusing the encapsulation keyword with other standards. Learners sometimes try to configure encapsulation in global mode or use incorrect options such as ietf. Another pitfall is assuming that every switch still supports Inter Switch Link or requires explicit encapsulation commands, when newer devices may only support 802.1Q. For exams, always pay attention to the prompt (config-if) and the exact keyword dot1q for the IEEE 802.1Q standard.


Final Answer:
Switch(config-if)#switchport trunk encapsulation dot1q

More Questions from CISCO Certification

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion