前面章节我们看到 instance 在启动过程中能够从 Neutron 的 DHCP 服务获得 IP,本节将详细讨论其内部实现机制。
Neutron 提供 DHCP 服务的组件是 DHCP agent。
DHCP agent 在网络节点运行上,默认通过 dnsmasq 实现 DHCP 功能。
配置 DHCP agent
DHCP agent 的配置文件位于 /etc/neutron/dhcp_agent.ini。
dhcp_driver
使用 dnsmasq 实现 DHCP。
interface_driver
使用 linux bridge 连接 DHCP namespace interface。
当创建 network 并在 subnet 上 enable DHCP 时,网络节点上的 DHCP agent 会启动一个 dnsmasq 进程为该 network 提供 DHCP 服务。
dnsma