Use and persist dhclient rapid commit option
-
Hi,
my ISP is using the rapid commit option as per RFC 4039 for his customers (or better to say, DHCP clients).
What i thought about:
Adding the
option rapid-commit;
to/var/etc/dhclient_wan.conf
interface "hn0" { supersede interface-mtu 0; timeout 60; retry 15; select-timeout 0; initial-interval 1; send dhcp-client-identifier "`blabla"; send host-name "blabla"; option rapid-commit; script "/usr/local/sbin/pfSense-dhclient-script"; }
The problem is, that this gets overriden (even before a reboot, during a DHCP renewal).
Is there an alternative how to do that?
Otherwise i cannot get a lease that can be renewed.Thanks!
-
Ok i was wrong the option should be rather:
request rapid-commit;
But pfSense dhclient package does not seem to support this.
/var/etc/dhclient_wan.conf line 11: rapid-commit: unexpected option name.
This is very bad news for me because now I'm stuck with my hacky solution (aka having a Linux based VM in addition to my pfSense for IPv4).
-
@Woodsomeister said in Use and persist dhclient rapid commit option:
Is there an alternative how to do that?
You can supply your own config file in the GUI, in the 'DHCP6 Client Configuration', 'Configuration Override'.
Ok i was wrong the option should be rather: request rapid-commit;
Are you sure that you have to set
request
? According to the docmentation you cansend rapid-commit
: FreeBSD dhcp6c man page -
@patient0 It's a DHCPv4 option (i know rarely used in the real world but my ISP seems to feel "special").
See the RFC i linked in my first post.
-
@Woodsomeister said in Use and persist dhclient rapid commit option:
It's a DHCPv4 option
I apologize, I read not careful enough. The RFC is only 20 year old, not time to implement :)
Since you can provide your custom config file, wouldn't you be able to set any option code you like. See FreeBSD: dhcp-options which is referenced in FreeBSD: dhclient.conf
Options which are not listed by name may be defined by the name option-nnn, where nnn is the decimal number of the option code. ... For example: option option-133 "my-option-133-text"; option option-129 1:54:c9:2b:47;
And the option code would be 80 for rapid-commit, according to the RFC.
-
No worries! It was also very confusing for me, after I read about this for the first time since it's commonly used and known for IPv6 but has almost no usage in IPv4.
Adding the option is not what I need. The DHCP Server of my ISP expects just that the dhclient is behaving as defined per RFC 4039. So I try to instruct the dhclient to do so. But the dhclient seems to be incapable of doing the short exchange.
-
@Woodsomeister said in Use and persist dhclient rapid commit option:
Adding the option is not what I need
You are again right, you would need dhclient to respond appropriated according to the RFC4039.
Checking the source code, dhcpcd 10.2.0 can handle it (no configuration needed) and it's compiled in in pfSense. Would be interesting to see if you get an IP when manually running it. Not very practical though.
Even less sure if you could script it by setting WAN IPv4 to None or Static as a placeholder and run whatever necessary yourself. Or set it to DHCP and use a dhclient hook to run dhcpcd. Maybe Sir @stephenw10 has done something similar in the past?Maybe a feature request to Netgate would help: to be able to choose which DHCP client app to use, dhclient or dhcpcd.
For IPv6 dhcpcd is already used.Btw: ISC DHCP and ISC KEA don't support rapid-commit but dnsmasq does. Gave a it go and dhcpcd would work, running manually
dhcpcd -4B <WAN interface> --option=rapid_commit
on the pfSense (client) and tcpdump on the dnsmasq server shows DHCPDISOVER & DHCPACK. Running the standarddhcpcd -4B <WAN interface> --nooption=rapid_commit
shows the standard 4 packages sequence.