我遇到了奇怪的情况,这可能是一些可以快速解决的愚蠢问题,但我无法弄清楚。
我有 2 台服务器。两台服务器的配置相同(只有 IP 不同)。一台运行良好,但第二台无法解析 DNS。
第一个安装的是 17.04 版,然后升级到 17.10 版。第二个是全新的 17.10 Ubuntu Server,带有 gnome。
在两台服务器上,我可以 ping 内部和外部网络上的任何 IP 地址。
第一台服务器(运行良好):
/etc/网络/接口
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eno1
#iface eno1 inet dhcp
iface eno1 inet manual
#iface eno1 inet static
# address 10.1.1.200
# netmask 255.255.255.0
# gateway 10.1.1.253
# network 10.1.1.0
# broadcast 10.1.1.255
# mtu 1500
auto eno1.1390
iface eno1.1390 inet static
address 10.66.64.9
netmask 255.255.252.0
gateway 10.66.64.1
dns-nameservers 8.8.8.8 10.66.95.249 10.1.1.254
# network 10.66.64.0
# broadcast 10.66.66.255
# mtu 1500
vlan-raw-device eno1
/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 8.8.8.8
nameserver 10.66.95.249
nameserver 10.1.1.254
nameserver
第二台服务器(有问题)
/etc/网络/接口
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# Generated by debian-installer.
# The loopback interface
auto lo
iface lo inet loopback
auto eno1
#iface eno1 inet dhcp
iface eno1 inet manual
#iface eno1 inet static
# address 10.1.1.201
# netmask 255.255.255.0
# gateway 10.1.1.253
# network 10.1.1.0
# broadcast 10.1.1.255
# mtu 1500
auto eno1.1390
iface eno1.1390 inet static
address 10.66.64.10
netmask 255.255.252.0
gateway 10.66.64.1
dns-nameservers 8.8.8.8 10.66.95.249 10.1.1.254
# network 10.66.64.0
# broadcast 10.66.66.255
# mtu 1500
vlan-raw-device eno1
/etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53