Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is a general networking question.

Suppose that I have a web server in a machine XYZ with 2 or more physical network adapters with IP's A, B, C and D.

If I access the web application in the machine with it's hostname, which IP will be used?

Thanks.

share|improve this question

migrated from stackoverflow.com Feb 15 '10 at 7:46

This question came from our site for professional and enthusiast programmers.

3 Answers 3

In the general, the IP number that maps to that hostname, via DNS or whatever other mapping system is in place. For specifics, http://serverfault.com/ is the place to go.

share|improve this answer

that depends on what hostname you're going to use and where that hostname is pointing to. let's say you have the following DNS entries:

hostname1 IN A IP_1
hostname2 IN A IP_2
hostname3 IN A IP_3
hostname4 IN A IP_4

so depending on whether you use hostname1 or 2 or 3 or 4 you'd hit different IPs. to find out the IP just type nslookup hostname

share|improve this answer

It depends of configuration of client host and it DNS server. For example if in client hosts file(in *nix it is /et/hosts) consist you hostname(i.e. entry with text "56.34.23.111 myhost.com"), then provided ip will be used. Elsewhere hostname will be resolved via default DNS server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.