Guest VLAN stopped working on OpenWrt 25.12

Regarding this topic, yesterday I updated my R4S router from OpenWrt 23.* to 25.12.

However, the guest VLAN stopped working.

Did something change significantly from 23 to 25? Should I pay attention to any specific changes, considering the topic I mentioned above? Has any syntax been changed?

Thanks!

From the 25.12 release notes...

Sysupgrade from 23.05 to 25.12 is not officially supported.

Had you gone via v24 all would have ended well.
If you have original config backup - revert to v23, restore config and upgrade gradually.

1 Like

No, I misspoke. I did a clean installation, from scratch.

2 Likes

Enable vlans on br-lan, then tag untag on ports as you wish?

1 Like
  • Router (NanoPi R4s)

/etc/config/network:


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	list ipaddr '127.0.0.1/8'

config globals 'globals'
	option dhcp_default_duid 'redacted'
	option ula_prefix 'redacted'
	option packet_steering '1'

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

config device
	option name 'eth1'
	option macaddr 'redacted'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	list ipaddr '10.0.0.1/24'
	option ip6assign '60'
	option multipath 'off'

config device
	option name 'eth0'
	option macaddr 'redacted'

config interface 'wan'
	option device 'eth0'
	option proto 'pppoe'
	option username 'redacted'
	option password 'redacted'
	option ipv6 'auto'
	option norelease '1'
	option multipath 'off'
	option peerdns '0'

config interface 'wan6'
	option device 'eth0'
	option proto 'dhcpv6'
	option peerdns '0'

config interface 'modem'
	option proto 'static'
	option device 'eth0'
	option ipaddr '192.168.15.2/24'

config interface 'guest'
	option proto 'static'
	option device 'eth1.10'
	option ipaddr '10.0.10.1/24'

config interface 'iot'
	option proto 'static'
	option device 'eth1.20'
	option ipaddr '10.0.20.1/24'

/etc/config/dhcp:


config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'
	option port '54'
	option noresolv '1'

config dhcp 'lan'
	option interface 'lan'
	option start '10'
	option limit '90'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ra_preference 'medium'
	list dhcp_option '3,10.0.0.1'
	list dhcp_option '6,10.0.0.1'
	list dhcp_option '15,lan'
	list dns 'fd90:2576:cb40::1'

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

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

config dhcp 'guest'
	option interface 'guest'
	option start '10'
	option limit '90'
	option leasetime '12h'
	list dhcp_option '6,94.140.14.15,94.140.15.16'

config dhcp 'iot'
	option interface 'iot'
	option start '10'
	option limit '90'
	option leasetime '12h'
	list dhcp_option '6,94.140.14.15,94.140.15.16'

/etc/config/firewall:

config defaults
	option syn_flood	1
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		DROP
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

config zone
	option name 'guest'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	list network 'guest'

config forwarding
	option src 'guest'
	option dest 'wan'

config rule
	option name 'Guest-DHCP'
	list proto 'udp'
	option src 'guest'
	option dest_port '67-68'
	option target 'ACCEPT'

config zone
	option name 'iot'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	list network 'iot'

config forwarding
	option src 'iot'
	option dest 'wan'

config rule
	option name 'IoT-DHCP'
	list proto 'udp'
	option src 'iot'
	option dest_port '67-68'
	option target 'ACCEPT'
  • AP (UniFi 6 Lite)

/etc/config/network:


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	list ipaddr '127.0.0.1/8'

config globals 'globals'
	option dhcp_default_duid 'redacted'
	option ula_prefix 'redacted'
	option packet_steering '1'

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

config interface 'lan'
	option device 'br-lan.1'
	option proto 'static'
	list ipaddr '10.0.0.3/24'
	option ip6assign '60'
	option gateway '10.0.0.1'
	list dns '10.0.0.1'

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

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

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

config interface 'iot'
	option proto 'none'
	option device 'br-lan.20'

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

/etc/config/wireless:

config wifi-device 'radio0'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '2g'
	option channel '1'
	option htmode 'HT20'
	option country 'BR'
	option cell_density '0'

config wifi-iface 'wifinet1'
	option device 'radio0'
	option mode 'ap'
	option ssid 'IoT'
	option encryption 'psk2'
	option key 'redacted'
	option network 'iot'
	list maclist 'redacted'
	option macfilter 'allow'

What am I doing wrong? :frowning:

Your config looks mostly fine.

I suspect that you need to issue dhcp option 3 to set the gateway. This is because of the changes you've made to dnsmasq (this happens with things like AdGuard, DoH/DoT, etc.).

Add this line to the DHCP servers for iot and guest (use the correct gateway for each, of course):

(the above is quoted from your lan DHCP server... modify accordingly for the other two networks).

Then reboot and test again.

config dhcp 'guest'
        option interface 'guest'
        option start '10'
        option limit '90'
        option leasetime '12h'
        list dhcp_option '3,10.0.10.1'
        list dhcp_option '6,94.140.14.15,94.140.15.16'

config dhcp 'iot'
        option interface 'iot'
        option start '10'
        option limit '90'
        option leasetime '12h'
        list dhcp_option '3,10.0.20.1'
        list dhcp_option '6,94.140.14.15,94.140.15.16'

Like this?

Rebooted… but my IoT device still can’t obtain an IP address. :frowning:

For reference, here are some AP logs:

root@U6Lite:~# logread -f | grep hostapd
Mon Mar  9 15:41:20 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: deauthenticated due to local deauth request
Mon Mar  9 15:41:20 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: authenticated
Mon Mar  9 15:41:20 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: associated (aid 1)
Mon Mar  9 15:41:30 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: deauthenticated due to local deauth request
Mon Mar  9 15:41:30 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: authenticated
Mon Mar  9 15:41:30 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: associated (aid 1)
Mon Mar  9 15:41:39 2026 daemon.info hostapd: phy0-ap0: STA redacted-macaddress IEEE 802.11: deauthenticated due to local deauth request

option htmode 'HT20'

I just removed this line from /etc/config/wireless… and it works again.

Was this expected/documented?

You are supposed to use luci to configure wifi.....