我正在尝试在Ubuntu 14.04中绑定2个WIFI卡。
我已经安装了ifenslave-2.6,然后更改了/ etc / network / interfaces并添加了/etc/wpa_supplicant0.conf和/etc/wpa_supplicant1.conf文件 ,如下所示。
无法正常使用,请告知。2个WIFI卡显示已连接,请参阅下面的iwconfig。 也可以在下面找到诊断消息。
我在接口文件中尝试了wpa详细信息的各种变化,在接口中使用ifenslave进行了上下移动,没有运气。
谢谢。
/ etc / network / interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
iface eth1 inet manual
#wlan0 is manually configured, and slave to the "bond0" bonded NIC
allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
bond-master bond0
bond-primary wlan0
wpa-conf /etc/wpa_supplicant0.conf
#wlan1 ditto, thus creating a 2-link bond.
allow-hotplug wlan1
auto wlan1
iface wlan1 inet manual
bond-master bond0
wpa-conf /etc/wpa_supplicant1.conf
# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address 192.168.3.150
netmask 255.255.255.0
gateway 192.168.3.1
bond-mode balance_rr
bond-miimon 100
bond-slaves wlan0 wlan1
#up /sbin/ifenslave-2.6 bond0 wlan0 wlan1
#down /sbin/ifenslave-2.6 -d bond0 wlan0 wlan1
#bond-slaves none
/etc/wpa_supplicant0.conf
network={
ssid="MYSSID0"
bssid=88:f0:77:fd:af:81
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="MYPASS"
}
/etc/wpa_supplicant1.conf
network={
key_mgmt=NONE
ssid="MYSSID1"
}
诊断信息
cat / proc / net / bonding / bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200
Slave Interface: wlan0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 00:1c:df:d1:98:27
Slave queue ID: 0
须藤iwconfig
wlan1 IEEE 802.11abg ESSID:"MYSSID1"
Mode:Managed Frequency:2.462 GHz Access Point: 00:3A:9A:1C:1B:20
Bit Rate=24 Mb/s Tx-Power=200 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=38/70 Signal level=-72 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
bond0 no wireless extensions.
eth0 no wireless extensions.
lo no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"MYSSID0"
Mode:Managed Frequency:2.462 GHz Access Point: 58:35:D9:C6:26:41
Bit Rate=57.8 Mb/s Tx-Power=27 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=52/70 Signal level=-58 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:3 Invalid misc:0 Missed beacon:0
ifconfig
bond0 Link encap:Ethernet HWaddr 00:1c:df:d1:98:27
inet addr:192.168.3.150 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::21c:dfff:fed1:9827/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:304 (304.0 B) TX bytes:10695 (10.6 KB)
eth0 Link encap:Ethernet HWaddr 00:23:5a:1a:47:8a
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::223:5aff:fe1a:478a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2315 errors:0 dropped:0 overruns:0 frame:0
TX packets:2191 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:191033 (191.0 KB) TX bytes:172354 (172.3 KB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:407 errors:0 dropped:0 overruns:0 frame:0
TX packets:407 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43747 (43.7 KB) TX bytes:43747 (43.7 KB)
wlan0 Link encap:Ethernet HWaddr 00:1c:df:d1:98:27
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:304 (304.0 B) TX bytes:10695 (10.6 KB)
wlan1 Link encap:Ethernet HWaddr 00:1c:df:d1:98:27
inet6 addr: fe80::21c:dfff:fed1:9827/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:4 overruns:0 frame:26088
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:684 (684.0 B) TX bytes:805 (805.0 B)
Interrupt:18
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.3.150 icmp_seq=1 Destination Host Unreachable
From 192.168.3.150 icmp_seq=5 Destination Host Unreachable
From 192.168.3.150 icmp_seq=6 Destination Host Unreachable
From 192.168.3.150 icmp_seq=7 Destination Host Unreachable
From 192.168.3.150 icmp_seq=8 Destination Host Unreachable
1
对于初学者来说,wlan1没有连接,可能是因为您没有在wpa_supplicant0.conf中提供密码等。您是否真的有两个使用不同通道并以基础架构模式配置的接入点插入了同一路由器?
—
psusi 2014年
谢谢您的意见。wlan1在使用ifenslave,bond0和wpa_supplicant1.conf进行手动测试时进行连接;有时它会尝试几次,然后再成功。也许我可以在接口中放入一个重试设置?我有一个内部无线卡和一个USB,分别可以正常工作并将它们分别连接到各自不同的ssid,如其各自的wpa_supplicant conf文件中所指定。
—
2013年
@psusi我设法使两个无线接口都可以连接,但是cat / proc / net / bonding / bond0仍然只将wlan0列为slave,与原来的一样。我想我已经在/ etc / network / interfaces中做了一些与绑定相关的错误,但是不知道该尝试其他哪些变化。请指教。
—
2013年
如果您的想法是同时连接两个wifi接口以总结他们的brandwwitch,那么恐怕根本无法做到这一点。
—
kcdtv
+1提供完整的信息。您能否将您的评论移至问题中,也许是在这样的一行下:输入,---,然后输入“新信息:”
—
SDsolar,