Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I boot up (or restart networking, as show below) my Debian system, it attempts to get a DHCP lease on my network interface that is unplugged, as you'll see below, it succeeds fine on the wireless later; unfortunately it delays boot by around a minute.

root@**HOSTNAME**:~# cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid **THE-NETWORK-NAME**
    wpa-psk **THE-PASSPHRASE**
root@**HOSTNAME**:~# /etc/init.d/networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/**WIRELESS-MAC-ADDR**
Sending on   LPF/wlan0/**WIRELESS-MAC-ADDR**
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to **DHCP-IP-ADDR** port 67
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/**WIRED-MAC-ADDR**
Sending on   LPF/eth0/**WIRED-MAC-ADDR**
Sending on   Socket/fallback
DHCPRELEASE on eth0 to **DHCP-IP-ADDR** port 67
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/**WIRED-MAC-ADDR**
Sending on   LPF/eth0/**WIRED-MAC-ADDR**
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/**WIRELESS-MAC-ADDR**
Sending on   LPF/wlan0/**WIRELESS-MAC-ADDR**
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from **DHCP-IP-ADDR**
DHCPACK from **DHCP-IP-ADDR**
bound to **WIRELESS-IP-ADDR-FROM-DHCP** -- renewal in 597 seconds.
done.

I'm probably neglecting something really obvious, but right now I'm stumped. Any ideas?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

you are specifying eth0 both as an auto and an allow-hotplug device:

auto eth0
allow-hotplug eth0

this is contradictory, esp. the auto device will not check whether the device is actually plugged.

so you should remove the line with auto eth0.

share|improve this answer
    
This certainly seems to stop it this behavior, although a network service restart with the cable plugged doesn't bring the interface up / establish a DHCP lease now. This is frustrating, although ifup will bring it up. I'll try rebooting later with it plugged in and see whether that works. –  Juniper X Jan 22 at 9:59
    
You can use ifplugd which will monitor if a cable is (un)plugged and launch ifup/ifdown accordingly. –  M Noit Jan 22 at 11:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.