You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dhcpcd doesn't require any explicit setup for this.
If you don't specify any authentication then dhcpcd will send the DHO_FORCERENEW_NONCE option by default:
The DHCP server will then send a nonce back in code 90 which dhcpcd will use to authenticate the force renew message from the server.
On DHCP server I see that Reconfigure key has been received. I give the command "Send configuration", in "Reconfigure status" shows "FORCERENEW sent, awaiting response".
So full disclosure, I don't have a DHCP server that supports authentication ..... yet.
I might add it to dhcpsd to help diagnose any issues.
Anyway, it should work, but to verify any issues you'll need to email me a tcpdump of the DHCP transactions at the client side. tcpdump -s0 -w/tmp/dhcpcd.cap -I eth0 port bootpc should do it - adjust the interface to taste.
I need to see the DHCP DISCOVER or REBIND with the server OFFER or ACK to this. Then any FORCERENEW sent as well.
if (state->xid != ntohl(bootp->xid)) {
Seems like this line always rejects forcerenew messages. It only makes sense to check xid for response mesages, not forcerenew.
I think that line is fine. What we probably want to do is change the similar check in dhcp_redirect_dhcp() here:
Because FORCERENEW happens over IP we do want to consider multi-homed interacts where you have different leases for the same subnet on different interfaces and may wish to add a test to check authentication for each interface to find a match that way.
tralalerotralala-orcareloorcala commented on Jul 7, 2026
Looks like MikroTik is sending xid = 0, which seems like a bug on their side. Maybe they're relying on the client to reject it at the auth state, since forcerenew without auth is considered a huge security loophole.
Couple of choices then. File a bug with MikroTik to fix their dhcp server, or soft-accept xid 0, but only for forcerenew so it moves on to the auth step.
@ColinMcInnes thanks.
If restart the dhcpcd service, IP address renewal will not work initially. Forced renewal will only work after the first lease renewal.
@ColinMcInnes thanks. If restart the dhcpcd service, IP address renewal will not work initially. Forced renewal will only work after the first lease renewal.
What about the change in #719? Does the initial renewal fail there too?
I can setup my MikroTik test again, it occurred to me I hadn't checked regular renewal, just whether force renewal was getting through.
@Izorkin I'm unable to replicate your issue with #719. I have Mikrotik set to 5 minute renewals, and I can both trigger force renew from the server, but it also renews all by itself, even the initial renewal. I can even force a renew right after it is initially bound, and it will renew itself after a reconfigure when the renew timer expires.
When you replicate the initial renewal fail, can you please post some logs?
One thing I did notice though is that when it's in BOUND state, all the auth info is printed out with the lease dump (replay, info, protocol, etc). But when it's in RENEW state, it only prints out if it's nonce capable. @rsmarples Is that a bug?
Activity
rsmarples commentedon May 25, 2026
dhcpcd doesn't require any explicit setup for this.
If you don't specify any authentication then dhcpcd will send the
DHO_FORCERENEW_NONCEoption by default:The DHCP server will then send a nonce back in code 90 which dhcpcd will use to authenticate the force renew message from the server.
You should be able to verify this with tcpdump.
Izorkin commentedon May 25, 2026
On DHCP server I see that Reconfigure key has been received. I give the command "Send configuration", in "Reconfigure status" shows "FORCERENEW sent, awaiting response".
rsmarples commentedon May 25, 2026
So full disclosure, I don't have a DHCP server that supports authentication ..... yet.
I might add it to dhcpsd to help diagnose any issues.
Anyway, it should work, but to verify any issues you'll need to email me a tcpdump of the DHCP transactions at the client side.
tcpdump -s0 -w/tmp/dhcpcd.cap -I eth0 port bootpcshould do it - adjust the interface to taste.I need to see the DHCP DISCOVER or REBIND with the server OFFER or ACK to this. Then any FORCERENEW sent as well.
ColinMcInnes commentedon Jun 15, 2026
@Izorkin what vendor of DHCP server are you using?
I have used ISC's older dhcpd and their newer Kea, neither supports forcerenew, so I can't help diagnose this at the moment.
tralalerotralala-orcareloorcala commentedon Jul 6, 2026
dhcpcd/src/dhcp.c
Line 3154 in 243ad84
Seems like this line always rejects forcerenew messages. It only makes sense to check xid for response mesages, not forcerenew.
rsmarples commentedon Jul 7, 2026
I think that line is fine. What we probably want to do is change the similar check in
dhcp_redirect_dhcp()here:dhcpcd/src/dhcp.c
Line 3097 in 243ad84
Because FORCERENEW happens over IP we do want to consider multi-homed interacts where you have different leases for the same subnet on different interfaces and may wish to add a test to check authentication for each interface to find a match that way.
tralalerotralala-orcareloorcala commentedon Jul 7, 2026
Maybe. The point was that for incoming FORCERENEW messages the program shouldn't be checking xid at all.
It seems both checks should be changed, since
dhcp_redirect_dhcpcallsdhcp_handledhcpagain.Izorkin commentedon Jul 22, 2026
Use RouterOS v7.23.
ColinMcInnes commentedon Jul 22, 2026
Thanks
perkelix commentedon Aug 23, 2026
Does the above still apply to 10.5.2?
ColinMcInnes commentedon Sep 1, 2026
Here's a capture from stock 10.5.2 with MikroTik 7.21. dhcp server is setup with RADIUS.
Generic config from the build.
5 packets
Then I sent a reconfigure, server says "FORCERENEW sent, waiting for response"
dump.zip
Does not log the incoming reconfigure.
ColinMcInnes commentedon Sep 1, 2026
Looks like MikroTik is sending xid = 0, which seems like a bug on their side. Maybe they're relying on the client to reject it at the auth state, since forcerenew without auth is considered a huge security loophole.
Couple of choices then. File a bug with MikroTik to fix their dhcp server, or soft-accept xid 0, but only for forcerenew so it moves on to the auth step.
ColinMcInnes commentedon Sep 1, 2026
This lets the renew through
Izorkin commentedon Sep 2, 2026
@ColinMcInnes thanks.
If restart the dhcpcd service, IP address renewal will not work initially. Forced renewal will only work after the first lease renewal.
ColinMcInnes commentedon Sep 2, 2026
What about the change in #719? Does the initial renewal fail there too?
I can setup my MikroTik test again, it occurred to me I hadn't checked regular renewal, just whether force renewal was getting through.
Izorkin commentedon Sep 2, 2026
I tested this patch. It only works occasionally.
ColinMcInnes commentedon Sep 2, 2026
Only the occasional renewal? Interesting. I might need to setup a longer term monitoring.
Did it spit out any logs saying it was rejecting the renewals for any reason?
ColinMcInnes commentedon Sep 7, 2026
@Izorkin I'm unable to replicate your issue with #719. I have Mikrotik set to 5 minute renewals, and I can both trigger force renew from the server, but it also renews all by itself, even the initial renewal. I can even force a renew right after it is initially bound, and it will renew itself after a reconfigure when the renew timer expires.
When you replicate the initial renewal fail, can you please post some logs?
One thing I did notice though is that when it's in BOUND state, all the auth info is printed out with the lease dump (replay, info, protocol, etc). But when it's in RENEW state, it only prints out if it's nonce capable. @rsmarples Is that a bug?