TIP: ipv6 address format conversion for bytemark dns


As you proballly know the tinydns format requires v6 addresses in a weird format without the colons. I wanted a method to convert “normal” ipv6 addresses to this format from a script. After much googling and a bit of experimentation I came up with.

convertv6 ()
    ipv6calc --in ipv6addr --out ifinet6 $1 | cut -d ' ' -f 1