resolv.conf 未在连接到 DHCP 服务器的 PC 客户端上显示正确的 DNS 服务器 [关闭]

问题描述 投票:0回答:0

我在 2 个虚拟机上,其中一个是 Ubuntu 上的 DHCP 服务器,另一个是客户端。客户端从 DHCP 服务获取正确的 IP,但是当我打开 resolv.conf 时,我得到这个:

虚拟机客户端:$ cat /etc/resolv.conf

nameserver 127.0.0.53
options edns0 trust-ad
search example.org

现在 DHCP 服务器上的 dhcpd.conf:

DHCP 服务器:$ nano /etc/dhcp/dhcpd.conf

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;

subnet 192.168.222.0 netmask 255.255.255.0 {
       option routers 192.168.222.1;
       option subnet-mask 255.255.255.0;
       option domain-name-servers 192.168.222.3, 192.168.222.4;
       range 192.168.222.20 192.168.222.30;
}

我在名称服务器中期待 192.168.222.3 但它显示 127.0.0.53. 我不知道我失败了什么。我正在学习视频教程,我完全确定我的状态很好。而且我不确定是否需要显示正确的名称服务器。我正在学习服务器和 Linux,这件事我不明白。

非常感谢你们。

linux ubuntu dhcp
© www.soinside.com 2019 - 2024. All rights reserved.