Most ports on an access switch need one of six port profiles, depending on the device behind them. A phone needs a second VLAN on an access port, a hypervisor needs a trunk, and a NAS needs two links bundled with LACP. Give any of them the wrong profile and you get a device that never comes up, or comes up in the wrong VLAN, with nothing on the device side to tell you why.
Here you build each profile on a Cisco switch, verify it with the show commands you would use at a real desk, and see where a virtual lab switch stops behaving like hardware. Every capture below comes from a Cisco IOSvL2 15.2 switch in our GNS3 lab, built and checked in December 2026 against Cisco’s Catalyst 9300 configuration guides.
Pick the port profile for each device
Start from the device you are connecting, not from the command. Use the table as the short version of everything below, and each row has a section of its own with the exact configuration:
| Device | Port mode | VLANs | Spanning tree | Watch for |
|---|---|---|---|---|
| Desktop, printer, IoT sensor | Access, no negotiation | One data VLAN | PortFast edge + BPDU guard | Optional power inline never where a port must never supply power |
| IP phone with a PC behind it | Access + voice VLAN | Data untagged, voice tagged | PortFast edge | Voice VLAN must exist; port security needs room for the phone |
| Access point, local mode | Access | AP management VLAN | PortFast edge | PoE budget |
| Access point, FlexConnect local switching | Trunk | Native = AP management, plus SSID VLANs | PortFast edge trunk | Native VLAN mismatch strands the AP |
| Virtualization host | Trunk, no negotiation | Only the port-group VLANs | PortFast edge trunk | VLAN IDs on the host must match the allowed list |
| NAS, firewall or other appliance | LACP port channel or trunk | What the appliance serves | Normal for firewalls and anything that may bridge; PortFast is fine for a single NAS | Both ends must agree on the bundle |
The lab topology
SW1 is the access switch, with an SVI in every VLAN so each device has a gateway to ping. PC1 is a plain desktop on Gi0/1. The PHONE node on Gi0/2 plays an IP phone with a PC behind it: untagged frames for the PC in data VLAN 10, and 802.1Q frames tagged for voice VLAN 110. VMHOST on Gi0/3 is a hypervisor uplink tagging VLANs 30 and 40, and NAS bonds two links, Gi1/0 and Gi1/1, into one LACP port channel in storage VLAN 50.
None of the profiles below creates its VLANs. An access VLAN is created automatically the first time a port uses it, but a trunk’s allowed list is not, so a hypervisor or FlexConnect trunk forwards nothing until its VLANs exist. Create and name them first (the VLAN guide covers it); our lab switch had VLANs 10, 110, 30, 40 and 50, each with an SVI:
vlan 10
name DATA
vlan 110
name VOICE
vlan 30
name VM-WEB
vlan 40
name VM-DB
vlan 50
name STORAGE
exit
ip routing
interface Vlan10
ip address 10.10.10.1 255.255.255.0
no shutdown
The other four SVIs follow the same pattern, at 10.110.0.1, 10.30.0.1, 10.40.0.1 and 10.50.0.1.

The same five nodes in GNS3, where every configuration below was applied:

