PracticeBlogFlashcardsEspañol

VLAN, Trunk, Router-on-a-Stick, and Firewall Rule Lab

Key Takeaways

  • A VLAN design is incomplete until trunks, access ports, gateways, DHCP scopes, and security rules agree.
  • 802.1Q trunks carry multiple VLANs between switches, routers, firewalls, and access points.
  • Router-on-a-stick uses subinterfaces with VLAN tags to route between VLANs.
  • Firewall policy should be written as source, destination, service, action, and logging requirements.
  • PBQ troubleshooting should compare symptoms against VLAN membership, trunk allowed lists, native VLANs, gateways, and rules.
Last updated: April 2026

VLAN and Firewall Design Lab

This lab combines Layer 2 segmentation, Layer 3 gateways, and security policy. In a performance-based question, you may have to place switchports into VLANs, mark a trunk, choose subinterfaces, and build firewall rules that allow only required traffic.

Scenario

A small office has one router or firewall connected to a switch. The switch also connects to access points, phones, users, and servers.

VLANNameSubnetDefault gatewayPurpose
10Users172.20.10.0/24172.20.10.1Employee workstations
20Voice172.20.20.0/24172.20.20.1IP phones
30Servers172.20.30.0/24172.20.30.1File, print, and application servers
40Guest172.20.40.0/24172.20.40.1Internet-only wireless guests
99Management172.20.99.0/24172.20.99.1Switches, APs, and firewall management

Switch Port Plan

Port typeExample portsRequired setting
User access1-20Access VLAN 10
Phone plus PC21-28Data VLAN 10 and voice VLAN 20
Server access29-34Access VLAN 30
AP uplink35-38Trunk allowing VLANs 10, 40, and 99 if AP management is tagged
Router or firewall uplink48802.1Q trunk allowing VLANs 10, 20, 30, 40, and 99

Access ports carry one data VLAN. Trunks carry multiple VLANs with tags. A trunk allowed list that omits VLAN 40 would explain why the guest SSID broadcasts but clients cannot reach the guest gateway.

Router-on-a-Stick Map

SubinterfaceEncapsulationIP address
g0/0.10802.1Q VLAN 10172.20.10.1/24
g0/0.20802.1Q VLAN 20172.20.20.1/24
g0/0.30802.1Q VLAN 30172.20.30.1/24
g0/0.40802.1Q VLAN 40172.20.40.1/24
g0/0.99802.1Q VLAN 99172.20.99.1/24

If the physical interface is up but a specific VLAN cannot route, focus on that VLAN tag, the trunk allowed list, the subinterface IP address, and the host default gateway.

Firewall Rule Table

OrderSourceDestinationServiceActionLog
1UsersServersSMB, HTTPS, DNS as requiredAllowYes
2VoiceCall manager or voice gatewaySIP, RTP, DHCP, DNS, NTP as requiredAllowYes
3GuestInternetHTTP, HTTPS, DNSAllowYes
4GuestInternal RFC1918 networksAnyDenyYes
5ManagementNetwork devicesSSH, HTTPS, SNMP, syslog as requiredAllowYes
6AnyAnyAnyDenyYes

Rules are evaluated in order on many firewalls and ACL systems. A broad deny above an allow can break a service. A broad allow above a deny can defeat segmentation.

Troubleshooting Prompts

SymptomLikely check
User gets an APIPA addressDHCP scope, DHCP relay, access VLAN, trunk path to DHCP server
Guest can browse Internet but can also reach file serverGuest-to-internal deny rule missing or ordered too low
Voice phones boot but cannot registerVoice VLAN, DHCP options, call manager reachability, firewall ports
AP management is unreachableAP management VLAN tag, trunk allowed list, management gateway
Only one VLAN works across trunkNative VLAN or allowed VLAN mismatch, missing subinterface

Common PBQ Traps

  • Marking the router uplink as an access port instead of a trunk.
  • Allowing the guest VLAN to reach internal networks.
  • Forgetting DHCP relay when the DHCP server is in a different VLAN.
  • Configuring the host gateway as an address from the wrong subnet.
  • Allowing a VLAN on the switch trunk but not creating the matching routed interface.
  • Creating firewall rules without a final deny or without logging where the scenario asks for auditing.
Test Your Knowledge

A router-on-a-stick design needs to route VLAN 30. Which interface component is required?

A
B
C
D
Test Your Knowledge

Guest wireless clients can reach internal file servers. Which firewall rule is most directly missing or misordered?

A
B
C
D
Test Your KnowledgeMulti-Select

Which items must align for a VLAN to work across a trunk to a router or firewall? Select three.

Select all that apply

The VLAN is allowed on the trunk
The routed subinterface uses the correct 802.1Q tag
The client default gateway is in the correct subnet
The client uses the same MAC address as the gateway
The VLAN number equals the TCP port number