Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Denis Fedorishenko <nuclearcat@nuclearcat.com>
To: lartc@vger.kernel.org
Subject: Re[2]: [LARTC] script to perform dead gateway detection
Date: Thu, 11 Mar 2004 07:39:11 +0000	[thread overview]
Message-ID: <277287922.20040311093911@nuclearcat.com> (raw)

Hello Daniel,

Thursday, March 11, 2004, 4:55:15 AM, you wrote:

Maybe better just to use
ping -t 2 anyhost

:)

DC> How about iptables -A OUTPUT --destination ${GATEWAY_1} -j TTL --set-ttl
DC> 2 (or 1, I'm not sure if the ttl dec is done at all with output chains)

DC> So, after the next hop, if the IP address isn't GATEWAY_1, then the
DC> packet is dead in the water.

DC> 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/  
DC> _______________________________________________
DC> LARTC mailing list / LARTC@mailman.ds9a.nl
DC> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/




-- 
Best regards,
 Denis                            mailto:nuclearcat@nuclearcat.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

                 reply	other threads:[~2004-03-11  7:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=277287922.20040311093911@nuclearcat.com \
    --to=nuclearcat@nuclearcat.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox