A host, called lpi, with the MAC address 08:00:2b:4c:59:23 should always be given the IP address of 192.168.1.2 by a DHCP server running ISC DHCPD.
Which of the following configurations will achieve this?
A.
host lpi {
hardware-ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.2;
}
B.
host lpi {
mac=08:00:2b:4c:59:23;
ip=192.168.1.2;
}
C.
host lpi = 08:00:2b:4c:59:23 192.168.1.2
D.
host lpi {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.2;
}
E.
host lpi {
hardware-ethernet 08:00:2b:4c:59:23;
fixed-ip 192.168.1.2;
}
题解
要根据发出 DHCP 请求的设备的 MAC 地址,来决定要给它什么样的 IP 地址,在「/etc/dhcp/dhcpd.conf」中,写法如下:
host 可辨识的名称 {
hardware ethernet MAC地址;
fixed-address IP地址;
}
所以答案是选项「D」。