Start with the desktop port, because every other profile builds on it.
Configure a desktop, printer or IoT port
An end device with one MAC address in one VLAN gets the plainest port there is, hardened so it can never become anything else. Static access mode with negotiation off means a switch plugged into that jack can never talk it into a trunk. PortFast edge skips the 30 seconds of listening and learning, so a PC gets its DHCP lease before the operating system gives up waiting. BPDU guard shuts the port if a switch does appear:
interface GigabitEthernet0/1
description DESKTOP-PC1
switchport mode access
switchport access vlan 10
switchport nonegotiate
spanning-tree portfast edge
spanning-tree bpduguard enable
Check the mode, the trunk negotiation state and the VLAN in one go:
show interfaces GigabitEthernet0/1 switchport
You only need the first lines of the output. Administrative and operational mode both read static access, negotiation is off, and the port sits in VLAN 10 with no voice VLAN:
Name: Gi0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 10 (DATA)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
You confirm the spanning tree side more easily per interface than in the full VLAN view:
show spanning-tree interface GigabitEthernet0/1 detail
Two lines prove the edge settings took: the port is in PortFast edge mode and BPDU guard is enabled. The counters add a useful detail, 90 BPDUs sent and none received, which is exactly what a port facing a single host should show:
Port 2 (GigabitEthernet0/1) of VLAN0010 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.2.
Designated root has priority 32778, address 0c13.94bd.0000
Designated bridge has priority 32778, address 0c13.94bd.0000
Designated port id is 128.2, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast edge mode
Link type is point-to-point by default
Bpdu guard is enabled
BPDU: sent 90, received 0
Printers, badge readers and cameras use the same profile in their own VLAN. On a PoE switch the only extra decision is power. A device with its own power supply is fine on the default power inline auto, because the switch only powers a device that identifies itself as a powered device, but power inline never on ports that must never supply power removes the question entirely. The PoE guide covers classes and the power budget. Catalyst 9300 configuration guides write the edge commands as spanning-tree portfast and spanning-tree portfast trunk, without the edge keyword, so on that platform use those forms everywhere this guide says portfast edge.
Add a voice VLAN for an IP phone
An IP phone usually shares its cable with a PC plugged into the phone’s own switch port. The switch port stays an access port, but it carries two VLANs: the PC’s data travels untagged in the access VLAN, and the phone tags its voice frames with the voice VLAN ID. The switch tells a Cisco phone which VLAN to use through CDP, so nothing is configured on the phone itself. Non-Cisco phones learn it through LLDP-MED instead, and LLDP is off by default on a Catalyst 9300, so those need lldp run in global configuration first. Create the voice VLAN first, because Cisco’s guides are explicit that it must exist and be active on the switch for the phone to work in it:
vlan 110
name VOICE
exit
interface GigabitEthernet0/2
description IP-PHONE-WITH-PC
switchport mode access
switchport access vlan 10
switchport voice vlan 110
switchport nonegotiate
spanning-tree portfast edge
Check the port the same way as the desktop port:
show interfaces GigabitEthernet0/2 switchport
You now see a second VLAN. Access mode VLAN is still 10, and the voice VLAN line reads 110:
Name: Gi0/2
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 10 (DATA)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 110 (VOICE)
show vlan brief agrees, listing Gi0/2 under both VLAN 10 and VLAN 110. That is the configuration a real Catalyst access switch needs, and on hardware the phone’s tagged frames land in VLAN 110 from here. Our lab switch did not get that far. The PC side worked (5 of 5 pings to the VLAN 10 gateway), but 20 pings from the phone’s tagged VLAN 110 interface to the voice gateway all failed, and the MAC table never learned an address on Gi0/2 in VLAN 110. To rule out the phone node, we turned Gi0/2 into a trunk with native VLAN 10 and VLANs 10 and 110 allowed, and the same tagged pings got through at once. From the phone node:
ping 10.110.0.1
Only the first echo was lost, to ARP:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.110.0.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/11/16 ms
Back on the voice VLAN configuration, they failed again, every time. In our lab IOSvL2 accepted and displayed the voice VLAN but never forwarded a tagged voice frame on the access port, so in GNS3 you can practice the configuration and the show commands but not a working call path. Real Catalyst switches carry the voice VLAN as described in the Catalyst 9300 voice VLAN guide. Three details from that guide decide whether a phone works on the first try:
- CDP must stay enabled on the port. It is how the phone learns VLAN 110, and turning CDP off on access ports as a hardening step silently drops phones into the data VLAN.
- Port security needs room for the phone. Set the maximum to two plus whatever the PC needs, because the phone’s MAC is learned in the voice VLAN and may also appear in the access VLAN.
- A voice VLAN turns PortFast on by itself, and removing the voice VLAN later does not turn it back off.
Connect an access point
Which port an AP needs depends on where its client traffic leaves the AP, which the AP modes guide covers in depth. A lightweight AP in local mode tunnels every client frame to the wireless controller inside CAPWAP, so its cable only carries the AP’s own management VLAN, and a plain access port is the right profile:
interface GigabitEthernet0/5
description AP-LOCAL-MODE
switchport mode access
switchport access vlan 20
switchport nonegotiate
spanning-tree portfast edge
A FlexConnect AP with local switching bridges client traffic straight onto the wired VLANs, so the port becomes a trunk. The AP’s management traffic is untagged, which means the native VLAN must be the AP management VLAN, and the allowed list must include every VLAN an SSID maps to. With management in VLAN 20 and SSIDs in VLANs 21 and 22:
interface GigabitEthernet0/6
description AP-FLEXCONNECT
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk native vlan 20
switchport trunk allowed vlan 20-22
switchport nonegotiate
spanning-tree portfast edge trunk
Neither AP block ran in the lab, since GNS3 has no AP image, so they follow the same syntax our switch accepted for the other ports. On a Catalyst 9300, drop the encapsulation line and write the last line as spanning-tree portfast trunk, which is also how Cisco’s Catalyst 9800 FlexConnect examples configure the AP’s switch port. The usual FlexConnect failure is a native VLAN mismatch: the AP sends untagged frames expecting VLAN 20, the switch puts them in VLAN 1, and the AP never reaches its controller. Most APs draw PoE as well, so check the budget before adding a twelfth AP to a switch that already powers eleven.
Trunk to a virtualization host
A hypervisor’s uplink carries many VMs in different VLANs, and the virtual switch tags each port group with its VLAN ID, so the physical port has to be a trunk. Allow only the VLANs the host uses, because every extra VLAN on that trunk floods its broadcasts into the host. Since the host is an end station from spanning tree’s point of view, portfast edge trunk lets the uplink forward as soon as the host boots:
interface GigabitEthernet0/3
description ESXI-HOST-UPLINK
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 30,40
switchport nonegotiate
spanning-tree portfast edge trunk
The encapsulation dot1q line is only needed on switches that also support ISL, such as IOSvL2; Catalyst 9300 guides do not list the command at all, so drop the line there. Confirm what the trunk carries:
show interfaces trunk
Gi0/3 is trunking in mode on with 802.1Q, and the allowed, active and forwarding lists all read 30,40. If a VLAN appears in the allowed list but not in the forwarding list, it either does not exist on the switch or spanning tree is blocking it:
Port Mode Encapsulation Status Native vlan
Gi0/3 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi0/3 30,40
Port Vlans allowed and active in management domain
Gi0/3 30,40
Port Vlans in spanning tree forwarding state and not pruned
Gi0/3 30,40
In the spanning tree detail, Gi0/3 shows The port is in the portfast edge trunk mode in both VLAN 30 and VLAN 40, and the host reached both gateways, 4 of 5 pings each, the first lost to ARP. The commonest hypervisor mistake is configuring this port as an access port. The host’s tagged frames then arrive on a port that expects untagged ones, and every VM loses its network while the host’s link light stays green.
Bundle links to a NAS or appliance with LACP
Storage appliances, firewalls and servers with two NICs often bond their links for bandwidth and resilience. On the switch, those ports join one port channel, and LACP in active mode on at least one side negotiates the bundle so a cabling mistake leaves the links unbundled instead of looping:
interface range GigabitEthernet1/0 - 1
description NAS-LACP
switchport mode access
switchport access vlan 50
channel-group 1 mode active
Your appliance has to run LACP too. Our NAS node was a second IOSvL2 with the same channel group, and on a Linux NAS the equivalent is a bond in 802.3ad mode. Check the bundle from the switch:
show etherchannel summary
Read the last line. Po1 is flagged SU (Layer 2, in use), the protocol is LACP, and both member ports carry P for bundled:
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) LACP Gi1/0(P) Gi1/1(P)
show lacp neighbor confirms the partner side: both links report the NAS’s system ID 0c90.474f.8000 with the SA flags (slow LACPDUs, active mode). The switch copied the VLAN settings onto Port-channel1 by itself, and the NAS reached the VLAN 50 gateway at 4 of 5. An I (stand-alone) flag instead of P usually means the other end is not running LACP, and the EtherChannel guide walks through that and the other mismatches. A firewall that carries several VLANs on one link takes the hypervisor profile instead: a trunk with negotiation off and an allowed list that matches its subinterfaces exactly.
Practice edge port configuration
Test yourself with the drill below. It covers every profile on this page, including the phone, AP and hypervisor mistakes that trip people up in production. Each answer is explained:
CCNA practice: Domain 2: Switching and Network Access
10 questions drawn fresh from 129 in the bank, with the answer and explanation after each one.
Start 10 questionsConfiguring edge ports for desktops, phones, APs, virtualized hosts and appliances is one of the topics in the Switching and Network Access domain of the Cisco CCNA 200-301 v2.0 exam. The VLAN guide and the 802.1Q trunking guide cover the building blocks underneath, and the whole course, in order, is in the CCNA 200-301 study guide.
A port template for a new access switch
On a new access switch, apply the profiles as ranges before anything is plugged in, so every jack is safe by default and the exceptions are deliberate. This layout puts desks with phones on ports 1 to 36, APs on 37 to 44, and keeps the last ports for uplinks and appliances:
interface range GigabitEthernet1/0/1 - 36
description DESK-PHONE-PC
switchport mode access
switchport access vlan 10
switchport voice vlan 110
switchport nonegotiate
spanning-tree portfast
spanning-tree bpduguard enable
interface range GigabitEthernet1/0/37 - 44
description AP-LOCAL-MODE
switchport mode access
switchport access vlan 20
switchport nonegotiate
spanning-tree portfast
spanning-tree bpduguard enable
You will notice the template is written for a Catalyst 9300 (the Gi1/0/x names and the plain portfast keyword), so it was not run on the IOSvL2 lab switch. Unused ports are better shut down and parked in an unused VLAN than left in VLAN 1, and the desk ports are the right place to add port security and storm control once the profiles are working.