* [LARTC] script to perform dead gateway detection
@ 2004-03-11 2:29 Ming-Ching Tiew
2004-03-11 2:55 ` Daniel Chemko
2004-03-11 11:29 ` sufcrusher
0 siblings, 2 replies; 3+ messages in thread
From: Ming-Ching Tiew @ 2004-03-11 2:29 UTC (permalink / raw)
To: lartc
I am also having some difficulty in doing dead gateway
detection using a shell script :-
Basically I am using ping -c 1 ${GATEWAY_1} If it times
out, I supposed it got into error, so it is probably time for me to
change route.
However, even if the ping comes back, it does not mean the
GATEWAY is alive as my nexthop; this is because I figured
that the packet could have made a U-turn via the one of the alive
links to come back to answer the ping request, ie the gateway
is alive for a packet on the external network, but the gateway
is still down from inside point of view, and this can happen
due to a faulty connection between by second link IP and the
second link gateway !
Without patching the kernel to do dead gateway detection,
how do I find out if a particular gateway is dead as my
NEXTHOP ?
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [LARTC] script to perform dead gateway detection
2004-03-11 2:29 [LARTC] script to perform dead gateway detection Ming-Ching Tiew
@ 2004-03-11 2:55 ` Daniel Chemko
2004-03-11 11:29 ` sufcrusher
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Chemko @ 2004-03-11 2:55 UTC (permalink / raw)
To: lartc
How about iptables -A OUTPUT --destination ${GATEWAY_1} -j TTL --set-ttl
2 (or 1, I'm not sure if the ttl dec is done at all with output chains)
So, after the next hop, if the IP address isn't GATEWAY_1, then the
packet is dead in the water.
Ming-Ching Tiew wrote:
> I am also having some difficulty in doing dead gateway
> detection using a shell script :-
>
> Basically I am using ping -c 1 ${GATEWAY_1} If it times
> out, I supposed it got into error, so it is probably time for me to
> change route.
>
> However, even if the ping comes back, it does not mean the
> GATEWAY is alive as my nexthop; this is because I figured
> that the packet could have made a U-turn via the one of the alive
> links to come back to answer the ping request, ie the gateway is
> alive for a packet on the external network, but the gateway
> is still down from inside point of view, and this can happen
> due to a faulty connection between by second link IP and the
> second link gateway !
>
> Without patching the kernel to do dead gateway detection,
> how do I find out if a particular gateway is dead as my
> NEXTHOP ?
>
>
>
>
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
> http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] script to perform dead gateway detection
2004-03-11 2:29 [LARTC] script to perform dead gateway detection Ming-Ching Tiew
2004-03-11 2:55 ` Daniel Chemko
@ 2004-03-11 11:29 ` sufcrusher
1 sibling, 0 replies; 3+ messages in thread
From: sufcrusher @ 2004-03-11 11:29 UTC (permalink / raw)
To: lartc
Try using the -I option for ping, this forces it to use a certain interface:
ping -I ${MY_IP_1} -c 1 ${GATEWAY_1}
You can also add a route to the gateway to force it to use that interface. I
do the same for the 2 SMTP servers of the different ISP's. I can't connect
to one SMTP server from the other ISP anyway, so better make it impossible
altogether.
sufcrusher
----- Original Message -----
From: "Ming-Ching Tiew" <mingching.tiew@redtone.com>
To: <lartc@mailman.ds9a.nl>
Sent: Thursday, March 11, 2004 3:29 AM
Subject: [LARTC] script to perform dead gateway detection
>
> I am also having some difficulty in doing dead gateway
> detection using a shell script :-
>
> Basically I am using ping -c 1 ${GATEWAY_1} If it times
> out, I supposed it got into error, so it is probably time for me to
> change route.
>
> However, even if the ping comes back, it does not mean the
> GATEWAY is alive as my nexthop; this is because I figured
> that the packet could have made a U-turn via the one of the alive
> links to come back to answer the ping request, ie the gateway
> is alive for a packet on the external network, but the gateway
> is still down from inside point of view, and this can happen
> due to a faulty connection between by second link IP and the
> second link gateway !
>
> Without patching the kernel to do dead gateway detection,
> how do I find out if a particular gateway is dead as my
> NEXTHOP ?
>
>
>
>
>
>
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-11 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 2:29 [LARTC] script to perform dead gateway detection Ming-Ching Tiew
2004-03-11 2:55 ` Daniel Chemko
2004-03-11 11:29 ` sufcrusher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox