Question

Difficulty: HardVLAN Configuration and Access Port Setup

A network administrator is reconfiguring interface GigabitEthernet0/2 on a Cisco Catalyst switch. The interface is currently connected to a trunking partner device and is actively operating as an 802.1Q trunk port via Dynamic Trunking Protocol (DTP). The administrator enters the following interface configuration command:

Switch(config-if)# switchport access vlan 50

VLAN 50 does not currently exist in the switch VLAN database. Assuming all other configuration settings remain at default, what is the resulting operational state of interface GigabitEthernet0/2 and VLAN 50?

  1. VLAN 50 is automatically created in the VLAN database, but interface GigabitEthernet0/2 continues to operate as an active trunk port.Answer
  2. B
    Interface GigabitEthernet0/2 immediately transitions to an operational access port in VLAN 50, disabling trunk negotiation.
  3. C
    Interface GigabitEthernet0/2 remains an 802.1Q trunk port, and VLAN 50 is automatically designated as its new untagged native VLAN.
  4. D
    The command is rejected with an error because VLAN 50 must be manually created in global configuration mode before assignment.

Answer

VLAN 50 is automatically created in the switch VLAN database, but interface GigabitEthernet0/2 continues to operate as a trunk port.
When configuring 'switchport access vlan 50' on a Cisco Catalyst interface, Cisco IOS automatically creates VLAN 50 in the VLAN database if it does not already exist. However, configuring the access VLAN value only affects traffic when the interface operates in access mode. Since the port was dynamically negotiating as an 802.1Q trunk and no explicit 'switchport mode access' command was issued, the interface remains in trunking operational mode.

Step-by-Step Solution

1
Analyze the effect of the command on the VLAN database
VLAN 50 is created automatically
When assigning an interface to a non-existent VLAN using 'switchport access vlan <vlan-id>', Cisco IOS dynamically creates the VLAN in the VLAN database.
2
Evaluate the administrative vs. operational mode of the interface
The interface operational mode remains trunk
The command 'switchport access vlan 50' modifies the access VLAN parameter for when the port operates in access mode. Because 'switchport mode access' was not executed, the existing dynamic/trunking operational state remains unchanged.

Key Concept

Separation of Access VLAN Configuration and Interface Operational Mode in Cisco IOS
Estimated Time:1m 30s
Rate this question