Sign in to follow this  

How to resolve address by host name in corporate network

This topic is 2539 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to develop a linux device, and I want to retrieve its IP address by its host name within a corporate network (may have offices at various geographical locations). Here is my idea: I assume every corporate network shall have name server and DHCP server by default, and the linux device shall act as DHCP client. So I should be able to retrieve its IP address from the local name server. As a backup measure, I may retrieve its IP address by the device's MAC address from DHCP server. I would like to know if it makes sense to you, and if there is even better solution around. Is it possible to retrieve its IP address by its alias name as well (multiple host names to one IP address)?

I also want to support use cases when there are no name server and DHCP server available. To enable communication between a host PC and the linux device under this circumstance, I think I will need zeroconf for either multicast discovery
protocol or link-plocal addressing. Is there any other solution around?

BTW, what is the easiest way to check whether the name server and DHCP server are available or not in the application software?

Thank you in advance!

Share this post


Link to post
Share on other sites
DNS and DHCP are well-supported, widely implemented, fully documented protocols and they're already available in embedded Linux distributions everywhere. What are you looking for that is not already available?

If you intend to interact wit hother devices on a self-configuring network (one with no DNS and no DHCP) you will probably want to use one of the competing, non-interoperative de facto standards. Zeroconf/bonjour is one, UPnP is another. Apple devices use the one, Windows/HP/DLNA use the other. They both have easy-to-use support on Linux.

Share this post


Link to post
Share on other sites
Sign in to follow this