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?
- switchport mode accessCevap
- Bswitchport trunk native vlan 20
- Cswitchport access vlan 20
- Dvlan 20
Cevap
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.
Adım Adım Çözüm
Anahtar Kavram
Disabling DTP trunk negotiation by statically configuring access port mode with 'switchport mode access'.