FlashGenius Logo FlashGenius
CCNA 200-301 Exam Prep · Topic 2 of 5

Network Access & Switching

VLANs · 802.1Q Trunking · STP/RSTP · EtherChannel · Wireless LAN · L2 Security

Study with Practice Tests →

Network Access & Switching

Domain 2 of the CCNA 200-301 exam (~20% of questions). Covers VLANs, 802.1Q trunking, Spanning Tree Protocol, EtherChannel, wireless LAN architecture, and Layer 2 security mechanisms.

~20% of Exam · ~24 Questions

Exam Domain Breakdown (CCNA 200-301)

DomainWeightKey Topics
1. Network Fundamentals20%OSI, TCP/IP, IPv4/IPv6, TCP/UDP, switching, cloud
2. Network Access20%VLANs, STP, wireless, L2 security
3. IP Connectivity25%Routing, OSPF, static routes, FHRP
4. IP Services10%NAT, DHCP, DNS, NTP, SNMP, QoS
5. Security Fundamentals15%ACLs, VPN, AAA, threats, hardening
6. Automation & Programmability10%REST APIs, Python, Ansible, SD-WAN

Core Concepts at a Glance

VLANs

Virtual LANs segment broadcast domains on a single physical switch. Logical separation without needing separate hardware. Access ports carry one VLAN (untagged); trunk ports carry multiple VLANs (802.1Q tagged). Native VLAN frames travel untagged on trunk links.

802.1Q Trunking

IEEE standard that inserts a 4-byte tag into Ethernet frames to identify the VLAN. Tag fields: TPID (0x8100), PCP (3-bit QoS priority), DEI (drop eligible indicator), VID (12-bit VLAN ID supporting 1–4094 VLANs). Native VLAN frames are sent untagged.

STP Port Roles

Spanning Tree Protocol prevents L2 loops by blocking redundant paths. Port roles: Root Port (RP) — best path to root; Designated Port (DP) — forwarding port on each segment; Non-Designated — blocked to prevent loops. RSTP adds Alternate and Backup roles.

EtherChannel

Bundles 2–8 parallel physical links into one logical link. Provides load balancing and redundancy. STP sees the bundle as a single link — no ports are blocked. Negotiated via LACP (IEEE 802.3ad, open) or PAgP (Cisco proprietary), or configured statically.

Wireless Architecture

Autonomous APs are standalone and self-configured. Lightweight APs rely on a WLC (Wireless LAN Controller) for centralized management via CAPWAP tunnels (UDP 5246/5247). WLC handles roaming, RF management, QoS, and security policy at scale.

L2 Security

Three key mitigations: Port Security — limits MACs per port, shuts on violation; DHCP Snooping — blocks rogue DHCP servers on untrusted ports, builds binding table; DAI (Dynamic ARP Inspection) — validates ARP against snooping table, stops ARP spoofing.

VLANs & Trunking

VLANs logically segment a switched network into separate broadcast domains. 802.1Q trunking carries multiple VLANs across a single physical link between switches or between a switch and router.

What VLANs Do

Broadcast Domain Segmentation

Without VLANs, all ports on a switch share one broadcast domain — every broadcast reaches every device. VLANs partition this into multiple smaller broadcast domains, reducing unnecessary traffic and improving security. Devices in different VLANs cannot communicate without a Layer 3 device (router or L3 switch).

VLAN Types

  • Data VLAN: Carries regular user traffic
  • Voice VLAN: Dedicated to VoIP phones; ensures QoS prioritization
  • Management VLAN: Used for switch management (SSH, Telnet, SNMP)
  • Native VLAN: Frames sent untagged on 802.1Q trunk (default VLAN 1)

VLAN ID Ranges

VLAN RangeTypeNotes
1Default VLANAll ports belong here by default; cannot be deleted
2 – 1001Normal RangeStandard VLANs for user configuration
1002 – 1005Legacy ReservedReserved for FDDI and Token Ring; cannot be used or deleted
1006 – 4094Extended RangeRequires VTP transparent mode or VTPv3; stored in running-config

Access Ports vs Trunk Ports

Access Port

