Question

Linux DHCP and DNS in a Windows network

Asked by: jpmcgrath

I am setting up a number of Linux systems on a Windows network.  In the past, I have done this with small networks, where editing the host files on each system was practical.  Now I need to configure the systems to use the Windows DHCP and DNS servers.

During the installation (Red Hat 9), I told the install to automatically configure both DHCP and DNS.  As I understand it, the systems should do the following during startup:

1) Find the DHCP server, obtain an IP address from it, and configure the network interface with that IP address.

2) Find the DNS server so that it can be used to resolve domain names.

3) Pass the system's name and the assigned IP address to the DNS server so that other systems can connect to the system using that name.

The first two parts seem to work correctly.  The Linux boxes obtain an IP address and configure themselves during startup.  The Linux boxes also are able to resolve the domain names of other systems on the network.

However, it seems that the DNS server is not being informed about the Linux system's name and IP address, so other systems cannot refer to the Linux systems by their symbolic names.

Does anyone know how to configure the system so that #3 also occurs?  I would also be interested to know what I should have done during the Red Hat 9 install to have this configured automatically, assuming that is possible.

Thanks in advance for your assistance.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-06-28 at 08:40:38ID21040533
Tags

linux

,

dns

,

dhcp

,

windows

Topic

Linux Networking

Participating Experts
3
Points
500
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. DHCP on Red Hat 9
    I want to use DHCP to auto assign IP addresses from 192.168.0.2 - 192.168.0.16 (subnet 255.255.255.0). I have as DNS servers Primary = 194.168.4.100 Secondary = 194.168.8.100 (Ntlworld) I tried to use an example config file from my Red Hat 8 bible. The computer however rejec...
  2. DNS with DHCP router
    Hi I have a home network consisting of two XP machines and a FC4 box. I connect to the internet via DSL-G604T router/modem. The router acts as a DHCP server and appears to be working, I can see all my machies listed in the LAN Clients list. The XP machines can connect to the...
  3. DHCP Issues
    Hi All, I seem to have a huge problem with my DHCP. I have been running fine with DHCP until last Friday, when out internet went down. When it came back up, everything appeared fine, but now our DHCP users (laptops) are not getting an address. I checked our DHCP server (Linu...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: grbladesPosted on 2004-06-28 at 10:44:31ID: 11418183

You need to set the 'DHCP_HOSTNAME' in the interface configutation file. For example the file '/etc/sysconfig/network-scripts/ifcfg-eth0' could contain:-

DEVICE=eth0
BOOTPROTO=dhcp
DHCPCDARGS=-D
DHCP_HOSTNAME=yourhostname
ONBOOT=yes

 

by: grbladesPosted on 2004-06-28 at 10:46:03ID: 11418207

I don't think redhat 9 installer has the option to add in the hostname to the interface script. It is something they missed out by mistake I think.

 

by: ahoffmannPosted on 2004-06-28 at 13:55:22ID: 11420145

where is your DNS server? is it the same as the DHCP server, a windoze server?

 

by: grbladesPosted on 2004-06-28 at 14:02:56ID: 11420198

What actually happens is that the Linux box sends out a DHCP broadcast looking for a DHCP server. It then queries the DHCP server aand sends its hostname and gets back the network settings to use including the DNS server to use. It is the DHCP server which updates the entry in the DNS.

I have configured this on Linux using dhcpd and Bind-9 a few times. You do need the 'DHCP_HOSTNAME' on Redhat Linux machines in order for the DHCP client to send a hostname to the DHCP server.

 

by: jpmcgrathPosted on 2004-06-28 at 15:03:28ID: 11420761

Thanks for your answer, grblades.

Unfortunately, I could not get that to work.  I added the DHCP_HOSTNAME parameter, which was not in the icfg-eth0 file.  I tried setting it to the simple name (db2) and the fully qualified name (db2.domain.com).  I also tried adding DHCPCDARGS=-D, since that was not in the file, but it did not seem to have an effect.

The following are the contents of the file:

# Broadcom Corporation|NetXtreme BCM5703 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0B:CD:CB:05:97
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
DHCPCDARGS=-D
DHCP_HOSTNAME=db2

I have checked the name server using "nslookup" on the Windows systems and "host" on the Linux systems, but the DNS servers do not appear to know about the Linux systems.

Regarding the installer / network configuration tools:  The following bug report seems to be talking about the same problem, but it seems to indicate that the problem was fixed, which does not seem to be the case.

    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=62947

One interesting note:  I have also been setting up SAMBA on some of the systems, and I found that both Windows and Linux systems can resolve the names of the Linux systems that have SAMBA running.  I think that is the WINS stuff that does that, but I am not certain about that.

 

by: jpmcgrathPosted on 2004-06-28 at 15:08:52ID: 11420802

> where is your DNS server? is it the same as the DHCP server, a windoze server?

Both are running on Windows.  I think DHCP is running on the same system as the primary DNS server, but I am not certain of that and do not know how to determine which DHCP server is responding.

 

by: jpmcgrathPosted on 2004-06-28 at 15:51:14ID: 11421024

> It is the DHCP server which updates the entry in the DNS.

OK, I was not aware of that.  Since this works with many Windows boxes on the network, there must be something different in the way that the Linux boxes are making the DHCP request, although I have no idea what that would be.

> You do need the 'DHCP_HOSTNAME' on Redhat Linux machines in order for the DHCP
> client to send a hostname to the DHCP server.

That makes sense - it cannot bind the name in DNS if it does not know the name.

However, I am somewhat confused about configuring the system name(s).  First, there is the DHCP_HOSTNAME setting, which applies to the interface.  There is also the value that you can configure through the menu "System Settings" | "Network", which applies to the entire system, appears on the login screen and seems to be what the uname command shows.  

Are there two different settings because of the possibility of having multiple network cards?  Note that the systems I am working with each have two network cards, although only eth0 is active.

 

by: ahoffmannPosted on 2004-06-28 at 16:11:50ID: 11421114

AFAIK you can not get a windoze DNS server to register a none-M$ system
wondoze's DNS uses WINS to register DHCP-assigned IPs
may be I missed something last 5 years (please correct me if I'm wrong) , but it sounds like you either need to tell you DNS server the Linux IP, and the DHCP server to assigne that IP, or you need to change your DNS server

 

by: grbladesPosted on 2004-06-29 at 01:22:46ID: 11423762

Yes you are correct in that the two settings are so you can register different names for different network interfaces.

ahoffmann may be correct. Are you sure the windows machines have their data in the DNS? Remember windows name lookups use network broadcasts and WINS to find other computer names.

 

by: jpmcgrathPosted on 2004-06-29 at 07:14:30ID: 11426245

> AFAIK you can not get a windoze DNS server to register a none-M$ system

That would certainly be a shame, but I guess I should not be too surprised if M$ set things up that way.

 

by: jpmcgrathPosted on 2004-06-29 at 07:14:45ID: 11426252

> Yes you are correct in that the two settings are so you can
> register different names for different network interfaces.

> Are you sure the windows machines have their data in the DNS?
> Remember windows name lookups use network broadcasts and WINS
> to find other computer names.

If I undersand your question correctly, the answer is yes.  If I query DNS using "nslookup" on the Windows boxes and both "host" and "nslookup" on the Linux boxes, it resolves the names of systems that have been on the network, but not the new ones I am adding.

 

by: ahoffmannPosted on 2004-06-29 at 07:24:41ID: 11426354

> ..  that have been on the network, ..
the usual WINS (M$) behaviour, knowing the ancient very well, ignoring the modern ... :-P
sorry for being off-topic, a bit ...

 

by: jpmcgrathPosted on 2004-06-29 at 10:49:46ID: 11428545

I just found some interesting information:  

Most of the Windows boxes on the network are members of the Windows domain, but a few are not - they are "workgroup" members.    None of the Linux boxes are members of the Windows domain.

With one exception (which can probably be explained), the systems that are not part of the Windows domain are not known to the DNS server.

It sounds like the problem is with the Windows configuration, not with Linux.  I would think that it should be possible to have Windows workgroup systems attached to a Windows network make their names known via DNS.

 

by: grbladesPosted on 2004-06-29 at 10:56:55ID: 11428618

If thats the case it sounds as if the windows server is adding the machines to the DNS when they connect to the domain. Are you using a Windows 2000/2003 as the domain controller?
I nkow that Active Directory is heavily DNS based so it is probably the active direcrory system updating the DNS.

 

by: ahoffmannPosted on 2004-06-29 at 11:04:48ID: 11428695

guessing ('cause I [wd]on't touch M$):
  windoze networking (whatever this means) is configured to be "simple to use" hence the default is that the dhcp service registers all hosts in dns service by default
  a domain loggon only might not do that, therfor you may give the dhcp service hints like MACs or hostnames, then they are always given the same IP (and being registerd in dns, not shure)

You also can try to add your linux box to the domain by using Samba. Samba also can do a domain logon.
Don't know if that solves your problem.

 

by: jpmcgrathPosted on 2004-07-01 at 09:36:46ID: 11448694

grblades:  Yes, it is Windows Server 2003, Enterprise Edition.  I am guessing that it might be a configuration issue with Active Directory, but that is someone else's territory, so I am limited in the investigation I can do.

ahoffmann:  As I understand it, DHCP doles out the IP addresses, and it identifies the system it gave them to based on the MAC address.  It allocates them based on a "lease time", so once it assigns an IP, it will not give it to anyone else until the lease expires.

Unfortunately, the lease time here is set to something in the range on 1 day, so I can power down systems at night without problem.  However, when I shut the systems down for a weekend, they sometimes get different IP addresses on Monday.  Without the DNS integration, I need to create /etc/host files with the IP addresses, and that causes problems when the IP addresses change.

In any case, the systems for which I was dealing with this issue have been shipped out, so I am pushing it to the back burner.  I want to figure this out eventually, but this is no longer the time.

Thank you both for all of your help.  I greatly appreciate it.

Regards,
John McGrath

 

by: jpmcgrathPosted on 2004-07-01 at 09:44:33ID: 11448808

I wanted to give out 400 + 250 points, but unfortunately, this system seems to impose a point total cap of 500.

Again, thank you both for your answers!

 

by: ahoffmannPosted on 2004-07-01 at 11:51:45ID: 11450404

>  However, when I shut the systems down for a weekend, they sometimes get different IP addresses ..
see my suggestion about binding the IP to the given MAC (assuming that noone sets its own MAC), fi it is bound that way, the lease time also doesn't matter

 

by: mgrocksPosted on 2004-08-23 at 10:24:26ID: 11872816

Hi,
I've solved the exact same problem, here's the issue... windows servers 2000, and 2003 both can allow the client to update the dns server, this works fine with w2k,xp clients (this is the "register connection in dns" check box under tcp/ip networking).

However, the 3 big linux dhcp clients don't do this very well if at all. dhcpcd or pump, do not update the dns server, and dhclient can update an ISC based dns server, but I haven't tested with windows, see dhclients man page.

 grblades had the right ifcfg-eth0 info, but that only sends the "hostname" to the dhcp server. In order to get linux clients hostnames into the windows dns, you have to turn on "dhcp server updates dns" on the windows box and restart the services.
mg

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...