An access port is a switch port assigned to one VLAN. It sends and receives Ethernet frames without VLAN tags, so it is also called an untagged port. Access ports usually connect end hosts such as PCs. section 12.2.2 section 12.3
Understand access-port behavior by comparing it with trunking:
- Forwards and floods traffic only among ports in the same VLAN; each VLAN remains a separate broadcast domain. section 12.2.2
- Contrasts with a trunk port, which carries multiple VLANs and uses tags to identify them. section 12.3
- Represents VLAN membership on the switch; a typical connected PC does not know which VLAN the switch assigned to its port. section 12.2.2
- Avoids relying on Dynamic Trunking Protocol by manually setting the interface to access mode. section 12.2.2
Assigning access ports to VLANs
On SW1, configure G0/0–G0/3 as access ports in VLAN 10, G1/0–G1/3 in VLAN 20, and G2/0–G2/3 in VLAN 30. The switchport mode access command fixes the port mode; switchport access vlan vlan-id assigns its VLAN. Assigning a port to a nonexistent VLAN automatically creates that VLAN. 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 annotated CLI listing to review interface-range configuration for access ports in VLANs 10, 20, and 30. section 12.2.2
