Its one of those days =) I'm not on the list, so when I replied to my
own post I am the only one that would get it.

-miah

----- Forwarded message from miah <[EMAIL PROTECTED]> -----

Date: Wed, 17 Nov 2004 11:51:26 -0500
From: miah <[EMAIL PROTECTED]>
To: miah <[EMAIL PROTECTED]>
Subject: Re: wget sorts ip's from lowest to highest when multiple ip's are 
linked to one hostname
X-Spam-Status: No, hits=-7.8 required=3.5 tests=AWL,BAYES_00 autolearn=ham 
        version=2.63

Maybe I'm a little quick to say this is a bug.  Looking at the way
round-robin dns works a bit more, this is probably not a bug.  Maybe
the real problem here is that I was trying to get around what I felt
was a problem with wget not being able to retry if a file isn't found
and try the next host in the list.

I'm not sure if DNS servers themselves do some sorting on a zone when
its loaded, but looking at microsoft.com, and yahoo.com (two other
domains that use round-robin dns), I can see that the list will allways
be the same, it just moves up and down.  As to why I'm having the
problem on my mac with it trying the same host over and over.. I can
only guess that the local resolver is caching.

-miah

On Wed, Nov 17, 2004 at 11:06:38AM -0500, miah wrote:
> Hi.
> 
> With the recent release of Linux 2.4.28, which fixes some security
> issues I quickly set out to grab a copy so that I could update my
> distribution.  However, I was having a problem because the file isn't
> on all the mirrors yet.  So I put wget in a simple while loop to get
> around the "if file is not found, quit retrying" behaviour.  It should
> be a safe thing to do since ftp.us.kernel.org uses a round robin dns
> scheme, which means that everytime you lookup the host, it returns the
> list of IP's in a different order.  However, it seems like wget sorts
> the IP's it gets from the resolver in the order of lowest to highest.
> 
> I looked through the manpage but didnt see a way to change this
> behaviour.
> 
> very simple while..
> 
> while [ ! -f linux-2.4.28.tar.bz2 ]; do wget -c
> ftp://ftp.us.kernel.org/pub/linux/kernel/v2.4/linux-2.4.28.tar.bz2;
> done
> 
> Resolving ftp.us.kernel.org... 128.46.156.117, 128.105.103.12,
> 128.118.2.96, ...Connecting to ftp.us.kernel.org[128.46.156.117]:21...
> connected.
> 
> Resolving ftp.us.kernel.org... 66.230.217.253, 69.31.98.210,
> 128.30.2.36, ...
> Connecting to ftp.us.kernel.org[66.230.217.253]:21... connected.
> 
> While this seems to work fine after a while on linux, maybe because my
> setup isn't caching dns, or my dns server is working differently, I
> have a problem running this from work. 
> 
> Resolving ftp.us.kernel.org... 144.92.104.38, 144.174.32.40,
> 155.98.64.81, ...
> Connecting to ftp.us.kernel.org[144.92.104.38]:21... connected.
> 
> Which will just happen over and over.  It won't connect to any IP
> other than 144.92.104.38.  But when I use dig, the order
> is definately different.  Something else to note is at work I'm
> trying this on OSX 10.3.6, with wget 1.9.1, which was provided by
> 'fink'.  On my linux box I'm also running wget 1.9.1.  Either way, why
> is wget sorting the list of IP's it gets from the resolver?  I feel if
> wget wasn't sorting the IP's, this problem wouldn't happen.  But maybe
> there is a reason for it?
> 
> Thanks
> -miah
> 


----- End forwarded message -----

Reply via email to