Question

Difficulty: HardVLAN Configuration and Access Port Setup

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?

  1. 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
  2. B
    The 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.
  3. C
    Interface GigabitEthernet 0/8 automatically converts to an 802.1Q trunk port and sets VLAN 42 as the native VLAN for untagged frames.
  4. D
    VLAN 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

1
Analyze the execution of 'switchport access vlan 42' on a non-existent VLAN ID in Cisco IOS.
Cisco IOS checks the VLAN database. Finding no existing VLAN 42, it generates a console notification ('VLAN 42 does not exist. Creating vlan 42') and automatically adds VLAN 42 with default settings.
Cisco IOS provides dynamic VLAN auto-creation upon assignment to access interfaces to streamline port assignment.
2
Determine the operational state and Layer 2 boundary of GigabitEthernet 0/8.
The port is assigned to access VLAN 42, placing all connected host untagged traffic into VLAN 42's distinct broadcast domain.
Access ports belong to a single access VLAN and process untagged Ethernet frames within that specific broadcast domain.

Key Concept

VLAN Auto-Creation and Access Port Broadcast Domain Isolation
Rate this question