'Return netmask as an string. Mostly useful for IPv6.
>>> print(IP(\'195.185.0.0/16\').strNetmask())
255.255.0.0
>>> print(IP(\'2001:0658:022a:cafe::0/64\').strNetmask())
/64'

def strNetmask(self):

    bits = _ipVersionToLen(self._ipversion)
    if (self._ipversion == 4):
        locallen = (bits - self._prefixlen)
        return intToIp((((2 ** self._prefixlen) - 1) << locallen), 4)
    elif (self._ipversion == 6):
        return ('/%d' % self._prefixlen)
