如何为PXE服务器的所有子网启用DHCP服务器?

我已经设置了一个PXE启动服务器,用于通过网络安装ubuntu。 目前我正在使用主机mac地址来安装ubuntu操作系统。 我想在所有子网中启用DHCP服务器,例如172.29.34.0/24 172.29.36.0/24等..而不是使用其mac地址。 请在下面找到我当前的配置,

DHCP服务器配置:

allow booting; allow bootp; subnet 172.29.32.0 netmask 255.255.255.0 { range 172.29.32.20 172.29.32.200; option broadcast-address 172.29.1.255; option routers 172.29.32.1; } group { next-server 172.29.32.9; filename "/pxelinux.0"; host webppc { hardware ethernet BC:30:5B:C3:23:69; option host-name "webppc"; } } 

我不能保证它会起作用,但你可以指定每个子网的选项,而不是按组指定(虽然你将失去主机名的分配 – 如果你没有一个独特的方式(即MAC),这是预期的。识别每个系统)。

 allow booting; allow bootp; subnet 172.29.32.0 netmask 255.255.255.0 { next-server 172.29.32.9; filename "/pxelinux.0"; range 172.29.32.20 172.29.32.200; option broadcast-address 172.29.32.255; option routers 172.29.32.1; } #Repeat this block for each subnet subnet 172.29.34.0 netmask 255.255.255.0 { next-server 172.29.32.9; #Note this is on another subnet. filename "/pxelinux.0"; range 172.29.34.20 172.29.34.200; option broadcast-address 172.29.34.255; option routers 172.29.34.1; } 
 allow booting; allow bootp; subnet 172.29.32.0 netmask 255.255.255.0 { range 172.29.32.20 172.29.32.200; range 172.29.33.20 172.29.33.200; range 172.29.34.20 172.29.34.200; option broadcast-address 172.29.1.255; option routers 172.29.32.1; } group { next-server 172.29.32.9; filename "/pxelinux.0"; host webppc { hardware ethernet BC:30:5B:C3:23:69; option host-name "webppc"; } }