I've got a little problem with dhcpcd and I don't know if you can help me #194
Replies: 7 comments 8 replies
-
Can you post a log example of this please?
Restart dhcpcd and you then get a nice logged debug you can post here. Also, dhcpcd-8.1.2 is quite old an unsupported by me anyway. Can you test with dhcpcd-9.5.0? |
Beta Was this translation helpful? Give feedback.
-
So I did a sudo apt-get update full-upgrade and the latest bullseye official release is the one above.
and I just thought I'd post it just in case someone else ran into this problem. |
Beta Was this translation helpful? Give feedback.
-
Decided to consolidate my answers: Caught one! At 17:54:57 I rebooted my AP.
Meanwhile, on the server: PS. I set my dhcpcd.service file back to what it was by default in /usr/lib/systemd/system/dhcpcd.service before reboot: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed logs! OK, so you need to install the Now here is the really interesting section
So this is when the renew starts, one how later. This looks perfectly normal and we can see that the replies go out to the server and the server does send a reply back again but the key point is that dhcpcd does not see it and thus it repeats until it tries to rebind and then it finally succeeds. Now, there is a technical difference between RENEW and REBIND. RENEW is always sent and received via the IP network whereas all other DHCP messages are sent and received using the BPF raw socket on the interface. Now this scenario is perfectly fine, and it's expected when the DHCP server is not reachable via IP (common in home routers) and it's just log spam. This is the nature of DHCP sadly (DHCPv6 fixes this). However, your DHCP server is on link, so you should not be seeing this. I need to setup a new Linux VM to test with anyway and I'll see if I can setup a bridge myself and see if there's any underlying issue with dhcpcd running directly on the bridge. |
Beta Was this translation helpful? Give feedback.
-
So I got to here: |
Beta Was this translation helpful? Give feedback.
-
A possible fix, not knowing given the size and complexity of the codebase if this a valid fix. It seems that my server and client are triggering no obvious errors. The code in dhcp.c gets to line 1780 in function |
Beta Was this translation helpful? Give feedback.
-
Any news on the testing of the linux bridge? I've been working on the debugging side myself when I can, but the only results of interest I get are attempts on the slave interfaces. On service startup: Anything you want me to try? |
Beta Was this translation helpful? Give feedback.
-
My struggles are detailed here.
morrownr/USB-WiFi#200 (comment)
I've got a raspberry pi dhcp server doing dynamic dns using isc-dhcpd-4.4.1 and BIND 9.16.37-Debian (Extended Support Version). I've got two raspberry pi clients running dhcpcd 8.1.2 as AP's for wireless clients. The dhcpcd client is bound to the bridge interface for the wifi with a uniquely generated MAC from any of the installed network interfaces. These are the changes I've made to my /etc/dhcpcd.conf
# fallback to static profile on eth0
denyinterfaces eth0 wlx*
interface br0
ipv4
dhcp
ipv4only
noipv4ll
noipv6
But the behavior was there before I made any changes.
These are the changes I've made to my /etc/systemd/system/dhcpcd.service file in order to correct the behavior:
ExecStart=/usr/sbin/dhcpcd --master --waitip=4 --timeout 10 -d
Restart=no
but with no long term success.
What seems to be happening is that during start up, or when there are many clients attempting to renew leases, the client doesn't appear to wait for the dhcp server to answer its requests and generates mass requests which then generates a failure... and then a successful renew.
The result has been syslog's on both my AP's and my router getting filled with dhcp traffic take neither client or server are handling efficiently once the pattern starts.
When I stop and start the dhcpcd daemon, it seems to resolve the behavior on both sides so I'm a bit stuck on how to resolve this without a kludge.
Can you help me understand what may be causing this behavior and how I can fix it?
Beta Was this translation helpful? Give feedback.
All reactions