大家好,我已经在我的无头服务器上运行了 Ubuntu Server 16.04 几个月,没有出现任何问题,最近我让服务器离线进行一些例行清洁并更换了一个 PSU,由于某种原因,重新启动服务器后,服务器没有传出的互联网连接,以下是一些测试的结果
ben@ubuntu:~$ ping -c5 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=23.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=23.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=23.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=23.3 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=29.9 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 23.396/24.844/29.937/2.556 ms
尝试 ping 主机名
ben@ubuntu:~$ ping www.cisco.com -c 1 -s 1472 -M do
ping: unknown host www.cisco.com
ben@ubuntu:~$
通过 IP 地址 Ping www.cisco.com
ben@ubuntu:~$ ping -c5 23.204.15.199
PING 23.204.15.199 (23.204.15.199) 56(84) bytes of data.
64 bytes from 23.204.15.199: icmp_seq=1 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=2 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=3 ttl=46 time=239 ms
64 bytes from 23.204.15.199: icmp_seq=4 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=5 ttl=46 time=229 ms
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
if config 的内容
ben@ubuntu:~$ ifconfig
enp8s0 Link encap:Ethernet HWaddr 00:1e:67:51:8e:8c
inet addr:192.168.0.251 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:67ff:fe51:8e8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:20820 errors:0 dropped:50 overruns:0 frame:0
TX packets:16017 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4243433 (4.2 MB) TX bytes:4596251 (4.5 MB)
Interrupt:16 Memory:c2300000-c2320000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:18434 errors:0 dropped:0 overruns:0 frame:0
TX packets:18434 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:2225861 (2.2 MB) TX bytes:2225861 (2.2 MB)
/etc/network/interfaces 的内容
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp8s0
iface enp8s0 inet static
address 192.168.0.251
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
/etc/hosts 的内容
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
我可以使用 4G 连接(在我的本地网络之外)从我的手机通过 SSH 进入盒子
有什么想法吗?系统一直运行良好,现在突然没有互联网访问,
谢谢
-本