enhance parse_ip to also recognize IP prefixes