我已经设置了一个 PXE 引导服务器,用于通过网络安装 ubuntu。目前我正在使用主机 mac 地址来安装 ubuntu 操作系统。我想在所有子网中启用 DHCP 服务器,例如 172.29.34.0/24 172.29.36.0/24 等,而不是使用它的 mac 地址。请在下面找到我当前的配置,
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";
}
}
Run Code Online (Sandbox Code Playgroud)
我不能保证它会起作用,但是您可以指定每个子网的选项而不是按组(尽管您会丢失主机名的分配 - 如果您没有独特的方式(即 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;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6545 次 |
| 最近记录: |