I am sure this is simple, but Google is full of users which cannot get a DHCP address So no matter what search term I use, I only see solutions which do not apply to this problem.
I am running Debian Squeeze on a netbook eeePC 1001P I have a wireless interface and a wired interface defined in /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
allow-hotplug eth0
auto wlan0
iface wlan0 inet dhcp
wireless-key s:XXXXX
wireless-essid myessid
Both interfaces
WORK! When I have plugged in a cable, eth0 acquires and gets an IP, when I am in reach of the WiFi, wlan0 gets an IP address.
Now when I want to use only wireless, and I have no LAN connected, this is what happens at boot:
Code:
ADDRCONF(NETDEV_UP): eth0: link is not ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 24
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
No DHCPOFFERS received
... etc
This is fine, however it takes forever (I think 60 seconds) before DHCP decides to time out. That is awkward. This is my wife's computer and I cannot tell her to intervene manually when she is either in Wifi range or on the LAN.
Why is
dhclient called when it is detected that eth0 is not ready? How can I disable acquiring a DHCP address on an interface which is not ready?
My idea is that when a link is not ready, acquiring a DHCP address is skipped. How can I configure that? I have looked thru the ifup scripts, but nothing. Where do I see what is happening when the interface is
auto eth0?
jlinkels