Rapid_Commit in dhcpcd Results in Non-Functional Connection (was: No internet after reboot)

LOL, did some reading and it turns out I was misunderstanding how dhcpcd works.
According to docs dhcpcd - ArchWiki
The dhcpcd does the request then wait so the timeout is how long it will wait for a response and not a delay before requesting. Technically it can wait indefinitely ( with 0 )
The problem is that in current implementation the boot on the router will stop for the wait, there is way around that described in docs but not implemented in ipfire.
This kind of makes my retry patch useless. However the exit is a good fix but not necessary either. Did some tries and 5 minutes works in same way as 10 seconds.

Back to my issues, I made some progress. ifconfig red0 down then ifconfig red0 up fix my issue so I can easy make some script to automate this.
However on bad state:

[root@ipfire ~]# cat /var/ipfire/dhcpc/dhcpcd-red0.info
broadcast_address=205.250.127.255
dhcp_lease_time=14400
dhcp_message_type=2
dhcp_server_identifier=10.27.191.10
domain_name_servers='75.153.171.67 75.153.171.116'
host_name=ipfire.local
ip_address=205.250.124.237
network_number=205.250.124.0
rapid_commit=
routers=205.250.124.1
subnet_cidr=22
subnet_mask=255.255.252.0

And in good state

[root@ipfire ~]# cat /var/ipfire/dhcpc/dhcpcd-red0.info
broadcast_address=205.250.127.255
dhcp_lease_time=14400
dhcp_message_type=5
dhcp_server_identifier=10.27.191.10
domain_name_servers='75.153.171.67 75.153.171.116'
host_name=ipfire.local
ip_address=205.250.124.237
network_number=205.250.124.0
routers=205.250.124.1
subnet_cidr=22
subnet_mask=255.255.252.0

The only difference is Message Type and rapid_commit
Based on other post I said to try to remove the rapid_commit option and give it a try.
It turns out that this fixed my issue. Really weird.
The good:

  • no patches or scripts are necessary,

The I’d like to:

  • fix boot_log to log to /var/log/messages
  • fix library to exit consistent on error and red script to proper log errors.

I will try to make a patch for this.

4 Likes