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」和「/etc/dhcp/dhcpd6.conf」中,寫法均如下:

host 可辨識的名稱 {
    hardware ethernet MAC位址;                                                                                                                                          
    fixed-address IP位址;
}

所以答案是選項「D」。