EtherChannel (LACP) and Layer 2 discovery protocols (CDP, LLDP)

Cisco CCNA Preparation · lesson 11 of 36 · 25 min

What Is a VLAN?

A VLAN (Virtual LAN) is a logical grouping of devices on a switch, regardless of physical location. VLANs segment a single physical switch into multiple broadcast domains — devices in different VLANs cannot communicate directly without a router (or Layer 3 switch).

Benefits: security (isolate sensitive systems), performance (reduce broadcast traffic), flexibility (group users by function, not location).

VLAN Types

Access vs Trunk Ports

802.1Q tagging

Trunk ports use IEEE 802.1Q to tag frames with a 4-byte header containing the VLAN ID (12 bits = VLANs 1–4094). The native VLAN is the exception — its frames are sent untagged on the trunk.

VLAN Configuration Commands

Inter-VLAN Routing

Devices in different VLANs need a Layer 3 device to communicate. Two methods:

Router-on-a-stick: One physical router interface with sub-interfaces, one per VLAN. Each sub-interface has an IP address and 802.1Q encapsulation.

Layer 3 switch (SVI): A multilayer switch with a Switched Virtual Interface (SVI) per VLAN — more scalable and faster than router-on-a-stick.

Flashcard Drill

VLAN Virtual LAN — logical grouping of devices creating separate broadcast domains on a switch. Access port Switch port in exactly one VLAN — connects end devices; frames are untagged. Trunk port Switch port carrying multiple VLANs — frames tagged with 802.1Q. 802.1Q IEEE standard for VLAN tagging on trunk ports — 4-byte tag with 12-bit VLAN ID. Native VLAN VLAN whose traffic is sent untagged on a trunk — default is VLAN 1. Default VLAN VLAN 1 — all ports assigned here by default; cannot be deleted. Router-on-a-stick Inter-VLAN routing using one physical router interface with 802.1Q sub-interfaces. SVI Switched Virtual Interface — Layer 3 interface on a multilayer switch for inter-VLAN routing. show vlan brief Shows all VLANs, names, and port assignments. show interfaces trunk Shows trunk ports, allowed VLANs, native VLAN, and encapsulation.

Knowledge Check

VLANs & Trunking — 10 Questions

What is the primary benefit of VLANs?

  • Increase bandwidth
  • Segment broadcast domains for security and performance
  • Replace routers
  • Encrypt traffic

Answer: Segment broadcast domains for security and performance
VLANs create separate broadcast domains, improving security and reducing unnecessary broadcast traffic.

Which port type carries traffic for multiple VLANs using 802.1Q tagging?

  • Access port
  • Trunk port
  • Voice port
  • Management port

Answer: Trunk port
Trunk ports carry multiple VLANs and tag frames with 802.1Q headers.

Devices in different VLANs can communicate directly without a router.

  • True
  • False

Answer: False
VLANs are separate broadcast domains — a Layer 3 device (router or L3 switch) is required for inter-VLAN communication.

The default native VLAN on Cisco switches is VLAN _____.

Answer: 1
VLAN 1 is the default native VLAN — its traffic is sent untagged on trunk ports.

Which command assigns a switch port to VLAN 20 as an access port?

  • switchport vlan 20
  • switchport access vlan 20
  • vlan 20 access
  • access-vlan 20

Answer: switchport access vlan 20
switchport access vlan 20 assigns the port to VLAN 20. Also requires switchport mode access.

What does 802.1Q add to a frame on a trunk port?

  • A new IP header
  • A 4-byte VLAN tag
  • An encryption header
  • A routing table entry

Answer: A 4-byte VLAN tag
802.1Q inserts a 4-byte tag containing the VLAN ID into the Ethernet frame.

Router-on-a-stick uses which feature to route between VLANs?

  • Multiple physical interfaces
  • 802.1Q sub-interfaces
  • SVI interfaces
  • Static routes

Answer: 802.1Q sub-interfaces
Router-on-a-stick uses one physical interface with multiple sub-interfaces, each with 802.1Q encapsulation for a VLAN.

Which command verifies which VLANs are allowed on a trunk port?

  • show vlan brief
  • show interfaces trunk
  • show mac address-table
  • show ip route

Answer: show interfaces trunk
show interfaces trunk shows trunk ports, allowed VLANs, native VLAN, and encapsulation.

VLAN 1 can be deleted from a Cisco switch.

  • True
  • False

Answer: False
VLAN 1 is the default VLAN and cannot be deleted — it can be unused but not removed.

A Layer 3 switch uses a _____ (SVI) to perform inter-VLAN routing.

Answer: Switched Virtual Interface
SVIs are virtual Layer 3 interfaces on a multilayer switch — one per VLAN for inter-VLAN routing.


Previous lesson: VLANs: access ports, default VLAN, inter-VLAN routing, trunk ports, 802.1Q, native VLAN
Back to Cisco CCNA Preparation
Next lesson: Inter-VLAN routing: router-on-a-stick, Layer 3 switch SVIs, configuration