Assigned to a single VLAN. Frames are sent and received without any 802.1Q tag. Connected to end devices (PCs, printers, IP phones). The switch adds/removes the tag internally.

Config: switchport mode accessswitchport access vlan X

Trunk Port

Carries multiple VLANs simultaneously. Frames are tagged with 802.1Q headers (except native VLAN frames). Used on switch-to-switch links and switch-to-router links.

Config: switchport mode trunkswitchport trunk allowed vlan X,Y,Z

802.1Q Frame Tag Structure

FieldSizeValue / Purpose
TPID (Tag Protocol ID)16 bits0x8100 — identifies frame as 802.1Q tagged
PCP (Priority Code Point)3 bitsQoS class of service (0–7); higher = higher priority
DEI (Drop Eligible Indicator)1 bitMarks frame as drop-eligible during congestion
VID (VLAN Identifier)12 bitsVLAN number (0–4095); 0 and 4095 reserved → usable 1–4094

The 4-byte 802.1Q tag is inserted into the Ethernet frame between the Source MAC address and the EtherType/Length field. The native VLAN does not receive a tag — frames are forwarded as-is.

Native VLAN & DTP

Native VLAN

Frames belonging to the native VLAN are transmitted untagged on an 802.1Q trunk. Both ends of the trunk must be configured with the same native VLAN — a mismatch causes STP topology issues, CDP warnings, and potential traffic misdelivery. Best practice: change native VLAN away from VLAN 1 and make it unused.

DTP (Dynamic Trunking Protocol)

Cisco proprietary protocol that auto-negotiates trunk links between switches. Modes: dynamic auto (passive, waits), dynamic desirable (actively negotiates). Best practice: disable DTP with switchport nonegotiate and manually configure trunk/access mode to prevent VLAN hopping attacks.

Inter-VLAN Routing

Router-on-a-Stick

One physical router interface connected to a trunk port. Multiple subinterfaces are created on the router — one per VLAN — each configured with encapsulation dot1q VLAN_ID. Router performs L3 routing between VLANs. Simple but single point of congestion.

SVI (Switched Virtual Interface)

Virtual Layer 3 interface created on a multilayer switch — one SVI per VLAN. The switch performs routing internally between VLANs without needing an external router. More scalable and faster than Router-on-a-Stick. Command: interface vlan X → assign IP → ip routing.

Key VLAN Commands

! Configure access port switchport mode access switchport access vlan 10 switchport voice vlan 20 ! Voice VLAN alongside data VLAN ! Configure trunk port switchport mode trunk switchport trunk native vlan 99 switchport trunk allowed vlan 10,20,30 switchport nonegotiate ! Disable DTP ! Router-on-a-Stick subinterface interface GigabitEthernet0/0.10 encapsulation dot1q 10 ip address 192.168.10.1 255.255.255.0 ! Verification show vlan brief show interfaces trunk show interfaces GigabitEthernet0/1 trunk

Spanning Tree Protocol

STP (802.1D) and RSTP (802.1w) prevent Layer 2 loops in switched networks. Without STP, redundant links cause broadcast storms that can crash a network within seconds.

Why STP Is Needed

The L2 Loop Problem

Ethernet frames have no TTL (unlike IP packets). If a loop exists, a broadcast frame circulates forever — this is called a broadcast storm. It consumes 100% of bandwidth and CPU, crashing all switches in the loop. STP solves this by logically blocking redundant paths while keeping them as standby failover paths.

STP Port States (802.1D)

  • Blocking: Receives BPDUs only; does not forward frames or learn MACs
  • Listening (15s): Processes BPDUs, no forwarding, no MAC learning
  • Learning (15s): Builds MAC table, still no forwarding
  • Forwarding: Full operation — learns MACs and forwards frames
  • Disabled: Administratively shut down

Total convergence time: ~30–50 seconds

Root Bridge Election

Bridge ID & Election Process

Bridge ID = 2-byte Priority + VLAN ID + 6-byte MAC
The switch with the lowest Bridge ID becomes the root bridge. Default priority = 32768. If priorities tie, lowest MAC address wins.

All ports on the root bridge are Designated Ports (forwarding).
Best practice: manually set the root bridge priority to ensure predictable topology.

Port Cost (Path to Root)

  • 10 Mbps = cost 100
  • 100 Mbps = cost 19
  • 1 Gbps = cost 4
  • 10 Gbps = cost 2
  • 100 Gbps = cost 1

Non-root switches elect a Root Port (RP) — the port with the lowest cumulative path cost to the root bridge.

STP Port Roles

RoleLocationStateDescription
Root Port (RP)Non-root switchForwardingBest (lowest cost) path to root bridge — one per switch
Designated Port (DP)Every segmentForwardingBest port on the segment toward root — all root bridge ports are DP
Non-Designated PortNon-root switchBlockingRedundant port that is blocked to prevent loops
DisabledAnyDisabledAdministratively shut down

RSTP (802.1w) — Really Speedy Tree Protocol

RSTP Improvements

  • Convergence: <1 second vs STP's 30–50 seconds
  • Only 3 port states: Discarding · Learning · Forwarding
  • Backward compatible with 802.1D
  • Uses proposal/agreement mechanism for rapid convergence
  • Edge ports (PortFast equivalent) go directly to Forwarding

RSTP Additional Port Roles

  • Root Port: Same as STP — best path to root
  • Designated Port: Same as STP — forwarding on segment
  • Alternate Port: Backup path to root bridge (replaces blocked RP)
  • Backup Port: Backup to a Designated Port on the same segment (less common)

Alternate port = instant failover if root port fails (no recalculation needed)

STP vs RSTP Comparison

FeatureSTP (802.1D)RSTP (802.1w)
Convergence time30–50 seconds<1 second
Port states5 (Blocking, Listening, Learning, Forwarding, Disabled)3 (Discarding, Learning, Forwarding)
Port rolesRoot, Designated, Non-DesignatedRoot, Designated, Alternate, Backup
BPDU handlingOnly root generates BPDUsEvery switch generates BPDUs every Hello time
Topology changePropagated via TCN BPDUs (slow)Flooded immediately (fast)
Backward compatibleYes

PortFast & BPDU Guard

PortFast

Allows an access port to skip the Listening and Learning states and go directly to Forwarding. Eliminates the 30-second wait when an end device connects. Only safe on ports connected to end hosts — never use on switch-to-switch links.

Enable: spanning-tree portfast
Global: spanning-tree portfast default

BPDU Guard

If a PortFast-enabled port receives a BPDU (which only switches send), BPDU Guard immediately error-disables the port. Protects against someone accidentally connecting a switch to an access port, which could destabilize the STP topology.

Enable: spanning-tree bpduguard enable
Recovery: shutdownno shutdown

EtherChannel (Link Aggregation)

What EtherChannel Does

Bundles 2–8 physical links into one logical Port-Channel interface. STP sees a single logical link — no links are blocked. Provides load balancing across all member links based on a hash (src/dst MAC, IP, or port). If one link fails, traffic shifts to remaining links automatically.

EtherChannel Negotiation Protocols

  • LACP (802.3ad): IEEE open standard. Modes: active (initiates) / passive (responds). Active-Active or Active-Passive = forms. Passive-Passive = does NOT form.
  • PAgP: Cisco proprietary. Modes: desirable (initiates) / auto (responds). Desirable-Desirable or Desirable-Auto = forms.
  • Static (on/on): No negotiation protocol. Both sides must be on. Simple but no mismatch detection.
! EtherChannel with LACP interface range GigabitEthernet0/1-2 channel-group 1 mode active ! LACP active interface Port-channel1 switchport mode trunk ! Verification show etherchannel summary show interfaces port-channel 1 show spanning-tree vlan 10 ! Verify root and port roles spanning-tree vlan 10 priority 4096 ! Manually set root bridge

Wireless LAN & Layer 2 Security

Wireless networking requires understanding AP architectures, WLAN standards, and security protocols. Layer 2 security protects the switched network from common attacks like MAC flooding, VLAN hopping, and DHCP spoofing.

WLAN Standards

