Skip to content
Mohamed Elsakhawy, PhD
  • Mohamed Elsakhawy, Ph.D
  • Talks
  • Technical Blog

VM getting a DHCP address

15 June 2017 0 comments Article Neutron, Technical Blog

DHCP requests are broadcast requests sent by the VM to its boradcast domain. If a DHCP server exists in this domain, it will respond back providing a DHCP IP lease following the DHCP protocol. In openstack, the same procedure is followed. A VM starts by sending its DHCP request to its boardcast domain which goes through br-int. Since this is broadcast, it exists br-int as well to br-tun and gets sent to all hosts in the environment using the dedicated tunnel ID for the network.

Once the request reaches the network node, it then reaches a network namespace created specifically to allow the dhcp request to be handled. This DHCP namespace name is qdhcp-{UUID} . The qdhcp namespace looks as follows

Selection_011

Individually, it looks like this

Selection_010

As you can see, the dhcp namespace has a tap interface which is attached to the br-int bridge on the network node. The tap interface is attached to a dnsmasq process. dnsmasq is a service that does manythings (obviously dns included). But it also allows providing dhcp addresses when acting as a dhcp server

On the network node, if you do a ps -ef | grep dns you will see the following

Selection_012

If you would like to see the dhcp namespaces on the network node, you can use ip netns

Selection_013

and if you go inside any of these namespaces, you will see the tap interface that is attached to the dnsmasq process

Selection_014

The IP attached to the dhcp namespace is assigned by default to the tap interface. Note that when you look into the flow rules on br-tun for any compute host, you may find an entry for the MAC address of this tap interface. This is used to prevent sending the dhcp request to every compute host and network host in the environment. Since the flow rules will direct the dhcp request to the VXLAN port that is connecting the compute host to the network node only.

 

 

 

 

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • My talk at SCaLE 22x
  • SCALE 22x
  • My talk at OpenInfra Days North America
  • Paper Accepted in ATC USENIX
  • Paper accepted at WoSC ‘7

Recent Comments

  1. Hung on Neutron: How a VM communicates
  2. hungpq on Neutron: How a VM communicates
  3. Atul on VM to VM communication: different networks
  4. mohamed on Traffic flows from an Openstack VM
  5. Amit Pawar on Traffic flows from an Openstack VM

Copyright Mohamed Elsakhawy, PhD 2026 | Theme by ThemeinProgress | Proudly powered by WordPress