Python 3.3+ sometimes does not recognize a legitimate IPv6Network netmask: $ python3 Python 3.3.5 (default, May 28 2014, 13:56:57) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ipaddress as ip >>> nodecon = ip.IPv6Network('ff00::/ff00::') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.3/ipaddress.py", line 2084, in __init__ self._prefixlen = self._prefix_from_prefix_string(addr[1]) File "/usr/lib64/python3.3/ipaddress.py", line 514, in _prefix_from_prefix_string self._report_invalid_netmask(prefixlen_str) File "/usr/lib64/python3.3/ipaddress.py", line 497, in _report_invalid_netmask raise NetmaskValueError(msg) from None ipaddress.NetmaskValueError: 'ff00::' is not a valid netmask >>> nodecon = ip.IPv6Network('ff00::/8') >>> print(nodecon) ff00::/8 >>> print(nodecon.with_netmask) ff00::/ff00:: I get the same behavior on Python 3.4.2.
Such problems should be reported in https://bugs.python.org/
This is an upstream bug, please file there.