Ask your questions here.
Post a reply

How to restart network

Thu Jan 17, 2013 4:20 am

Just how would I restart the network on refracta? I've always used this on Gnome but it doesn't work with refracta:

Code:
# service network-manager restart
network-manager: unrecognized service

wicd isn't installed so just where/how is the network configured?? And how can I restart if it gets flaky?

Re: How to restart network

Thu Jan 17, 2013 6:58 am

I often do
etc init.d networking restart, but including the slash
or
ifdown eth0
ifup eth0
If i knew more i would say it. I don't.

If you don't use wireless a network manager is superfluous. dhclient eth0 is all needed.
If you use wireless: consider stop doing so (a) cracking wireless routers is not a rocket science. all that is needed is time b) it is slow and c) it adds complexity, hence confusion).

locate is a good command.
after installing run updatedb (i think you will be told too).
then it makes sense to pipe the output to a pager
locate network-manager | less
or to a grep
locate network-manager | grep -v home
or
locate network-manager | grep bin
or similar.

I removed "shit knows" to start behaving like an adult. But the truth is: shit knows.

Re: How to restart network

Thu Jan 17, 2013 2:26 pm

If wicd is not installed, you're still using an old beta. Go ahead and install it now. The bugs that stopped me from installing it before have been fixed.

Restart the init script as nadir suggested. Ignore the warnings about it being deprecated. AFAIK, it'll continue to work until systemV is replaced with systemd.

You can use ifup/down if your interface is configured in etc-network-interfaces. I think the betas without wicd have eth0 configured for dhcp here.

You can also use ifconfig to bring a network interface up or down.

Using "service blah..." to start and stop services is a redhat thing. I forget what package needs to be installed in debian to be able to use that.
.

Re: How to restart network

Fri Jan 18, 2013 12:47 am

Thanks for the input. I haven't manually configured any network interfaces. Only plug and play. No wireless . . . not for security but just don't want that energy in my environment. I'm rather recently off dialup so don't understand networking very well yet . . . obviously.

This stopped the network but then it wouldn't restart.
Code:
# etc init.d networking restart


Code:
# ifdown eth0
# ifup eth0

Stops and starts the network. But then something went wrong with permissions when I tried to post this. Don't know if it's related to my network experiments:
Forbidden
You don't have permission to access /posting.php on this server.


I figured out why this wouldn't post. I thought "code" tags isolated commands but evidently not. Had to remove the slashes to get this to post.

Re: How to restart network

Fri Jan 18, 2013 1:16 am

the message you got has hit all of us. It is a bug in phpbb3 the way we got it here
It sucks

what means: couldn't restart? any messages about not restarting?

the most lazy way is to:
Code:
dhclient -v eth0

if eth0 is your interface
Code:
ifconfig -a

will tell you. If you got several you need to guess.

Edit the file etc network interfaces , with slashes, is like this:
Code:
auto eth0
iface eth0 inet dhcp

that's all there is to it.
Network managers and manually edited interfaces file can stand on each others feed.
run "sysv-rc-conf" and disaple the network-manager from starting during boot (or, if you prefer, remove it, sure)

I probably forgot something, perhaps even a lot and basic stuff, but usually that should work. I for one don't mind to type dhclient -v eth0
As a first check if , in general, everything is fine it is perfect.
(also ping localhost, ping router -like 192.168.1.1 , ping google.com and ping 8.8.8.8)

shutting down the router, waiting for a few, then starting it again, is a tip often given.

Calling the ISP is another option. Run a speedtest somewhere. Everything ok? I got such problems, and it usually is a problem only to be solved by the ISP (i can fiddle as much i want, no luck, i call them, boom: problem solved).

There is a thread in help, dean posted a lot, called *wicd*, but i think it was about wireless. Might contain some tips anyway. He is the man of it. I bet he can plug your toaster in your router an make it talk to your refrigerator.

Re: How to restart network

Fri Jan 18, 2013 1:22 am

The good news:
What i, and every other home user, has to do : the few commands given are really all you need.

There is route and such, but usually one really doesn't need it.
traceroute might be interesting.

Re: How to restart network

Fri Jan 18, 2013 1:52 am

nadir wrote:what means: couldn't restart? any messages about not restarting?

No messages. It appeared to restart but the connection was dead. A reboot set things straight.

nadir wrote:shutting down the router, waiting for a few, then starting it again, is a tip often given.

It's a modem/router combo and I prefer not to muck around with it.

nadir wrote:Calling the ISP is another option.

They are actually coming tomorrow to check the modem/router/wiring. Twice this month the connection has been very flaky.

As to the rest . . . it will take a while to digest. All I know is that with ifdown/ifup I can now stop and start the connection. I prefer to do that when I am working in xampp. Security is not very good so I want to be offline when I am working on websites.

Re: How to restart network

Fri Jan 18, 2013 2:45 am

ah, i see.
Just do
Code:
dhclient -r eth0

that will release the <unknown word>
(not any better that if-up-down, as far i can tell)

I doubt that taking the router of electricity can make any changes. Like i shutdown my TV when i don't use it. Next time i start it: all like before.
But i see your worry. Ask the tech-folks who will check.
I was often advice to do so, but it never helped :-)

If it is twice or fourth a month i wouldn't care.
I sometimes got lousy connection for a few days in a row, several times a months. Lousy means a site takes 2 minutes to load. dhclient eth0 doesn't connect anymore. All like that. That is shit.
If it is an issue for you it is an issue for you, sure. But connections aren't perfect all the time. I think. (Well: i think the ISP's fuck with us, so we are willing to pay more).

Re: How to restart network

Fri Jan 18, 2013 2:49 am

A good way to train such is to have a router you don't plug to the internet. Connect to it. fool with it.
When done with fooling: plug your PC back in your internet router and all is back to normal internet, no harm done.

But you are right: such isn't learned in two hours .... or two weeks ... or two months ... one bite a time. Or: that is how i do it. When i got my router (before modem) Dean and eye and lliiv had a 14 pages thread ... Yes. 14. That was a horror.

Re: How to restart network

Fri Jan 18, 2013 5:18 am

fsmithred wrote:If wicd is not installed, you're still using an old beta. Go ahead and install it now. The bugs that stopped me from installing it before have been fixed.

If I installed it, I wouldn't know what to do with it . . . yet. ;)

fsmithred wrote:You can use ifup/down if your interface is configured in etc-network-interfaces. I think the betas without wicd have eth0 configured for dhcp here.

This is what's in that file:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp


fsmithred wrote:You can also use ifconfig to bring a network interface up or down.

OK

fsmithred wrote:Using "service blah..." to start and stop services is a redhat thing. I forget what package needs to be installed in debian to be able to use that.

Well, I haven't used RedHat since 2005 and certainly wasn't skilled enough to know that command. I picked it up somewhere - I think from the local LUG list. It's always worked with gnome DE.
Post a reply