小编Sar*_*rke的帖子

Ubuntu 18.04 无法识别来自路由器的主机名

我之前安装了 Xubuntu 16.04,它确实识别了我的路由器(Tomato)设置的主机名。

例如,我mate在网络上有一台计算机,其静态 IP 为192.168.2.202,以前我可以这样做:

$ host mate                                                               
mate has address 192.168.2.202
Run Code Online (Sandbox Code Playgroud)

但现在我明白了:

$ host mate
Host mate not found: 2(SERVFAIL)
Run Code Online (Sandbox Code Playgroud)

这次我做了一个最小的桌面安装,所以我想知道我是否缺少某个包。

编辑:

$ cat /var/run/systemd/resolve/resolv.conf:
nameserver 192.168.2.1
Run Code Online (Sandbox Code Playgroud)
$ cat /var/run/NetworkManager/resolv.conf
nameserver 127.0.0.53
Run Code Online (Sandbox Code Playgroud)
$ netstat -antup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      3421/VBoxHeadless   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      663/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      950/sshd            
tcp        0 …
Run Code Online (Sandbox Code Playgroud)

networking hosts router

7
推荐指数
1
解决办法
9512
查看次数

标签 统计

hosts ×1

networking ×1

router ×1