Configuring the Neutron DHCP agent

Neutron utilizes dnsmasq, a free and lightweight DNS forwarder and DHCP server, to provide DHCP services to networks. The neutron-dhcp-agent service is responsible for spawning and configuring dnsmasq and metadata processes for each network that leverages DHCP.

The DHCP driver is specified in the /etc/neutron/dhcp_agent.ini configuration file. The DHCP agent can be configured to use other drivers, but dnsmasq support is built-in and requires no additional setup. The default dhcp_driver value is neutron.agent.linux.dhcp.Dnsmasq and can be left unmodified.

Other notable configuration options found in the dhcp_agent.ini configuration file include the following:

  • interface_driver
  • enable_isolated_metadata

The interface_driver configuration option should be configured appropriately based on the Layer 2 agent chosen for your environment:

  • Linux bridge:   neutron.agent.linux.interface.BridgeInterfaceDriver
  • Open vSwitchneutron.agent.linux.interface.OVSInterfaceDriver

Both the Linux bridge and Open vSwitch drivers will be discussed in further detail in upcoming chapters. For now, the default value of <none> will suffice.

Only one interface driver can be configured at a time per agent.

The enable_isolated_metadata configuration option is useful in cases where a physical network device such as a firewall or router serves as the default gateway for instances, but Neutron is still required to provide metadata services to those instances. When the L3 agent is used, an instance reaches the metadata service through the Neutron router that serves as its default gateway. An isolated network is assumed to be one in which a Neutron router is not serving as the gateway, but Neutron still handles DHCP requests for the instances. This is often the case when instances are leveraging flat or VLAN networks with physical gateway devices. The default value for enable_isolated_metadata is False. When set to True, Neutron can provide instances with a static route to the metadata service via DHCP in certain cases. More information on the use of metadata and this configuration can be found in Chapter 7, Attaching Instances to Networks. On the controller node, update the enable_isolated_metadata option in the DHCP agent configuration file located at /etc/neutron/dhcp_agent.ini to True:

[DEFAULT] 
...
enable_isolated_metadata = True

Configuration options not mentioned here have sufficient default values and should not be changed unless your environment requires it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset