A network engineer is configuring an unassigned interface on a Cisco Catalyst switch. The engineer enters interface configuration mode for GigabitEthernet 0/8 and executes the following command sequence:
text
Switch(config)# interface gigabitethernet 0/8
Switch(config-if)# switchport access vlan 42
Prior to entering these commands, VLAN 42 was not present in the switch VLAN database. Assuming default Cisco IOS switchport configuration settings, which outcome occurs as a result of this configuration?
- VLAN 42 is automatically created in the switch VLAN database, and interface GigabitEthernet 0/8 is assigned to forward untagged traffic exclusively within VLAN 42's broadcast domain.Answer
- BThe command is rejected by Cisco IOS with an error message because VLAN 42 must be explicitly created in global configuration mode to divide the switch into distinct collision domains.
- CInterface GigabitEthernet 0/8 automatically converts to an 802.1Q trunk port and sets VLAN 42 as the native VLAN for untagged frames.
- DVLAN 42 is automatically created, but traffic on GigabitEthernet 0/8 is bridged directly into VLAN 1 so connected hosts can communicate with default VLAN devices without a Layer 3 device.
Answer
VLAN 42 is automatically created in the switch VLAN database, and interface GigabitEthernet 0/8 is assigned to forward untagged traffic exclusively within VLAN 42's broadcast domain.
In Cisco IOS, executing 'switchport access vlan <vlan-id>' on an interface when the specified VLAN does not exist causes the switch to automatically create the VLAN in the VLAN database and assign the interface to it. The interface then functions as an access port operating exclusively within the designated broadcast domain.
Step-by-Step Solution
Key Concept
VLAN Auto-Creation and Access Port Broadcast Domain Isolation