Câu trả lời:
Bạn có thể thêm dòng này vào /etc/dhcp/dhclient.conf:
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
Sau đó khởi động lại mạng hoặc chạy dhclientđể thực hiện thay đổi.
Từ man dhclient.conf:
The supersede statement
supersede [ option declaration ];
If for some option the client should always use a locally-configured
value or values rather than whatever is supplied by the server, these
values can be defined in the supersede statement.
/etc/dhcp/dhclient.conftrongrequestcác tham số mà bạn không muốn yêu cầu, đối với DNS thì có thểdomain-name, domain-name-servers, domain-search.