public static IPPortPair convertIPAndPortPair(String ipPortString, int defaultPort) {
		// If it's the scoped IP6 address
		ipPortString = removeScopedMarkerFromIP(ipPortString);
		if (InetAddresses.isInetAddress(ipPortString)) {
			return new IPPortPair(ipPortString, defaultPort);
		}
		final int i = ipPortString.lastIndexOf(":");
		String ipPart = ipPortString;
		int portPart = defaultPort;
		if (i != -1) {
			portPart = NumberUtils.toInt(ipPortString.substring(i + 1));
			ipPart = ipPortString.substring(0, i);
		}
		return new IPPortPair(getIP(ipPart), portPart);
	}
Convert the given string to ip and port pair.
<p/>
This supports IP6 and IP4.
<p/>
<ul>
<li>127.0.0.1:30  ==> 127.0.0.1 and 30</li>
<li>2001:0:9d38:90d7:469:1f94:f5bf:cf5d:30  ==> 2001:0:9d38:90d7:469:1f94:f5bf:cf5d and 30</li>
<li>[2001:0:9d38:90d7:469:1f94:f5bf:cf5d]:30  ==> 2001:0:9d38:90d7:469:1f94:f5bf:cf5d and 30</li>
</ul>

@param ipPortString textual representation of ip and port pair
@param defaultPort  default port used when port is invisible.
@return ip and port pair
ngrinder-core/src/main/java/net/grinder/util/NetworkUtils.java