udhcpc failed to get a DHCP lease while configuring networking

3 posts / 0 new
Last post
#1 Thu, 2017-04-27 16:15
suiwenfeng
  • suiwenfeng's picture
  • Offline
  • Last seen: 11 months 1 week ago
  • Joined: 2017-04-25

steps to reproduce the error.

- create bootable usb after download iso(alpine-standard-3.5.2-x86_64.iso)
dd if=alpine-standard-3.5.2-x86_64.iso of=/dev/sdb
- cat /etc/network/interfaces
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet dhcp
 
auto wlan0
iface wlan0 inet dhcp
 
- /etc/init.d/networking restart
udhcpc: started, v1.25.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc failed to get a DHCP lease
udhcpc: no lease, failing

the network is ok while boot to Ubuntu in the same laptop.

Fri, 2017-05-05 17:09
ReproducibleBui...
  • ReproducibleBuildsAreAGoodStandard's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2017-05-05

Also got udhcpc failed to get a DHCP lease while answering questions in response to setup-alpine, having also dd'd that iso onto a USB, booting into a HP Pavilion notepad. Later tried burning iso onto a CD-ROM with same result.

setup-alpine asked about my eth0 and wlan0 (or was that wlan1?), which surprised me as I had turned the wireless setting off on my router.

Eventually tried running setup-interfaces on its own first, but this was overwritten by setup-alpine, as I think may be indicated in the Wiki. Tried various efforts, but these may not be appropriate, e.g. using static addresses but not setting router with a static address.

Someone reported needing to do a hard reset while not getting a dhcp lease (https://bugs.alpinelinux.org/issues/6705 for a wireless connection) and that inserting
udhcpc_opts -b
on the last line of /etc/network/interfaces helped. I used vi to try that, but that doesn't give me a lease.

Is this a bug for users not installing on a virtual machine?

Fri, 2017-05-05 23:25
ReproducibleBui...
  • ReproducibleBuildsAreAGoodStandard's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2017-05-05

Am able to connect even though I appeared to have the same problem as in the original post. The following may not be the most elegant, but I am not an advanced user. Instead of running setup-alpine first:
1. Ran setup-interfaces first, answering "done" when asked about wlan0, as not required.
2. Partly applied https://wiki.alpinelinux.org/wiki/Configure_Networking:
hostname -F /etc/hostname but not sure if this is necessary, and although tried to change the hostname by doing the echo "shortname" > /etc/hostname instruction, this seemed to add an extra line to the hostname file and so I left the hostname as localhost.
3. /etc/init.d/networking --quiet start & and had to force out of this (I am not advanced!) using Ctr+C.
4. ifup eth0 but not sure if this was necessary.
(I could then do setup-alpine but answered "done" when asked about my eth0 (and wlan0?) setting, and "[]" about my DNS settings.
Note: Steps 1 or 2 to 4 had to be redone on reboot even after installing to disk.
Maybe a coder could clarify what's really necessary, if that can help. There haven't been many replies to some posts though - too busy coding, perhaps!

Log in or register to post comments