Super User is a question and answer site for computer enthusiasts and power users. 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

I set up PC with 2 network cards, connected to the same LAN. I can connect to this PC (e.g. by remote desktop) only via IP addresses. Accessing by hostname does not work.

Why is this the case?

UPDATE: Full environment

  1. PC with 2 hardware network adapters.
  2. On this PC installed VMWare Workstation. Created 3 VM's, networked by "bridged" network setting in VMWare.
  3. In LAN all IP addresses given from DHCP.
  4. Win2k8 on all hosts (both physical and virtual).
    As result:
  5. PC has 2 IP addresses (e.g. and PC available in LAN by IP addresses, but not available by hostname.
  6. VM's has own IP address on each (e.g., *74, *75 etc). They are available from LAN by their ip's, BUT not by their hostnames.

How can I access to PC and to VM's by hostname?

share|improve this question

migrated from Nov 27 '11 at 1:15

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

are they on the same domain or workgroup? – Daniel A. White Nov 27 '11 at 1:18
Describing a problem just by saying it doesn't work isn't helpful. – David Schwartz Nov 27 '11 at 1:24
Daniel - yes, all computers in same workgroup. – lewis Nov 27 '11 at 1:27
what about any firewalls? – Daniel A. White Nov 27 '11 at 1:33
Firewalls are enabled. But what difference on fw, if host is accessible via IP-address? – lewis Nov 27 '11 at 1:38

The easiest thing would just be to add the entries in your hosts file.

Open, using administrator privileges - your C:\Windows\System32\drivers\etc\hosts.

This file should already contain a couple lines like:

::1 localhost localhost

Then just add relevant entries: myawesomerouter somethingelse

You can also use this to "blackhole" some sites, for example if you never wanted to communicate with you could add the line:
share|improve this answer
How do you add entries to the hosts file? Could you edit your answer to reflect this? – Simon Sheehan Nov 27 '11 at 16:25
@caimz, I don't want to use this solution, because it need to update hosts on each computer in LAN. IMHO, it is not good solution. – lewis Nov 27 '11 at 17:10
Well it was just a suggestion, since somehow your netbios doesn't seem to be in order to do proper name resolution. Does this apply to all VMs and the host? Also, what kind of router/thingie do you have in front? – cairnz Nov 27 '11 at 18:42
@cairnz Yes, this trouble applies to all VM's and host. LAN is connected to ADSL-modem with DHCP server inside it. – lewis Nov 27 '11 at 19:21
@cairnz, LAN is work. – lewis Nov 27 '11 at 19:31

Hostname resolution is typically handled by your router. Your IP configuration probably has your router's IP address as the DNS server. If that's the case, then the router will resolve the hostname to the local IP address. If you have your system set to use alternate DNS servers, like Google's, then hostname resolution may fail.

share|improve this answer
Yes, all my hosts (physical and VM's) obtained ip-addresses from DHCP. DHCP server works on adsl-modem. – lewis Nov 27 '11 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .