LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-19-2015, 07:56 AM   #1
Haines
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Rep: Reputation: Disabled
Difficulty getting association


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:

auto lo
iface lo inet loopback

# allow-hotplug eth0
# iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wireless-mode managed
wpa-ssid ATT680
wpa-psk <ten digits>

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?).
 
Old 03-19-2015, 03:23 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You can leave auto stanza there and check DHCP lease time.
 
Old 03-19-2015, 07:24 PM   #3
Haines
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
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.
 
Old 03-20-2015, 02:32 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
DHCP client configuration is in /etc/dhclient.conf and like following

lease {
interface "eth1";
option subnet-mask 255.255.255.0;
option dhcp-lease-time 300;
}
 
Old 03-20-2015, 02:49 PM   #5
Haines
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
> DHCP client configuration is in /etc/dhclient.conf and like following

> lease {
> interface "eth1";
> option subnet-mask 255.255.255.0;
> option dhcp-lease-time 300;
> }

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.
 
Old 03-23-2015, 02:37 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
I just give you a example, how to set lease time. Normal lease time should be 24 hours.
 
Old 03-24-2015, 04:46 AM   #7
Haines
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks. I did as you suggested and now have a stanza in /etc/dhcp/dhclient.conf:

lease {
interface "eth0";
option subnet-mask 255.255.255.0;
option dhcp-lease-time 147600;
}

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.
 
Old 03-25-2015, 02:55 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Yes, you need restart network.

/etc/init.d/networking stop
/etc/init.d/networking start
 
Old 03-26-2015, 09:20 AM   #9
Haines
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes, that did it. No more eth0 renewals. Of course that leaves open why the default lease time was so brief. Thanks.
 
Old 03-26-2015, 01:57 PM   #10
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
It is dependent on the network change. If change is often, it should be short.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No association with my AP langfor6 Linux - Wireless Networking 4 05-26-2007 12:13 PM
File Association sgtbob Linux - Newbie 2 07-15-2004 06:25 PM
file association true_atlantis Linux - Newbie 1 10-27-2003 03:26 PM
file association ergo_sum Linux - Newbie 6 10-11-2003 01:26 PM
file association cuco76 Linux - General 1 10-09-2003 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration