On 01-08-2006 11:28, Oscar Mechanic wrote:
Say if I have a few routes like this
ip rule add from 19.21.12.12 lookup 200
ip route add default via 10.0.0.253
ip rule add to 13.1.2.2 lookup 201
ip route add default via 10.0.0.254
ip route add default via 10.0.0.254

How do I save them, I have looked through the list and have googled this
Q for some time and do not have an concrete answers. I have read that
you just save and rerun the command but that does not work as the "from
all to" is not valid it has to be the "to" without the "from all". I
have used multiple versions of iproute2 and still the same problem. I
written a script and put in many sed's to get around problems but its
nasty code. Surely someone solved this is there a "saveall" script or
bin that is distro independant.

Maybe I miss your point, but ip doesn't care if you write a command by hand (from shell) or run it from a shell script. If you don't use "from ...", it is the same as if you've written "from all". It doesn't contradict with "to ..." which is another parameter.

After your last command there will be an error because it repeats the previous one.

If you add in a script:
set -x
before the first command, you will see, which end with errors.

Jarek P.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Reply via email to