Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running Debian Wheezy on my desktop wirelessly connected to a Motorola NVG510 router. I was not experiencing problems, but happened to glance at my /var/log/daemon.log and discovered an attempt every 5-10 minutes to obtain an IP address for eth0, even though I'm using the wla0 interface:
Mar 15 08:09:58 engels dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
...
Mar 15 08:10:59 engels dhclient: No DHCPOFFERS received.
Mar 15 08:10:59 engels dhclient: No working leases in persistent database - sleeping.
Unfortunately I attempted to stop the DHCP requests by commenting the eth0 stanza in my interfaces file like this and restarted networking:
That was a mistake, for doing it killed the wlan0's association with the router and I lost access to Internet. My first question is, why did commenting the eth0 stanza dissociate the wlan0?
I've had this problem before (with this router imposed on me by my provider), but there's no consistency in how I've recovered.
# ifconfig -a
eth0 UP
no inet address
ethp:avahi
lo UP
inet address 127.0.0.1
wlan0 UP
no inet address
wlan0: avahi
I tried ifdown wlan0/ifup wlan0, networking restart, reboot the router, several times in different orders. My second question is, what order of these operations makes sense? I'm tired of randomly stumbling about.
I do # iwconfig wlan0 and see that wlan0 is not associating with my router:
Access Point: Not Associated
I try
# iwlist key
wlan0 2 key sizes : 40, 104bits
4 keys available :
[1]: off
[2]: off
[3]: off
[4]: off
Current Transmit Key: [1]
eth0 no encryption keys information.
I took this to mean that somehow the encryption key was not working because on a different machine I had a value for key [1] and here transmit key [1] is "off". But now that I'm back on line, I still have "off". So my third question is, why was I wrong to draw the inference there was a key problem?
Things are now working, but as once before only by rebooting the machine. My final question is, given what I tried, is there something else I could have done to recover Internet access without having to reboot?
In retrospect I could simply have done # ipdown eth0 to stop the DHCP requests to the router, but I'm not anxious to reboot if I happen to be wrong. I did not have any problem over the years with my old wireless router (Linksys), but the Motorola imposed by my provider has been a pain. The old router does not sync with the provider and the provider says it won't help getting the Linksys to sync (because the Linksys lacks a backdoor?).
You can leave auto stanza there and check DHCP lease time.
Thanks, but I have not been able to see how to set lease time. I find default and max lease time, but not where to set lease time. In my /var/lib/dhcp/dhclient.eth0.leases file, the option dhcp-lease-time is set to 86400, which seems to be 24 hours.
Thank you for the pointer, but your example sets the lease time to 300, to five minutes, and that was what I was questioned. My daemon log said that a new lease was obtained every 5-10 minutes, and
I assumed this was far too often. But your example might imply a new lease every five minutes is normal. Following your method I can set it to something else, but I do not know what is typical or
normal.
It had no effect. Still an attept is made to renew the lease every 5-10 minutes. I wonder
if a daemon should somehow be restarted to reread its configuration file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.