Hi everybody,
I need some help with regards to my Guest LAN
I’m opening a new issue since none of the other similar ones that I could find quite describe the same situation or offer a good solution to this. So here we go:
I’ve successfully installed a MOX A+G+SDIO WiFi Add-On+mPCIe WIFI Add-On as a WiFi Access Point for my main LAN.
Now I’d like to also use the MOX as Access Point for my Guest LAN.
This currently doesn’t work probably because the MOX is connected to the Omnia at LAN0, which is attached only to main LAN and the Guest LAN (and its DHCP server) is not accessible through it.
How can I change this to use LAN0 for both main and guest networks, so I can use the MOX as AP for the Guest LAN, too?
Do I need to create a VLAN to enable this kind of sharing of the physical interface?
How do I configure this in /etc/config/network?
Thank you for any help and tips!
Christian
…
Edit, pasting from below:
So in full, my solution is as follows:
On the Mox:
- configure both
lan
interface as well asguest_turris
interface to be DHCP clients. Having it be a static IP did work on the main LAN, but it didn’t work for the guest LAN. - add
eth0.2
VLAN interface toguest_turris
config interface (VLAN ID (2
) has to match the one configured on turris, interface must match the local physical ifaceeth0
on Mox) - set override MAC address on
guest_turris
interface (the guest interface was switching between a virtual one and the one of the physical iface which seemed weird and was unexpected, so I used the override to always get the virtual MAC so my guest network DHCP server on the Omnia would always assign it the same IP per static lease configuration)
Interfaces lan
and guest_turris
in /etc/config/network
now look like this:
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'dhcp'
option _turris_mode 'managed'
option ip6assign '60'
option hostname 'mox'
config interface 'guest_turris'
option enabled '1'
option type 'bridge'
option bridge_empty '1'
option proto 'dhcp'
option ifname 'eth0.2'
option hostname 'mox-guest'
option macaddr 'XX:XX:XX:XX:XX:XX'
- disable the DHCP server and firewall services (took inspiration from Steps 3-5 from https://openwrt.org/docs/guide-user/network/wifi/dumbapand):
uci set dhcp.lan.ignore=1
uci set dhcp.lan.dhcpv6=disabled
uci set dhcp.lan.ra=disabled
uci set dhcp.guest_turris.ignore=1
uci set dhcp.guest_turris.dhcpv6=disabled
uci set dhcp.guest_turris.ra=disabled
uci commit
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop
/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop
/etc/init.d/firewall disable
/etc/init.d/firewall stop
/etc/init.d/network reload
On the Omnia:
- Add
option ifname 'lan0.2'
toconfig interface 'guest_turris'
sincelan0
is the physical interface the Mox is connected to. - On
https://<my-omnia-ip>/cgi-bin/luci/admin/network/dhcp
set up two static DHCP leases:
One formox
with its physical MAC address in the main network and
one formox-guest
with its virtual MAC address in the guest network.