WLAN guest odhcpd + unbound control

Hi, I use OpenWRT dev-snap on a Linksys WRT3200ACM. I configured odhcpd and unbound-control to replace dnsmasq for dhcp and dns, following the guide on the github page of the unbound package. Everything works perfectly. The thing I can't do is set up a WLAN guest. If I try with the guide https://openwrt.org/docs/guide-user/network/wifi/guestwifi/configuration the client that tries to connect to the WLAN guest does not receive an IP address, there is something wrong with DHCP. Can someone help me?

Do you have a guest section in /etc/config/dhcp? Perhaps some
option dhcpv4 'server'
is missing

etc/config/dhcp

config dhcp 'lan'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option interface 'lan'
	option leasetime '12h'
	option ra 'server'
	option ra_management '1'

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

config odhcpd 'odhcpd'
	option maindhcp '1'
	option leasefile '/var/lib/odhcpd/dhcp.leases'
	option leasetrigger '/usr/lib/unbound/odhcpd.sh'

config dhcp 'guest'
	option dhcpv4 'server'
	option interface 'guest'
	option start '100'
	option leasetime '12h'
	option limit '150'

I have added option dhcpv4 'server' but it doesn't work.

dnsmasq disabled / removed?
odhcpd full version installed, not only ip6?

Check also appropriate firewall rules....and if thats all ok try the GUI version ;- )

odhcpd is complete and in fact everything works on the LAN and on the normal WLAN connected. I followed this guide: https://github.com/openwrt/packages/tree/master/net/unbound/files#unbound-and-odhcpd to replace dnsmasq. The problem is only with this guest, which worked with dnsmasq, but with this configuration (odhcpd-unbound) it doesn't work. I also tried the LuCI version of the guide to create the WLAN guest achieving the same bad result.

@moeller0 and @anon45274024, you who are omnipresent, can you give me a hand? Or should I name the magic word?

such would imply being a DHCP issue and not DNS, likely routing | firewall caused. See if increasing the loglevel to more verbose output yields a hint.

config odhcpd 'odhcpd'
	option loglevel '4'
This setting works on my node with guest network
config dhcp 'guest'
	option interface 'guest'
	option start '59'
	option limit '30'
	option leasetime '1h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option dhcpv6_assignall '0'
	option ra_management '1'
	option ra_offlink '1'
	option ra_preference 'low'
1 Like

In the end I solved it. I copied the 'lan' section to the /etc/config/dhcp file for the 'guest' interface. This didn't work on dev snap, but perfectly on 18.06.5. Now it is:

config dhcp 'lan'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option interface 'lan'
        option leasetime '12h'
        option ra 'server'
        option ra_management '1'

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

config odhcpd 'odhcpd'
        option maindhcp '1'
        option leasefile '/var/lib/odhcpd/dhcp.leases'
        option leasetrigger '/usr/lib/unbound/odhcpd.sh'

config dhcp 'guest'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option interface 'guest'
        option leasetime '12h'
        option ra 'server'
        option ra_management '1'
1 Like

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