The DHCP client can not detect the address provided by the server

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Jun 10 14:00:37 UTC 2008


DÔ Phan-Cam-Thach wrote:

>i now have a problem with my DHCP client. Hope 
>that someone can give me an idea.
>I start my DHCP client et  server by the commands:
>sudo dhclient -cf dhclient.conf eth1
>sudo dhcpd -cf dhcpd.conf -lf dhcpd.leases eth1
>
>There is no problem if we watch the messages 
>transmitted between the two hosts by using 
>Wireshark (there are 4messages sent: 
>dhcpdiscover, dhcpoffer, dhcprequest, dhcpack). 
>The addresse provided by the server that we see 
>in Wireshark is A. It is regular and in the 
>range indicated in the file dhcpd.conf. But the 
>client can not detect this addresse. When i 
>execute the command: ifconfig, there is no 
>address for the interface eth1, as it hasnt been 
>configured. But i recognize that, if i start 
>dhclient without the file dhclient.conf, the 
>addresse is detected.
>
>The first question: what can be the problem?

What is in the dhclient.conf file ?

>The second question: what is the file dhclient.conf used for exactly?

It is used to configure the behaviour of the client.

>The third question: what is the difference when i start dhcpd by:
>sudo dhcpd -cf dhcpd.conf -lf dhcpd.leaseseth1 start
>and:
>sudo dhcpd -cf dhcpd.conf -lf dhcpd.leases eth1
>  (sans start)

The first form, assuming the missing space is 
just a typo, isn't a valid command line. It 
should fail with an error message that rather 
obliquely tells you that it can't find a subnet 
declaration for interface 'start'.

>How can i stop dhclient and dhcpd? Normally i kill them manually by:
>sudo kill PID
>But perhaps it is not the good way to stop them. 
>There are probably others things that continue 
>to run after this command?

Don't know about the client, but that's the only way to stop the server.

The client would normally be handled by the 
interface management scripts - ie the script to 
bring up an interface would start the client, the 
script to take an interface down would stop it. 
This is platform/distribution specific.


More information about the dhcp-users mailing list