JavaScript is required

Một máy tính Linux có một địa chỉ địa phương là 192.168.1.1 với subnet mask 255.255.255.0. Vào thời gian này, tất cả các dịch vụ bị từ chối. Mã nào của những dòng này được nối thêm vào file hosts để cho phép truy cập vào các dịch vụ web trên mạng con?

A.

A. Tất cả trừ httpd: 192.168.1.1/24

B.

B. httpd: 192.168.1.

C.

C. 192.168.1.255/255.255.255.0:httpd

D.

D. Tất cả 192.168.1.255/24

Trả lời:

Đáp án đúng: B


The `/etc/hosts` file is used to map hostnames to IP addresses. We need to add a line that allows access to web services on the subnet. None of the options are valid. A. Incorrect syntax. It attempts to exclude httpd, which `/etc/hosts` cannot do. B. Incomplete IP address. C. Incorrect syntax and uses the broadcast address, which is not appropriate for `/etc/hosts`. D. Incorrect syntax and uses the broadcast address, which is not appropriate for `/etc/hosts`. A correct entry would be `[IP address] [hostname]` e.g., `192.168.1.10 webserver.local`.

Câu hỏi liên quan