Question

Difficulty: EasyVLAN Configuration and Access Port Setup

A network administrator needs to create VLAN 20 on a Cisco Catalyst switch and configure interface GigabitEthernet0/1 as an access port belonging to VLAN 20. Arrange the CLI commands in the correct sequence, starting from privileged EXEC mode.

  1. 1configure terminal
  2. 2vlan 20
  3. 3interface GigabitEthernet0/1
  4. 4switchport mode access
  5. 5switchport access vlan 20

Answer

The correct CLI configuration sequence begins by entering global configuration mode with 'configure terminal', creating the VLAN with 'vlan 20', navigating to the target interface with 'interface GigabitEthernet0/1', defining static access mode via 'switchport mode access', and finally binding the interface to the VLAN using 'switchport access vlan 20'.
The configuration progression follows Cisco IOS hierarchical logic: enter global configuration mode ('configure terminal'), create the VLAN in the database ('vlan 20'), transition to the specific interface context ('interface GigabitEthernet0/1'), force the link to operate as an access link ('switchport mode access'), and assign it to the desired broadcast domain ('switchport access vlan 20').

Step-by-Step Solution

1
Enter global configuration mode
Switch prompt changes to Switch(config)#
Global configuration mode is required before creating VLANs or specifying interface configurations.
2
Create VLAN 20
VLAN 20 is added to the database and prompt changes to Switch(config-vlan)#
Creating the VLAN ensures the broadcast domain exists prior to assigning switch ports to it.
3
Enter interface configuration mode for GigabitEthernet0/1
Switch prompt changes to Switch(config-if)#
Interface parameters must be configured within the specific interface configuration context.
4
Configure static access mode on the interface
Disables DTP trunk negotiation and sets interface to access mode
Explicitly declaring access mode ensures the port will not form a trunk link.
5
Assign the interface to VLAN 20
Interface GigabitEthernet0/1 is placed into VLAN 20
Associates untagged layer 2 traffic on GigabitEthernet0/1 with broadcast domain VLAN 20.

Key Concept

Cisco IOS CLI hierarchy for VLAN creation and switchport access assignment
Rate this question