我最近搬到了一个有公共 WiFi 的地方(所以我无法访问路由器或其 DHCP 配置),并且在连接我的 Arch 笔记本电脑时遇到了问题。
我尝试使用 NetworkManager 和 netctl 进行连接,但都无法获得 DHCP 租约。应该指出的是,所有其他设备(Android 和 iOS 手机、Windows 和 macOS 笔记本电脑)都可以毫无问题地执行此操作。
我该如何调试这个?我是否缺少包裹,或者我连接错误?
网络管理器
我用来nmcli
连接:
$ nmcli dev wifi
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
ssidOfWifi Infra 1 54 Mbit/s 52 ▂▄__ WPA2
ssidOfWifi Infra 13 54 Mbit/s 34 ▂▄__ WPA2
ssidOfWifi Infra 13 54 Mbit/s 22 ▂___ WPA2
$ nmcli dev wifi connect ssidOfWifi password passwordToWifi
Error: Connection activation failed: (5) IP configuration could not be reserved (no available address, timeout, etc.).
$ systemctl status NetworkManager
...
Jan 09 17:49:43 home NetworkManager[5621]: <info> [1483980583.9385] device (wlp2s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network 'ssidOfWifi'.
Jan 09 17:49:43 home NetworkManager[5621]: <info> [1483980583.9386] device (wlp2s0): state change: config -> ip-config (reason 'none') [50 70 0]
Jan 09 17:49:43 home NetworkManager[5621]: <info> [1483980583.9390] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0055] dhcp4 (wlp2s0): state changed unknown -> timeout
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0214] dhcp4 (wlp2s0): canceled DHCP transaction
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0215] dhcp4 (wlp2s0): state changed timeout -> done
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0220] device (wlp2s0): state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0223] manager: NetworkManager state is now DISCONNECTED
Jan 09 17:50:29 home NetworkManager[5621]: <warn> [1483980629.0233] device (wlp2s0): Activation: failed for connection 'ssidOfWifi'
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0319] device (wlp2s0): state change: failed -> disconnected (reason 'none') [120 30 0]
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0421] device (wlp2s0): set-hw-addr: set MAC address to AA:BB:CC:DD:EE:FF (scanning)
Jan 09 17:50:29 home NetworkManager[5621]: <warn> [1483980629.0453] sup-iface[0x1d5ec00,wlp2s0]: connection disconnected (reason -3)
Jan 09 17:50:29 home NetworkManager[5621]: <info> [1483980629.0454] device (wlp2s0): supplicant interface state: completed -> disconnected
网络控制
我用的wifi-menu -o
是连接。这仅显示一个“ssidOfWifi”,nmcli
与每个接入点显示一个不同。
$ sudo wifi-menu -o
Job for netctl@wlp2s0\x2dssidOfWifi.service failed because the control process exited with error code.
See "systemctl status "netctl@wlp2s0\\x2dssidOfNetwork.service"" and "journalctl -xe" for details.
$ journalctl -xe
...
Jan 09 23:10:34 home dhcpcd[14402]: wlp2s0: soliciting a DHCP lease
Jan 09 23:11:03 home dhcpcd[14402]: timed out
Jan 09 23:11:03 home dhcpcd[14402]: dhcpcd exited
Jan 09 23:11:03 home network[14363]: DHCP IPv4 lease attempt failed on interface 'wlp2s0'
Jan 09 23:11:03 home kernel: wlp2s0: deauthenticating from AA:BB:CC:DD:EE:FF by local choice (Reason: 3=DEAUTH_LEAVING)
Jan 09 23:11:03 home network[14363]: Failed to bring the network up for profile 'wlp2s0-ssidOfWifi'
Jan 09 23:11:03 home systemd[1]: netctl@wlp2s0\x2dssidOfWifi.service: Main process exited, code=exited, status=1/FAILURE
答案1
如果超时的话,他们可能就完了。请咨询管理层,了解他们是否有任何特殊的连接要求。