Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 14:08:38 +0930
From:      Andrew Reid <andrew.reid@plug.cx>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Andrew Reid <andrew.reid@plug.cx>, j balan <jbalan@proscouting.com>, freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Network Startup
Message-ID:  <20011016140837.C12702@plug.cx>
In-Reply-To: <20011015212017.B73961@dan.emsphone.com>; from dnelson@allantgroup.com on Mon, Oct 15, 2001 at 09:20:17PM -0500
References:  <200110152116.f9FLGsL51934@proscouting.com> <20011015162221.B8674@dan.emsphone.com> <20011016100105.D12238@plug.cx> <20011015212017.B73961@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 15, 2001 at 09:20:17PM -0500, Dan Nelson wrote:

> > That's a bit of a problem as far as I'm concerned. Perhaps the network
> > scripts should be redesigned in a similar manner to the one taken on be
> > RedHat.
> 
> Of course, you can always run the equivalent commands yourself to get
> the system in synch with what you put in rc.conf.  i.e. if you added an
> alias ip to an interface, you can run 
> 
> ifconfig xxx inet 1.2.3.4 alias

Oh, for sure. That's what I, and the majority of the community, do
now. I think that it's not particularly convenient if you want to
restart the network if you've got 3 or 4 network interfaces.

> > I started playing around with such a thing, using usr/local/etc/rc.d/
> > as a base for 'network' scripts which take arguments such as 'start',
> > 'stop' and 'restart'.
> >
> > Implementation of such a thing would be fairly trivial methinks. What
> > are the thoughts on this sort of approach to management of network
> > interfaces and ancillary services?
> 
> Is it smart enough to only add the alias interface on "restart", or
> does it try to deconfigure the whole NIC, and add all the IPs back? 

I've only gone as far as nuking the entire interface and bringing it all
up again, including the alias. I've not tested the time difference
between doing it the way it current does, and being 'smart' (as you
say), and only configure the alias.

However, if someone issues 'sh network.sh restart', I'd expect just that
to happen -- the entire network to be restarted, not bits of it. 

Similarly, if I was to issue 'sh network.sh start rl0', I'd expect it to
start the interface from scratch. Perhaps there is room there for some
'smartness' whereby the ifconfig commands are only issued if the current
interface configuration is different to that in the configuration file.

> How about if you change an IP number?  Is it smart enough to kill and
> restart named, inetd, smbd, or any other programs that might have bound
> to that IP?  It's not as simple as "I'll just rerun the ifconfig
> commands", and I stand by "reboot is the only sure way" :)

Perhaps it could be. For services that are controlled by
/usr/local/etc/rc.d/*.sh, it mightn't be that hard. Control of inetd,
named, smbd, or anything like that could also be done by a
/usr/local/etc/rc.d/*.sh file.

I can see this entire issue of startup scripts will spiral quickly into
a larger task if it was decided that there needed to be a change in the
way that the activity of other daemons such as inetd, named et al. were
controlled. Then again, I don't consider such a change as a "bad thing".

   - andrew

-- 
void signature () {
	cout << "Andrew Reid -- andrew.reid@plug.cx" << endl;
	cout << "Cell: +61 401 946 813" << endl;
	cout << "Quidquid latine dictum sit, altum viditur" << endl;
}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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