calculate subnet/netmask from cidr