LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Restarting Wireless Network (https://www.linuxquestions.org/questions/slackware-14/restarting-wireless-network-636230/)

bogzab 04-18-2008 08:36 AM

Restarting Wireless Network
 
I have been getting Slackware 12 running on a new Lenovo 3000 N200 laptop PC. Mainly all is working well now, especially since I built and configured the latest kernel release. One small annoyance is that every now and then the wireless network goes down.
Code:

iwconfig
continues to show the correct parameters and even shows that the signal strength from my router is fine. I try to re-start by running
Code:

/etc/rc.net/rc.inet1
but although I get messages saying that it is trying to find a DHCP server first on eth0 (fails, no ethernet plugged in) and then on wlan0 (fails for reasons that I don't understand) this does not seem to get the wireless link re-started.
Code:

iwlist scan
shows that the router can be found, but still no connection made. I am obviously missing a trick - can somebody tell me what it is? Running rc.inet1 does re-start the eth0 link if I have it plugged in. A re-boot always works and the wireless connection is found after this procedure, but I am trying to avoid this as a routine solution.

GrapefruiTgirl 04-18-2008 09:04 AM

I have found, because I have any one of 2 possible connections at a given time, that I generally need to specify which interface I want to bring UP.
For example, I usually use LAN; therefore it is the first connection listed in my inet1.conf. If I connect my dialup, and restart inet1, that simply restarts eth0 (with no connection) but it ignores ppp0.

So, what I do is stop inet1, then restart inet1 specifying that it should bring up PPP0, so:

/etc/rc.d/rc.inet1 stop
/etc/rc.d/rc.inet1 ppp0 start

and it will now ignore my LAN, and will start ppp0 instead.

In your case, after the stop command, you will want to bring up wlan0, or whatever it is called on your machine.

Does this help?

Sasha

PS - I am not sure (IF I could have dialup and LAN going at once) if I could tell inet1 to use BOTH interfaces, and I can't try it, because the computer from which I get my LAN connection is actually using the same dialup line I would use, when I use ppp.
Anyhow, the above is the only way I have found to for-sure re-start a given connection.

BCarey 04-18-2008 10:25 AM

Quote:

Originally Posted by bogzab (Post 3125218)
I have been getting Slackware 12 running on a new Lenovo 3000 N200 laptop PC. Mainly all is working well now, especially since I built and configured the latest kernel release. One small annoyance is that every now and then the wireless network goes down.
Code:

iwconfig
continues to show the correct parameters and even shows that the signal strength from my router is fine. I try to re-start by running
Code:

/etc/rc.net/rc.inet1
but although I get messages saying that it is trying to find a DHCP server first on eth0 (fails, no ethernet plugged in) and then on wlan0 (fails for reasons that I don't understand) this does not seem to get the wireless link re-started.
Code:

iwlist scan
shows that the router can be found, but still no connection made. I am obviously missing a trick - can somebody tell me what it is? Running rc.inet1 does re-start the eth0 link if I have it plugged in. A re-boot always works and the wireless connection is found after this procedure, but I am trying to avoid this as a routine solution.

This sounds similar to my problem. Are you using WPA?

EDIT Sorry, I didn't notice you were on Slack 12. I'm on -current, so it's probably not the same problem (worked fine on 12 for me). /EDIT

Brian

bogzab 04-18-2008 11:02 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 3125253)

So, what I do is stop inet1, then restart inet1 specifying that it should bring up PPP0, so:

/etc/rc.d/rc.inet1 stop
/etc/rc.d/rc.inet1 ppp0 start

and it will now ignore my LAN, and will start ppp0 instead.

I think I should do the "stop" bit. So far I have assumed that it has stopped, but this presumably stops cleanly and starting will be more like starting from a re-boot (which always works).

Quote:

Originally Posted by GrapefruiTgirl (Post 3125253)

Does this help?

I'll be able to say when I next get the problem! Thanks for the advice anyway.

BCarey 04-18-2008 11:33 AM

Quote:

Originally Posted by bogzab (Post 3125350)
I think I should do the "stop" bit. So far I have assumed that it has stopped, but this presumably stops cleanly and starting will be more like starting from a re-boot (which always works).



I'll be able to say when I next get the problem! Thanks for the advice anyway.

Using "restart" will do "stop" and then "start". Also, if you are going to specify the interface you should put an underscore between the interface name and the directive, ie. "eth1_restart".

Brian

GrapefruiTgirl 04-18-2008 02:04 PM

iwconfig rc.inet1 restart
 
Quote:

Originally Posted by BCarey (Post 3125385)
Using "restart" will do "stop" and then "start". Also, if you are going to specify the interface you should put an underscore between the interface name and the directive, ie. "eth1_restart".

Brian

Good point, thanks Brian. -- I often get mixed up when using ifconfig, and restarting inet1; there are several ways of telling each what to do, such as:

eth0_up = eth0 start
eth0_restart
eth0 restart (no underscore)

and the same for if/iwconfig: try variations of up/down or stop/start and with/without underscore, if they give you a hassle :)

BCarey 04-18-2008 02:47 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3125500)
Good point, thanks Brian. -- I often get mixed up when using ifconfig, and restarting inet1; there are several ways of telling each what to do, such as:

eth0_up = eth0 start
eth0_restart
eth0 restart (no underscore)

and the same for if/iwconfig: try variations of up/down or stop/start and with/without underscore, if they give you a hassle :)

:)
I've typed it many times recently, as I'm struggling to get it to work on -current ;-)

Brian


All times are GMT -5. The time now is 02:19 AM.