Skip to content

Instantly share code, notes, and snippets.

@limingzju
Created October 10, 2014 07:23
Show Gist options
  • Save limingzju/ecd6891495d8e1fedc55 to your computer and use it in GitHub Desktop.
Save limingzju/ecd6891495d8e1fedc55 to your computer and use it in GitHub Desktop.
dns
import java.net.InetAddress;
import java.net.UnknownHostException;
public class TestNet {
public static void main(String[] args) throws UnknownHostException {
InetAddress[] machines = InetAddress.getAllByName("lbs.yxgslb.netease.com");
for (InetAddress address : machines) {
System.out.println(address.getHostAddress());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment