自从我安装了 18.04 以来,我的网络调试起来简直就是一场噩梦。我用了一天。
我真的不知道发生了什么事。我可以访问一些网站,而另一些则不能。ping ubuntu.com
确实有效,但ping nba.com
没有。在我的浏览器中,当我去ubuntu.com
它不起作用。apt update
不起作用。当我进入 GUI 对话框Software & Updates
并且Select best server
没有提供服务器时。
sudo apt update -y
Err:1 http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic InRelease
Connection failed [IP: 91.189.95.83 80]
Err:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Connection failed [IP: 91.189.88.162 80]
Err:3 http://in.archive.ubuntu.com/ubuntu bionic-security InRelease
Connection failed [IP: 91.189.88.149 80]
但 ping91.189.88.83
确实有效
ping 91.189.95.83
PING 91.189.95.83 (91.189.95.83) 56(84) bytes of data.
64 bytes from 91.189.95.83: icmp_seq=1 ttl=56 time=20.6 ms
64 bytes from 91.189.95.83: icmp_seq=2 ttl=56 time=18.7 ms
64 bytes from 91.189.95.83: icmp_seq=3 ttl=56 time=19.6 ms
64 bytes from 91.189.95.83: icmp_seq=4 ttl=56 time=19.2 ms
cat /etc/apt/sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::28c:faff:fe8a:7cba prefixlen 64 scopeid 0x20<link>
ether 00:8c:fa:8a:7c:ba txqueuelen 1000 (Ethernet)
RX packets 198488 bytes 80931214 (80.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 148532 bytes 71462491 (71.4 MB)
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
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 238660 bytes 25150962 (25.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 238660 bytes 25150962 (25.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.9 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::5e82:7f12:37f8:854f prefixlen 64 scopeid 0x20<link>
ether 34:de:1a:7f:93:1a txqueuelen 1000 (Ethernet)
RX packets 29308 bytes 10218041 (10.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15815 bytes 2638177 (2.6 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: yes
dhcp6: yes
addresses: [192.168.1.0/24, ]
gateway4: 192.168.1.1
nameservers:
addresses: [192.168.1.1, 8.8.8.8, 8.8.4.4]
systemd-resolve --status
Global
DNS Servers: 192.168.1.1
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 3 (wlan0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.1.1
Link 2 (eth0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.1.1
8.8.8.8
8.8.4.4
“连接失败”意味着服务已关闭,而不是您的网络配置有问题。
获得对 ICMP (ping) 的响应但 apt 拒绝连接仅意味着它是 Web 服务,而不是主机,它已关闭。
如果您始终无法访问您知道正在从其他主机运行的某些 Web 服务,则它们可能被您的路由器阻止。可能有一个强制门户,您需要从您的网络浏览器或路由器端所需的其他配置进行身份验证。
您的报告中没有任何内容表明您配置的网络设置未正确应用于系统,但我们无法知道它们是否是适合您环境的正确设置。