Question

Difficulty: MediumVLAN Configuration and Access Port Setup

A network administrator needs to create VLAN 35 named SALES on a Cisco Catalyst switch and assign interface FastEthernet0/5 as a static access port in this VLAN, starting from Privileged EXEC mode (`Switch#`). Place the following Cisco IOS CLI commands in the correct sequential order from first to last.

  1. 1configure terminal
  2. 2vlan 35
  3. 3name SALES
  4. 4interface FastEthernet0/5
  5. 5switchport mode access
  6. 6switchport access vlan 35

Answer

The correct command sequence begins with entering global configuration mode using `configure terminal`, creating VLAN 35 using `vlan 35`, setting the VLAN name with `name SALES`, entering the interface context via `interface FastEthernet0/5`, configuring the interface operating mode using `switchport mode access`, and finally assigning the interface to the VLAN using `switchport access vlan 35`.
In Cisco IOS, configuration follows a strict hierarchy. From Privileged EXEC mode (`Switch#`), global configuration mode must first be accessed via `configure terminal`. Once in global configuration mode, `vlan 35` creates the VLAN and shifts context to VLAN sub-mode (`config-vlan`), where `name SALES` sets the VLAN name. The administrator then navigates directly to interface configuration mode using `interface FastEthernet0/5`. Within interface configuration mode (`config-if`), the port mode is explicitly configured using `switchport mode access`, followed by assigning the port to VLAN 35 with `switchport access vlan 35`.

Step-by-Step Solution

1
Enter Global Configuration Mode
Prompt changes from `Switch#` to `Switch(config)#`.
Global configuration commands like VLAN creation and interface navigation can only be initiated from global configuration mode.
2
Create VLAN 35
Prompt changes from `Switch(config)#` to `Switch(config-vlan)#`.
Issuing `vlan 35` creates the Layer 2 broadcast domain in the VLAN database and opens VLAN configuration mode.
3
Assign VLAN Name
VLAN 35 is assigned the name SALES in the switch database.
The `name` command must be run while in VLAN configuration mode.
4
Navigate to Interface FastEthernet0/5 Context
Prompt changes to `Switch(config-if)#`.
Interface parameters can only be altered when inside the specific interface configuration sub-mode.
5
Set Port Operational Mode to Access
Dynamic Trunking Protocol (DTP) negotiation is disabled or restricted, locking the port to non-trunking access mode.
Executing `switchport mode access` explicitly sets the interface into access mode before or during VLAN membership assignment.
6
Associate Interface with VLAN 35
Traffic untagged on FastEthernet0/5 is assigned to VLAN 35.
The command `switchport access vlan 35` binds the interface to the specified access VLAN.

Key Concept

Cisco IOS CLI command hierarchy for VLAN creation and static access port configuration
Rate this question