problems with DHCP for linux box on windows network
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
problems with DHCP for linux box on windows network
Hello,
I have a machine running Fedora 2 that is connected to an office network made up of mostly windows machines. The network uses a windows DHCP server. From the linux box, I can ping other machines on the network using their IP addresses. However, when I try to ping using the hostname that does not work. The same holds true when trying to ping the linux box from a windows machine (ip works but hostname does not). Updating /et/hosts with all the host names is not practical since the IPs for many of the machines change fairly often.
What do I need to do to ensure that the windows machines will be able to resolve the linux machine's name and to ensure that linux machine will be able to resolve the host names of the windows machines on the network?
That answer suggests using WINS, which is very outdated and is nearly unsupported at this point. For all name resolution, you should be using DNS.
It sounds like part of the problem is that your Linux machine isn't reporting it's hostname to the DHCP/DNS server. Or perhaps it is reporting it's host name, but your Windows clients are not setup to query the DNS server for hostnames (especially if the clients are 9x).
You might also want to make sure that the DHCP server's IP is the first entry in your resolv.conf. If your machine doesn't know that the server can resolve hostnames, it isn't going to ask it.
Also make sure that the Windows server is setup so that hostnames of DHCP clients are added to the DNS database. It is probably already setup that way, but it never hurts to check.
I mentioned WINS because the OP mentioned that the Windows machines change IP addresses frequently and typically "offices of windows machines" do not have a DDNS (Dynamic DNS) server available for internal name resolution. DNS by design is static and I am not aware of a way to update an internal DNS server (that is not DDNS) from a _Windows_ DHCP server (Linux, yes). Since the OP is using a Windows DHCP server, WINS or Microsoft's DDNS is the only way that I can think of to have dynamic updates to ip addresses of windows-based DHCP clients.
It looks like starting the smb service solved the windows to linux host resolution issue. smb was not running before. (Setting wins support = yes in smb.conf does not seem to affect it one way or the other.) After starting smb, the windows machines can now ping the linux machine and access the web server running on the linux machine, but the linux machine does not seem to be able to resolve any of the windows hostnames. For example, ping <windows-hostname> on the linux machine results in 'ping: unknown host <windows-hostname>'.
Originally posted by hossnutt It looks like starting the smb service solved the windows to linux host resolution issue. smb was not running before. (Setting wins support = yes in smb.conf does not seem to affect it one way or the other.) After starting smb, the windows machines can now ping the linux machine and access the web server running on the linux machine, but the linux machine does not seem to be able to resolve any of the windows hostnames. For example, ping <windows-hostname> on the linux machine results in 'ping: unknown host <windows-hostname>'.
You need to put your Windows DNS server's IP address in you Linux's /etc/resolv.conf file. That way when you run 'ping windows' it will first look to resolve via the address that is in /etc/resolv.conf. If you Windows DNS servers addresses are 192.168.1.1(2) and your domain is enron.com then you /etc/resolv.conf should look like the following:
In a Windows 2000 network the DNS server is usually the Domain Controller; and that's what you should use as the name server in the /etc/resolv.conf. Afterward you should be able to ping any Windows computer that is under Active Directories.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.