TL;DR: I need a way to send a custom IAID in the IA_NA/IA_PD request in order to get the right prefix and update my ISP's dynamic DNS service, either using odhcp or an alternative which allows to configure a DS-lite tunnel.
I have been using OpenWRT for a long time, and until now I have always managed to either find the answer in the forum or figure out how to configure it myself with the documentation, but this time the problem has won the fight.
My ISP provided me with a Fritz!Box 7412 (FB from now on). The main idea is to install OpenWRT and use it in bridge mode simply as a modem. The FB is then connected to a WNDR3700 which takes care of the DHCPv6, DS-Lite, port forwarding etc. in order to achieve the full speed (100mb/s), increase the stability of the network and manage better the incoming traffic from the internet to my private server.
My ISP uses native IPv6, and provides a dynamic IP. At the same time it also provides you with some sort of dynDNS service, for which it gives you a permanent subdomain address that is updated with your latest IP.
Getting OpenWRT to work with the Fritz!Box and the Vectoring working, as well as DHCPv6 and the DS-Lite was not an issue.
The issue is that, in order for the dynamic DNS service they provide to work, when you negotiate the connection, you need to send the following data to the ISP server:
- In the PADI, you must add a specific host-uniq (Done and working)
- The request has to come from a Link-Local address with a specific suffix (Done and working)
- In the DHCPv6 request you must have a specific DUID (Done and working)
- In the DHCPv6 request you must send the vendor class (Done and working) <- not sure if this one is required but just in case
- In the DHCPv6 request, when requesting the Prefix Delegation (IA_PD option) you must send a specific IAID to get the right IPv6 and refresh it in the dynamic DNS service that the ISP provides (It has been impossible to set a different value than 1!)
So far I tried setting the clientid parameter in the wan6 section with the RFC standard of IAID+DUID (RFC4361) of 0xff + IAID (low 4B of LL addr) + UUID (2B duid_type + 2B hw_type) + low 8B of iface LL addr, and tried variations ommiting the 0xFF and even DUID + "0003000c" + IAID as suggested in here. I have also tried adding the option IAID in the dhcp configuration, but nothing has worked so far.
I really would like some insight on whether changing the IAID to a custom value is possible, or if it would possible to patch odhcpc to allow it. I have also tried to use the port of dhcpcd instead to send the right IAID, but then everything downstream becomes a nightmare (including the DS-Lite tunnel).
This is my
/etc/config/network file (the dhcp file is the default one at the moment):
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd08:22d7:c433::/48' config interface 'lan' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' option ifname 'eth0' option type 'bridge' config device 'wan_dsl0_dev' option name 'dsl0' option macaddr '38:10:D5:XX:YY:ZD' config atm-bridge 'atm' option vpi '1' option vci '32' option encaps 'llc' option payload 'bridged' option nameprefix 'dsl' config dsl 'dsl' option annex 'b' option tone 'bv' option firmware '/lib/firmware/vr9-B-dsl_5.9.0.C.1.7-5.9.0.A.0.2.bin' option ds_snr_offset '0' config device 'lan_eth0_dev' option name 'eth0' option macaddr '38:10:D5:XX:YY:Z9' config interface 'wan' option proto 'pppoe' option ifname 'dsl0.7' option username 'H1und1/(xxxxxxx)email@example.com' option password 'nnnnnnn' option host_uniq '3810d5xxyyzdaaaaaaaa00000001aaaaaaaa4621426f78202020aaaaaaaa' option ipv6 '1' option pppd_options 'ipv6 ::3a10:d5ff:fexx:yyzd,' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' option reqaddress 'none' option reqprefix '56' option vendorclass '00000368' option clientid '000300013810d5xxyyzd' #seems to be directly translated to the DUID option macaddr '38:10:D5:XX:YY:ZD' option reqopts '235 17 83 86'
I know some of the options are redundant. I will tidy it up in the final version but I just have been trying everything to send the IAID.
Thank you in advance,