On Thu, 08 Mar 2001 16:06:11 Colm Buckley wrote:
> For what it's worth, I think Debian's solution is pretty elegant;
> details of network interfaces are stored in /etc/network/interfaces
> (which is parsed and implemented at boot-time by
> /etc/init.d/networking, and can be used thereafter by ifup/ifdown).
There are other things you can put into interfaces such as the
up/down/pre-up/post-down directives. Nifty for adding and removing routes
for oddball networks. With any of those directives you can specify any
arbitrary command and you can have multiples (execution stops at first
failure, but you can always stick || true at the end).
To extend Colm's example, say you had another network 192.168.0.0/16 the
other side of eth2 (10.0.0.1 is next hop) and you wanted the route to it
to come up when eth2 is up, you just add the following line to eth2's
description:
up route add -net 192.168.0.0/16 gw 10.0.0.1
Tres nifty indeed...
Martin.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!