The IPv6 prefix I got from my ISP in Denmark did not stick, as explained here. Well, Google revealed that my ISP expects IAID to be 1 (one), when requesting a prefix using DHCPv6. The mechanism around IAID is explained in RFC3633. And guess what, the DHCPv6 client in my Mikrotik router requests a prefix with IAID 2 (two), not 1. This IAID is a number associated with the interface, and in my case WAN interface “ether1” has IAID: 2. You can find your IAID as follows: “:put [/interface find where name=“ether1”]”. I have not found a way to change this mapping in RouterOS.

RouterOS enables me to add options to the DHCPv6 request. Requesting a prefix is option 25 (OPTION_IA_PD). So what if I would create this option with IAID: 1 and add it to the DHCPv6 client request? Actually, there’s another option that my ISP requires as well: option 3 (OPTION_IA_NA) for the WAN address. The exact value of the options is important, see below (I used OPTION_ORO for testing, but it’s ignored by my ISP):

You add these options to the DHCPv6 client configuration like this:

Now the DHCPv6 client triggers a reply from my ISP:

What’s happening here? The DHCPv6 client requests the options “ia_na” and “ia_pd”, both with IAID: 1 and the DHCPv6 server replies with info for IAID: 1 (id: 0x01). Unfortunately RouterOS validates this IAID against the fixed interface value: 2 and the DHCPv6 reply is not accepted (skipping wrong iaid: 1). After a few retries the DHCPv6 client gives up and gets into state error. But the DHCPv6 server did send a reply containing prefix, address and IPv6 DNS servers. The cool part: my ISP now assumes “All Good” and my IPv6 prefix is activated in the ISP network, enabling IPv6 connectivity (with manual IPv6 interface configuration, as described here).

With a successful DHCPv6 handshake (state: bound), there will be a renew after a certain time. Since my DHCPv6 client gets into state error, this does not happen. But that’s easily fixed using the “Scheduler” and “Scripts” functions in RouterOS, running the command “/ipv6/dhcp-client/renew ether1” once every hour.

Now my ISP sees a DHCPv6 request every hour, and subsequently keeps my IPv6 prefix advertised in the network. And with the fixed IP address option of my subscription, the IPv6 prefix does not change. Hopefully Mikrotik takes my bug-report serious and makes the IAID a configuration option, or changes the IAID validation logic. Only then, IPv6 would almost work “out of the box”…

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 6 = 16