jana added the comment:
Running into the same problem here. Within the zonefile rfc1035 defines a
usecase for ipv4, but I can't find anything similar for IPv6. The feature is
also rather obscure. The zone however is used in the zonefile as origin and in
bind in the named.conf to ref
jana added the comment:
This code does the trick:
ipn = ipaddress.ip_network("2a0c:ac10::/32")
prefix = ipn.prefixlen
if ipn.version == 6:
rest = int((ipn.max_prefixlen - prefix) / 4)
elif ipn.version == 4:
rest = int((ipn.max_prefixlen - prefix) /