How do I VLAN-tag all traffic exiting the Ethernet interface?

I have a device set-up to bridge its two Wi-Fi interfaces to its Ethernet interface, acting as a simple wireless extension to my home network. I'd like to VLAN-tag all the traffic that exits the Ethernet port, but LuCi doesn't expose any switch/VLAN stuff at all. Is it possible at all if the device doesn't have a regular hardware switch?

Here are some details of my device and its network config:

If I understood what you mean, you just need to use "eth0.x" (where "x" is the VLAN) instead of "eth0" for the LAN interface.


Changing the ifname of interface 'lan' in /etc/config/network seems to introduce some VLAN thing by judging from how LuCi displays the details of the bridge, but then traffic no longer appears to reach out of the Ethernet port. Does something more need to be added or changed?

If I at this point check eth0 to include it in the bridge, the device because unreachable over Wi-Fi as well.

If you change the eth0 to eth0.1 then all the packets out of the interface will be tagged and only tagged packets into the interface will be heard. Which means the device plugged into that port must be configured for tagged packets as well.


Thanks, @eduperez and @dlakelan, that worked!

For anyone else who's looking to solve the same problem, the only change on the OpenWRT side was that I renamed the interface in the bridge as @eduperez suggested - changing ifname 'eth0' to ifname 'eth0.1', with no additional changes in the bridging setup - which started tagging the traffic as belonging to VLAN 1. The rest was as @dlakelan pointed out a matter of setting up a VLAN on my router the OpenWRT device connected to so that it could finally see the "new" traffic.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.