我正在尝试配置 DHCP 以使用选项 66 为 Sunray 瘦客户端提供 TFTP 服务器。特定子网中的客户端必须使用特定的 TFTP 服务器,以便为其提供特定于其子网的配置。我可以将选项放置在子网块中,如下所示
subnet 192.168.1.128 netmask 255.255.255.128 {
# don't let clients modify their own A records
ignore client-updates;
# options
option subnet-mask 255.255.255.128;
option broadcast-address 192.168.1.255;
option domain-name "domain.com";
option domain-name-servers 192.168.3.55, 192.168.3.56;
option routers 192.168.1.129;
option 66 ip 192.168.16.21;
option ntp-servers 192.168.3.57;
option interface-mtu 1500;
ddns-domainname "dhcp.domain.com.";
ddns-rev-domainname "dhcp.in-addr.arpa.";
pool {
failover peer "dhcp-failover";
range 192.168.1.140 192.168.1.249;
}
}
答案1
在 isc-dhcp-server 中我创建选项全局使用,然后在主机级别使用它。你应该能够使用供应商选项空间在子网级别也是如此。
option space SunRay;
option SunRay.FWSrvr code 31 = ip-address;
option SunRay.FWSrvr 10.99.90.160;
option SunRay.AuthSrvr code 21 = ip-address;
option SunRay.AuthSrvr 10.99.90.160;
option SunRay.AltAuth code 35 = array of ip-address;
option SunRay.AltAuth 10.99.90.161, 10.99.90.160;
host 10.96.0.11 {
vendor-option-space SunRay;
hardware ethernet 00:ff:ff:ff:ff:ff;
fixed-address 10.96.0.11;
}