Re: Linux (both 2.0.x and 2.2.x), ifconfig, and routing tables.
Quoting Seth R Arnold (firstname.lastname@example.org):
> I got the impression that Richard was looking for a nicer way of doing this;
> if linux is going to be wierd about its network interfaces, then perhaps
> there is a nice way to circumvent it without too much work. :)
If your routing table is something that evolves over time through
multiple well-considered changes over a period of time, then surely
it needs backing up. After all, it is an essential part of the
machine's configuration which just happens not to be in /etc/foo/bar.
Such a perl script could do this too.
On the other hand if, like mine, it's just the standard routing
table I always use, then isn't the answer just to run
Very occasionally, one of my machine's kernels kills the interrupt
handler for the 3c509 card. Because it's happened more than twice,
I have a script in /root/restart-network which is:
# script to restart the network after the interrupt handler is killed
ifconfig eth0 down
lpc down all
lpc up all
If it happened more frequently, I would probably leave a process
watching the log and commanding it automatically.
> On Wed, Sep 22, 1999 at 01:28:18AM -0400, William T Wilson wrote:
> > On Tue, 21 Sep 1999, Richard Kaszeta wrote:
> > > 2. Find a way to save all the routing table entries involving the
> > > interface I'm bringing down, and restore them after bringing the
> > > interface back up?
> > Have you considered running /sbin/route with the appropriate invocations,
> > and then parsing the output / preparing input using perl or some such?
Email: email@example.com Tel: +44 1908 653 739 Fax: +44 1908 655 151
Snail: David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer: These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.