Question

Difficulty: MediumVLAN Configuration and Access Port Setup

A network administrator executes the command `show interfaces gigabitethernet0/2 switchport` on a Cisco Catalyst switch to troubleshoot a connectivity issue for an end-user device. The CLI output displays the following operational state:

text
Name: Gi0/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Access Mode VLAN: 20 (VLAN0020)
Trunking Native Mode VLAN: 1 (default)

Which command must be configured on interface GigabitEthernet0/2 to force the port to operate as an access port in VLAN 20?

  1. switchport mode accessAnswer
  2. B
    switchport trunk native vlan 20
  3. C
    switchport access vlan 20
  4. D
    vlan 20

Answer

The command `switchport mode access` must be configured on interface GigabitEthernet0/2.
The CLI output indicates that interface GigabitEthernet0/2 has an Administrative Mode of 'dynamic auto' and has negotiated an Operational Mode of 'trunk'. Even though an access VLAN of 20 is configured, access VLAN assignments only take effect when the operational mode is access. Executing `switchport mode access` under interface configuration mode statically sets the interface to access mode and disables trunking negotiation.

Step-by-Step Solution

1
Analyze the CLI output for interface GigabitEthernet0/2
Administrative Mode is set to 'dynamic auto' and Operational Mode is currently operating as 'trunk'.
By default on many Cisco Catalyst switches, interfaces run Dynamic Trunking Protocol (DTP) in dynamic auto mode. If the connected device sends DTP frames or negotiates trunking, the interface operates as a trunk regardless of the configured access VLAN.
2
Determine the required command to override dynamic negotiation
Configuring `switchport mode access` under `interface GigabitEthernet0/2` forces the interface to operate statically as an access port.
Statically defining the port mode as access disables trunk negotiation for that port and activates the configured `switchport access vlan 20` setting.

Key Concept

Disabling DTP trunk negotiation by statically configuring access port mode with 'switchport mode access'.
Rate this question