# net.eth0 fails with openrc-0.8.3 due to DHCP timeout

## joehni

Last week openrc-0.8.2 was updated to openrc-0.8.3 and suddenly net.eth0 failed at startup with a weird error claiming busybox was failing. After some investigation I recognized that obviously the preferred DHCP client software changed and that it tried now to use "busybox udhcpc". Therefore I added a second line to my /etc/conf.d/net:

```
config_eth0="dhcp"

modules_eth0="dhclient"

```

Unfortunately, even explicitly selecting dhclient does not solve the problem. At boot time still all dependent services fail (after printing some lines how long they are waiting for eth0 to come up). However, net.eth0 is finally coming up after all those other services failed and I have to start all the dependent services manually :-/. 

When I try to stop and start net.eth0 manually again, four out of five times it takes ~60s to receive my IP address from the DHCP server and I have no clue why. See /var/log/messages:

```
Jul 11 07:14:48 josix avahi-daemon[5151]: Withdrawing address record for 192.168.4.170 on eth0.

Jul 11 07:14:48 josix avahi-daemon[5151]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.4.170.

Jul 11 07:14:48 josix avahi-daemon[5151]: Interface eth0.IPv4 no longer relevant for mDNS.

Jul 11 07:14:51 josix kernel: tg3 0000:09:00.0: irq 45 for MSI/MSI-X

Jul 11 07:14:52 josix dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

Jul 11 07:14:59 josix dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

Jul 11 07:15:07 josix dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7

Jul 11 07:15:08 josix kernel: tg3 0000:09:00.0: eth0: Link is up at 100 Mbps, full duplex

Jul 11 07:15:08 josix kernel: tg3 0000:09:00.0: eth0: Flow control is off for TX and off for RX

Jul 11 07:15:14 josix dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10

Jul 11 07:15:24 josix dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15

Jul 11 07:15:39 josix dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12

Jul 11 07:15:50 josix dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17

Jul 11 07:15:51 josix dhclient: DHCPOFFER from 192.168.2.10

Jul 11 07:15:51 josix dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

Jul 11 07:15:51 josix dhclient: DHCPACK from 192.168.2.10

Jul 11 07:15:51 josix avahi-daemon[5151]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.4.170.

Jul 11 07:15:51 josix avahi-daemon[5151]: New relevant interface eth0.IPv4 for mDNS.

Jul 11 07:15:51 josix avahi-daemon[5151]: Registering new address record for 192.168.4.170 on eth0.IPv4.

Jul 11 07:15:51 josix avahi-daemon[5151]: Withdrawing address record for 192.168.4.170 on eth0.

Jul 11 07:15:51 josix avahi-daemon[5151]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.4.170.

Jul 11 07:15:51 josix avahi-daemon[5151]: Interface eth0.IPv4 no longer relevant for mDNS.

Jul 11 07:15:51 josix avahi-daemon[5151]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.4.170.

Jul 11 07:15:51 josix avahi-daemon[5151]: New relevant interface eth0.IPv4 for mDNS.

Jul 11 07:15:51 josix avahi-daemon[5151]: Registering new address record for 192.168.4.170 on eth0.IPv4.

Jul 11 07:15:51 josix dhclient: bound to 192.168.4.170 -- renewal in 35426 seconds.

```

The busybox version simply fails after 10s, while dhclient succeeds after these 60s. As said, occasionally I get the IP address quite immediately, then both DHCP clients succeed.

Therefore two questions:

1/ Where can I configure the timeout for dependent services in openrc to wait longer?

2/ What may cause this 60s delay for the DHCP client and how can I avoid it?

net.eth0 is run in default level:

```
$ /sbin/rc-update -s

...

             net.eth0 |      default                                  

               net.lo | boot                                          

...

```

- Jörg

----------

## Joseph K.

Sorry to ask the obvious, but did upgrading openrc to the latest version, currently 0.9.8.4, magically fix it?

----------

