NetWarren_

Lessons › Switching

VLANs and trunks: one building, separate floors

12 min lesson · Switching · free

▶ Start the interactive lesson

Ticket #160, from Security: "Visitors on guest Wi-Fi can see the finance file server!" Everyone's on the same flat network. Maya: "We need floors with locked doors. Same building, same switches, but separate networks. VLANs."

The problem with one big switch

Every device on a switch is in the same broadcast domain: when one shouts (a broadcast), everyone hears it. Sales, HR and guests all on one network means no separation, more noise and more risk.

A VLAN is a virtual switch inside the switch

A VLAN (virtual LAN) splits one physical switch into several separate networks. Ports in VLAN 10 only talk to VLAN 10, and ports in VLAN 20 only to VLAN 20, as if they were different switches.

Access ports: one VLAN per port

A port that connects a PC or printer is an access port in exactly one VLAN. The PC has no idea VLANs exist: the switch handles it.

Trunks: many VLANs on one cable

Between switches (or to a router) you don't want one cable per VLAN. A trunk carries all VLANs on one link by adding a small 802.1Q tag to each frame that says which VLAN it belongs to. The other end reads the tag and removes it.

Talking between VLANs needs a router

VLANs are separate networks, so traffic between them must be routed, exactly like between any two networks. Each VLAN gets a gateway.

Key points

The full lesson has more: animations, a hands-on exercise, 3 quiz questions and spaced review cards. Open it free →