随机有限连接 nmcli

随机有限连接 nmcli

我的笔记本电脑与本地 wifi 的连接出现了一些奇怪的现象。连接似乎毫无原因地受到限制,而且完全是随机的。这种情况平均每小时发生一次。以下是 nmcli 显示的内容:

stefano@stefano-Latitude-E7240:~$ nmcli g
STATE                  CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
connected (site only)  limited       enabled  enabled  enabled  enabled 

要解决这个问题,只需重新启动网络管理器小程序即可。当然,这只是一个临时解决方案。我试图通过在互联网上 ping 不同的 IP 来了解问题的根源。我的虚拟故障排除结果:

  • 我可以 ping 网关
  • 我可以 ping 任何 IP 地址
  • 我无法 ping 主机名

所以我猜这个问题与 DNS 名称解析有关。我该如何解决这个问题?下面是 resolv.conf 的内容和 uname 的输出。

stefano@stefano-Latitude-E7240:~$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 127.0.0.53

stefano@stefano-Latitude-E7240:~$ uname -a
Linux stefano-Latitude-E7240 4.18.0-17-generic #18-Ubuntu SMP Wed Mar 13 14:34:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

先感谢您。

编辑:其他所需信息:

stefano@stefano-Latitude-E7240:~$ nmcli d
DEVICE  TYPE      STATE        CONNECTION       
wlp2s0  wifi      connected    FASTWEB-XE5.0GHZ 
eno1    ethernet  unavailable  --               
lo      loopback  unmanaged    --

stefano@stefano-Latitude-E7240:~$ ip addr show
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: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether ec:f4:bb:67:3b:75 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f8:16:54:ba:71:74 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.206/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0
       valid_lft 84662sec preferred_lft 84662sec
    inet6 2001:b07:5d29:9741:49b8:1d36:d9df:f637/64 scope global temporary dynamic 
       valid_lft 603064sec preferred_lft 84287sec
    inet6 2001:b07:5d29:9741:e11e:4a67:e846:1e/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::94bf:18ac:a222:89c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

stefano@stefano-Latitude-E7240:~$ sudo lshw -short -class network
[sudo] password for stefano: 
H/W path         Device     Class          Description
======================================================
/0/100/19        eno1       network        Ethernet Connection I218-LM
/0/100/1c.3/0    wlp2s0     network        Wireless 7260

stefano@stefano-Latitude-E7240:~$ rfkill
ID TYPE      DEVICE              SOFT      HARD
 1 wlan      dell-wifi      unblocked unblocked
 2 bluetooth dell-bluetooth unblocked unblocked
 3 wlan      phy0           unblocked unblocked
15 nfc       nfc0           unblocked unblocked
17 bluetooth hci0           unblocked unblocked

stefano@stefano-Latitude-E7240:~$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   stefano-Latitude-E7240

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

编辑2:

stefano@stefano-Latitude-E7240:~$ hostname
stefano-Latitude-E7240

stefano@stefano-Latitude-E7240:~$ nmcli device show wlp2s0 | grep IP4.DNS
IP4.DNS[1]:                             192.168.1.254
IP4.DNS[2]:                             8.8.8.8

相关内容