Mailinglist Archive: opensuse-security (423 mails)
| < Previous | Next > |
RE: [suse-security] Dynamic routgin
- From: Christian Uhde <mail@xxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Mar 2001 22:41:08 +0100
- Message-id: <01031222472000.03885@max>
Hi!
This problem seems to be interesting for me too. So I've got one question: Could
there be set two Gateway-entrys? Seems to me like you could set different
metrics so there is the one with the lower one taken until it isn't available.
Could please tell me anyone if I'm wrong?
Christian
Am Sam, 10 Mär 2001 schrieben Sie:
> Give this a try (I'm not good in scripting, but it works for me):
>
> #!/bin/bash
>
> GW1="192.168.10.4"
> GW2="19.18.31.18"
> TEST=$GW1
>
> echo "Setting default gw to $GW1"
> route add default gw $GW1
> route -n
>
> echo Starting gateway test ...
>
> while true ; do
> echo "GW1: $GW1, GW2: $GW2, testing $TEST"
> ping $TEST -c 1 > /dev/null 2>&1 # $? returns 1 if
> host
> if [ $? = 1 ] ; then
> echo Gateway is down, resetting routes ...
> route del default gw $GW1
> route add default gw $GW2
> route -n
> if [ $TEST=$GW1 ] ; then
> TEST=$GW2
> else
> TEST=$GW1
> fi
> echo "Now testing $TEST"
> fi
> done
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: suse-security-unsubscribe@xxxxxxxx
> For additional commands, e-mail: suse-security-help@xxxxxxxx
--
Christian Uhde
Dreikreuzenstrasse 6
30449 Hannover
Germany
mail@xxxxxxxxxxxxxxxxx
http://www.christian-uhde.de
--
This problem seems to be interesting for me too. So I've got one question: Could
there be set two Gateway-entrys? Seems to me like you could set different
metrics so there is the one with the lower one taken until it isn't available.
Could please tell me anyone if I'm wrong?
Christian
Am Sam, 10 Mär 2001 schrieben Sie:
> Give this a try (I'm not good in scripting, but it works for me):
>
> #!/bin/bash
>
> GW1="192.168.10.4"
> GW2="19.18.31.18"
> TEST=$GW1
>
> echo "Setting default gw to $GW1"
> route add default gw $GW1
> route -n
>
> echo Starting gateway test ...
>
> while true ; do
> echo "GW1: $GW1, GW2: $GW2, testing $TEST"
> ping $TEST -c 1 > /dev/null 2>&1 # $? returns 1 if
> host
> if [ $? = 1 ] ; then
> echo Gateway is down, resetting routes ...
> route del default gw $GW1
> route add default gw $GW2
> route -n
> if [ $TEST=$GW1 ] ; then
> TEST=$GW2
> else
> TEST=$GW1
> fi
> echo "Now testing $TEST"
> fi
> done
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: suse-security-unsubscribe@xxxxxxxx
> For additional commands, e-mail: suse-security-help@xxxxxxxx
--
Christian Uhde
Dreikreuzenstrasse 6
30449 Hannover
Germany
mail@xxxxxxxxxxxxxxxxx
http://www.christian-uhde.de
--
| < Previous | Next > |