Question

Difficulty: MediumVLAN Configuration and Access Port Setup

A network administrator is connecting a new IP security camera to interface GigabitEthernet1/0/4 on a Cisco Catalyst switch. VLAN 22 (named CAMERAS) has already been created in global configuration mode. Which set of interface configuration commands correctly configures GigabitEthernet1/0/4 to operate as a static, untagged access port belonging to VLAN 22?

  1. switchport mode access
    switchport access vlan 22
    Answer
  2. B
    switchport mode trunk
    switchport trunk native vlan 22
  3. C
    ip address 192.168.22.1 255.255.255.0
    switchport access vlan 22
  4. D
    switchport mode dynamic desirable
    switchport access vlan 22

Answer

The command sequence incorporating 'switchport mode access' followed by 'switchport access vlan 22' correctly configures the interface as a static access port assigned to VLAN 22.
To configure a switch port for a dedicated end device in Cisco IOS, the port must be explicitly configured as an access port using 'switchport mode access' and assigned to the intended broadcast domain using 'switchport access vlan <vlan-id>'. The command sequence combining 'switchport mode access' and 'switchport access vlan 22' fulfills both requirements cleanly.

Step-by-Step Solution

1
Identify the target operating mode for an end-user device or host
End-host devices such as IP cameras require an access port (single untagged VLAN membership) rather than a trunk port.
Access ports send and receive standard, untagged Ethernet frames expected by end stations.
2
Set the switchport mode to static access
Executing 'switchport mode access' under interface configuration mode disables dynamic trunking negotiation and locks the port in access mode.
This prevents unexpected DTP trunk negotiation and enforces Layer 2 static access port behavior.
3
Assign the designated access VLAN to the interface
Executing 'switchport access vlan 22' places untagged frames received on GigabitEthernet1/0/4 into VLAN 22.
This explicitly maps the port's Layer 2 broadcast domain membership to VLAN 22.

Key Concept

Configuring Cisco IOS Layer 2 Switchports as Static VLAN Access Ports
Rate this question