No internet on VIrtual Machines and external (physical) network is unreachable from VM’s

cloud computingopenstack

I have installed openstack (packstack) on centos 6.4 with neutron. The openstack is installed on single virtual machine using vmware.

First i have created external network using following command

quantum net-create public --router:external=True

Then i added my external network subnet (ip pool not used in external network)

Then i created router

Then i set my router gateway to external network

I created security group to allow ssh and icmp.

On second step i created private network with dhcp enabled

Then created router interface and attach it to my private network

On third step i launched the instance with private network

On fourth step i generated floating ip of external network and associates it to instance

Problem Statement:

Virtual machines are getting IP's (private network) from dhcp and communicating with each other but there is No internet on VM's

VM's cannot ping any external network device.

I am using Centos 6.4. Ip route shows

192.168.186.0/24 dev eth1  proto kernel  scope link  src 192.168.186.166  metric 1 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 
10.16.48.0/22 dev br-ex  proto kernel  scope link  src 10.16.51.208
169.254.0.0/16 dev eth0  scope link  metric 1002
169.254.0.0/16 dev br-ex  scope link  metric 1017
default via 10.16.48.1 dev br-ex 

Where 10.16.48.0/22 is my external network on eth0 (for internet)

10.16.186.0/24 is another interface on eth1

quantum agent-list shows

----+-------+----------------+
| id                                   | agent_type         | host                  | alive | admin_state_up |
+--------------------------------------+--------------------+-----------------------+-------+----------------+
| 4c709a4c-bf0c-4e03-a0f5-2d938fee7ae1 | L3 agent           | localhost.localdomain | :-)   | True           |
| 960a7806-dc4d-4ab1-99b0-a79dbc31600f | Open vSwitch agent | localhost.localdomain | :-)   | True           |
| d9f545e2-4a6c-43f4-8037-b807cbe27fc5 | DHCP agent         | localhost.localdomain | :-)   | True           |
+--------------------------------------+--------------------+-----------------------+-------+----------------+

Best Answer

So you have created a VMWare Virtual Server, and in this VM, installed OpenStack, which itself hosts VMs?

Then the Virtual Switch the VMWare VM is connected to, blocks every traffic from your OpenStack VMs. This is a security measure, to make sure only VMWare VMs can reach the Virtual Switch and the outside network. This is a layer 2 trouble, I am quite sure the arp -an command in OpenStack VMs does not show you gateway.

All you have to do is allow the VMWare Virtual Switch to receive multiple MAC addresses.

You can find how to do this onthis post

EDIT FOR YOUR COMMENT:

I don't know. What I think I know, is that you can't reach you router, and as consequence, the outside network, even at a Layer 2 (check for this that no MAC address is shown for the gateway when launching the arp -an command) because the VSwitch is dropping paquets whom mac-addresses are not those of the OpenStack server.

Then, you can either disabled this feature in the VSwitch, or install on your OpenStack server an ARP-proxy service. The idea is to spoof MAC-address of your VMs which will then appear on the VSwitch as the OpenStack server itself.