AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-850136

Guy Dresher's questions

Martin Hope
Guy Dresher
Asked: 2020-12-15 22:46:56 +0800 CST

我可以ping google.com,但没有别的?

  • 0

在我定义了一个静态 IP 后,我的网络设置出现了问题。我花了一段时间才让它再次工作,但现在出现了一些奇怪的症状。其中之一是无法再解析 dns。我可以ping google.com毫无问题,但 ping microsoft.com、godaddy.com 甚至 8.8.8.8 让我ping: connect: Network is unreachable

这台机器是 I7、32Gb 内存,运行 Ubuntu 服务器 20.04,大部分是无头的。使用 ssh。

我网络上的其他设备没有问题。

$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:22:f6:ee:c8  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

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a02:14c:805f:ffc5:1ac0:4dff:fe41:3e93  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::1ac0:4dff:fe41:3e93  prefixlen 64  scopeid 0x20<link>
        ether 18:c0:4d:41:3e:93  txqueuelen 1000  (Ethernet)
        RX packets 331527  bytes 83760648 (83.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 182973  bytes 52213897 (52.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0x53200000-53220000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 209338  bytes 12397801 (12.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 209338  bytes 12397801 (12.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我的 /etc/resolv.conf 每次重启都会被清理到这个状态:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad

$ netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.17.0.0      0.0.0.0         255.255.0.0     U         0 0          0 docker0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eno1

/etc/netplan/00-installer-config.yaml

network:
  version: 2
  renderer: networkd
    ethernets:
        eno1:
            addresses: ['192.168.1.101/24']
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4, 192.168.1.1, 212.143.0.1, 194.90.0.1, '2a02:148::1', '2a02:149::>

任何想法出了什么问题以及如何解决它?

顺便说一句,ping IP6 地址确实有效!

networking server dns ethernet
  • 1 个回答
  • 294 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve