# DHCPD or DHCPCD

## siaz4t

Hi Every one.

I have written a small application using gtk2.0. Also i have prepared a

bootable cd image so that when i boot from the cd my application runs.

For this purpose i have used kernel 2.6.14 statically compiled (without modules) and

isolinux.bin as a bootloader while using the suse linux

Also i m using Xvesa server for X support with icewm window manager.

I want to configure network for my bootbale disc.

Using a mannual networking that is by giving ip address and netmask, i got success and the network was configured. But now i want to configure the network automatically. But i m not getting the right path.

I m trying to use dhcpcd deamon to automatically configure the network but all my efforts are not ending in a success.

What should i use dhcpd or dhcpcd?

I want to know the correct steps to configure network automatically (i-e without giving an ip address or netmask).

Please help me this matter

Thanx

----------

## runningwithscissors

dhcpd is the dhcp server daemon, and dhcpcd is the dhcp client daemon.

To automatically acquire an ip address, your server must be running the dhcp server daemon (dhcpd), or any other service that listens for client requests and assigns them ip addresses automatically through dhcp.

If your server isn't running a dhcp daemon, you can't acquire an IP address automatically.

----------

## siaz4t

if server is running,

then from client side i only run dhcpcd?

----------

## runningwithscissors

Yes.

----------

## siaz4t

Thanx dear.

I tried dhcpcd. The network was configured but there was no file named as "dhcpcd-<interface>.pid" in the /var/run  directory.

When i ping the server it was working.

On  the other hand, i tried the same thing on a second pc on the same network, but i this case nothing happend. the network was not configured.

I m using dhcpcd v.1.3.22-pl4 for this purpose.

I tried the command 

dhcpcd -d <interface>

Any thing more i need to do?

----------

## runningwithscissors

 *siaz4t wrote:*   

> Thanx dear.
> 
> I tried dhcpcd. The network was configured but there was no file named as "dhcpcd-<interface>.pid" in the /var/run  directory.
> 
> When i ping the server it was working.
> ...

 

Were you planning on connecting to machines outside your network? If you were, then all you need to do is set up default nameserver entries if you couldn't ping machines outside your local network.

 *siaz4t wrote:*   

> 
> 
> On  the other hand, i tried the same thing on a second pc on the same network, but i this case nothing happend. the network was not configured.
> 
> 

 

You don't need to do anything special to configure dhcp on the client. You may specify that the interface explicitly receive an address via dhcp, but it is not mandatory. If you wish to, you may edit the net.example file in /etc/conf.d and save it with the name 'net' to implement those options.

 *siaz4t wrote:*   

> 
> 
> I m using dhcpcd v.1.3.22-pl4 for this purpose.
> 
> I tried the command 
> ...

 

What does the log say? Is your network device configured properly?

----------

## siaz4t

I am trying to connect with the server. I am not trying to connect to the machines outside the network.

By using the "dhcpcd -d eth0"

the log file i received in  the /var/log directory with the name "message" is

May  8 12:03:34 (none) user.info kernel: skge eth0: enabling interface

May  8 12:03:34 (none) local0.debug dhcpcd[1391]: broadcasting DHCP_REQUEST for 192.168.0.10 

May  8 12:03:35 (none) user.info kernel: skge eth0: Link is up at 100 Mbps, full duplex, flow control tx and rx

May  8 12:03:44 (none) user.debug kernel: eth0: no IPv6 routers present

May  8 12:03:44 (none) local0.debug dhcpcd[1391]: timed out waiting for DHCP_ACK response 

May  8 12:03:44 (none) local0.debug dhcpcd[1391]: broadcasting DHCP_DISCOVER 

May  8 12:04:44 (none) local0.err dhcpcd[1391]: timed out waiting for a valid DHCP server response 

May  8 12:04:44 (none) local0.debug dhcpcd[1391]: modify_resolvconf restore

May  8 12:04:44 (none) user.info kernel: skge eth0: disabling interface

May  8 12:04:44 (none) local0.debug dhcpcd[1391]: modify_resolvconf returns 134

May  8 12:04:44 (none) local0.err dhcpcd.exe: wrong interface name ""

I cant understand it. Is "eth0: no IPv6 routers present" the problem?

----------

## runningwithscissors

No, the no ipv6 routers present message is not an error.

If the same server is assigining addresses to your other machine via dhcp, then I think the problem lies with the client machine, provided this machine is on the same network as the other machine that succeeds in acquiring an address. Are you blocking incoming traffic to your client machine in any way? (Improperly configured firewall?). The client machine is simply not receiving a response from the server.

I can't think of any other reasons except for incoming traffic on the client being blocked. Maybe someone else on the forum with a better understanding of the DHCP protocol may have more ideas.

----------

## siaz4t

Thanx for help me

Is there any other way to configure network without dhcpcd or dhcpd?

----------

## UberLord

 *siaz4t wrote:*   

> I m using dhcpcd v.1.3.22-pl4 for this purpose.

 

That version is very old - why not try dhcpcd-2.0.5?

----------

