Configuring the DHCP service agent
Neutron can provide DHCP services to the virtual machine instances using the neutron-dhcp-agent
service. In this recipe, we will configure the DHCP agent to utilize dnsmasq
—a free, lightweight DNS forwarder—and DHCP server that is used to provide DHCP services to networks. The DHCP agent is responsible for spawning and controlling dnsmasq processes for each network that leverages DHCP.
How to do it…
Follow these steps to configure the DHCP service agent:
Using the
openstack-config
command, edit thedhcp
agent configuration file, and under the default section, set OVS as the interface driver:[root@neutron-node ~]# openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
Choose
dnsmaq
as thedhcp
driver:[root@neutron-node ~]# openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
Enable the use of network namespaces for DHCP services as follows...