已连接到 wifi 但没有互联网 - ubuntu 18.04

已连接到 wifi 但没有互联网 - ubuntu 18.04

我检查过:Wifi 已连接但无互联网已连接 wifi,但上不了网 [16.04]

https://askubuntu.com/questions/1028651/wifi-connected-but-cannot-access-internet-ubuntu--- 不起作用

除其他来源外...

我已连接到同一网络,并在另一台计算机上访问了互联网。有问题的计算机使用的是 Ubuntu 18.04.3 LTS 并连接到我的路由器。我有一个 IP 地址(来自 wlp1s0)。我无法 ping 8.8.8.8。我不知道我的路由器的 IP,我无法解析名称服务器或通过浏览器连接到互联网。

user@user-S410G2:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
#post-up ip route add 224.0.0.0/4 dev lo metric 800
user@user-S410G2:~$ sudo service network-manager restart
user@user-S410G2:~$ iwconfig
lo        no wireless extensions.

enp0s31f6  no wireless extensions.

wwp0s20f0u5i12  no wireless extensions.

wlp1s0    IEEE 802.11  ESSID:"FRFadmin"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1E:2A:0A:E7:0A   
          Bit Rate=18 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=28/70  Signal level=-82 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:22   Missed beacon:0
user@user-S410G2:~$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:22:20:1f:6a:85 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global enp0s31f6
       valid_lft forever preferred_lft forever
4: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether d4:d2:52:d1:08:62 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.130/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp1s0
       valid_lft 86334sec preferred_lft 86334sec
    inet6 fe80::2d1f:3795:f831:3593/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
7: wwp0s20f0u5i12: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 9a:96:15:9a:e6:e1 brd ff:ff:ff:ff:ff:ff
user@user-S410G2:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4041ms
pipe 3
user@user-S410G2:~$ sudo lshw -class network 
  *-network                 
       description: Wireless interface
       product: Wireless 8265 / 8275
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: wlp1s0
       version: 78
       serial: d4:d2:52:d1:08:62
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.0.0-32-generic firmware=36.9f0a2d68.0 ip=192.168.1.130 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:130 memory:a9100000-a9101fff
  *-network
       description: Ethernet interface
       product: Ethernet Connection I219-LM
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       logical name: enp0s31f6
       version: 21
       serial: 00:22:20:1f:6a:85
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-4 ip=192.168.1.100 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:134 memory:a9200000-a921ffff
  *-network DISABLED
       description: Ethernet interface
       physical id: 2
       logical name: wwp0s20f0u5i12
       serial: 9a:96:15:9a:e6:e1
       capabilities: ethernet physical
       configuration: broadcast=yes driver=cdc_mbim driverversion=22-Aug-2005 firmware=CDC MBIM link=no multicast=yes

上面附有各种调试/故障排除的输出,我认为这些输出似乎与此相关。这似乎是 Ubuntu 的一个普遍问题。非常感谢您的帮助!

答案1

是 wifi 还是以太网导致了这个问题?两者似乎都已连接。/etc/network/interfaces从 Ubuntu 17.10 开始,该文件已被 netplan 替换。我建议您将更改还原到该文件并在网络管理器中设置任何详细信息。如果您要设置静态 IP 地址,请确保还包括 DNS 名称服务器。

进行任何更改后,断开以太网并重新启动网络管理器:

sudo service network-manager restart

wifi 能连上吗?

iwconfig

您能 ping 通路由器吗?

ping -c3 192.168.1.1

您能 ping 通互联网名称服务器吗?

ping -c3 8.8.8.8

你能解析名称吗?

ping -c3 www.ubuntu.com

相关内容