LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-29-2006, 04:13 PM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Question Wireless networking doesn't work on boot but does on reboot


I am having an odd problem with wireless networking using ndiswrapper.

When I boot, the machine the machine hangs for a couple of minutes before starting X.

I think it is hanging while executing /etc/rc.d/rc.local at the line

/sbin/dhcpcd wlan0

After a couple of minutes X starts but there is no network connection.

If I then turn the machine off and boot it up again there is no hanging and the network works.

Not only that but the machine can be turned off for a few hours and it will boot ok with a working network. It seems that if the Pc is turned off for some days then the problem comes back. It is as if it takes time to wake up the network connection.

This is proving a difficult issue to test because it is not easy to reproduce.

Any ideas? It would help if I could run the statements in rc.local as a non-root user so that any user would be able to start the network if it doesn't work on booting.

Alan
 
Old 04-29-2006, 04:23 PM   #2
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Shouldn't inet1 be firing up your card as opposed to local? It's a more logical place for it anyway and inet.conf should be capable of handling wlan interfaces...

I use driverloader and am not fimilar with ndiswrapper but still... I would probably try listing ndiswrapper in rc.modules then let inet1 handle the connection like it's supposed to happen. Who knows, that may solve your quirkyness.
 
Old 04-29-2006, 04:44 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Your problem sounds like it is related to the lease time of your IP address. When you boot, the "dhcpcd" program tries to get a lease for an IP address with the local DHCP server (most probably your cable/dsl internet router). Once the computer has obtained an IP lease, that lease will remain valid for a specific amount of time, determined by the DHCP server. Within the first 50% of that lease time, your "dhcpcd" program will feel no need to query the DHCP server because it knows the IP address it has cached is still valid. Only after that 50% timeline has passed, will the dhcpcd program begin directing cautious queries toward the DHCP server, to verify the IP address is not about to be leased to some other PC.
Your PC's talks to the DHCP server seems to cause rather large delays. When the IP address lease has been obtained, subsequent (re)boots seem to go much quicker, up to the point where obviously the 50% timeline is passed, and the lengthy process of querying the DHCP server begins again.

Check the content of /etc/dhcpc/dhcpd-wlan0.info for the value of "RENEWALTIME" and divide that value by 8600 to get the number of days that the dhcp client may use the IP address before starting a new query.
Also, you might need to activate your wlan0 interface earlier in the boot process. The rc.local file is only executed after all the other programs have been started. If you run Slackware 10.2 (not earlier) you can add this to /etc/rc.d/rc.inet1.conf for your wlan0 interface:

Code:
# Config information for wlan0:
IFNAME[1]="wlan0"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
Then, the network interface configuration will happen much sooner in the boot process, and chances are you will have an IP address by the time X is starting.

Long story, but I guess you should check that DHCP server to see if it is being too busy.

Eric
 
Old 04-29-2006, 05:13 PM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Thanks.

I have uncommented some lines in inet1.conf as follows
IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_ESSID[4]=whatever
WLAN_MODE[4]=Managed
WLAN_KEY[4]="whatever"
WLAN_WPADRIVER[4]="ndiswrapper"

and commented out the stuff in rc.local
It is working but I do not know about whether it will work after the expiry. Do those changes look ok?

/etc/dhcpc/dhcpd-wlan0.info shows:

LEASETIME=3600
RENEWALTIME=1800
REBINDTIME=3150

Should I change the renewal time?
 
Old 04-29-2006, 05:50 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
A LEASETIME of 3600 means one hour which is very short. You could easily make that 12 hours, and still start fresh every day.

Code:
IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_ESSID[4]=whatever
WLAN_MODE[4]=Managed
WLAN_KEY[4]="whatever"
WLAN_WPADRIVER[4]="ndiswrapper"
I don't think you use WPA, so you might as well leave WLAN_WPADRIVER[4]="ndiswrapper" out.

Eric
 
  


Reply



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
Wireless worked on install doesn't work after 1st reboot - Debian mulciber Linux - Wireless Networking 4 03-20-2006 08:24 AM
Wireless won't work after reboot w/ Mepis& integrated Dell Wireless 1370 WLAN MiniPCI longboarder543 Linux - Wireless Networking 1 03-01-2006 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:52 AM.

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