public static String selectLocalIp(List<String> ips) {
		try {
			Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
			while (interfaces.hasMoreElements()) {
				NetworkInterface iface = interfaces.nextElement();
				if (iface.isLoopback() || !iface.isUp()) continue;

				Enumeration<InetAddress> addresses = iface.getInetAddresses();
				while (addresses.hasMoreElements()) {
					InetAddress addr = addresses.nextElement();
					String hostAddress = addr.getHostAddress();
					if (ips.contains(hostAddress)) {
						return hostAddress;
					}
				}
			}
		} catch (SocketException e) {
			throw new NGrinderRuntimeException("error while resolving current ip", e);
		}
		throw new NGrinderRuntimeException("the ip address set doesn't contain current ips");
	}
Get IP form the given string.
<p/>
If the given ipOrHost is host name, it tries to turn it into IP.
If the host name is not available, it returns 127.0.0.1 instead.
ff

@param ipOrHost textual representation of ip or host name
@return ip
ngrinder-core/src/main/java/net/grinder/util/NetworkUtils.java