supersede dhcp-server-identifier 255.255.255.255 not working
-
Hi,
so I finally figured out my "WAN IP changes too often" problem. It appears as if my ISP also chooses to ignore unicast DHCP requests. Means that once a lease is gone, pfsense dhclient will do a broadcast request for an IP which will be answered. After 1/2 lease time dhclient chooses to send DHCP requests via unicast which are ignored by the ISP. Lease eventually times out, a new broadcast is sent, this works etc. And most of the times this will result in the same IP but not always.
So I searched the forum and this seems to be a common problem. Putting "supersede dhcp-server-identifier 255.255.255.255" in the options is the intended fix as it will override the DHCP server identifier in the reply and force dhclient to always send broadcasts. In 2021 this was not working as the dhclient version in pfsense did not support this. Redmine: https://redmine.pfsense.org/issues/7416 suggests it is working now and other posts indicate this as well. So I tried it... And it does not work on 23.05.1. The dhclient config generated by the GUI is:
[23.05.1-RELEASE][root@pfSenseHills.koopmann.local]/var/etc: cat /var/etc/dhclient_wan.conf interface "igc0.132" { supersede interface-mtu 0; # DHCP Protocol Timing Values timeout 60; retry 300; select-timeout 0; reboot 10; backoff-cutoff 120; initial-interval 10; # DHCP Protocol Options supersede dhcp-server-identifier 255.255.255.255; supersede dhcp-lease-time 120; script "/usr/local/sbin/pfSense-dhclient-script"; }
Which looks correct. The ISP gives me bad 30 minute lease times and after 15 minutes pfsense dhclient starts... unicast requests instead of the intended broadcasts. In case you are wondering: The dhcp-lease-time 120 was intended to make my debugging life easier but is also ignored.
Any ideas on this?
-
I believe I found the problem....
For whatever reason the /usr/local/sbin pfSense-dhclient-script was more or less empty. This lead to other parsing problems I suppose or at least messed dhclient up. I copied it from another 23.05.1 box and it appears to be running now with both options being honored....
-
@j-koopmann so this has fixed your issue, and now your IP renews correctly?
-
@johnpoz Indeed it does. I still believe the DHCP configure on the server side is crap but hey.... if switching to broadcast works it is fine with me!
-
@j-koopmann i would concur, 30 minutes for one is a low lease time.. And per dhcp specs unicast for renew is what should be used. A rebind would be broadcast.
-