Replace to_ip_with_config with more usefully shaped helper.