Bug #14938
openCan't get "Track interface" working for IPv6 when using DHCP6 "Advanced Configuration"
0%
Description
Hello,
I'm using this WAN setup to get IPv6 prefix (::/56) from my ISP (Orange France):
- General Configuration
-- IPv6 Configuration Type : DHCP6
- DHCP6 Client Configuration
-- Options
--- [X] Advanced Configuration
--- [ ] Configuration Override
-- Request only an IPv6 prefix
--- [X] Only request an IPv6 prefix, do not request an IPv6 address
-- DHCPv6 Prefix Delegation size : 56
-- [X] Do not wait for a RA
-- DHCP6 VLAN Priority
--- [X] Enable dhcp6c VLAN Priority tagging
--- 802.1p priority : IC, 6 (needed by ISP)
- Advanced DHCP6 Client Configuration
-- Send options : comma separated options needed by ISP (raw-option 6, 11, 15 and 16)
-- Identity Association Statement
--- [X] Prefix Delegation
-- Prefix Interface : WAN
Result is a file like this :
interface vtnet0.832 {
send ia-pd 0;
send raw-option 15 *****;
send raw-option 16 *****;
send raw-option 6 *****;
send raw-option 11 *****;
script "/usr/local/etc/dhcp6c_wan_dhcp6withoutra_script.sh";
};
id-assoc pd { };
I then add to a LAN interface the setup:
- General Configuration
-- IPv6 Configuration Type : Track Interface
- Track IPv6 Interface
-- IPv6 Interface : WAN
-- IPv6 Prefix ID : 1 (any chosen from 0 to ff)
Expected: a ::/64 subnet is assigned to the LAN interface with the dhcp6c.conf file updated with the "id-assoc pd" block like :
interface vtnet0.832 { <same as before> };
id-assoc pd {
prefix-interface vtnet1 {
sla-id 1;
sla-len 8;
};
};
Actual behavior: the dhcp6c.conf file is not updated, no IPv6 subnet is assigned to the LAN interface.
Bypass: I actually use the "Configuration Override" option so I have to manually manage the configuration file.
I can see in the interfaces.inc file that, when NOT using "Advanced Configuration", the code look to handle the "trackiflist" so it can add the "prefix-interface" in the dhcp6c.conf file.
Why isn't this handled when using "Advanced Configuration" (function DHCP6_Config_File_Advanced) (so I can add send options for my ISP) ?
Maybe there is something wrong with my setup but after trying many things I can't get into it.
Thanks for reading.
Updated by Kris Phillips about 1 year ago
I have tested this with an identical configuration, minus the advanced DHCPv6 client options, and things work normally. Likely something is malformed in the advanced options being sent to the config for LAN.
Is there any log entries for errors in the dhcp system log on your firewall?
Updated by Damien LE GUILLOU about 1 year ago
Thanks Kris
The answer is simple : in the interfaces.inc file, when "advanced configuration" is checked for WAN, there is no code to handle LAN interfaces with "track interface" enabled.
if ($wancfg['adv_dhcp6_config_file_override']) {
// DHCP6 Config File Override
$dhcp6cconf .= DHCP6_Config_File_Override($wancfg, $wanif);
} elseif ($wancfg['adv_dhcp6_config_advanced']) {
// DHCP6 Config File Advanced
$dhcp6cconf .= DHCP6_Config_File_Advanced($interface, $wancfg, $wanif);
} else {
// DHCP6 Config File Basic
https://github.com/pfsense/pfsense/blob/056e50ee7b3bd252c971724d7d06287e74a145ea/src/etc/inc/interfaces.inc#L4790-L4797
Maybe it's missing or it's not there for a good reason ?