What's new

How do I find out why my router has stopped assigning LAN ip addresses ?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Shaggy1

New Around Here
Router and dhcp info:
Code:
Router Firmware: DD-WRT v3.0-r52459 std (05/08/23)

udhcp info:
$ ./sbin/udhcpc
udhcpc: started, v1.36.0

$ ps -w | grep dhcp
1206 root      1248 S    udhcpc -i eth0 -p /var/run/udhcpc.pid -s /tmp/dhcpc -O routes -O msstaticroutes -O staticroutes -x hostna

Hi
I was not entirely sure where to post this query, but I figured someone on this forum may have seen this sort of issue before and have an idea what the cause is.

I have been using a netgear nighthawk r7800 with dd-wrt (Firmware: DD-WRT v3.0-r52459 std (05/08/23)) for a quite a while now, and it has been working fine until recently it suddenly stopped
providing ip addresses and thus there is no way I can connect any more. It appears that if a device already has an ip address it is fine.

The router appears to be running udhcpc on busybox, though I am not 100% sure whether this is specific to the nighthawk hardware, or whether the it's something to do with the dhcp software.

I have tried to look at the logs on connection, but all I have managed to see so far is the dhcp request(s) from device(s) trying to connect. There does not

Has anyone seen a problem like this before ? Or have any idea what might have caused it to stop supplying ip addresses ?

One possibility that occured to me is that the number of address leasses had maxed out - the max is set to 50 and there are nowhere 50 devices in the house, but I guess if the leases are not
properly released they will stack up and eventually run out. However in the logs I have not seen any messages regarding there being no leases left - though I do not know what I should expect
to see if they did run out.

If I look for files on the router related to dhcpc I see the following:
Code:
$ find . -name "*dhcp*" 
./udhcpc.expires
./dhcpc
./var/run/udhcpc.pid

The uducp.expires file is a bit odd - it is dated about the same time the ip addresses stopped being assigned, anyone know what it is ?

If this is not a known thing, does anyone have any hints as to how I should go about debugging this ?
(It's quite possible that if I reset and re-configure the router it'll start working again, but I'd like to try to get to the bottom of the problem so I can prevent it from happening again)
 
I'm not that familiar with DD-WRT but udhcpc is a DHCP client. It's typically used by a router to obtain its WAN IP address from the upstream ISP DHCP server.

I think you are talking about your router's DHCP server which allocates IP addresses to devices on the LAN. This is often a task performed by dnsmasq, which is both a DNS and DHCP server. I don't know whether DD-WRT uses dnsmasq of some other software.

I believe DD-WRT have their own forums so you might get better or faster advice there.
 
For fun, I tried asking ChatGpt 4...
Reply edited to extract the most relevant content. Assuming you have CLI access.

Check DHCP Leases:
Once logged in, you can use specific commands to view the DHCP leases. The common command for this is cat /tmp/dnsmasq.leases or cat /var/lib/misc/dnsmasq.leases.
This command will display the current DHCP leases, including the MAC address, IP address, hostname, and lease expiration time for each connected device.
 
Thank you very much for the replies.

> I think you are talking about your router's DHCP server which allocates IP addresses to devices on the LAN
That is indeed what I am talking about - it's LAN side assignment that is the problem.

Being used to dhcpd as a dhcp server I was simply searching for that and blindly assumed udhcpc was doing both client and server. Knowing it's dnsmasq is a big help - at least I'll be researching the correct tool!. I'll have a look how it works and will hopefully be able to use it to generate dhcp discover messages and see what happens to them in the logs (and tcpdump). Then I can go to dd-wrt forums (or maybe Netgear forums if they exist - still a bit of a worry that it might be related to hardware).

It appears dnsmask.leases is empty, so that probably is not the problem (though I get the impression you can change the leases file(s) so I will look a bit further in to it).

Thank you again for your help.
 
It appears dnsmask.leases is empty, so that probably is not the problem (though I get the impression you can change the leases file(s) so I will look a bit further in to it).

Take a look at your filesystem - if it is full, then dnsmasq cannot write the leases file...

just saying - I don't do DD_WRT, but I'm an OpenWRT dev, and I've seen this many times...
 
> Take a look at your filesystem - if it is fullY, then dnsmasq cannot write the leases file...
doh! You are correct my filesystem is full. Thank you! Should really learn to check the simple stuff first.

Now I've just got to figure out what I can clean up. Maybe I can also use a usb stick to alleviate space issues - not sure.

Thank you again.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top