Device stuck in a DHCP request loop

I'm new to OpenWRT and I'm having an issue where certain devices either will not acknowledge the DHCP offer from the router, or will just loop request, offer, acknowledge. Here's what the system log is showing below. It's a stock install with all packages up to date. Any help would be greatly appreciated.

Tue May 21 20:25:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:57 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:57 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43 ubuntu-fin
Tue May 21 20:25:57 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:57 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43 ubuntu-fin
Tue May 21 20:25:59 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:59 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:59 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:25:59 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:01 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:01 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:01 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:01 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:06 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:06 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:06 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:06 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:14 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:14 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:14 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43
Tue May 21 20:26:14 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.1.11 10:e7:c6:b3:b3:43

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

ubus call system board:

{
        "kernel": "5.15.150",
        "hostname": "OpenWrt",
        "system": "Intel(R) N100",
        "model": "AZW EQ",
        "board_name": "azw-eq",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "x86/64",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"
        }
}

cat /etc/config/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 'xxxxx::/48'

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

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option delegate '0'

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth1'
        option proto 'dhcpv6'
        option disabled '1'
        option reqaddress 'try'
        option reqprefix 'auto'

config interface 'HomeVPN'
        option proto 'wireguard'
        option private_key 'xxxxx'
        option listen_port 'xxxxx'
        list addresses 'xxxxx'

config wireguard_HomeVPN
        option description 'Phone'
        option public_key 'xxxxx'
        option private_key 'xxxxx'
        list allowed_ips 'xxxxx'
        option route_allowed_ips '1'

cat /etc/config/dhcp:

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option cachesize '1000'
        option authoritative '1'
        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 force '1'

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'

config host
        option name 'jesse-desktop'
        option ip '192.168.1.8'
        option leasetime '12h'
        list mac 'xxxxx'

config host
        option name 'idrac-1DR4B42'
        option ip '192.168.1.6'
        option leasetime '12h'
        list mac 'xxxxx'

config host
        list mac 'xxxxx'
        option ip '192.168.1.48'

config host
        option name 'adguard'
        list mac 'xxxxx'
        option ip '192.168.1.4'

config host
        option name 'labuntu'
        list mac 'xxxxx'
        option ip '192.168.1.14'

config host
        option ip '192.168.1.11'
        option leasetime '12h'
        option name 'ubuntu-fin'
        list mac 'xxxxx'

cat /etc/config/firewall:

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'

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

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

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

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'

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'

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'

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 redirect
        option dest 'lan'
        option target 'DNAT'
        option name 'HomeVPN'
        option src 'wan'
        option src_dport '58034'
        option dest_ip '10.10.10.1'
        option dest_port '58034'
        list proto 'udp'

config rule
        option name 'Test'
        option src 'wan'
        option target 'REJECT'
        option dest_port '6000'

config redirect
        option dest 'lan'
        option target 'DNAT'
        option name 'BetterMC'
        option src 'wan'
        option src_dport '60798'
        option dest_ip '192.168.1.14'
        option dest_port '25565'

The address on the WG network should be an RFC1918 address and doesn't need to be redacted. Can you show that to us?

Is this the DHCP reservation that is in question here?

Yes that is the lease causing issues. It is statically set to 192.168.1.11 in OpenWRT, with the host set to acquire an address with dhcp. Removing the static lease shows the same behavior, just with a randomly assigned IP.

config interface 'HomeVPN'
        option proto 'wireguard'
        option private_key 'xxxxx'
        option listen_port '58034'
        list addresses '10.10.10.1/24'

How do you have same MAC address on "ubuntu" and "device"?

1 Like

Not sure how or why, but the issue has resolved itself.

Can you elaborate more on how 2 devices with identical MAC address communicate over ethernet?