Last Updated on August 1, 2021 by Admin 2
Which IOS commands are entered in interface configuration mode to configure a switch port to actively negotiate to be an 802.1Q trunk port? (Choose two.)
- switchport trunk dot1q
- switchport mode dynamic auto
- switchport trunk allowed vlan
- switchport mode trunk
- switchport trunk encapsulation dot1q
Entering the IOS commands switchport mode trunk and switchport trunk encapsulation dot1q in interface configuration mode will allow a switch port to actively negotiate to be an 802.1Q trunk port. This allows Dynamic Trunking Protocol (DTP) to actively negotiate to be a trunk if the other side is set to trunk, desirable, or auto.
Use the following steps to configure a port as an 802.1Q trunk:
1. Enter the interface configuration. switch(config)# interface interface-id
2. Configure the port to use 802.1Q encapsulation. switch(config-if)# switchport trunk encapsulation dot1q
3. Configure the port as a trunk port. switch(config-if)# switchport mode trunk
Note: Trunking modes can be configured as dynamic desirable, dynamic auto, trunk, access, and nonegotiate. If both sides are set to auto, no negotiations will occur.
Verification of the configuration can be done by executing the show run command on both switches. An example partial output for two switches is shown below:
In the above partial output, the following can be determined:
Since it is configured as dynamic desirable, SwitchB will send DTP packets to SwitchA
Since the two switches are set to dynamic desirable and dynamic auto, they will form a trunk. When one end is set to desirable, the other must be set to trunk, desirable, or auto for a trunk link to form.
The native VLAN for SwitchA is VLAN 5 as indicated in the last line of its output. SwitchB is set to the default, which is VLAN 1. This configuration would result in a failure of the switches to form a trunk since the native VLANs do not match.
The switchport allowed vlan command is also valid for configuring dot1q trunks, but is not required. By default, all VLANs are allowed on the trunk.
Layer 2 Technologies
Configure and verify trunking