14

When I am using Ubuntu, sometimes the network goes down and there is no option to bring back the wired network. There is always option for wireless, but no option for wired network. In such case I try sudo service network-manager restart (using a command line just to start the interface). This works sometimes, sometimes it takes many iterations and other times it never starts. In my country the network goes down without any reason. I even wrote a perl script to run above script for at least 10 iterations and scheduled it using Cron. Since lately I cannot start the network using above command unless I restart the computer. What is the problem with the computer, why can't a network restart become a first class citizen in Ubuntu and needs a computer reboot. Why isn't there an option that never goes down just like wireless network to start wired network. Is there something I am missing. The command sudo /etc/init.d/networking restart does not seem to do anything at all.

1

3 Answers 3

14

You can run this command to take down all interfaces:

sudo ifdown -a

Then run this to bring them back up again:

sudo ifup -a

Hope that helps!

See also:

5

The "Wired network" option in the NetworkManager indicator becomes greyed out if no connection is detected over the cable. First of all I would check that you are not using a faulty cable or router.

If it really is a problem with the driver or network hardware on your computer, you might want to try unloading and reloading the kernel module responsible for handling your wired network adaptor. You can find the name of the module by running lspci -k, looking for the entry corresponding to your network card, and reading the name off the line "Kernel driver in use". Then do sudo rmmod <name> ; sleep 5 ; sudo modprobe <name>, replacing <name> with the name of the kernel module in question. The network hardware should be re-initialized in the process, so the effect should be pretty close to a reboot.

0
1

In Xubuntu, which might differ from Ubuntu, I can deactivate the network as a whole in the Panel (but not just Eth).

Your problem doesn't sound like normal behaviour, so there is no normal way to deal with it.

Another solution, which might trigger a restart, would be to pull the cable and plug it again.

Investigating your lookfiles might help you to find out, what is going on, and what to fix. Try

dmesg | tail -n 30 

on the next time your connection drops.

Another idea is, to unload the module for your network chip, and reload it again, like so.

sudo rmmod 8139too
sudo modprobe 8139too

but instead of 8139too, you have to find out what your card/chip is, and which module it uses.

Not the answer you're looking for? Browse other questions tagged .