LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   How to Reset Ubuntu Network Without Reboot (https://www.linuxquestions.org/questions/linux-wireless-networking-41/how-to-reset-ubuntu-network-without-reboot-656979/)

cmnorton 07-20-2008 09:05 AM

How to Reset Ubuntu Network Without Reboot
 
Once in a while my home wireless network burbs, and I need to reconnect. . Kubuntu's network manager tries to reconnect to my network and hangs.

I have tried /etc/init.d/networking restart, and this does not cause a reconnect.

All I want to do is bring the network down and restart it without rebooting. Doing things like this is what makes Linux great; I'm just trying to research the steps.

neilneil2000 07-20-2008 09:26 AM

Try these commands:

This will take down all interfaces:
Code:

sudo ifdown -a
This will bring them all back up again
Code:

sudo ifup -a
You can do it by interface, but you'll have to check out the man pages for that!

Clemente 07-20-2008 09:35 AM

Hi,

if you use knetworkmanager as your mentioned KDE Network Manager, restarting the networding script cannot work:

1)
The script does only handle network devices that are configured in /etc/network/interfaces (on debian an related distributions - others might have a coresponding file somewhere).
2)
The knetworkmanager does only manage devices that are _not_ listed in the interfaces file mentioned above. This is usefull for mobile network devices - like your wlan device.

Both ways to configure network devices work complementary.

If my WLAN hangs, I usually reconnect the device using the knetworkmanager GUI (translation could differ, I run no english system):
Code:

1) Right click the icon
2) Select "Options"
3) Select "Change to offline modus"
Wait until everything is disconnected
4) Repeat 1 and 2, select "Change to online modus"
Wait until everything is reocnnected.

Perhaps, you have to select your WLAN manually after changing towards online modus.

Hope this one helps,
Greet-o-mente

Clemente 07-20-2008 09:38 AM

@neilneil2000:

IIRC, for those commands is the same valid:
They only manage devices configured in /etc/network/interfaces.
And if the op uses knetworkmanager - what I assume - the desired device is not configured there.

koen plessers 07-20-2008 01:01 PM

Hello

After bad experiences with networkmanager, I installed Wicd: http://wicd.sourceforge.net/

Also very easy to connect or disconnect.

Bye

Koen Plessers

cmnorton 07-20-2008 01:18 PM

This performs the reset.
 
Quote:

Originally Posted by Clemente (Post 3220634)
Hi,

if you use knetworkmanager as your mentioned KDE Network Manager, restarting the networding script cannot work:

1)
The script does only handle network devices that are configured in /etc/network/interfaces (on debian an related distributions - others might have a coresponding file somewhere).
2)
The knetworkmanager does only manage devices that are _not_ listed in the interfaces file mentioned above. This is usefull for mobile network devices - like your wlan device.

Both ways to configure network devices work complementary.

If my WLAN hangs, I usually reconnect the device using the knetworkmanager GUI (translation could differ, I run no english system):
Code:

1) Right click the icon
2) Select "Options"
3) Select "Change to offline modus"
Wait until everything is disconnected
4) Repeat 1 and 2, select "Change to online modus"
Wait until everything is reocnnected.

Perhaps, you have to select your WLAN manually after changing towards online modus.

Hope this one helps,
Greet-o-mente

This shuts down and restarts network manager.
thanks

pcgeek321 09-07-2010 11:15 AM

ifdown ethX,ifup ethX (X is the interface #)

tito_drum 03-01-2012 02:55 PM

Restart network interface Ubuntu
 
Code:

$ ifconfig eth0 down
Code:

$ ifconfig eth0 up
this works for wired connections


All times are GMT -5. The time now is 05:38 PM.