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.

Every time I ping one of my VMs from another VM by hostname I get a different IP address resolved for it...

Both VMs are Ubuntu 12.04 running on VMware Workstation 10. All VMs are running with bridged network, all with DHCP including the host. The host is Windows 8.1, all VMs involved are Ubuntu 12.04.

This VM that is failing to ping ci-server was cloned from another Ubuntu VM which works perfectly.

The one I'm pinging is ci-server. This is the ping output:

administrator@ubuntu-x64-cr:~$ ping ci-server
PING ci-server.att.net (192.168.1.179) 56(84) bytes of data.

--- ci-server.att.net ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2008ms

administrator@ubuntu-x64-cr:~$ ping ci-server
PING ci-server.att.net (192.168.1.182) 56(84) bytes of data.

--- ci-server.att.net ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms

administrator@ubuntu-x64-cr:~$ ping ci-server
PING ci-server.att.net (192.168.1.206) 56(84) bytes of data.

--- ci-server.att.net ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

The correct IP address on ci-server is 192.168.1.214.

Do anyone has any idea how could this happen? and specially, how could I solve this?

UPDATE:

This is the VM I'm trying to ping from networking setup:

administrator@ubuntu-x64-cr:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:9c:fc:87  
          inet addr:192.168.1.203  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe9c:fc87/64 Scope:Link
          inet6 addr: 2602:306:c49b:1280:20c:29ff:fe9c:fc87/64 Scope:Global
          inet6 addr: 2602:306:c49b:1280:1014:ca10:2b9b:68f/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25683 errors:0 dropped:0 overruns:0 frame:0
          TX packets:734 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1656255 (1.6 MB)  TX bytes:93217 (93.2 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30322 (30.3 KB)  TX bytes:30322 (30.3 KB)

The weird thing is when I try to take this interfance down, I get that it is not configured... this is very strange.

administrator@ubuntu-x64-cr:~$ sudo ifdown eth0
ifdown: interface eth0 not configured

UPDATE 2 I made a few more pings, then did an arp -an. This is how the tables look like:

administrator@ubuntu-x64-cr:~$ arp -an
? (192.168.1.254) at 90:b1:34:96:09:10 [ether] on eth0
? (192.168.1.214) at 00:0c:29:24:60:09 [ether] on eth0
? (192.168.1.157) at <incomplete> on eth0
? (192.168.1.158) at <incomplete> on eth0
? (192.168.1.156) at <incomplete> on eth0

Interestingly, these last 3 IP addresses were the ones that ci-server (the target of my Ping) resolved to.

If I ping using the IP of the target server it works fine.

I tried changing the OS's MAC address by setting eth0 to match the VM's MAC address in /etc/network/interfaces, but that didn't help... same result.

UPDATE 3

Here is some more information on name resolution:

administrator@ubuntu-x64-ff:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

and

administrator@ubuntu-x64-ff:~$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Also, per request:

administrator@ubuntu-x64-ff:~$ dig 127.0.0.1 ci-server

; <<>> DiG 9.8.1-P1 <<>> 127.0.0.1 ci-server
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37070
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;127.0.0.1.         IN  A

;; ANSWER SECTION:
127.0.0.1.      0   IN  A   127.0.0.1

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Nov 17 09:43:43 2013
;; MSG SIZE  rcvd: 43

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54267
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 19, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ci-server.         IN  A

;; ANSWER SECTION:
ci-server.      0   IN  A   192.168.1.164
ci-server.      0   IN  A   192.168.1.166
ci-server.      0   IN  A   192.168.1.168
ci-server.      0   IN  A   192.168.1.171
ci-server.      0   IN  A   192.168.1.173
ci-server.      0   IN  A   192.168.1.174
ci-server.      0   IN  A   192.168.1.176
ci-server.      0   IN  A   192.168.1.178
ci-server.      0   IN  A   192.168.1.179
ci-server.      0   IN  A   192.168.1.182
ci-server.      0   IN  A   192.168.1.206
ci-server.      0   IN  A   192.168.1.207
ci-server.      0   IN  A   192.168.1.209
ci-server.      0   IN  A   192.168.1.214
ci-server.      0   IN  A   192.168.1.157
ci-server.      0   IN  A   192.168.1.158
ci-server.      0   IN  A   192.168.1.159
ci-server.      0   IN  A   192.168.1.161
ci-server.      0   IN  A   192.168.1.162

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Nov 17 09:43:43 2013
;; MSG SIZE  rcvd: 331

Any suggestions or ideas on why ci-server resolves to a different IP every time I ping it?

Thank you!!

Eduardo

share|improve this question
    
Interesting question. Can you try a few more pings, and then immediately after do an arp -an to show what the ARP table shows –  davidgo Nov 17 '13 at 5:22
    
@davidgo Absolutely! I updated the question with the output. Thank you for replying! :) –  Eduardo Born Nov 17 '13 at 5:35
    
From the above we know that the problem is definately related to DNS lookups rather then some weird network/IP address setting. The next step is to get a better understanding of that. Can you add the output of "cat /etc/resolv.conf" and "cat /etc/hosts". Once you have done that, use the first nameserver in "/etc/resolv.conf" and provide the output of "dig @$nameserver.ip ci-server" and "dig @nameserver.ip ci-server.$search" (where $nameserver and $search are the values associated with those lines in /etc/resolv.conf) –  davidgo Nov 17 '13 at 17:10
    
@davidgo For sure! I ran the commands you asked, and updated the answer with the outputs. Interestingly the only thing I got was nameserver 127.0.0.1 in the resolv.conf, so I didn't run the second dig command. I see a list of IPs in the first dig though that seem to match the IPs ping gave me back on all my attempts to reach ci-server.. I think we're on the right track! Thanks again!! –  Eduardo Born Nov 17 '13 at 17:46
    
Also, even when I do a simple command like sudo gedit /etc/hostname I get a long wait and then a message saying "sudo: unable to resolve host ubuntu-x64-ff" and then the command completes ... ubuntu-x64-ff is the name of the machine I'm trying to ping ci-server from. –  Eduardo Born Nov 17 '13 at 18:14

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.