When a network is created and DHCP is enabled on a subnet within the network, the network is scheduled to one or more DHCP agents in the environment. In most environments, DHCP agents are configured on controllers or dedicated network nodes. In more advanced environments, such as those utilizing network segments and leaf/spine topologies, DHCP agents may be needed on compute nodes.
A DHCP agent is responsible for creating a local network namespace that corresponds to each network that has been scheduled to that agent. An IP address is then configured on a virtual interface inside the namespace, along with a dnsmasq process that listens for DHCP requests on the network. If a dnsmasq process already exists for the network and a new subnet is added, the existing process is updated to support the additional subnet.