Help DHCP config

I config dhcp.lan.start to 3 and enable "Allocate IP sequentially", but my pc get ip address 192.168.2.100 (gateway 192.168.2.1) instead of 192.168.2.3
What am I doing wrong?

Perform DHCP release and renew on the PC.

If the problem persists, post the output from OpenWrt:

uci show dhcp
1 Like
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
dhcp.@dnsmasq[0].sequential_ip='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.start='3'
dhcp.lan.ra_management='1'
dhcp.lan.limit='250'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
1 Like

you're missing

config dhcp 'lan'
        option start '100'

I'm guessing (haven't checked the wiki) the 100 is a default value if that option is missing, you may want to explicitly set it to a different value.

PS. The fact that you edited your earlier messages and added the option which wasn't there originally to then contradict what I said makes me reluctant to help further.

Your old DHCP lease should have already expired, and the new one should get the proper IP.
Restart the router and reconnect the clients if the problem persists.

1 Like

i didn't miss: dhcp.lan.start='3'

1)я несколько раз перезапустил роутер, после перезагрузки он выдает опять тот же ip
2)срок истек уже много раз

1 Like