我正在尝试拆分 isc dhcp 子网,以便在一个部分(0..128)中我仅保留 IP,而在另一部分(128..255)中 - 动态范围。我尝试了此配置(如下所示),但我总是从第 2 部分获得动态范围。即使我正在启动“node-1”,它也应该通过其 MAC 获取静态 IP。
subnet 1.2.3.0 netmask 255.255.255.128 {
next-server 1.2.3.199;
filename "pxelinux.0";
option routers 1.2.3.1;
option subnet-mask 255.255.255.0;
option domain-name "host.edu";
option domain-name-servers 1.2.8.;
option broadcast-address 1.2.3.255;
default-lease-time -1;
max-lease-time -1;
host node-1 {
hardware ethernet 00:00:00:01:01:5d;
fixed-address 1.2.3.12;
option host-name "node-1";
}
}
subnet 1.2.3.128 netmask 255.255.255.128 {
range dynamic-bootp 1.2.3.130 1.2.3.190;
next-server 1.2.3.199;
filename "pxelinux.0";
option routers 1.2.3.1;
option subnet-mask 255.255.255.0;
option domain-name "host.edu";
option domain-name-servers 1.2.8.23;
option broadcast-address 1.2.3.255;
default-lease-time -1;
max-lease-time -1;
}
那么我的任务可以完成吗?我需要分离网络,因为 dhcp 后面有一个管理软件。否则我不会这样做。
答案1
你的配置应该看起来更像这样:
subnet 1.2.3.0 netmask 255.255.255.0 {
range 1.2.3.128 1.2.3.254
next-server 1.2.3.199;
filename "pxelinux.0";
option routers 1.2.3.1;
option subnet-mask 255.255.255.0;
option domain-name "host.edu";
option domain-name-servers 1.2.8.;
option broadcast-address 1.2.3.255;
default-lease-time -1;
max-lease-time -1;
host node-1 {
hardware ethernet 00:00:00:01:01:5d;
fixed-address 1.2.3.12;
option host-name "node-1";
}
}