From owner-freebsd-questions Thu Feb 8 14:31:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id 642D137B980; Thu, 8 Feb 2001 14:30:47 -0800 (PST) Received: from [212.238.77.116] (helo=gateway.raggedclown.net) by post.mail.nl.demon.net with smtp (Exim 3.14 #4) id 14QzLX-00085B-00; Thu, 08 Feb 2001 22:15:26 +0000 Received: from buffy.raggedclown.net (buffy.raggedclown.intra [192.168.1.2]) by gateway.raggedclown.net (Ragged Clown Gateway) with ESMTP id 69AE23396B; Thu, 8 Feb 2001 22:01:34 +0100 (CET) Received: by buffy.raggedclown.net (Ragged Clown Mailhost, from userid 500) id ECBB612D59; Thu, 8 Feb 2001 22:01:33 +0100 (CET) Date: Thu, 8 Feb 2001 22:01:33 +0100 From: Cliff Sarginson To: Nick Rogness Cc: Eric Fiterman , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: multiple IP addresses in /etc/hosts Message-ID: <20010208220133.E1453@raggedclown.net> References: <3A82CC57.3D1F5AB4@torrentnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nick@rogness.net on Thu, Feb 08, 2001 at 11:09:01AM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Feb 08, 2001 at 11:09:01AM -0600, Nick Rogness wrote: > On Thu, 8 Feb 2001, Eric Fiterman wrote: > > > Hi: > > > > Is it possible to have an application like ping or telnet iterate > > through IP addresses for a given hostname, if a previous attempt fails? > > > > For example: > > > > in /etc/hosts: > > --------------- > > 0.0.0.1 testhost > > 0.0.0.2 testhost > > 0.0.0.3 testhost > > --------------- > > > > If I attempt to 'ping testhost', and the first entry (0.0.0.1) fails, is > > there anything to configure which would allow an automatic attempt to > > ping 0.0.0.2? Is this possible? > > AFAIK, not with /etc/hosts. You could do round-robin DNS with > named but it will never be 100% of what you want to do. DNS does > not keep track of which hosts are dead or alive. Well, as far as ping goes you could do this in a very simple way with a script that parses the hosts file and presents each IP as an argument..or am I missing something here ? Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message