Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very large network say Class A. I have Linux DHCP and Microsoft DHCP servers deployed. I am successful in querying Microsoft DHCP server but Is there any way to Query LINUX DHCP server to get a list of all leased IP/Hostnames using C#?

share|improve this question
    
what 'flavor' of Linux/DHCP Server? Can you access the machine, possibly to write as script, grep a log etc? –  lexu Oct 20 '10 at 6:24
    
possible duplicate serverfault.com/questions/190461/querying-a-dhcp-server-in-c –  Prix Oct 20 '10 at 6:34
    
I want a generic code that works on any Linux DHCP server. I can not do anything on LINUX DHCP server. All I need to do is just by sitting on client side. –  AZ_ Oct 20 '10 at 7:31

2 Answers 2

Should be possible using the same win32 api, but maybe it's more protected, do you have some king of authentication on linux DHCP?

Maybe it just reject the client query

share|improve this answer
    
Yes I have some authentication and I don't have SSH access over DHCP. In other words it is very secure. –  AZ_ Oct 21 '10 at 4:47

there is an API for the dhcpd called omapi. Here there is info about how to do stuff in C: http://www.linuxmanpages.com/man3/omapi.3.php . I have absolutely no idea if you can query it in c#.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.