Omnia + MOX AP with Guest LAN [SOLVED]

Hi everybody,
I need some help with regards to my Guest LAN :slight_smile:
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 as guest_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 to guest_turris config interface (VLAN ID (2) has to match the one configured on turris, interface must match the local physical iface eth0 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'
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' to config interface 'guest_turris' since lan0 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 for mox with its physical MAC address in the main network and
    one for mox-guest with its virtual MAC address in the guest network.

With some differences for inspiration

https://doc.turris.cz/doc/en/howto/vlan_settings_omnia

Thanks @JardaB! I saw that, too, but it seems outdated.
My network config does not contain any mention of switch and looks very different over all, e.g.
the config interface 'lan' contains no option ifname 'eth0 eth2' but instead list ifname 'lan0'.

So I wonder which part I’d have to add there…

on https://<your-omnia-ip>/cgi-bin/luci/admin/network/network you have to add a new VLAN (lets say VLAN 2) to the guest interface by:

  1. clicking edit
  2. switch to tab physical settings and make sure Bridge interfaces is checked
  3. for interface add a new custom entry and name it <interface-name>.<vlan-id> eg. lan0.2
  4. also select your guest wifi network

On your LAN network make sure you have the physical interface without vlan or another vlan than the guest network eg. lan0or lan0.3

On your MOX use the same vlan for the physical interfaces

1 Like

Thank you, I got it to work that way!

So in full, my solution is as follows:

On the Mox:

  • configure both lan interface as well as guest_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 to guest_turris config interface (VLAN ID (2) has to match the one configured on turris, interface must match the local physical iface eth0 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'
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' to config interface 'guest_turris' since lan0 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 for mox with its physical MAC address in the main network and
    one for mox-guest with its virtual MAC address in the guest network.
1 Like