【问题标题】:wifi and ethernet up and pinging but both die as soon as I unplug ethernetwifi和以太网启动并ping,但只要我拔掉以太网,它们都会死机
【发布时间】:2021-03-11 03:28:06
【问题描述】:

我可以在以太网和 wlan 地址上 ping 我的计算机,但是一旦我拔下以太网,我就无法 ping 它或上网。如果我把以太网插回去,在拔掉linksys ac1200 usb wifi dongle之前什么都ping不通,然后我可以再次ping以太网地址。如果我再次将 wifi 加密狗插回两个 ping 中(方块 1)。最终目标是永久拔下以太网并将其留在 wifi 上,但到目前为止,我还无法让 wifi 正常工作。还尝试将 eth 拔下并重新启动,但在我拔下 wifi 加密狗并插入以太网之前没有任何 ping 操作

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.140  netmask 255.255.255.0  broadcast 192.168.2.255

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.141  netmask 255.255.255.0  broadcast 192.168.2.255

/etc/netplan/01-netcfg.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: no
      addresses:
        - 192.168.2.140/24
      gateway4: 192.168.2.1
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]
  wifis:
    wlan0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.2.141/24]
      gateway4: 192.168.2.1
      nameservers:
        addresses: [192.168.2.1, 8.8.8.8]
      access-points:
        "myssid":
          password: "mywifipassword"

*编辑

对不起,我缺少 wpa_supplicant,所以我实际上并没有连接到 AP,我现在可以正常工作了

【问题讨论】:

  • 拔下以太网时 ifconfig 的输出是什么?

标签: ubuntu networking wifi


【解决方案1】:

对不起,我缺少 wpa_supplicant,所以我实际上并没有连接到 AP,我现在可以正常工作了

【讨论】:

    猜你喜欢
    • 2012-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多