PDA

View Full Version : [ubuntu] Fully qualified domain name is improperly resolved



aajax
October 9th, 2010, 09:15 PM
When I ping to the fully qualified domain name of my Ubuntu 10.04 (Lucid) system I receive a reply from 127.0.1.1. I've done nothing to define such an interface. Can anyone explain what causes this behavior? I believe it is causing other serious errors on my system.

Here is some console output showing this peculiar behavior.


ajax@Pluto:~$ ping pluto.my.test
PING Pluto.my.test (127.0.1.1) 56(84) bytes of data.
64 bytes from Pluto.my.test (127.0.1.1): icmp_seq=1 ttl=64 time=0.030 ms
64 bytes from Pluto.my.test (127.0.1.1): icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from Pluto.my.test (127.0.1.1): icmp_seq=3 ttl=64 time=0.029 ms
^C
--- Pluto.my.test ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.027/0.028/0.030/0.006 ms
ajax@Pluto:~$

Some factual information about my system follows. The console output that follows


ajax@Pluto:~$ nslookup pluto.my.test
Server: 10.0.0.1
Address: 10.0.0.1#53

Name: pluto.my.test
Address: 10.0.0.12

ajax@Pluto:~$

shows the interface that should respond to a ping. Other documentation concerning my network configuration follows:

/etc/network/interfaces is as follows:


auto lo
iface lo inet loopback


iface eth0 inet static
address 10.0.0.12
netmask 255.255.255.0
gateway 10.0.0.1

auto eth0

iface eth1 inet static
address 10.0.0.12
netmask 255.255.255.0
gateway 10.0.0.1

auto eth1

/etc/resolv.conf is as follows:


# generated by NetworkManager, do not edit!

search my.test


nameserver 10.0.0.1
nameserver 71.252.0.12


domain my.test

Console output from running ifconfig is as follows:


ajax@Pluto:~$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:1e:2a:37:6e:b0
inet addr:10.0.0.12 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:2aff:fe37:6eb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2045 errors:0 dropped:0 overruns:0 frame:0
TX packets:1389 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2615185 (2.6 MB) TX bytes:127262 (127.2 KB)
Interrupt:18 Base address:0xcc00

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:16436 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3388 (3.3 KB) TX bytes:3388 (3.3 KB)

ajax@Pluto:~$

r0ydster
October 14th, 2010, 09:20 PM
Your /etc/network/interfaces file looks fine, this is the problem:




/etc/resolv.conf is as follows:


# generated by NetworkManager, do not edit!

search my.test


nameserver 10.0.0.1
nameserver 71.252.0.12


domain my.test


As root, delete the search my.test line, the nameserver 10.0.0.1 line and the domain my.test line, save and you should be able resolve dns names.

This is mine for an example:


cat /etc/resolv.conf
nameserver 208.67.222.222
nameserver 208.67.220.220

efflandt
October 15th, 2010, 12:45 AM
I don't see anything wrong. Why do you think your system should go to an outside interface to ping itself. Ping would tend to use your hosts file before consulting DNS. So what is in your /etc/hosts?

It is a good idea for your system to be able to find itself on a loopback (127.) IP, or things may break if your external network is unavailable (unconfigured, misconfigured, or otherwise broken).