Question get Hostadress, IP, MAC

stouniii

New member
Joined
Dec 21, 2009
Messages
1
Programming Experience
Beginner
hi everyone,

can someone tell me how I can get the Hostname, IP and the MAC of every computer in my network?

need it for a LAN-Party..

found Net.Dns.GetHostName() but this is only for my computer..
 
Last edited:
For IP Addr and hostname
VB.NET:
Dim strHostName As String = Dns.GetHostName (). 
'Use GetHostName with no parameter to return the host name of a local machine.
'Once you have host name, pass this host name as a parameter in GetHostByName
Dim ipEntry As IPHostEntry = Dns.GetHostByName(strHostName)
Dim IpAddr As IPAddress() = ipEntry.AddressList
Dim i As Integer = 0
Do While i < IpAddr.Length
Console.WriteLine ("IP Address {0}: {1} ", i, IpAddr(i).ToString ())
i += 1
Loop

For MAC Address, u will have to look at Windows Management Instrumentation (WMI) (System.Management)..
How to get MAC Address on remote Computer using VB.NET
 
Last edited:
Back
Top