ISC DHCPD 的 IP pool (range) 並不會自動排除已 fixed-address 的 IP
舉個例子:
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.200;
option routers 192.168.0.1;
option domain-name-servers 168.95.1.1,168.95.192.1;
}
host test { hardware ethernet 00:90:dc:02:45:88; fixed-address 192.168.0.10; }
這就是有問題的設定, 有可能有其他電腦會佔了 192.168.0.10 這個 IP,
而 00:90:dc:02:45:88 這台電腦就無法取得 IP.
正確的做法應該要把固定 IP 區段畫開,
如:
192.168.0.10 ~ 192.168.0.20 為固定分配 IP
192.168.0.21 ~ 192.168.0.200 為動態分配 IP
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.21 192.168.0.200;
option routers 192.168.0.1;
option domain-name-servers 168.95.1.1,168.95.192.1;
}
host test { hardware ethernet 00:90:dc:02:45:88; fixed-address 192.168.0.10; }
Leave a comment