I am writing an app that collects IP Accounting data from Cisco Routers. The app collects only the Source, Destination, bytes, and packets. All of this information is stored in a SQL database.
The output of the IPA data is timed (Cisco cron jobs). My IPAHandler needs to be able to resolve IP Addresses to host names. I am doing this with some releative ease, until it comes to local IP Addresses of machines that are not joined to the domain.
We are a college and we have several "rogue" notebooks on wireless. We would like to be able to capture the machine name of each device that gets an IP address - subsequently we would have their network usage data. But if I try to use the code listed below I get an error:
static string Machine(IPAddress IP)
{
string sName = Dns.GetHostEntry(IP).HostName;
return sName;
}
Our AD only allows secure DNS updates, so a local IP address assigned to a non-domain machine does not show up in DNS and I get the following exception:
===========
No such host is known.
===========
Here's the question:
Can I query the DHCP server (an AD Domain Controller) for the IP Address and machine name? If so, do I need to use a WMI query, or is there an API I can use?

New Topic/Question
Reply





MultiQuote





|