Okay. I got this working. It may have been firewall issues that prevented it working originally, although I'm not sure.
The process was roughly this:
Set up new vlans through robocfg. This configures which ports will contain vlan tags when data from interfaces on that vlan communicate.
Code:
robocfg vlan 20 ports "0t 5t"
I did this three times. One for IOT(VLAN20), one for public internet(VLAN30), and one for my private network (VLAN10).
This also needs to be done with vconfig. I don't know why exactly. Maybe robocfg configures something at a driver level and vconfig does something else in the kernel.
Code:
vconfig add eth0 20
ifconfig vlan20 up
Where 20 is the vlan from the robocfg step.
Then delete all the wlx.x interfaces from the default bridge that comes with the router.
Now we create a new bridge to put the interfaces on, along with the vlan. Doing this tags all the traffic on those interfaces.
Add the interface to the new bridge:
And bring up the bridge
then all this needs to be written to nvram. Not sure what this does.
Private / VLAN1 / 10 / physical ports
Code:
nvram set br0_ifname="br0"
nvram set lan_ifname="br0"
nvram set br0_ifnames="vlan1 eth1 eth2 vlan10"
nvram set lan_ifnames="vlan1 eth1 eth2 vlan10"
And an example of setting up br1 in nvram
Code:
nvram set lan1_ifnames="vlan20 wl0.2 wl1.2"
nvram set lan1_ifname="br1"
nvram set br1_ifname="br1"
nvram set br1_ifnames="vlan20 wl0.2 wl1.2"
Flush bridge firewall rules.
Here's the script I butchered to get it working:
GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
If anyone can explain the significance of the nvram settings I'd appreciate it. Also not sure what eapd is. Or why there is a vlan2.