KEA DHCP6 doesn't start/get a prefix at boot
-
@Gertjan You are right, I think the problem comes from the dhcp6 client which doesn't start during boot. You don't see it in the logs because there aren't any logs of it. It only comes up when I reload the interface.
Also yes im living in France, it requires to put raw options and a specific config for Orange ISP :
-
@Superpaul209 said in KEA DHCP6 doesn't start/get a prefix at boot:
Also yes im living in France, it requires to put raw options and a specific config for Orange ISP :
Ok, yes, I've seen the DHCP Option generators.
Strange that the dhcp6c doesn't start at boot.
"It should".My pfSense 23.09.1 and 24.03-Beta since a week or so, is playing nicely, but I'm still using the LB6 as the upstream ISP router. I gets the "one" (just one /64) prefix out of the box.
I didn't find a reason to reboot my 4100, I leave it running all the time. I can't compain about my fibre connection, it can stay up for weeks if not months.
My dhcp6c wakes up every 5 minutes or so, and does 'its thing' :
Btw : I'm not using the kea stuff right now, as I need to use DHCP options on the LAN=server side (some captive portal testing is going on, as I use my hotel clients as guinea pigs ^^ )
-
@Gertjan or anyone else
Is there a command to reinstall the dhcp6c package (only the client) to the default one in PfSense Repository ? It could potentially be a corruption issue or an update issue on my package which makes it no work at boot.
I don't find other reasons why it doesnt start at boot. There aren't debug logs.
-
If the file ( /usr/local/sbin/dhcp6c ), an executable, was corrupted, then you would see for sure logs mentioning this.
Because I have this :
Check :
Again : I'm using ISC, not KEA !
-
My router is up since this morning, there is only the DHCP6 KEA backend running and no dhcp6c
79657 root 20 0 39M 22M select 0 0:02 0,00% /usr/local/sbin/kea-dhcp6 -c /usr/local/etc/kea/kea-dhcp6.conf{kea-dhcp6}
Then when I reload the WAN interface, it shows up.
25699 root 55 0 13M 2544K select 1 0:00 0,00% /usr/local/sbin/dhcp6c -D -n -c /var/etc/dhcp6c.conf -p /var/run/dhcp6c.pid mvneta0.832
-
-
@Gertjan I think the issue occurs because im using a "custom" dhcp6c package but this shouldn't be a problem for the client boot.
Its a compiled dhcp6c package to have new features like raw-options compatibility and ISP requirements. Its used in the OpnSense project.
There is a redmine ticket opened since 6 years with no answer : https://redmine.pfsense.org/issues/8173
I had injected the new file into /usr/local/sbin and replaced it with the old version.
Anyway, the custom package is working so thats not the issue but its more about the automatic start at the boot. Is there a file/parameter which automatically starts packages like other linux dists ?
-
Here : /usr/local/etc/rc.d/dhcp6c
You are using 23.09.1 : what is the kernel version ? 14 ?
What is the kernel version against which your dhcp6c is compiled ? etc etc . -
The latest pfSense version uses the kernel 14 of FreeBSD.
About the compiled "custom" executable :
/usr/local/sbin/dhcp6c: ELF 64-bit LSB shared object, ARM aarch64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.1, FreeBSD-style, strippedAnd here is the content of the file /usr/local/etc/rc.d/dhcp6c
#!/bin/sh # PROVIDE: dhcp6c # REQUIRE: netif # BEFORE: NETWORKING # KEYWORD: shutdown # Add the following lines to # /etc/rc.conf.d/dhcp6c /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # dhcp6c_enable (bool): Set to NO by default. # Set it to YES to enable dhcp6c. # dhcp6c_config (path): Set to /usr/local/etc/dhcp6c.conf # by default. # dhcp6c_dhcp6cctlkey (path): Set to /usr/local/etc/dhcp6cctlkey # by default. # dhcp6c_pidfile (path): Set to /var/run/dhcp6c.pid # by default. # dhcp6c_interfaces (NIC list): Not defined by default. # Set it to the network interface(s) where dhcp6c should work on. # dhcp6c_flags (additional arguments): Not defined by default. # . /etc/rc.subr name="dhcp6c" rcvar=dhcp6c_enable command="/usr/local/sbin/${name}" start_precmd="${name}_precmd" load_rc_config $name : ${dhcp6c_enable="NO"} : ${dhcp6c_config="/usr/local/etc/${name}.conf"} : ${dhcp6c_dhcp6cctlkey="/usr/local/etc/dhcp6cctlkey"} : ${dhcp6c_pidfile="/var/run/${name}.pid"} required_files="${dhcp6c_config}" pidfile="${dhcp6c_pidfile}" command_args="-c ${dhcp6c_config} -p ${dhcp6c_pidfile} ${dhcp6c_interfaces}" dhcp6c_precmd() { if [ -z ${dhcp6c_interfaces} ]; then warn "dhcp6c_interfaces is not set." return 1 fi if [ ! -s ${dhcp6c_dhcp6cctlkey} ]; then echo "Creating ${dhcp6c_dhcp6cctlkey}" (umask 077 ; openssl rand -base64 48 > ${dhcp6c_dhcp6cctlkey}) fi } run_rc_command "$1"
-
Isn't that asking for troubles, using a kernel 12.1 binary 'dhcp6c' on a version 14 system ??
/usr/local/etc/rc.d/dhcp6c : I've the same file, I guess. I left 23.09.1 several weeks ago, using 24.03-RC now.
-
I will need to compile it again on the new kernel version 14 or 15. I don't that would change anything but I guess I will have to try.
About the dhcp6c config /usr/local/etc/rc.d/dhcp6c, is it NO by default for you ?
: ${dhcp6c_enable="NO"}
Is it the automatic start at boot or something else ?
-
@Superpaul209 said in KEA DHCP6 doesn't start/get a prefix at boot:
dhcp6c_enable
I don't think this 'auto start' script is used by pfSense.
It's there s it is part of the standard framework when the dhcp6c package was included into pfSense.
Example : it locates the config (dhcp6c.conf) in the default FreeBSD location, not the one used by pfSense.The dhcp6c process is fully controlled from /etc/invc/interfaces.inc :
See here, where it is started : https://github.com/pfsense/pfsense/blob/88670c6c167418e7d12b010c0ce8b7d06c2b757f/src/etc/inc/interfaces.inc#L3848 line 3864 with the correct paths (in /var/...).
-
@Gertjan Hello again, im back after 15 days because I needed to recompile everything with the latest FreeBSD kernel. So everything is now compatible for FreeBSD 15.0 (which is the kernel of pfSense).
The new file reports as :
/usr/local/sbin/dhcp6c: ELF 64-bit LSB executable, ARM aarch64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 15.0 (1500012), FreeBSD-style, stripped
You can see how I have done the steps to compile it here : https://github.com/Superpaul209/dhcp6c-armv7
Everything is up to date and you can find the binaries on this GitHub for arm64 and armv7 (for those who would like them if they are living in France).The installation was successful on each pfSense, after a reboot Im now having an IPv6 ! The problem was therefore one of compatibility with the kernel version which was too old.
Thanks for your ideas and your help, it has solved my issue