IPv6 prefix mode
Do you need this?
Most people do not. Here is the test: watch the IPv6 address of one of your devices across a router restart or a reconnect. If the FIRST half of the address changed while the SECOND half - the part that belongs to the device itself - stayed the same, your provider rotates your IPv6 prefix, and this page is for you. If the whole address stayed the same, you do not need any of this: the normal setup already handles you.
This is how some large providers run their networks. Orange, for example, describes its home connections as having a dynamic IPv6 address that changes when the router reconnects, with the home network built from that changing prefix - see Orange's own guide to IP addresses (in French).
The two halves, once
An IPv6 address on a connection like this has two halves. The first half is the prefix: your provider hands it to your router, and it changes. The second half is the host part: each device picks its own, and it stays the same. Prefix mode stores the two halves separately, so one prefix update fixes every device at once.
One worked example. Your router reports the prefix 2001:db8:abcd::/56. A device with host part ::5 gets the address 2001:db8:abcd::5. When the prefix changes to 2001:db8:9999::/56, the same device is now at 2001:db8:9999::5 - same host part, new prefix, nothing to retype anywhere.
If a device builds its host part from its network card's MAC address (many do), the panel can work the host part out from the MAC for you: the card 00:80:41:ae:fd:7e becomes the host part ::280:41ff:feae:fd7e.
Set it up
Three short steps.
- Register a prefix. In the panel, open Prefixes and register one with a name like "Home". You get a prefix token, shown once. It is a separate token from your hostname tokens, and it only ever updates this prefix.
- Point your router at us with that token. Either way below sends the same thing: the new prefix, with its length.
- Link each hostname. On the hostname's own page, open "Advanced: this device sits behind a changing IPv6 prefix", pick the prefix, and give the device's host part (or its MAC address). From then on, the hostname's IPv6 address follows the prefix. Its IPv4 address is untouched and keeps working exactly as before.
Sending the prefix update, as a script or program - the usual update endpoint, with the prefix where a full address would normally go:
POST https://legitdns.com/api/v1/update Authorization: Bearer <prefix token>
{"ipv6": "2001:db8:abcd::/56"}
On a FRITZ!Box, use a user-defined DynDNS provider with this update URL, any username, and the prefix token as the password. The box fills in your current prefix itself:
https://legitdns.com/nic/update?myipv6=<ip6lanprefix>
One update republishes every linked hostname in one go, each at its own TTL. A linked hostname that is offline or on hold is not republished by it: the new address is stored for it, and it picks the address up when it comes back.
Details worth knowing
- Prefix lengths from /48 to /64 are accepted.
- A host part must fit under the prefix length: it may only use the bits after the prefix. If a prefix update arrives with a longer length (say /64 where it was /56) that a linked host part no longer fits under, the update is refused and nothing moves until the host part is fixed (the API answer names the hostname in the way).
- Prefix updates are held during maintenance and read-only times, like every other update, and are published when things return to normal.
- Unlinking a hostname keeps the address it has at that moment, as a normal record.
- A prefix can only be deleted once no hostname is linked to it.
- A hostname token cannot update a prefix, and a prefix token cannot update a hostname. They are separate on purpose.