Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VMs can't ping servers by their domain name

I have Openstack installed using Devstack on Ubuntu 16.04. After, I launched an Instance and I'm unable to ping 'openstack.org', but I'm able to the IP address '162.242.140.107.

I can connect to the external network from the host:

$ ping -c 4 openstack.org
PING openstack.org (162.242.140.107) 56(84) bytes of data.
64 bytes from 162.242.140.107: icmp_seq=1 ttl=128 time=175 ms
64 bytes from 162.242.140.107: icmp_seq=2 ttl=128 time=192 ms
64 bytes from 162.242.140.107: icmp_seq=3 ttl=128 time=168 ms
64 bytes from 162.242.140.107: icmp_seq=4 ttl=128 time=172 ms

--- openstack.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 168.909/177.280/192.221/8.908 ms

On the other hand, if I ping from the instance I get this result:

I'm able to connect to the external network.

$ ping -c 4 162.242.140.107
PING 162.242.140.107 (162.242.140.107) 56(84) bytes of data.
64 bytes from 162.242.140.107: icmp_seq=1 ttl=125 time=172 ms
64 bytes from 162.242.140.107: icmp_seq=2 ttl=125 time=169 ms
64 bytes from 162.242.140.107: icmp_seq=3 ttl=125 time=167 ms
64 bytes from 162.242.140.107: icmp_seq=4 ttl=125 time=179 ms

--- 162.242.140.107 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 167.175/172.092/179.160/4.566 ms

But I use the domain name:

$ ping -c 4 openstack.org
ping: unknown host openstack.org

The file dhcp_agent.ini has this configuration:

[DEFAULT]
interface_driver = openvswitch
ovs_use_veth = False
dnsmasq_local_resolv = False
dnsmasq_dns_servers = 8.8.8.8, 8.8.4.4
debug = True