Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question

migrated from Feb 15 '10 at 7:46

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

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

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

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 ""), then provided ip will be used. Elsewhere hostname will be resolved via default DNS server.

share|improve this answer

Your Answer


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.