Update API: Updating only the ipv6-address without changing ipv6prefix

Hey everybody!

I am using the update api and I am trying to update a zone’s ipv6-address and ipv6-prefix independently from each other.

The docs say about the query parameters:

  • ipv6= […] If it includes a prefix length like /64 and you omit the ipv6prefix parameter, then your prefix will be updated as well.

and

  • ipv6prefix= […] If empty or unset, the current IPv6 prefix is kept unchanged.

So I am doing these two requests:

curl "http://ipv6.dynv6.com/api/update?zone=myzone.dynv6.net&ipv6prefix=1234:5678::/16&token=<bla>";

curl "http://ipv6.dynv6.com/api/update?zone=myzone.dynv6.net&ipv6=2345::6789&token=<bla>";

Since those two requests come from different machines far apart from each other, both requests occur in random order, but the order above is the one that fails for me.

According to the docs the first request only updates the ipv6prefix - which it does indeed.

The second request should only be updating the ipv6-address without updating the ipv6prefix even though the ipv6prefix is unset, because the ipv6-address doesn’t contain a prefix length. Unfortunately it does update the ipv6prefix as well.

I tried different things like setting ipv6prefix="", so it is defined, but empty, or tried adding a prefix length of /128 or /0 to the ipv6 query parameter, but no matter what I tried, I was never able to update the ipv6-address only without touching the ipv6prefix.

What am I doing wrong? How can I set the ipv6-address only without changing the ipv6prefix when using the Update API?

Thanks everybody :slight_smile:

Are you sure about the /16 prefix instead of /32 or /48 ? Your example prefix address has more than 16 bits set at the beginning.
(For the big picture I’m just starting to learn what ipv6prefix means for a zone - other than calculating addresses based on MAC addresses - and why single IPv6 addresses “inside” would have a different prefix.)

We modified our webservice. If you only pass the ipv6prefix parameter without ipv6, the prefix will be changed and the AAAA record won’t be touched. Now it should work as expected.

1 Like

Yes, Julian, thank you very much!

Now it works exactly as described in the docs:

  • Putting the ipv6-address only indeed only updates the ipv6-record
  • Putting the ipv6-address with /prefix updates both
  • Putting the ipv6prefix only updates the prefix itself.

I’ve just been testing it successfully, thanks again for your quick reaction!

And on top of that: I totally appreciate your dynv6-service! Great work! Absolutely! I really want you guys to know that!

PS: @ju93: The example mentioned above was just bogus. Also I don’t have an access token which is “bla” . :upside_down_face: