Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
busybox udhcpc: no lease, failing (BOOT time)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cord
Apprentice
Apprentice


Joined: 28 Apr 2007
Posts: 289

PostPosted: Sun Sep 23, 2018 6:22 pm    Post subject: busybox udhcpc: no lease, failing (BOOT time) Reply with quote

While system starts udhcpc doesn't obtain lease.
Code:
 * 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).
Code:
# /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?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6721
Location: Blighty

PostPosted: Mon Sep 24, 2018 3:01 pm    Post subject: Reply with quote

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).
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
cord
Apprentice
Apprentice


Joined: 28 Apr 2007
Posts: 289

PostPosted: Tue Sep 25, 2018 5:49 pm    Post subject: Reply with quote

Alright, I have added netplugd to start. Now it's not obtain lease either.
Code:
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:
Code:
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.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6721
Location: Blighty

PostPosted: Wed Sep 26, 2018 2:47 am    Post subject: Reply with quote

File a bug or try dhcpcd instead of netifrc.
See sig for details.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum