我试图在 Ubuntu 14.04 中绑定 2 个 WIFI 卡。
我有安装 ifenslave-2.6, 然后更改了 /etc/network/interfaces和添加了 /etc/wpa_supplicant0.conf和/etc/wpa_supplicant1.conf 文件 如下。
无法运行,请指教。2 个 WIFI 卡显示已连接,请参见系统配置以下。 另请参见以下诊断消息。
我尝试了接口文件中各种 wpa 详细信息的变化,并在接口中使用 ifenslave 进行上下调整,但都没有成功。
谢谢。
/etc/网络/接口
# 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"
}
诊断信息
猫/ 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
是否配置
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
因为大部分“协会“(物理链路层上的连接,如插入以太网电缆)到无线网络是通过MAC地址因此欺骗/发送错误的数据包会很棘手
以下提示可能会有帮助:
许多路由器(和网桥)都有STP(生成树协议)启用,防止在链路级别出现循环,但也会过滤您想要的情况(数据包来自路由器不期望的另一个端口)STP 维基百科条目
这balance_xx绑定驱动程序的模式需要混杂模式,请参阅这里让你的 wifi 卡进入此模式
路由器需要客户端隔离关闭,也许还有修补 hostapd/wpa-supplicant接受不属于的数据包关联MAC地址
解决方法:尝试锡克或者格雷塔普 拥有一个 IP 端点,并将这个虚拟隧道连接到路由器端的桥接器
答案2
你不能让它工作,因为这是不可能的