Access Port
Cheat sheet · https://pcornel.dk/topic.php?topic=583
Answer
An access port carries a single VLAN untagged to an end device. Configure it with switchport mode access and switchport access vlan <id>.
Remember
Set the mode explicitly so DTP cannot turn the port into a trunk. Add spanning-tree portfast (and BPDU guard) on ports to end devices so they come up without the 30-second STP delay. The VLAN must exist, or the port is inactive.
First checks
show interfaces <if> switchport— Operational Mode: static access, Access Mode VLAN.show interfaces status— port state and VLAN.show vlan brief— port listed under the intended VLAN.show mac address-table interface <if>— the device's MAC learned in that VLAN.show spanning-tree interface <if> portfast— PortFast enabled.
Commands
show interfaces switchport- Shows administrative/operational switchport mode, access VLAN, native VLAN and trunk details.
interface <interface>- Enter interface configuration mode.
switchport- Make the interface a Layer 2 switch port.
switchport mode access- Make the port a static access port.
switchport access vlan <id>- Assign an access port to a VLAN.
show interfaces <id> switchportshow vlanshow vlan brief
Verify in this order
switchport mode access → access VLAN set → VLAN exists → port connected → MAC learned in that VLAN → device gets an address in the VLAN's subnet
Where it usually breaks
physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path
Access Port · operational reference
| Access-port layer | Evidence |
|---|---|
| Physical | Interface up/up |
| Classification | Access/voice VLAN state |
| Layer 2 | MAC learned + STP forwarding |
| Layer 3 | Endpoint address/gateway/lease |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=583