DHCP client unable to get lease from cable provider [solved]
-
@gertjan 4 years ago,
https://redmine.pfsense.org/issues/7416
But I can find the same thing beyond 4 years and it looks like its still not implemented... if anyone is willing to supply me a binary build for dhclient in pfSense FreeBSD 11.3-STABLE with this patch I'm willing to pay for it.In fact what annoys me the most is you have full control on the LAN side but just about nothing on the WAN side for dhcp, a simple --dhcp-server-ignore xyz or --dhcp-server-replace xyz,abc(regex) would give anyone control over what an ISP is doing, a clear google shows ISP's don't always know what their doing and without 3th line access as a customer your f***d.
-
@itpp21 said in DHCP client unable to get lease from cable provider [solved]:
https://redmine.pfsense.org/issues/7416
The last line might contain a solution.
Check if the used FreeBSD version is the same.
Install the other one.
Retrieve the dhpc client binairies
Copy them over to pfSense......I can't believe I just wrote that :(
Btw : do not forget the first and best option : Chose an ISP on what they offer.
As far as I know, we are not in some country where the government decides what ISP you should use. A couple of decades ago we earned the right to chose the product we like best.@itpp21 said in DHCP client unable to get lease from cable provider [solved]:
In fact what annoys me the most is you have full control on the LAN side but just about nothing on the WAN side for dhcp, a simple --dhcp-server-ignore xyz or --dhcp-server-replace xyz,abc(regex) would give anyone control over what an ISP is doing, a clear google shows ISP's don't always know what their doing and without 3th line access as a customer your f***d.
Yep, if the admin of the server f*cks up, the client has no choice but leaving.
That goes for every server-client concept. -
I can't believe I just wrote that :(
Hahahaha, well I got and placed dhclient_opnsense_19.1, I'll test it tomorrow to see what happens. I've grown up with hex-editing or swapping binaries to solve issues (pre 1980).
Btw : do not forget the first and best option : Chose an ISP on what they offer.
Not much to choose here, ziggo ain't bad (business user) I just don't want to be stuck with a problem I could solve, regardless if this is their mistake I want full control.
Yep, if the admin of the server f*cks up, the client has no choice but leaving.
That goes for every server-client concept.Unless we give users more control, I am still open for anyone writing better control code for dhclient for a fee as long as I get the binary.
-
Well I've done it,
Fri Mar 12 08:57:31 2021;192.168.238.1; <30>Mar 12 08:57:31 dhclient_opnsense_19.1[66714]: DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 7
Fri Mar 12 08:57:31 2021;192.168.238.1; <30>Mar 12 08:57:31 dhclient_opnsense_19.1[66714]: DHCPOFFER from 212.142.*
Fri Mar 12 08:57:33 2021;192.168.238.1; <30>Mar 12 08:57:33 dhclient_opnsense_19.1[66714]: DHCPREQUEST on igb0 to 255.255.255.255 port 67
Fri Mar 12 08:57:33 2021;192.168.238.1; <30>Mar 12 08:57:33 dhclient_opnsense_19.1[66714]: DHCPACK from 212.142.*
Fri Mar 12 08:57:33 2021;192.168.238.1; <13>Mar 12 08:57:33 dhclient: New IP Address (igb0): 62.194.*
Fri Mar 12 08:57:33 2021;192.168.238.1; <13>Mar 12 08:57:33 dhclient: New Subnet Mask (igb0): 255.255.255.0
Fri Mar 12 08:57:33 2021;192.168.238.1; <13>Mar 12 08:57:33 dhclient: New Broadcast Address (igb0): 255.255.255.255
Fri Mar 12 08:57:33 2021;192.168.238.1; <13>Mar 12 08:57:33 dhclient: New Routers (igb0): 62.194.*
Fri Mar 12 08:57:33 2021;192.168.238.1; <30>Mar 12 08:57:33 dhclient_opnsense_19.1[66714]: bound to 62.194.* -- renewal in 101534 seconds.This works, so killed the processes, swapped the binaries and restarted the WAN interface, so far it works, lets see in the next days if a renew works as it should respecting the supersede values or not (atm. hardcoded in /etc/inc/interfaces.inc).
Fri Mar 12 09:00:30 2021;192.168.238.1; <13>Mar 12 09:00:30 dhclient: PREINIT
Fri Mar 12 09:00:30 2021;192.168.238.1; <30>Mar 12 09:00:30 dhclient[63500]: DHCPREQUEST on igb0 to 255.255.255.255 port 67
Fri Mar 12 09:00:30 2021;192.168.238.1; <30>Mar 12 09:00:30 dhclient[63500]: DHCPACK from 212.142.*
Fri Mar 12 09:00:30 2021;192.168.238.1; <13>Mar 12 09:00:30 dhclient: REBOOT
Fri Mar 12 09:00:30 2021;192.168.238.1; <13>Mar 12 09:00:30 dhclient: Starting add_new_address()
.......
[2.4.5-RELEASE][xxx@xxx.localdomain]/root: ps -aux|grep dhclient
root 63952 0.0 0.1 533620 2872 - Is 09:00 0:00.00 dhclient: igb0 [priv] (dhclient)
_dhcp 67622 0.0 0.1 533620 2984 - SCs 09:00 0:00.01 dhclient: igb0 (dhclient)
root 45844 0.0 0.1 6560 2336 0 S+ 09:17 0:00.00 grep dhclient
.......
Lets also see if it crashes via its timestamp.And yep, /var/db/dhclient.leases.igb0 still contains wrong info.
-
I wasn't expecting a renew this soon but hey its all ok :)
Sat Mar 13 13:11:16 2021;192.168.238.1; <30>Mar 13 13:11:16 dhclient[67622]: DHCPREQUEST on igb0 to 255.255.255.255 port 67
Sat Mar 13 13:11:16 2021;192.168.238.1; <30>Mar 13 13:11:16 dhclient[67622]: DHCPACK from 212.142.*
Sat Mar 13 13:11:16 2021;192.168.238.1; <13>Mar 13 13:11:16 dhclient: RENEW
Sat Mar 13 13:11:16 2021;192.168.238.1; <13>Mar 13 13:11:16 dhclient: Creating resolv.conf
Sat Mar 13 13:11:16 2021;192.168.238.1; <30>Mar 13 13:11:16 dhclient[67622]: bound to 62.194.* -- renewal in 129600 seconds.[2.4.5-RELEASE][xxxx@xxxx.localdomain]/sbin: ps -aux | grep dhclient
root 63952 0.0 0.1 533620 2872 - Is Fri09 0:00.00 dhclient: igb0 [priv] (dhclient)
_dhcp 67622 0.0 0.1 533620 2984 - SCs Fri09 0:00.15 dhclient: igb0 (dhclient)
root 31399 0.0 0.1 6560 2336 0 S+ 13:39 0:00.00 grep dhclientNo dhclient crashes.
[2.4.5-RELEASE][xxxx@xxxx.localdomain]/sbin: procstat -f 67622
PID COMM FD T V FLAGS REF OFFSET PRO NAME
67622 dhclient text v r r------- - - - /sbin/dhclient
67622 dhclient cwd v d r------- - - - /var/empty
67622 dhclient root v d r------- - - - /var/empty
67622 dhclient jail v d r------- - - - /var/empty
67622 dhclient 0 v c rw------ 6 0 - /dev/null
67622 dhclient 1 v c rw------ 6 0 - /dev/null
67622 dhclient 2 v c rw------ 6 0 - /dev/null
67622 dhclient 3 s - rw------ 2 0 UDD /var/run/logpriv
67622 dhclient 4 v r -w---n-l 2 0 - /var/run/dhclient.igb0.pid
67622 dhclient 6 v c r------- 1 2348 - /dev/bpf
67622 dhclient 7 s - rw------ 1 0 ?
67622 dhclient 8 v r -w------ 1 1893 - /var/db/dhclient.leases.igb0
67622 dhclient 10 p - rw------ 1 0 - -
67622 dhclient 12 s - rw------ 5 0 UDS /var/run/php-fpm.socket
67622 dhclient 13 s - rw------ 17 0 UDS /var/run/php-fpm.socket
67622 dhclient 14 v c r------- 6 460 - /dev/randomProof the new binary is running from sbin
/var/db/dhclient.leases.igb0 still contains the wrong info but it surely looks like the supersede is honored !
Lets give a few more days, then remove the hardcoded values and use the advanced options in the GUI.Attached the binary I am using, feel free to scan (I've done this with >100 engines) and try it.
dhclient_opnsense_19.1.zip -
3 successful updates now using supersede hardcoded.
Restored interfaces.inc and entered the hardcoded values+supersede in the advanced settings WAN interface, restart WAN.
Give it 3 more days, if this also works we have a winner. -
So far 2 renewals without issues, all respecting supersede (and other) setting via GUI config, Ymmv. but I will consider this a solution to a broken pfsense dhclient.
-
So it seems that dhclient from OPNSense fixes the problem, so, can someone give a little receipe of what had to be done to solve this issue?
Is it just coping the binary provided here, dhclient_opnsense_19.1 over /sbin/dhclient?
-
@pablot said in DHCP client unable to get lease from cable provider [solved]:
So it seems that dhclient from OPNSense fixes the problem, so, can someone give a little receipe of what had to be done to solve this issue?
Is it just coping the binary provided here, dhclient_opnsense_19.1 over /sbin/dhclient?
You can find the list of changes they made to
dhclient
here on GitHub: https://github.com/opnsense/src/commits/master/sbin/dhclient. You would need to compile your own copy of the source on a separate FreeBSD 12.2-STABLE machine.These guys, like the Netgate team, eventually submit fixes back upstream into FreeBSD. From there they trickle out to the various projects that are based on FreeBSD. But that can sometimes take a bit of time, and also it may be that a particular fix makes it into one FreeBSD version and not another. For example, it may go into 13-CURRENT but not into 12.2-STABLE.
-
@pablot said in DHCP client unable to get lease from cable provider [solved]:
So it seems that dhclient from OPNSense fixes the problem, so, can someone give a little receipe of what had to be done to solve this issue?
Is it just coping the binary provided here, dhclient_opnsense_19.1 over /sbin/dhclient?
Yep, thats all it took. Still running it and still zero problems.
-
@itpp21 unfortunately it's not working for me. Perhaps I have another problem...
-
This is for 2.4.5-p1 and also requires this additional GUI setting "supersede dhcp-server-identifier 255.255.255.255" which the original binary ignores.
-
@itpp21 said in DHCP client unable to get lease from cable provider [solved]:
supersede dhcp-server-identifier 255.255.255.255
Where should I put that in the GUI?
-
@pablot said in DHCP client unable to get lease from cable provider [solved]:
Where should I put that in the GUI?
As said implicitly, above :
@itpp21 said in DHCP client unable to get lease from cable provider [solved]:
When you set for example "supersede dhcp-server-identifier 255.255.255.255" either in the config or hardcoded, the running version of dhclient does no ....
Typically, you seleclt :
and you enter the path to the file, a file that is created by you with all the options you want.
It has to be syntax correct of course.
And, as you already understood, should use the options that the binary 'dhclient' understands - is aware of. -
Step1
Step2
Step3
This only works with the client binary you can find in this thread.
-
@itpp21 Great!!!, thank you very much!!!!