Table of Contents

OpenWRT Simple VLAN Routing

Overview

This will configure an OpenWRT router from default configuration to enable two routed VLANs:

The final configuration will resemble this simple network diagram:

Configure VLAN tagging/untagging

Note: When configuring your OpenWRT router for VLAN support it is important to remember that once you configure a VLAN tag on a switch port you must use VLAN tags on all switch ports which will require you to reconfigure the br-lan bridge to bridge directly to the primary VLAN rather than to the physical interface. You can still use an “untagged” switch port, but the br-lan bridge must be bridged with a VLAN interface in order to function properly.

Login to the OpenWRT router:

Change the primary interface for br-lan to bridge to VLAN 1

Configure VLAN tagging/untagging on all switch ports

Note: When routing between VLANs the CPU port must be set to tagged for all VLANs you intend to route between. Think of it like an internal trunk port.

Create VLAN interface(s)

Now that you have configured VLAN tagging/untagging on your switch ports you must create a new interface for each new VLAN if you plan to route between them.

Configure Firewall

The final step to configuring your routed VLANs is to create firewall rules that will allow traffic to be forwarded between the virtual interfaces on the router

That's it, the router should now be configured to route between both VLANs!