Quantum OVS, gre tunnel, vlan…….weirdness

Alright, this is a follow up to this post here. https://visualne.wordpress.com/2013/01/25/tapdhcp-interface-not-comming-up-after-restart-vms-wont-get-private-ip-addresses/

I used this guide here: http://docs.openstack.org/folsom/basic-install/content/basic-install_intro.html to install folsom.  All the quantum network node services are running on the controller.

I’m sure some of you out there are seeing your vms not getting private ip addresses, which I talked about in my previous post. You still need to bring up the interface that the dhcp server serves up ip addresses on. So look at that last post.

Now lets assume you have brought up the dhcp interface and your vms still don’t get ip addresses. This might be because the interface associated with your vm on your ovs agent isn’t in the same vlan as the interface that is serving ip addresses. Refer to the output below.

Image

The above screenshot is all the ports on the ovs agent on the compute node where my virtual machine spun up. What I put a rectangle around is the the interface that is associated with my vm. You see how it says “tag 9”, that’s the vlan tag. If you don’t know anything about vlans just know that broadcast messages don’t leave vlans, unless there’s some kind of helper address or something, but don’t worry about that. Just know that broadcasts don’t leave vlans.

A dhcp discover message is a broadcast message. It’s only going to go to ports in the SAME vlan. This includes the port that the dhcp server listens on, on the network node. If that dhcp interface isn’t in the same vlan on ovs, you will never get an ip address. In order to fix it you have to put the vm interface in the same vlan as the dhcp interface. Refer to the output below.

Image

The screenshot directly above is the interface that hands out ip addresses. You see how that’s tagged with ‘5’. So you have the vm in vlan 9 and the dhcp port for that subnet  not in the same vlan. That VM will never get an ip address if they aren’t in the same vlan. In order to fix it you have to put the VM in the same vlan as the dhcp interface.

In my case I have to go to the compute node where this vm exists and issue this command.

“ovs-vsctl set Port qvocb9c5dd9-f8 tag=5”

vnc into your vm and do an /etc/init.d/networking restart, and you should get an ip.

In order for me to figure out what interface was associated with the vm, I just went through and started capturing traffic on individual ports on the ovs agent. When I saw discovers, I knew that was my vm. Refer to the output below.

Image

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s