[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: which dhcp client should be used?



Please keep your replies on list and not to me privately unless it is
personal.

Kamaraju Kusumanchi wrote:
> Bob Proulx wrote:
> > What are you needing to configure?
> 
> Thanks for the reply. I have the following lines in /etc/resolv.conf on 
> the machine using dhcp-client
> 
> search 192.168.0.1

That is not a correct line for /etc/resolv.conf.  The search statement
lists out domain names to search when resolving names to IP
addresses.  It does not list out IP addresses.  Replace that line with
a search list of domain *names*.

> couple of nameserver statements.
>
> If I am using dhcp3-client, this file is being overwritten during the 
> boot process. It could be the result of some other program, but that is 
> the behaviour I am getting. I am not able to dig into it any further.

During the dhcp startup, which happens at boot.  But it also happens
whever you restart networking or the dhcp lease expires.  Other times
too.

But since the search line was incorrect the DHCP process was probably
right to be overwriting it.  What was the dhcp client replacing it
with?  It should have been placing the domain name that the DHCP
server offered there.  If the domain name is incorrect then the best
place to fix it is in the DHCP server.  That way all clients get the
correct information.

> Further, dhcp3-client is incompatible with dhcp-client.

I don't understand what you are saying here.  What is incompatible
about it?  dhcp3 is simply a newer version of dhcp and therefore the
newer version will upgrade the old version.  That is normal for all
packages.  Newer package versions replace older package versions.
Isn't that what you would expect?

The config files have moved.

  /etc/dhclient.conf   -> /etc/dhcp3/dhclient.conf
  /etc/dhclient-script -> /etc/dhcp3/dhclient-script

> There are multiple configuration files that I need to worry about
> and so the probability of me making mistake is large.

If you are worried about making a mistake then don't make any changes
to either file.  Leave both of them at the default setting.  It is
hard to go wrong that way.  The defaults should work for 99.44% of
everybody using DHCP.  DHCP is a wonderfully nice thing that way.

> dhcp-client provides a command called dhclient. If for some reason my 
> network is not up during the boot process, I can just do dhclient and 
> the client gets an IP address. dhclient3 was not able to do that.

You say running 'dhclient' with version 3 installed did not work but
'dhclient' with version 2 installed did work.  That would be a bug.
If you can reproduce it then please report it.  However I have never
seen that myself.  Usually it is the reverse problem.  Version 3
generally works better than version 2.

One notable bug fixed in version 3 is dhcp from a MS DHCP server.
This is why I push version 3 over version 2.  Version two from a MS
DHCP server ends up with a misconfigured search line in
/etc/resolv.conf.  MS appends the four characters "\000" to the end of
the domain name.  Nasty.  Version 3 works around that bug and removes
it from the domain name before installing it in the search statement.
Version 2 does not.  Both work from a unix DHCP server, however.

Bob



Reply to: