EHQ*_*EHQ 3 domain-name-system hostname nslookup
我似乎无法让 nslookup 正确解析。
这是我的主机文件:
[root@clc-host ge2011.11]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.101 clc-host
192.168.0.101 clc-host.novalocal
Run Code Online (Sandbox Code Playgroud)
以下是结果nslookup
:
[eamorr@clc-host ge2011.11]$ nslookup clc-host
Server: 10.77.254.1
Address: 10.77.254.1#53
** server can't find clc-host: NXDOMAIN
[eamorr@clc-host ge2011.11]$ nslookup clc-host.novalocal
Server: 10.77.254.1
Address: 10.77.254.1#53
** server can't find clc-host.novalocal: NXDOMAIN
Run Code Online (Sandbox Code Playgroud)
你知道我如何解决这个问题吗?我想要做的就是将“clc-host”解析为 192.168.0.101。我需要“clc-host”和“clc-host.novalocal”来解析为 192.168.0.101!!!
这是“ifconfig -a”
[eamorr@clc-host ge2011.11]$ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255
ether fa:16:3e:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 506130 bytes 500159111 (476.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 318940 bytes 80431845 (76.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 251781 bytes 57945811 (55.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 251781 bytes 57945811 (55.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:xx:xx:xx txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:xx:xx:xx txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Run Code Online (Sandbox Code Playgroud)
我认为 DNS 存在一些内部问题,我不知道如何解决。我认为它与 /etc/hosts 无关
我需要在本地安装完整的 DNS 服务器吗?
我正在尝试安装 3rd 方软件 - GUI 不接受 IP 地址,我必须使用机器的主机名,这不能解析...
Sve*_*ven 11
nslookup
(ñ AME小号erver查找)不工作,在主机文件中的条目,而是查询DNS系统,不知道在您的本地定义名称hosts
的文件。尝试仅ping
使用名称或在 Web 浏览器中访问它。
/etc/hosts
不是 DNS。
请使用正确的工具进行测试;nslookup
并且dig
始终咨询 DNS 并且永远不要使用 /etc/hosts 中的条目(或就此而言 NIS、LDAP 或其他替代主机数据库)。
/etc/hosts
您的系统完全使用该文件的事实及其优先级由配置的名称服务切换库决定/etc/resolv.conf
getent hosts <hostname | ip-address>
将使用 C 解析器函数,尊重 nsswitch.conf 并显示来自您的主机文件的条目,如果这些条目具有优先级,并且最接近地模仿您的系统将解析的内容。
归档时间: |
|
查看次数: |
16726 次 |
最近记录: |