Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 201333

Re: Regarding subnet mask of a virtual machine.

$
0
0

Here is script. The netmask of the first address of the  interface:



InetAddress localHost = Inet4Address.getLocalHost();

NetworkInterface networkInterface = NetworkInterface.getByInetAddress(localHost);

for (InterfaceAddress address : networkInterface.getInterfaceAddresses()) {
    System.out.println(address.getNetworkPrefixLength());
}

Regards,
Milton


Viewing all articles
Browse latest Browse all 201333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>