Ethernet cable replugged

Hi,
if i boot my machine the network is deteced properly, but sometimes my router with dhcp server just crashes and i have to unplug the powersupply on the router and plug it back in, so this is equivalent to unplug the ethernet cable on my machine and plug it back in. But then network is not detected again properly. I use Knetworkmanager to create a new connection, or switch to offline mode and back to online mode, but this doesn’t help.

What can i do to redetect network settings?

Thanks for help.

As far as your machine is concerned, the network never went down and will not ask for a new IP address. I think you need to get a better router.

If your interface is eth0, just do the following to bring it down and then up (as root).


ifdown eth0
ifup eth0

Problem is, the threadstarter is using NetworkManager so ifup/ifdown won’t work.

However, the command


rcnetwork restart

(also as root) works for both NWM and ifup.

Thanks for the replies, i will try it next time it happens. And yes, i need to get a better router, but i don’t have the money, but it’s on the list.

It worked (kind of). Network access is available again after rcnetwork restart. But Networkmanager displays a wrong icon in the system tray area. This is not a big problem, as long as it works i don’t care about the icon :wink: