Convert IP sublist to netmask