Ubuntu: reset networking

5

1

My eeePC Ubuntu (9.10) wireless connection stops working after returning from sleep or hibernation. The only thing that helps is restarting the machine.

Is there some way to reset networking without restarting the Ubuntu? I've already tried commands like

sudo ifconfig wlan0 down
sudo ifconfig wlan0 up

but it doesn't help. I have this problem for some months now and I couldn't find any good answers by googling around.

Igor Brejc

Posted 2010-03-04T15:51:21.543

Reputation: 153

Answers

2

sudo /etc/init.d/networking restart

akira

Posted 2010-03-04T15:51:21.543

Reputation: 52 754

Thanks, unfortunately it still doesn't help. But I'll accept your answer since it's what I was asking about. – Igor Brejc – 2010-03-04T21:32:49.957

On Precise this says Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces. – Mechanical snail – 2013-05-01T04:44:47.193

7

After perusing numerous threads and articles about wireless just hanging for no reasons and forcing me to restart the computer, these are the only steps that ever got me my wireless connection back without rebooting.

1. Find out about the wireless card and its driver

lshw -C network

You should get some comprehensive output about your wireless and ethernet. What you're looking for is the line that has the name of the wireless card's driver. Mine looks like this:

 configuration: broadcast=yes driver=iwlagn ip=192.168.1.102 latency=0 [...]

There we go: driver=iwlagn.

2. Unload and reload its kernel module

sudo modprobe -r iwlagn
sudo modprobe iwlagn

I hope this works for you as it does for me.

Michael Ekoka

Posted 2010-03-04T15:51:21.543

Reputation: 171