Hi guys,
I spent most of today getting my rt87u (AP mode) to connect to my opensense router with two vlans on a single cable. I got it to work so I'm leaving the info here in case it helps anyone.
The idea is to use the rt87u guest network as an IOT wifi, and the regular wifi as the home network. Everything gets filtered on opensense. I only have one cable beween the two, so I need a trunk connection.
The main takeaway is that using native vlan (untagged) together with a tagged vlan (which are most of the examples I could find) wont work. I had to tag both networks on both ends.
(also, vlan 9 is used somethere inside rt87u and isn't free to use...couple of hours there...)
On Opensense side there wasn't a lot to do. I just needed create a vlan interface for each vlan on the ethernet interface that I used to connect to rt87u (each went into its own bridge and stuff but that's irrelevant here...)
Cheers,
-Miguel
I spent most of today getting my rt87u (AP mode) to connect to my opensense router with two vlans on a single cable. I got it to work so I'm leaving the info here in case it helps anyone.
The idea is to use the rt87u guest network as an IOT wifi, and the regular wifi as the home network. Everything gets filtered on opensense. I only have one cable beween the two, so I need a trunk connection.
The main takeaway is that using native vlan (untagged) together with a tagged vlan (which are most of the examples I could find) wont work. I had to tag both networks on both ends.
(also, vlan 9 is used somethere inside rt87u and isn't free to use...couple of hours there...)
My /jffs/services-start:
#!/bin/sh
touch /tmp/000brstarted
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
robocfg vlan 101 ports "0t 1t 2t 3t 5t 8t"
#tag vlan 1 on the wan port (0t) I used to connect to opensense
robocfg vlan 1 ports "0t 1 2 3 5 8t"
vconfig add eth0 101
ifconfig vlan101 up
brctl addbr br1
brctl addif br1 vlan101
brctl delif br0 wl0.1
brctl addif br1 wl0.1
ifconfig br1 192.168.1.1 netmask 255.255.255.0 up
nvram set lan_ifnames="vlan1 eth1"
nvram set lan_ifname="br0"
nvram set lan1_ifnames="vlan101 wl0.1"
nvram set lan1_ifname="br1"
nvram set lan1_ipaddr=192.168.1.1
nvram commit
killall eapd
#redirect annoying messages
eapd >& /dev/null
#!/bin/sh
touch /tmp/000brstarted
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
robocfg vlan 101 ports "0t 1t 2t 3t 5t 8t"
#tag vlan 1 on the wan port (0t) I used to connect to opensense
robocfg vlan 1 ports "0t 1 2 3 5 8t"
vconfig add eth0 101
ifconfig vlan101 up
brctl addbr br1
brctl addif br1 vlan101
brctl delif br0 wl0.1
brctl addif br1 wl0.1
ifconfig br1 192.168.1.1 netmask 255.255.255.0 up
nvram set lan_ifnames="vlan1 eth1"
nvram set lan_ifname="br0"
nvram set lan1_ifnames="vlan101 wl0.1"
nvram set lan1_ifname="br1"
nvram set lan1_ipaddr=192.168.1.1
nvram commit
killall eapd
#redirect annoying messages
eapd >& /dev/null
On Opensense side there wasn't a lot to do. I just needed create a vlan interface for each vlan on the ethernet interface that I used to connect to rt87u (each went into its own bridge and stuff but that's irrelevant here...)
Cheers,
-Miguel
Last edited: