[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: better /etc/init.d/network

> On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> > 
> > Hi,
> > 
> > The /etc/init.d/network script created by the debian installation is very
> > simple and not flexible enough if you need to manage complex networks with
> > many interfaces.
> > 
> > I have written a generic network interface management command, net, which
> > can be used to start/stop/show/configure network interfaces, and a smarter
> > replacement for the /etc/init.d/network script.
> > ...
> So what is the big difference between your tool and ifconfig? Seems you
> get the same results and you don't save a lot of work... Please provide
> more details on benifits of your tool.

Obviously you can do the same things with ifconfig. The difference is that
now you don't need to put all the ifconfig and route commands for your 
network in one big network startup script, but instead you store only the
configuration parameters in separate config files which are used by the
new net script.

The big advantage is that you can now start, stop, and configure (that is
creating the configuration file, not running ifconfig) each interface
separately. This doesn't save a lot of work but provides much more
flexibility to network management.

The current network script can't do that, unless you create a different
script for each interface and all the needed links in rc*.d, and can only
start the network, not stopping it or a part of it.
So if you want to stop or restart your network or change the status of just
one interface you must type all the ifconfig and route commands by hand and
remember all the numbers each time.

With my solution you store the parameters for each interface and then just
type 'net stop' or 'net restart' or 'net start eth1' without needing to
remember all the arguments. If you need to add or remove an interface you
just create or delete its config file and the job is done because you don't
need to change the /etc/init.d/network, which just does a 'net start' or
'net stop'. Simple and easy.

This is not very useful if you have a simple network with one interface and
one ip, but is really handy if you have to manage complex networks with many
interfaces or ip aliases and complex routing tables, as is my case.

In general I believe it is better to separate the configurations from the
programs which do the work, which should be kept as general as possible.
My script does just that: it separates programs from configurations.

Note also that currently there isn't a network configuration program in
debian. The network script is created by dinstall and must be edited by
hand. My net script provides also a very simple configuration function.
Think of a novice user which can now just type 'net config eth0' and answer
a few simple questions.

Massimo Dal Zotto

|  Massimo Dal Zotto               email: dz@cs.unitn.it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                             pgp: finger dz@tango.cs.unitn.it  |

Reply to: