liveBook · Manning

Switchport access vlan

As explained in Acing the CCNA Exam: Volume 1 Fundamentals and Protocols

switchport access vlan is a Cisco IOS interface-configuration command that assigns an access port to a specified VLAN.

switchport access vlan is a Cisco IOS interface-configuration command that assigns an access port to one VLAN. Configure the port with switchport mode access first, then specify the VLAN ID. section 12.2.2

An access port sends and receives untagged frames for its assigned VLAN and is typically used for an end host such as a PC. VLAN membership belongs to the switch port; ordinary hosts are not aware of it. section 12.5 section 12.3

Ports in the same VLAN can forward and flood frames within one broadcast domain, while hosts in different VLANs cannot communicate directly. Assigning a nonexistent VLAN ID automatically creates that VLAN, although the vlan command is needed before naming it. section 12.2.2

Assigning port ranges

SW1(config)# interface range g0/0-3 SW1(config-if-range)# switchport mode access SW1(config-if-range)# switchport access vlan 10 This places G0/0 through G0/3 in VLAN 10. Repeating the pattern with VLANs 20 and 30 assigns additional port ranges to those broadcast domains. section 12.2.2

SW1(config)# interface range g0/0-3                   #1
SW1(config-if-range)# switchport mode access          #1
SW1(config-if-range)# switchport access vlan 10       #1
SW1(config-if-range)# interface range g1/0-3          #2
SW1(config-if-range)# switchport mode access          #2
SW1(config-if-range)# switchport access vlan 20       #2
SW1(config-if-range)# interface range g2/0-3          #3
SW1(config-if-range)# switchport mode access          #3
SW1(config-if-range)# switchport access vlan 30       #3
#1 Configures G0/0–3 as access ports in VLAN 10
#2 Configures G1/0–3 as access ports in VLAN 20
#3 Configures G2/0–3 as access ports in VLAN 30

Use the configuration listing to compare access-mode commands and VLAN assignments across three interface ranges. section 12.2.2

How Acing the CCNA Exam: Volume 1 Fundamentals and Protocols covers it

How deep it goes
Explains syntax, access-port behavior, automatic VLAN creation, and broadcast-domain effects, but defers trunk-port configuration.
Examples
Demonstrates interface-range assignments placing G0/0–3, G1/0–3, and G2/0–3 into VLANs 10, 20, and 30.
What it assumes
Defines access ports and VLANs before contrasting them with trunk ports and assumes basic interface-configuration familiarity.
What you can do after
Operate Cisco IOS interfaces by configuring access mode and assigning selected ports to specified VLANs.
How it connects
Connects access ports with VLANs, broadcast domains, trunk ports, untagged frames, and end hosts.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 1 Fundamentals and Protocols. The section links point to the parts of the book it draws on.