我的电脑上连接了两张 WiFi 卡,一张分配给 connectify 用作绑定热点。由于失误,我将 eth0 和 wlxb44bd62bf5e0 设置在了两个不同蜂窝路由器的同一 IP 范围内。这种方法在短时间内是有效的,可能是因为我忘记禁用了自动更新,但现在我无法从未分配的路由器连接无线网络,即使我更改了它的 IP 范围。我的一个蜂窝路由器现在位于 192.168.100.1,第二个位于 192.168.10.1。我可以通过一张卡连接到我的家庭无线网络,如果我禁用热点,也可以通过另一张卡连接到我的家庭无线网络,但我无法加入我的移动路由器的无线网络。
我的 connectify 设置为在启动时运行,但没有显示,尽管 Ubuntu 20.04 上的 GUI 显示“热点已启用”。也许我打开终端太快了?我的 ifconfig 是:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.178 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::dea6:32ff:fed4:6390 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:d4:63:90 txqueuelen 1000 (Ethernet)
RX packets 302 bytes 238740 (238.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 417 bytes 66302 (66.3 KB)
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 270 bytes 27407 (27.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 270 bytes 27407 (27.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.145.1 netmask 255.255.255.0 broadcast 192.168.145.255
inet6 fe80::c64:355c:699:91d2 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:d4:63:91 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 93 bytes 15218 (15.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlxb44bd62bf5e0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b4:4b:d6:2b:f5:e0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
当连接到我的家庭网络时,我的 ifconfig 是(在启动和重新启动时断开 connectify 服务之前和之后):
connectify0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 14800
inet 10.202.0.2 netmask 255.255.255.0 destination 10.202.0.2
inet6 fd0c:e2b6:32b:eda4:1234:abcd:6789:2 prefixlen 128 scopeid 0x0<global>
inet6 fe80::b792:13db:f29e:4cba prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10000 (UNSPEC)
RX packets 49 bytes 16385 (16.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 138 bytes 16120 (16.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.178 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::dea6:32ff:fed4:6390 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:d4:63:90 txqueuelen 1000 (Ethernet)
RX packets 768 bytes 637050 (637.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 957 bytes 109391 (109.3 KB)
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 417 bytes 42645 (42.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 417 bytes 42645 (42.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.145.1 netmask 255.255.255.0 broadcast 192.168.145.255
inet6 fe80::c64:355c:699:91d2 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:d4:63:91 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 146 bytes 26597 (26.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlxb44bd62bf5e0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.9.124 netmask 255.255.255.0 broadcast 192.168.9.255
inet6 fe80::1e6e:2cc9:5a6e:161f prefixlen 64 scopeid 0x20<link>
ether b4:4b:d6:2b:f5:e0 txqueuelen 1000 (Ethernet)
RX packets 4808 bytes 1670293 (1.6 MB)
RX errors 0 dropped 1558 overruns 0 frame 0
TX packets 931 bytes 376362 (376.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
因此,当我连接到家庭网络时,似乎会出现 connectify 条目,但这从来不是 connectify .conf 设置的一部分。
我尝试将分配的地址添加到我的/etc/netplan/50-cloud-init.yaml
两个接入点中,但显示 IP 范围冲突的错误:
**
ERROR:src/parse.c:1120:handle_gateway4: assertion failed (scalar(node) == cur_netdef->gateway4): ("192.168.10.1" == "192.168.100.1")
Bail out! ERROR:src/parse.c:1120:handle_gateway4: assertion failed (scalar(node) == cur_netdef->gateway4): ("192.168.10.1" == "192.168.100.1")
An error occurred: the configuration could not be generated
Reverting.
我最初让第二个适配器接受连接的方式是:
echo "blacklist <card>" > /etc/modprobe.d/local.conf
禁用内置 wifi 卡,然后update-initramfs -u
,然后重新启动,并连接到网络并强制创建指定的 wpa_supplicant(我想,我找不到这篇文章)。然后删除黑名单:sudo rm /etc/modprobe.d/local.conf
,然后重复update-initramfs -u
并重新启动。
另外,我注意到我没有wpa_supplicant.conf
,只有wpa_supplicant-wlxb44bd62bf5e0.conf
。
我还发现:两张 WiFi 卡/适配器并尝试关闭我的 ssid 的“自动连接”并为其分配 MAC,但没有任何改善。
我怎样才能清除我造成的这种堵塞?