当我使用前缀名称服务器修改我的 /etc/dhcp/dhclient.conf 时,网络管理器重新启动后,生成的 resolv.conf 文件不包含这些服务器。我正在研究 Kali Linux。
这是我的 dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 208.67.222.222, 208.67.220.220;
修改后我运行
service network-manager restart
这是 cat /etc/resolv.conf 的输出
# Generated by NetworkManager
nameserver 192.168.1.254
nameserver 2001:b07:a99:4d41:ead1:1bff:fe7c:75eb
没有名称服务器。