# Any way to Run dhcpcd client in background during boot up ?

## dhvani001

Hi, 

I new to gentoo linux. I need a help to regarding dhcpcd client. I want to run dhcpcd client in background during boot up process as right now what happen is that i am connecting my gentoo linux machine in switch. in switch i have also connected server but right now its is power off. I turn on my gentoo machine and what i see is that genoot is waiting forever untill it get ip from dhcp server. So i want to run dhcpcd client in background in boot up. 

Please suggest me how can i run dhcpcd client in background ? 

Can any one help me on this ?

Thanks in advanced, 

-Regards

Dhvani Patel

----------

## GFCCAE6xF

Set up a static IP with dhcpcd for a quick fix. For me it went down from ~8s to 1.849s

----------

## dhvani001

 *rorgoroth wrote:*   

> Set up a static IP with dhcpcd for a quick fix. For me it went down from ~8s to 1.849s

 

Hi 

But how can i fix this ? I have to provide ip from dhcp server not a static ip ? 

Please can you provide me some step ? 

Is there any option to run any process in background during boot up ? 

My issue is just put dhcpcd client to run in background ? 

What happen in my case is that my dhcp server is turn off and i am turning my gentoo machine after some time dhcp server is start . 

so my gentoo machine wait untill its get ip address from dhcp server ? 

If i am able to put a dhcpcd client to put in background then my issue may be resolved ? 

Can you provide me some step How to put dhcpcd client into background process during bootup ? 

-Best Regards 

Dhvani Patel

----------

## GFCCAE6xF

Well, you could use the parallel feature of OprenRC but it is kinda... non-working. It may work to some small degree, but I have no idea if it would make dhcpcd start earlier so other things will progress or if there is a way to force it to start dhcpcd earlier, even if you managed to get start earlier in the background it will still take forever though.

Edit: VV I think this may be just incredibly bad reading skills on my part  :Confused: Last edited by GFCCAE6xF on Thu May 09, 2013 12:09 pm; edited 1 time in total

----------

## Suicidal

I think you are looking for: 

```
rc-update add dhcpcd default
```

I have gotten to the point it is so rare that I have to statically assign an ip that if I do I just do it via ifconfig on the console. I dont even have net.eth* symlinks in /etc/init.d anymore.

----------

## Sven Vermeulen

Why not enable dhcpcd but with a small timeout? I use a 5-second timeout.

```

$ cat /etc/conf.d/net

config_eth0="dhcp"

dhcpcd_eth0="-t 5"

```

----------

## Suicidal

 *Sven Vermeulen wrote:*   

> Why not enable dhcpcd but with a small timeout? I use a 5-second timeout.
> 
> ```
> 
> $ cat /etc/conf.d/net
> ...

 

That way probably works good for most. Some buggy network drivers like the tg3 hang forever because they don't report link mode accurately and adding dhcpcd to the default runlevel is a better solution.

----------

