Sure Way to Restart a Wireless Network

linux penguin is watching windows fly

While wireless signal is good, the network is dead – why is that? Many reasons, of course. You can spend time to figure out the reason and then try to fix, which is a good approach, but requires some time. Or you can restart the network to see if it resolves the issue, and if it does – forget that the problem ever existed.

However the way to restart a wireless network is not always “black and white”. Sometimes it is possible using GUI, and sometimes by typing something that means “network service restart”. And yes these ways are “clean”, but have a drawback – they rely on operating system to do what it suppose to do and restart the network.

However, OS does not always behave (yes, Linux does not always behave, along with Mac, and Windows, and “any” OS.. ). But here is a sure way to restart it – you would need to get down to the driver level though – to be less OS (or distribution) specific. But I’ll guide you through, don’t worry..

So, the signal is full/good/strong:

wireless signal is good
but there is no network:

$ ping -c 4 google.com
ping: unknown host google.com

First thing to do is to see what wireless card you are using:

$ lspci | grep -i network
08:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

In my case it is Intel 3945ABG. Next, check what driver is used for this card. I did a simple google search, and saw that the driver is “ipw”something.

Let’s see what ipw-like modules/drivers are currently running/loaded:

$ modprobe -l | grep ipw
/lib/modules/2.6.20-17-generic/kernel/ubuntu/wireless/ipw3945/ipw3945.ko
/lib/modules/2.6.20-17-generic/kernel/drivers/usb/serial/ipw.ko
/lib/modules/2.6.20-17-generic/kernel/drivers/net/wireless/ipw2200.ko
/lib/modules/2.6.20-17-generic/kernel/drivers/net/wireless/ipw2100.ko

Here it is “ipw3945″. Let’s kill it (-r stands for “remove”):

$ sudo modprobe -r ipw3945

Let’s start it back up:

$ sudo modprobe ipw3945

Checking connectivity:

$ ping -c 4 google.com
 
PING google.com (64.233.187.99) 56(84) bytes of data.
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=1 ttl=238 time=43.3 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=2 ttl=238 time=28.9 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=3 ttl=238 time=27.7 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=4 ttl=238 time=34.7 ms
 
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 27.742/33.685/43.323/6.165 ms

Perfect!

8 comments

  1. Awesome! This is what I was looking for.

  2. bilişim haberleri

    A method to reset the modem fine:)

  3. Thanks for sharing this. My friend was having trouble with his Linux and the wireless network. I’ve never tried Linux OS. But it seems that it’s more complicated than Windows and Mac. And to think I was having trouble with windows and setting up the wireless network. What more if I had a Linux?

  4. Thanks!!

  5. Thanks dotkam. I’m still something of a Linux newbie and my wireless connection is not made every time I start up. Roughly 30% of the time, my computer simply acts as if I had no wireless card at all. Previously this meant I would shutdown and restart a few times until it was “found”. Now I have a way to “reprobe” the wireless module. Awesome.

  6. Many thanks for this! I’ve been trying to switch from Windows to Linux for some time now but there’s always something not working properly with my Linux installations and the wireless network was one of those things. It’s been on and off – mostly off – with Opensuse and Linux Mint. The one distribution that has never failed is Mageia but that one is still only on a live-CD. So, now I know how to get the wireless to work in my Linux Mint installation. Onwards to the Opensuse installation!

    Thanks again!

    /Peter, Sweden

  7. New day, new troubles… It seems that I cannot repeat this after having had the computer off during the night. Well, I’ll just have to get Mageia installed and live happily ever after I guess…

    Thanks anyway!

    /Peter

tell me something...
  1. (required)
  2. (valid email - optional)
  3. Captcha
  4. (required)