Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a network with the following:

  • Cable modem with static IP address
  • Router
  • Desktop - Win 7
  • VM Host - VMware ESXi 4.0
  • A couple of VM Guests - Windows

Every now and then my Win 7 PC is unable to access some of the VMs. When I ping the VMs by their domain name their IP address shows up as the IP address of the cable modem.

Sometimes I can fix it by running ipconfig /flushdns. The IP address will reset back to what it was supposed to be, but occasionally it wont work.

Why does this happen and how can I fix it?


Update

I have had the problem happen again and so I have tried pinging the machines that are returning the public static IP address from a different machine on the network at the same time the problem is occurring. The pings were coming back with the correct addresses on the other machine. So it seems the incorrect IP address problem is only happening on the Win 7 PC.

Also, after about 10 minutes of noticing the problem, pinging the machine names that were returning incorrect IPs suddenly started working correctly again without me fiddling with anything nor running ipconfig /flushdns.

share|improve this question
    
Just to be clear, your cable modem has a static public IP and when the problem occurs, the VM names resolve to that public IP instead of the proper private IP? –  Stephen Jennings Feb 21 '11 at 7:00
    
That's correct. –  GiddyUpHorsey Feb 21 '11 at 22:59
    
I would run a packet capture program like Wireshark to confirm to what server and what hosts the windows 7 system is looking up. –  Kyle Smith May 18 '11 at 14:53
add comment

3 Answers

I dont think it is any of the other answers so far. I would have agreed with Randolf's answer if it weren't for you saying that OTHER PC's don't experience this problem. If the VM's were registering the public IP's then all PC's would report back the public IP's

When you ping by name what name do you use? I suspect you are using the same internal DNS name as your external DNS name, something like company.com and not company.local?

Also this next bit is very important...When you ping it in the command prompt what you actually type sometimes is different to what actually it says it pings. Here is an example.

U:>ping bcdc01

Pinging bcdc01.company.local [192.168.101.1] with 3 Reply from 192.168.101.1: bytes=32 time<1ms TTL=128

Did you notice I only typed "ping bcdc01" but it said it was pinging bcdc01.company.local.

This is important for reasons I won't go into yet. Just tell me what you ping and what it says IT ACTUALLY DID ping.

You prob also have two DNS servers set in the TCP/IP properties for this machine. one is internal and the other is external. This means (in combination with the domains being the same name) sometimes it will query your internal DNS server and sometimes the external DNS server. This will resolve different IP addresses and is typical of this behavour.

share|improve this answer
    
Did this fix it? –  Mucker Apr 15 '12 at 1:07
add comment

Your VMs that are getting public IP assignments are probably set to use a NIC that's directly hooked up to the public side. Or if you only have one NIC, then your firewall may not be providing NAT.

share|improve this answer
    
I'm not sure that it's the VMs getting assigned the public ip address because the ip addresses (192.168.0.xxx) appear correct when pinged from another machine on the network. The wrong ip addresses only occur when pinged from the Win 7 PC, which makes me think that the problem is only with that machine. I'm just not sure how to test/fix it. –  GiddyUpHorsey Mar 5 '11 at 14:14
add comment

What do you mean when you say "domain name"? It's important to understand whether these domain names are internal to your network, vs whether you've tried to assign public-facing hostnames to your VMs.

  1. Something to check: your VMs may be set to use NAT rather than bridged networking - try switching them to bridged (bridged to the adapter connected to the network, of course) and they should be assigned internal IPs just like your real machines hooked up to the router.
  2. The public IP of your VMs will always be the IP of the cable modem, since that's the only IP that the rest of the world can see - you could forward ports on the router in to the equivalent port on the VM if you want to run any public facing network services using the VM.
  3. From inside the network, each of the hosts should have their own internal IP address, as well as an internal hostname (with a decent router). I think it's likely either a problem with the way that the Win 7 PC is resolving hostnames, or with the way that you expect hostnames to be resolved.
share|improve this answer
    
By "domain name" I mean the machine name that is registered on the DNS server which is itself on a VM. Under VMware Server I was able to configure the networking for NAT, bridged etc but I can't find the equivalent on ESXi. So I'm using whatever the default happens to be. –  GiddyUpHorsey Apr 25 '11 at 5:31
add comment

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.