Bug #4436
closed
dhcp6c requests prefix delegation when no tracking interfaces are configured
Added by Paul K almost 10 years ago.
Updated over 9 years ago.
Description
When interface with DHCPv6 has 'DHCPv6 Prefix Delegation size' set and no interfaces are setup to track it, pfSense generates dhcp6c config file as follows:
interface em0 {
send ia-pd 0; # request prefix delegation
request domain-name-servers;
request domain-name;
script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please
};
id-assoc pd 0 {
};
This makes dhcp6c send out request to the server requesting prefix delegation without actually having a need for it.
It does not really cause any real issues that I know of, but it does create unnecessary distraction when troubleshooting things.
Config file for this scenario should look like this:
interface em0 {
request domain-name-servers;
request domain-name;
script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please
};
- Status changed from New to Confirmed
- Assignee set to Chris Buechler
- Priority changed from Low to Normal
- Target version set to 2.2.1
this can be worse than it might seem at a glance, as if you don't get a PD assignment, it'll keep retrying over and over and over. makes for messy logs at a minimum.
Thanks for the pull request, I'll review and get that merged.
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Tested on v2.2 branch. Config file is generated correctly now.
- Status changed from Feedback to Resolved
thanks for the confirmation, Paul. I confirmed as well, fixed.
But it broke the work of native DHCPv6. Unable to query ia-pd without using the advanced configuration. In the advanced configuration can not enter "0" in the "id-assoc na ID" and "id-assoc pd ID"
I tested this again today and it is working fine for me.
Michael, can you be a bit more specific about your setup. Did your setup work fine, you did git sync and it stopped working? By "native DHCPv6" I assume you mean non-advanced options that are displayed by default. This change did not affect advanced options in any way. Once you specify advanced options it overrides whatever was configured in non-advanced options. The fact that "id-assoc na ID" does not accept 0 is probably caused by empty() function used to validate input. You might want to report that as a separate issue.
IPv6 type DHCP6. I hope to get
interface em0 {
send ia-na 1;
send ia-pd 1;
request domain-name-servers;
script "/var/etc/dhcp6c_wan_script.sh";
};
id-assoc na 1 { };
id-assoc pd 1 { };
as it was before. The current logic in php does not allow it in non-advanced options.
And yet it would be nice to add a field to explicitly specify DUID. It was there, but has not been completed yet.
As to the "0" - did not find it worthy of a separate ticket.
Comments for understanding: I do not have "track" interfaces.
Michael, in your example you are requesting prefix-delegation from DHCP6 server, but it does not get used anywhere, because you do not have track interfaces. It simply gets discarded by dhcp6c. So the question is what are you trying to accomplish here. Why even request PD if it does not get used? Thanks
The prefix is reserved for me. I have to ask for delegation. Other interfaces are configured statically. Firstly, I manage the distribution of address. Secondly, I do not want to lose internal IPv6 in case of problems with the delegation.
Michael's mentioned situation is potential fallout from this, but a rare situation. The vast majority of situations are better-managed now, and there's a workaround for the odd case of requesting PD but not using track interface.
I do not understand why so complicate things and make the logic is not transparent and inflexible. Simply put a few checkboxes for standard queries (NA, PD, DNS, etc.), field DUID (not to torment yourself and ISP, each time you change hardware or reinstall software). But the field "DHCPv6 Prefix Delegation size" is present, I do not know why, because its value is returned to the request PD.
In my situation, I had to watch php to understand why change the settings do not affect the result.
Also available in: Atom
PDF