From owner-freebsd-questions Thu Feb 8 11:53:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tiger.ciberlynx.net (ns2.ciberlynx.net [216.242.0.3]) by hub.freebsd.org (Postfix) with ESMTP id 05E8B37B6BE for ; Thu, 8 Feb 2001 11:53:26 -0800 (PST) Received: from localhost (wjm@localhost) by tiger.ciberlynx.net (8.9.3/8.9.3) with ESMTP id OAA09311 for ; Thu, 8 Feb 2001 14:53:08 -0500 Date: Thu, 8 Feb 2001 14:53:08 -0500 (EST) From: "wjm@ciberlynx.net" To: freebsd-questions@FreeBSD.ORG Subject: Re: multiple IP addresses in /etc/hosts In-Reply-To: <20010208191710.C35971@ringworld.oblivion.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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