Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2007 15:44:52 +0200
From:      Christoph Schug <chris+freebsd-questions@schug.net>
To:        Bram Schoenmakers <bramschoenmakers@xs4all.nl>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Network interface restart
Message-ID:  <20070509134452.GB1421@voodoo.schug.net>
In-Reply-To: <200705091331.56038.bramschoenmakers@xs4all.nl>
References:  <200705091231.18164.bramschoenmakers@xs4all.nl> <1A58CC26-5CAE-4834-9043-27040767CEF5@brooknet.com.au> <200705091331.56038.bramschoenmakers@xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 09, 2007, Bram Schoenmakers wrote:

> But as I said, I ran the script from a screen session, so that makes me wonder 
> why the execution was aborted.
> 
> But is running '/etc/rc.d/netif restart'' known to cause problems? I think I 
> shouldn't have to use scripts like these just to change a setting on the 
> network interface.

First, you should limit the operation to the interface in question.
You can do this by adding the interface name as optional parameter.
Nevertheless, any routing information regarding this interface gets
dropped, in your case it most probably the interface of the default
gateway. So, your interface will come back, but will be reachable only
in its subnet.

Something like

| # /etc/rc.d/netif restart bge0 && /etc/rc.d/routing restart

in a screen session should do the trick.

-cs



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070509134452.GB1421>