I have written a test program that scans the network interfaces returned from NetworkInterface.getNetworkInterfaces(), then interprets all the contained items for each NetworkInterface.

InterfaceAddresses are returned for each NetworkInterface with getInterfaceAddresses().

In the single case that I'm interested in, the InterfaceAddresses contains a single element which is null. In this case net5. Also, there's no MAC address for this same interface. I've gone through this exercise to find out how to obtain the subnet prefix length. This interface is the interface I'm currently using for internet traffic.

I'm running Java 1.7u25 on Windows 7 x64.

Any ideas on how to do this would be appreciated.

A couple of interesting interfaces are listed:

---------- NetworkInterface
index 1
name lo
displayName Software Loopback Interface 1
flags Up, Loopback, SupportsMulticast
---------- InetAddress
Address 127.0.0.1, LoopbackAddress
---------- InterfaceAddress
Address 127.0.0.1, LoopbackAddress
Broadcast 127.255.255.255, LoopbackAddress
Prefix /8

---------- NetworkInterface
index 8
name eth2
displayName WAN Miniport (IP)
flags Up, SupportsMulticast
hardwareAddress 5c:99:20:52:41:53

---------- NetworkInterface
index 13
name net5
displayName Intel(R) Centrino(R) Advanced-N 6205
flags Up, SupportsMulticast
---------- InetAddress
Address 192.168.1.100[LHITGLF2274R1.net.ccci.org], SiteLocal
---------- InterfaceAddress
null InterfaceAddress

The IPCONFIG information for the adapter follows:

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205
Physical Address. . . . . . . . . : A0-88-B4-9E-D0-58
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::3990:4da7:8d5e:360a%13(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Friday, October 04, 2013 5:30:47 PM
Lease Expires . . . . . . . . . . : Saturday, October 05, 2013 5:30:47 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 245401780
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-15-C5-D5-E3-5C-26-0A-70-91-56

DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled