Dhcp to central router and vlan tagging

Greetings, I am new to openwrt. I setup my google wifi with openwrt and I am trying to get a couple basic things working. vlan tagging on lan interface (which appears to be working fine) and dhcp from my local router (mikrotik). My router has 4 vlans (1 as native, 2-4 as tagged) and running dhcp for all 4 networks. I tested all of this via a juniper router plugging into the same port the google wifi connects to and I receive correct IP address from the mikrotik dhcp server depending on what vlan I put my test host in. I am using version 23.05.2. I don't really want to use the google unit for routing/firewall etc so not sure if there is another setup/bridged only mode that I need to do. I will use my central router for everything else. I also need to do 802.11s but will tackle that another day.

When I join wifi network (e.g. IOT) I get IP address from the default lan network (192.168.86.x), not from the correct vlan4 network (192.168.89.x). Below is my config. I removed vlans 2-3 just to focus on 4. I put an IP address on the IOT vlan interface and it is reachable from my router.

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan'
        option vlan_filtering '0'

config device
        option name 'lan'
        option macaddr '70:3a:cb:b0:e9:a0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.86.2'
        option netmask '255.255.255.0'
        option ip6assign '60'

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '4'
        list ports 'lan:t'

config interface 'IOT'
        option proto 'static'
        option device 'br-lan.4'
        option ipaddr '192.168.89.2'
        option netmask '255.255.255.0'
        option gateway '192.168.89.1'

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/a000000.wifi'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option cell_density '0'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'iot'
        option encryption 'none'
        option network 'IOT'
        option wds '1'

let me understand this is the main router and the vlans are managed by it?

Is it always him who manages DHCP?

if the answers to my questions are yes then you want to make your "google wifi with openwrt" a Dump-AP

https://openwrt.org/docs/guide-user/network/wifi/dumbap

1 Like

Yeah thats what I am looking for. I think my setup is already close to this (the doc doesn't fully go over vlan tagging) but I will do the other steps (disable fw etc) just to be sure.

remove the last line in the section below... that may be causing the problem.

You need to edit the lan interface to use br-lan.1 (instead of br-lan). It will look like this:

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option ipaddr '192.168.86.2'
        option netmask '255.255.255.0'
        option ip6assign '60'

The Google AP doesn't need an address on the IOT network... make it unmanaged like this:

config interface 'IOT'
        option proto 'none'
        option device 'br-lan.4'

Remove the WDS line from the SSID configuration for the iot network:

Then reboot and try again.

1 Like

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