# [solved]busybox udhcpc: no lease, failing (BOOT time)

## cord

While system starts udhcpc doesn't obtain lease.

```
 * Bringing up interface enp2s0

 *   Caching network module dependencies

need dbus

 *   dhcp ...

 *     Running udhcpc ...

udhcpc: started, v1.29.0

udhcpc: sending discover

udhcpc: sending discover

udhcpc: sending discover

udhcpc: no lease, failing

 *     start-stop-daemon: failed to start `/bin/busybox'

```

When I login the system and start it manually - lease obtained (in most cases).

```
# /etc/init.d/net.enp2s0 restart

 * Bringing up interface enp2s0

 *   dhcp ...

 *     Running udhcpc ...

udhcpc: started, v1.29.0

udhcpc: sending discover

udhcpc: sending select for 172.16.0.2

udhcpc: lease of 172.16.0.2 obtained, lease time 86400                                                                                                                                  [ ok ]

 *     received address 172.16.0.2/30 

```

What is the problem at boot time?Last edited by cord on Fri May 08, 2020 3:15 pm; edited 1 time in total

----------

## UberLord

udhcpc has no knowledge of carrier state - it's probably down at boot and takes to long to get up before it times out.

Either use something that knows about carrier state instead of udhcpc (such as say dhcpcd) or install something in front of it like netplugd (which the netifc scripts should work with automagically).

----------

## cord

Alright, I have added netplugd to start. Now it's not obtain lease either. 

```
localhost / # /etc/init.d/net.enp2s0 start

 * Bringing up interface enp2s0

 *   Starting netplug on enp2s0 ...                                                                                                                                                     [ ok ]

 *     Backgrounding ...

 * WARNING: net.enp2s0 has started, but is inactive

localhost / #
```

Last logs:

```
Sep 25 20:40:04 [kernel] [ 1470.727374] r8169 0000:02:00.0 enp2s0: link down

Sep 25 20:40:04 [kernel] [ 1470.727418] r8169 0000:02:00.0 enp2s0: link down

Sep 25 20:40:04 [kernel] [ 1470.727426] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready

Sep 25 20:40:04 [/etc/init.d/net.enp2s0] WARNING: net.enp2s0 has started, but is inactive

Sep 25 20:40:07 [kernel] [ 1473.453515] r8169 0000:02:00.0 enp2s0: link up

Sep 25 20:40:07 [kernel] [ 1473.453532] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready

Sep 25 20:40:07 [netplugd] enp2s0: state DOWN flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000

Sep 25 20:40:07 [netplugd] /etc/netplug.d/netplug enp2s0 in -> pid 4155
```

And ifconfig shows no IP assigned to enp2s0.

----------

## UberLord

File a bug or try dhcpcd instead of netifrc.

See sig for details.

----------

## cord

Solved. I have changed netplugd to ifplugd

Also related topic ->

----------

