Ask Your Question
1

VMs can't ping servers by their domain name

asked 2017-05-23 05:45:11 -0500

alexgs27 gravatar image

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
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-05-25 06:18:15 -0500

alexgs27 gravatar image

All files have the correct dns entry.

My VM's /etc/resolve.conf file has this entry:

$ 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 8.8.4.4
nameserver 8.8.8.8
search openstacklocal

The local tenant network configuration is the next:

Name                    subnet0
ID                      7d8f026d-fa45-4c20-9af4-b1bb38d4825b 
Network Name            net0
Network ID              56ebd398-d910-4c22-b844-87406ea4f40a
Subnet Pool             None
IP Version              IPv4
CIDR                    10.10.0.0/24
IP Allocation Pools     Start 10.10.0.2 - End 10.10.0.254
Gateway IP              10.10.0.1
DHCP Enabled            Yes
Additional Routes       None 
DNS Name Servers        8.8.4.4 8.8.8.8

I think that my problem is neutron service devstack@q-dhcp.service, which starts 'dnsmasq' with these options:

dnsmasq --no-hosts --no-resolv --strict-order --except-interface=lo --pid-file=/opt/stack/data/neutron/dhcp/56ebd398-d910-4c22-b844-87406ea4f40a/pid --dhcp-hostsfile=...

And I don't know how to modify it.

Thanks for your answer, Vinoth

edit flag offensive delete link more
0

answered 2017-05-24 01:39:02 -0500

Make sure your local tenant network has the same dns-server assigned. You can check this from edit subnet option in the horizon.

If it has dns entry, then your VM's /etc/resolve.conf file should have the same entrty.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2017-05-23 05:45:11 -0500

Seen: 85 times

Last updated: May 25 '17