Networking Forums

Networking Forums > Computer Networking > Linux Networking > resolve.conf clobbered by DHCP

Reply
Thread Tools Display Modes

resolve.conf clobbered by DHCP

 
 
Nathan Spear
Guest
Posts: n/a

 
      11-04-2004, 10:38 PM
I am managing a network consisting of Windows and Linux clients. We
have three dns suffixes that need to be used during name resolution.
For the Microsoft clients using Group Policy works great. The problem
I am having is with the Linux clients. Every time a machine gets a
new DHCP lease the resolve.conf gets clobbered, requiring the user to
edit the file again to add the proper dns suffixes.

Does anyone know a way around this? Is there a way to prevent a
Microsoft DHCP server from overwriting a Linux resolve.conf file?

-Nathan
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      11-04-2004, 10:49 PM
On 4 Nov 2004 15:38:53 -0800, Nathan Spear wrote:
>
> Is there a way to prevent a
> Microsoft DHCP server from overwriting a Linux resolve.conf file?


Over 190+ linuxes.
Please read http://www.catb.org/~esr/faqs/smart-questions.html
Always provde distribution and release level when posting questions.
It could help you get better answers.

add PEERDNS=no to /etc/sysconfig/network-scripts/ifcfg-ethX if Mandrake
9.x or 10.x where ethX is you interface to lan.

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      11-05-2004, 01:01 AM
Nathan Spear wrote:

> I am managing a network consisting of Windows and Linux clients. We
> have three dns suffixes that need to be used during name resolution.
> For the Microsoft clients using Group Policy works great. The problem
> I am having is with the Linux clients. Every time a machine gets a
> new DHCP lease the resolve.conf gets clobbered, requiring the user to
> edit the file again to add the proper dns suffixes.
>
> Does anyone know a way around this? Is there a way to prevent a
> Microsoft DHCP server from overwriting a Linux resolve.conf file?


When setting up the NIC in Yast, there's an option to update name servers
etc., via dhcp. Is that turned off?

--

(This space intentionally left blank)
 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      11-05-2004, 03:02 AM
(E-Mail Removed) (Nathan Spear) writes:

]I am managing a network consisting of Windows and Linux clients. We
]have three dns suffixes that need to be used during name resolution.
]For the Microsoft clients using Group Policy works great. The problem
]I am having is with the Linux clients. Every time a machine gets a
]new DHCP lease the resolve.conf gets clobbered, requiring the user to
]edit the file again to add the proper dns suffixes.

]Does anyone know a way around this? Is there a way to prevent a
]Microsoft DHCP server from overwriting a Linux resolve.conf file?

A) Put the correct resolver in the DHCP servers so they deliver the right
addresses.
b) Tell linux not to request or honour resolvers.

Either or both of the above would solve your problem.

Eg, for B
man dhcpcd
-R Prevents dhcpcd from replacing existing /etc/resolv.conf file.
 
Reply With Quote
 
Nathan Spear
Guest
Posts: n/a

 
      11-09-2004, 08:24 PM
Acutally, I asked the wrong question. I do want my Microsoft DHCP
server to overwrite the resolv.conf, but with the 3 dns suffixes, not
just one. Right now it is only writing a single domain on the search
line which requires editting by the user every day.

Here is the desired resov.conf;
[root@lt-dpc1 etc]# more resolv.conf
; generated by /sbin/dhclient-script
search foo.bar.com next.domain.com another.domain.com
nameserver 192.168.12.60
nameserver 192.168.12.62

Here is what the DHCP server is writing to the Linux clients;
[root@lt-dpc1 etc]# more resolv.conf
; generated by /sbin/dhclient-script
search foo.bar.com
nameserver 192.168.12.60
nameserver 192.168.12.62

Does anyone know how to pass the right search string to the Linux host
with a Microsoft DHCP server (Windows Server 2003)

-Nathan



(E-Mail Removed) (Bill Unruh) wrote in message news:<cmeu0q$c11$(E-Mail Removed)>...
> (E-Mail Removed) (Nathan Spear) writes:
>
> ]I am managing a network consisting of Windows and Linux clients. We
> ]have three dns suffixes that need to be used during name resolution.
> ]For the Microsoft clients using Group Policy works great. The problem
> ]I am having is with the Linux clients. Every time a machine gets a
> ]new DHCP lease the resolve.conf gets clobbered, requiring the user to
> ]edit the file again to add the proper dns suffixes.
>
> ]Does anyone know a way around this? Is there a way to prevent a
> ]Microsoft DHCP server from overwriting a Linux resolve.conf file?
>
> A) Put the correct resolver in the DHCP servers so they deliver the right
> addresses.
> b) Tell linux not to request or honour resolvers.
>
> Either or both of the above would solve your problem.
>
> Eg, for B
> man dhcpcd
> -R Prevents dhcpcd from replacing existing /etc/resolv.conf file.

 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      11-10-2004, 05:55 AM
(E-Mail Removed) (Nathan Spear) writes:

]Acutally, I asked the wrong question. I do want my Microsoft DHCP
]server to overwrite the resolv.conf, but with the 3 dns suffixes, not
]just one. Right now it is only writing a single domain on the search
]line which requires editting by the user every day.

Why? All that search line does is be used if you hand it a single name.
ping bloggs
will put those three names after bloggs and go to the dns server to ask for those names. Now why do you want it to do that?


]Here is the desired resov.conf;
] [root@lt-dpc1 etc]# more resolv.conf
] ; generated by /sbin/dhclient-script
] search foo.bar.com next.domain.com another.domain.com
] nameserver 192.168.12.60
] nameserver 192.168.12.62

]Here is what the DHCP server is writing to the Linux clients;
] [root@lt-dpc1 etc]# more resolv.conf
] ; generated by /sbin/dhclient-script
] search foo.bar.com
] nameserver 192.168.12.60
] nameserver 192.168.12.62

]Does anyone know how to pass the right search string to the Linux host
]with a Microsoft DHCP server (Windows Server 2003)

 
Reply With Quote
 
Giles Chamberlin
Guest
Posts: n/a

 
      11-10-2004, 05:12 PM
(E-Mail Removed) (Nathan Spear) writes:

> I am managing a network consisting of Windows and Linux clients. We
> have three dns suffixes that need to be used during name resolution.
> For the Microsoft clients using Group Policy works great. The problem
> I am having is with the Linux clients. Every time a machine gets a
> new DHCP lease the resolve.conf gets clobbered, requiring the user to
> edit the file again to add the proper dns suffixes.
>
> Does anyone know a way around this? Is there a way to prevent a
> Microsoft DHCP server from overwriting a Linux resolve.conf file?
>
> -Nathan


Not putting the search string in from DHCP, but if hard coding it on
the linux box is acceptable then, on Fedora Core 2 in file
/etc/sysconfig/network-scripts/ifcfg-ethX (where X is your interface )
add at the end:
SEARCH="dns.suffix.one dns.suffix.two etc"

That file is read by /sbin/dhclient-script which generates /etc/resolv.conf

Then run:
/sbin/ifup eth0

to regenerate resolv.conf

--
Giles Chamberlin

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change resolv.conf for one particular DHCP server Stefan Monnier Linux Networking 3 08-24-2007 10:52 AM
DHCP will not resolve Peter Welk Wireless Networks 8 11-22-2004 07:07 PM
Q: Simple way to pick up resolv.conf info from DHCP to DNS? Sundial Services Linux Networking 2 11-15-2004 01:09 PM
resolve.conf and kppp Scott Linux Networking 1 09-03-2004 06:48 PM
Help please! I need dhcp.conf file for Comcast... J Krugman Linux Networking 12 10-07-2003 07:37 AM



1 2 3 4 5 6 7 8 9 10 11