Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/etc/host multiple entries 2

Status
Not open for further replies.

vodkadrinker

Technical User
May 16, 2002
163
0
0
GB
I have a question on how the host file works with multiple ip's for one alias.

Personally I think DNS will fix my problem but I have been ask to check this way as well and I currently don't have access to an AIX server so your help will be greatly appriciated.

If the hosts file has for example:

/etc/hosts
10.1.1.1 hostname.com
10.1.1.2 hostname.com
10.1.1.3 hostname.com

If I then ping'ed or tried to connect to hostname.com and the first two ip's were not available would it pick up the 3rd ip.

I don't think it will but I'd just like to check.

Many thanks,
VD
 

It definitely won't cycle through them based on availability.

If you do that in DNS it will round robin serving the addresses but I doubt the resolver will do that. In fact, from experience I'm pretty sure it won't but I'll have to test it to be 100%.
 
Thanks, that was my thinking but you know when someone puts another point of view in I always like to check.

VD
 
As a third opinion, No it won't!

Only the first occurence of the IP address will be resolved and if it is down then that's it!

Regards,
Khalid
 
Thanks, that's was my first thought but you know when someone throws doubt in there, just like to check.

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top