StandardFrequencyMax SpeedKey Feature
802.11b2.4 GHz11 MbpsLegacy; DSSS modulation
802.11g2.4 GHz54 MbpsOFDM; backward compatible with b
802.11n (Wi-Fi 4)2.4 / 5 GHz600 MbpsMIMO; channel bonding (40 MHz)
802.11ac (Wi-Fi 5)5 GHz3.5 GbpsMU-MIMO; 80/160 MHz channels; beamforming
802.11ax (Wi-Fi 6)2.4 / 5 / 6 GHz9.6 GbpsOFDMA; BSS coloring; improved dense environments

2.4 GHz: longer range, more interference. Non-overlapping channels: 1, 6, and 11 (only 3). 5 GHz: more available channels, less interference, shorter range. WLC manages channel and power assignment automatically in enterprise deployments.

Wireless Modes & Terminology

Infrastructure vs Ad-Hoc

  • Infrastructure mode: Devices communicate through an Access Point (AP). Standard enterprise and home deployment.
  • Ad-hoc (IBSS): Devices communicate directly with each other — no AP required. Peer-to-peer, limited range, no central management.

BSS, ESS & SSID

  • BSS (Basic Service Set): One AP + its associated clients. BSSID = AP's MAC address.
  • SSID: The network name clients see and connect to.
  • ESS (Extended Service Set): Multiple APs sharing the same SSID. Enables seamless roaming between APs as clients move. Each AP has a unique BSSID but the same SSID.

Autonomous AP

Self-contained AP that is individually configured per device. All wireless intelligence (SSID config, security, RF settings) resides on the AP itself. Suitable for small deployments. Does not scale well — managing 50+ APs individually is impractical.

Lightweight AP + WLC

Lightweight APs are "thin" — they forward all wireless traffic to the WLC (Wireless LAN Controller) via CAPWAP tunnels. WLC centrally manages RF channels, power, security policies, QoS, roaming, and firmware for all APs. Scales easily to hundreds of APs. CCNA exam favors this model for enterprise.

CAPWAP Protocol

Control And Provisioning of Wireless APs

  • Protocol between lightweight AP and WLC
  • UDP 5246 — CAPWAP control channel (AP management, config)
  • UDP 5247 — CAPWAP data channel (encapsulated 802.11 traffic)
  • All wireless frames encapsulated in CAPWAP and sent to WLC
  • WLC decapsulates, applies policy, and forwards to wired network

Wireless Security

StandardEncryptionAuthenticationNotes
WEPRC4 (40/128-bit)Open/Shared KeyBroken — do not use. Cracked in minutes.
WPATKIP/RC4PSK or 802.1XTransitional — deprecated. TKIP is weak.
WPA2-PersonalCCMP/AESPSK (passphrase)Vulnerable to offline dictionary attacks via PMKID
WPA2-EnterpriseCCMP/AES802.1X/EAP + RADIUSPer-user credentials; enterprise-grade
WPA3-PersonalCCMP/AESSAE (dragonfly)Resists offline attacks; forward secrecy
WPA3-EnterpriseGCMP-256802.1X/EAP192-bit security mode; strongest option

SAE (Simultaneous Authentication of Equals): WPA3's replacement for PSK. Uses a dragonfly handshake that is resistant to offline dictionary attacks and provides forward secrecy — past sessions cannot be decrypted even if the password is later compromised.

Layer 2 Security Threats

MAC Flooding

Attacker sends thousands of frames with fake source MACs, filling the switch's CAM table. Once full, the switch cannot learn new entries and begins flooding all frames to all ports — acting like a hub. Attacker can capture all traffic. Mitigated by Port Security.

VLAN Hopping

Two methods: Double Tagging — attacker sends frame with two 802.1Q tags; switch strips outer tag, inner tag lands in victim VLAN; DTP Switch Spoofing — attacker tricks switch into forming a trunk using DTP. Mitigated by disabling DTP (switchport nonegotiate) and changing native VLAN.

DHCP Attacks

DHCP Starvation: Attacker exhausts DHCP pool with fake MAC requests — legitimate clients cannot get IPs. DHCP Spoofing: Rogue DHCP server responds with malicious gateway/DNS — man-in-the-middle attack. Both mitigated by DHCP Snooping.

ARP Spoofing / Poisoning

Attacker sends gratuitous ARP replies associating their MAC with a legitimate IP (often the gateway). Victims update their ARP cache — traffic flows to attacker instead. Enables man-in-the-middle attacks. Mitigated by Dynamic ARP Inspection (DAI).

Layer 2 Security Mitigations

Port Security

Limits the number of valid MAC addresses per switch port. Violation modes:
Protect: Drops violating frames silently, no log
Restrict: Drops frames + increments violation counter + syslog
Shutdown (default): Error-disables the port immediately, sends SNMP trap
Sticky MACs: dynamically learned and saved to running-config

DHCP Snooping

Switch feature that classifies ports as trusted (uplinks to real DHCP server) or untrusted (access ports to clients). Blocks DHCP OFFER/ACK on untrusted ports. Builds a DHCP snooping binding table (MAC, IP, port, VLAN) used by DAI and IP Source Guard. Enable globally + per VLAN + mark uplinks trusted.

Dynamic ARP Inspection (DAI)

Validates ARP packets by checking them against the DHCP snooping binding table. If the MAC-IP mapping in an ARP reply doesn't match the binding table, the frame is dropped. Operates on untrusted ports. Requires DHCP snooping to be enabled first to populate the binding table.

Storm Control

Limits the rate of broadcast, multicast, or unknown unicast frames on a port. If the rate exceeds a configured threshold (as % of bandwidth or pps), frames are dropped or the port is shut down. Prevents broadcast storms from affecting the rest of the network.

! Port Security interface GigabitEthernet0/1 switchport port-security switchport port-security maximum 2 switchport port-security mac-address sticky switchport port-security violation shutdown ! DHCP Snooping ip dhcp snooping ip dhcp snooping vlan 10,20 interface GigabitEthernet0/24 ip dhcp snooping trust ! Uplink to DHCP server = trusted ! Dynamic ARP Inspection ip arp inspection vlan 10,20 interface GigabitEthernet0/24 ip arp inspection trust ! Trusted uplink

Practice Quiz — Network Access & Switching

10 questions covering VLANs, STP, EtherChannel, wireless, and L2 security. Select your answers and submit to see your score with explanations.

1. Which IEEE standard defines 802.1Q VLAN trunking?
2. What is the default STP bridge priority value?
3. Which STP port role provides the best path to the root bridge on a non-root switch?
4. A port configured with PortFast receives a BPDU. If BPDU Guard is enabled, what happens?
5. Which EtherChannel protocol is an open IEEE standard?
6. What is the native VLAN on an 802.1Q trunk?
7. Which wireless security protocol uses SAE (Simultaneous Authentication of Equals)?
8. A lightweight AP communicates with a WLC using which protocol?
9. Which Layer 2 attack floods the CAM table to force a switch to behave like a hub?
10. Inter-VLAN routing using a single physical link between a router and switch is called?

Memory Hooks

Six visual memory anchors to lock in the most exam-critical concepts from Network Access & Switching.

🌐
VLANs
"VLANs = Virtual Walls"
Separate broadcast domains without separate hardware. Access port = 1 VLAN, no tag. Trunk port = many VLANs, tagged with 802.1Q. Native VLAN = untagged — must match on both sides or you get STP loops and traffic misdelivery.
🌳
STP Root Election
"Lowest Wins the Crown"
Root bridge = lowest Bridge ID (Priority + MAC). Lower priority = more likely to win. Set manually with priority multiples of 4096. Default priority 32768 means root is random — avoid this in production. Use spanning-tree vlan X root primary.
RSTP vs STP
"RSTP = Really Speedy Tree Protocol"
STP converges in 30–50 seconds. RSTP converges in <1 second. RSTP has 3 port states (Discard/Learn/Forward) vs STP's 5. RSTP adds Alternate and Backup roles; STP only has Non-Designated. Backward compatible — use RSTP in all modern networks.
🔌
EtherChannel
"Bundle Your Links, Not Your Stress"
Bundles 2–8 links into 1 logical link. LACP = IEEE open standard (active/passive). PAgP = Cisco-only (desirable/auto). Both sides must match mode. STP sees one logical link — no blocking! All member ports must match speed, duplex, and VLAN config or the bundle won't form.
📶
WLC vs Autonomous
"Lightweight = WLC Does the Thinking"
Autonomous AP = self-contained, configured per AP. Lightweight AP = thin client, WLC does all config/RF/security via CAPWAP tunnels (UDP 5246/5247). CCNA: WLC = scalable enterprise choice. 2.4 GHz: channels 1, 6, 11 only (non-overlapping). 5 GHz: more channels, less interference.
🛡️
L2 Security Triad
"Snoop · Inspect · Secure Ports"
DHCP Snooping = stop rogue DHCP servers. DAI (Dynamic ARP Inspection) = stop ARP spoofing using the snooping binding table. Port Security = stop MAC flooding. These three work together to harden Layer 2. Enable snooping first — DAI depends on its binding table.

Flashcards & Exam Advisor

Click any card to flip it. Use the Exam Advisor below for category-specific tips, key commands, and common exam traps.

Click a card to reveal the definition →

802.1Q Frame Tag
4-byte structure — what are the fields?
4-byte tag inserted after source MAC: TPID (0x8100, 16-bit) + PCP (3-bit QoS priority) + DEI (1-bit drop eligible) + VID (12-bit VLAN ID, 1–4094). Native VLAN frames are NOT tagged.
STP Port States (802.1D)
5 states in order — what are they?
Blocking (no forward, listens BPDUs) → Listening (15s) → Learning (15s, builds MAC table) → ForwardingDisabled. Total convergence: ~30–50 seconds.
Root Bridge Election
How is the root bridge selected?
Lowest Bridge ID wins. Bridge ID = 2-byte Priority (default 32768) + VLAN ID + 6-byte MAC. To force a switch to be root: set priority to 4096 or use spanning-tree vlan X root primary.
LACP Modes
Active vs Passive — when does EtherChannel form?
Active: initiates LACP. Passive: responds, does not initiate. Active-Active ✓ | Active-Passive ✓ | Passive-Passive ✗ (no EtherChannel). On-On = static, no protocol. All member ports must match speed/duplex/VLAN.
WPA2 vs WPA3
Key differences in authentication and security
WPA2: CCMP/AES encryption. Personal=PSK, Enterprise=802.1X/EAP. Vulnerable to PMKID/offline dictionary attacks. WPA3: SAE (dragonfly handshake) replaces PSK — resistant to offline attacks. Forward secrecy built in.
Port Security Violation Modes
Protect vs Restrict vs Shutdown
Protect: drops frames, no log. Restrict: drops frames + violation counter + syslog. Shutdown (default): error-disables port, SNMP trap. Recovery: manual shutdown / no shutdown or errdisable recovery.
DHCP Snooping
How does it protect the network?
Classifies ports as trusted (uplink to DHCP server) or untrusted (access ports). Blocks DHCP OFFER/ACK from untrusted ports. Builds binding table (MAC, IP, port, VLAN) used by DAI and IP Source Guard.
CAPWAP
What ports? What does it do?
Control And Provisioning of Wireless Access Points. UDP 5246 (control) and UDP 5247 (data). Lightweight APs form CAPWAP tunnel to WLC — all 802.11 traffic encapsulated and forwarded to WLC for centralized processing.

Exam Advisor

VLANs & Trunking — Exam Tips

  • Native VLAN mismatch between trunk peers causes CDP warnings, STP topology issues, and potential traffic misdelivery — always configure both sides the same
  • VTP modes: Server (creates/modifies/deletes VLANs, propagates), Client (receives only, cannot change), Transparent (ignores VTP, only forwards, stores VLANs locally)
  • Use show vlan brief to see VLANs and their assigned ports; use show interfaces trunk to see active trunk ports and allowed VLANs
  • Voice VLAN is configured alongside the access VLAN: switchport access vlan 10 + switchport voice vlan 20 — both on the same port
  • DTP is enabled by default — always disable with switchport nonegotiate on manually configured trunk/access ports to prevent VLAN hopping
  • Extended VLANs (1006–4094) require VTP transparent mode or VTPv3; they are stored in running-config, not VLAN database

Ready to Pass the CCNA?

Test your knowledge with full-length practice exams and adaptive flashcards on FlashGenius.

Start Free Practice Tests →