Networking Tutorials

VLANs & Trunking Made Simple

A VLAN (Virtual LAN) splits one physical switch into multiple logical networks, so you can separate departments, improve security and reduce broadcast traffic. A trunk is a link that carries many VLANs between switches using 802.1Q tags.

Why VLANs exist

Without VLANs, every device on a switch shares one broadcast domain. VLANs let you logically group devices — for example HR, Sales and Servers — even if they share the same switches, improving security, performance and manageability.

Access vs trunk ports

  • Access port: assigned to one VLAN, used for PCs, printers and phones.
  • Trunk port: carries multiple VLANs between switches (or to a router), tagging each frame so the other side knows which VLAN it belongs to.

802.1Q tagging and the native VLAN

The IEEE 802.1Q standard inserts a 4-byte tag into Ethernet frames on a trunk, identifying the VLAN. The native VLAN is the one exception — its traffic is sent untagged. Mismatched native VLANs are a common real-world error.

Inter-VLAN routing

VLANs are isolated by design, so to let them talk you need Layer 3 routing: either router-on-a-stick (one trunk to a router with a subinterface per VLAN) or a Layer 3 switch using Switched Virtual Interfaces (SVIs).

Try it in Packet Tracer

  1. Create VLANs: vlan 10, vlan 20.
  2. Assign access ports: switchport mode access / switchport access vlan 10.
  3. Configure the uplink as a trunk: switchport mode trunk.
  4. Add inter-VLAN routing on a router or L3 switch.

Set up your own lab with our home lab guide, or learn it hands-on in our CCNA course.

Frequently asked questions

What is the difference between an access port and a trunk port?

An access port belongs to a single VLAN and connects end devices. A trunk port carries traffic for multiple VLANs between switches and tags frames with 802.1Q.

What is the native VLAN?

The native VLAN carries untagged traffic on a trunk. By default it is VLAN 1; it should match on both ends of the trunk to avoid issues.

How do devices in different VLANs communicate?

Through inter-VLAN routing — either router-on-a-stick (a router subinterface per VLAN) or a Layer 3 switch using SVIs.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2007.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.