Module 2 · Segmentation and Firewall Policy · Lesson 5 of 9

VLANs and inter-VLAN routing

Put staff and guests on separate VLANs, prove same-VLAN connectivity, and learn why a VLAN is not a security policy on its own.

In this lesson · about 26 minutes

  • Explain access ports, trunk ports and VLAN tags
  • Describe how traffic moves between VLANs
  • Explain why VLANs need ACLs or a firewall to enforce policy

Whiteboard · watch and try

Two floors, one building

Press Play. The tutor draws two VLANs on one switch, then the router that connects them.

5 steps
Press Play and the tutor will talk you through it while writing on the board. Pause any time to write on the board yourself.

Tip: press Pause, then use the pen to work along on the board. Space plays and pauses; Ctrl+Z undoes your last mark.

A VLAN (virtual LAN) splits one physical switch into several separate Layer 2 networks. Devices in VLAN 10 can't send frames directly to devices in VLAN 20, even on the same switch.

TermMeaning
Access portA switch port in exactly one VLAN, usually connected to a computer or printer. The device doesn't know it's in a VLAN.
Trunk portA link carrying several VLANs, usually switch-to-switch or switch-to-router. Each frame gets an 802.1Q tag with its VLAN number.
Native VLANThe VLAN whose frames cross a trunk untagged. Change it from the default and don't put users in it.

Getting from one VLAN to another

Each VLAN is usually its own IP subnet. To cross from VLAN 10 to VLAN 20, a packet must be routed, by a router with a sub-interface per VLAN ("router on a stick"), a Layer 3 switch, or a firewall. That routing point is exactly where you put your control.

Try it · watch it move

Split one switch into VLANs

Send a message from the guest laptop to the file server. Then connect the router and send it again. Then add the rule. Also try moving devices between VLANs by clicking them.

one physical switch, split into two virtual ones10🖥️Staff PC 110.10.10.2110🖥️Staff PC 210.10.10.2210🗄️File server10.10.10.520💻Guest laptop10.10.20.3120📱Guest phone10.10.20.32trunk📮no routerVLANs can't meet

Click a device to move it to the other VLAN

From
To
A VLAN splits one switch into separate virtual switches, like putting staff and guests on different floors of the same building with no stairs between them. Send a message from a guest to the file server, then add a router, then add the rule.

Hands-on lab (simulated terminal)

Lab: test VLAN isolation in a simulator

In a network simulator, a switch has staff PCs in VLAN 10 (10.10.10.0/24) and guest PCs in VLAN 20 (10.10.20.0/24). No router is connected yet. You're on staff-pc1 (10.10.10.21).

Step 1 of 3. Type each command and press Enter. Nothing runs on your computer.

Lab: test VLAN isolation in a simulator

1. Check the switch's VLAN assignments first. Run the switch command that shows a brief VLAN summary.

staff-pc1>

Decision scenario

The guest network that wasn't

You're the network admin for a small clinic.

Last month you moved the guest Wi-Fi into VLAN 20 and the staff network into VLAN 10. Today a visitor's laptop scanner on guest Wi-Fi found the staff file server's SMB share. The core switch is a Layer 3 switch with both VLAN interfaces configured.

What do you recommend?

0 of 3 options explored. Try the others to see how each would play out.

Check your understanding0 of 3 correct

Question 1

1.Do VLANs automatically block all traffic between them?

Question 2

2.Which port type carries frames from several VLANs with 802.1Q tags?

Question 3

3.Two PCs in VLAN 10 can't ping each other. What should you check FIRST?

Quiz score: 0 of 3

Tip: answer every quiz question correctly first.

Noviq Academy is free and for learning. Every lab here is simulated with synthetic data and private lab addresses. Only capture traffic and test networks that you own or have written permission to test. Wireshark and pfSense are trademarks of their owners; this course is independent of them.