Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2001 14:53:08 -0500 (EST)
From:      "wjm@ciberlynx.net" <wjm@tiger.ciberlynx.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: multiple IP addresses in /etc/hosts
Message-ID:  <Pine.LNX.4.10.10102081449170.1783-100000@tiger.ciberlynx.net>
In-Reply-To: <20010208191710.C35971@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help

Would this be overkill?

#!/bin/sh
#

file=`sed -n '1,5p' /file/with/ip-addresses`

for stat in $file; do
    var1=`ping -c 2 $stat | grep % |awk '{ print $7 }'`

    if [ $var1 = 100% ]; then
        continue
    else
        telnet $stat
        exit 0;
    fi
done




On Thu, 8 Feb 2001, Peter Pentchev wrote:

> On Fri, Feb 09, 2001 at 02:06:31AM +0900, Hajimu UMEMOTO wrote:
> > >>>>> On Thu, 8 Feb 2001 18:51:50 +0200
> > 
> > IPv6 aware applications in base system such as telnet, ssh... do
> > round-robbin so that it can be fall back to use IPv4 if IPv6
> > connection is fail.
> 
> Errr.. oops.  I must have been on something.
> 
> Of course base system telnet does round-robin.  Just noticed it
> yesterday, when I tried telnet'ting to port 25 of a multi-addressed
> MX by name, and it tried all addresses in turn.
> 
> So half the original question is answered :)
> 
> I do not really think such behavior belongs in 'ping' though,
> especially seeing as ping is usually used as a diagnostics tool.
> If a host does not respond, this might be temporary, or due to
> timeouts, or due to some routing/interface problem.. most of the
> time, I do want to see how it does as time goes by :)
> 
> G'luck,
> Peter
> 
> 

-- 

--------------------------------------------------------

William Melanson - CiberLynx Technical Support Manager 

--------------------------------------------------------




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10102081449170.1783-100000>