Debugging DHCPv6-PD

I found a clue in the source of dhcpcd5 from 2018, when this error message is removed:

I am using the latest dhcpcd5 from Ubuntu 16.04, which is from before this commit. I will try a more modern version of dhcpcd5 with IANA:1 for both IA_NA and IA_PD and see what happens.

UPDATE: solved

IA_PD works fine with dhcpcd5 version 7.0.8 with IAID:1 for both request types.

The server replies unless I specifically request option 67 (prefix exclude). When requesting this option with dhcpcd5 , the server does not send a reply, whereas with odhcp6c the server's reply must have contained something to confuse odhcp6c not to request a prefix at all.

I checked this with odhcp6c by running with the following options:

odhcp6c -s /lib/netifd/dhcpv6.script -Ntry -P0 -t120 -R -r23 eth1

Lo and behold, the reply went out asking for IA_PD as expected.

So it appears the ISP server does not support option 67 (prefix exclude), and the IAID uniqueness issue was a red herring.

I have modified my configuration to pass -R (equivalent uci config option defaultreqopts '0', undocumented):

config interface 'wan6'                  
        option ifname 'eth1'             
        option proto 'dhcpv6'            
        option reqprefix 'auto'          
        option reqaddress 'try'          
        option defaultreqopts '0'             
        option reqopts '23 24'

I will update the wiki so that this very important option is documented!

Thanks all, especially @trendy, for your effort in helping me solve this issue.

EDIT: remove options 82 and 83 from reqopts

2 Likes

Nice catch, that was a tricky one.

Probably the contents of option 67 in the DHCPv6 advertise will not be correct and as result odhpc6c will drop the IA_PD option as the sanity check will fail.
Can you share a binary dump of option 67 as I cannot find this in the initial DHCPv6 packet dumps ?

@dedeckeh Sure. I can send you the full packet captures with and without option 67, but since the data contains my prefix I'd prefer to send it via DM. Hope that's alright.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.