DHCP trouble on client roaming

Hi all,

I got some trouble when my client move by it self from AP1 to AP2 he don't get any IP and end with the magical ip 169.254.x.x ...

if my client iPhone, windows etc... connect to ap1 they got an ip 10.10.x.x
if my client iPhone, windows etc... connect to ap2 they got an ip 10.10.x.x
roaming from ap1 -> ap2 or ap2-> ap1 not working

if i connect to another ssid and switch back I get and ip
if i change my mac address I get and ip

my network is

1 Pfsense box
networks :
VLAN.5 10.5.0.1/24
DHCP enabled on 0.100 to 0.200
VLAN.10 10.10.0.1/16
DHCP enabled on 10.100 to 200.200
VLAN.20 10.20.0.1/24
DHCP enabled on 0.100 to 0.200
VLAN.30 10.30.0.1/24
DHCP enabled on 0.100 to 0.200

ARCHITECTURE :

Pfsense -> zyxel 1900-8 ->netgear GS308EP -> AP1 and AP2

hardware 2x :
Zyxel NWA50AX
MediaTek MT7621 ver:1 eco:4
ramips/mt7621
OpenWrt 24.10.1 r28597-0425664679

config
wifi

config wifi-device 'radio0'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option channel '11'
	option band '2g'
	option cell_density '0'
	option country 'FR'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'SECURE'
	option mode 'ap'
	option ssid 'Helene&Max - Home'
	option encryption 'psk2'
	option key 'xxxxxxxxxx'
	option max_inactivity '15'
	option dtim_period '1'
	option disassoc_low_ack '0'

config wifi-device 'radio1'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0+1'
	option channel '52'
	option band '5g'
	option htmode 'HE80'
	option cell_density '0'
	option country 'FR'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'SECURE'
	option mode 'ap'
	option ssid 'Helene&Max - Home'
	option encryption 'psk2'
	option key 'xxxxxxxxxxxx'
	option dtim_period '3'
	option max_inactivity '15'
	option disassoc_low_ack '0'

config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'ap'
	option ssid 'hmiot2'
	option encryption 'psk-mixed'
	option key 'xxxxxxxxxxxx'
	option network 'IOT'
	option wmm '0'

network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd16:2e2e:b1e8::/48'
	option packet_steering '1'

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

config interface 'lan'
	option device 'br-lan.5'
	option proto 'static'
	option ipaddr '10.5.0.50'
	option netmask '255.255.255.0'
	option gateway '10.5.0.1'
	list dns '10.5.0.1'
	list dns_search 'sys'

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

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

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

config device
	option type 'bridge'
	option name 'BR-SECURE'
	list ports 'br-lan.10'

config interface 'SECURE'
	option proto 'dhcp'
	option device 'BR-SECURE'

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

config device
	option type 'bridge'
	option name 'BR-IOT'
	list ports 'br-lan.30'

config interface 'IOT'
	option proto 'none'
	option device 'BR-IOT'

DHCP

config dnsmasq
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option ignore '1'
	option dynamicdhcp '0'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

I test 2 times only 1dhcp on the network
Any ideas ? i'm lost

You've created nested bridges... this is not necessary and is likely part of the problem.
Delete this:

Edit the SECURE network interface to be unmanaged and to use br-lan.10:

config interface 'SECURE'
	option proto 'none'
	option device 'br-lan.10'

Likewise, delete this:

And modify the IOT network:

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

FWIW, it looks like you don't have anything happening with VLAN 20, but you'll approach it the same way.

Restart and test again. If the config on the other AP is similar, be sure to fix that one, too. You can post them again for review.

@psherman Ok, guru leader is a good title
1 month of try and fail retry solve in 20min :smile:

just to my knowledge why nested BR create this issue ?
some kind of loop ?

When you use a bridge-vlan, it is itself a device definition of a bridge. Therefore, it does not belong within another bridge stanza.

TBH, I'm not exactly sure what happens under the hood, but I do know that nested bridges generally cause problems.

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