ぼんでぃんぐ。
有線LAN と 無線LAN
同じIPアドレスで使いたいなと思いました。
どっちを使っても同じ固定IPを振ってあれば
便利かなって。
調べてみると ボンディングとやらでできるらしい。
NICを束ねて使う方法みたいです。
以下のサイトを参考に設定してみました。
http://mkws.blogspot.jp/2012/12/raspberry-piusb-wifi.html
root@raspberrypi ~ # sudo apt-get install ifenslave Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'ifenslave-2.6' instead of 'ifenslave' The following NEW packages will be installed: ifenslave-2.6 0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded. Need to get 20.9 kB of archives. After this operation, 98.3 kB of additional disk space will be used. Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main ifenslave-2.6 armhf 1.1.0-20 [20.9 kB] Fetched 20.9 kB in 1s (17.8 kB/s) Selecting previously unselected package ifenslave-2.6. (Reading database ... 69063 files and directories currently installed.) Unpacking ifenslave-2.6 (from .../ifenslave-2.6_1.1.0-20_armhf.deb) ... Processing triggers for man-db ... Setting up ifenslave-2.6 (1.1.0-20) ... update-alternatives: using /sbin/ifenslave-2.6 to provide /sbin/ifenslave (ifenslave) in auto mode root@raspberrypi ~ # vi /etc/network/interfaces root@raspberrypi ~ # cat /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet manual bond-master bond0 # wifi NIC auto wlan0 allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf bond-master bond0 bond-give-a-chance 10 auto bond0 iface bond0 inet static address 192.168.1.250 netmask 255.255.255.0 gateway 192.168.1.1 bond-mode 0 bond-miimon 100 root@raspberrypi ~ # /etc/init.d/networking restart [....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning). [....] Reconfiguring network interfaces...ifup: interface eth0 already configured ifup: interface wlan0 already configured ifup: interface wlan0 already configured done. root@raspberrypi ~ # ifconfig bond0 Link encap:Ethernet HWaddr b8:27:eb:cb:13:91 inet addr:192.168.1.250 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:1631 errors:0 dropped:344 overruns:0 frame:0 TX packets:658 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:311664 (304.3 KiB) TX bytes:90160 (88.0 KiB) eth0 Link encap:Ethernet HWaddr b8:27:eb:cb:13:91 UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1 RX packets:531 errors:0 dropped:0 overruns:0 frame:0 TX packets:442 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:42130 (41.1 KiB) TX bytes:60848 (59.4 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan0 Link encap:Ethernet HWaddr b8:27:eb:cb:13:91 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:1100 errors:0 dropped:0 overruns:0 frame:0 TX packets:216 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:269534 (263.2 KiB) TX bytes:29312 (28.6 KiB)
最初、また無線LAN側がうまくいかなかったのですが
ちょっと調べてみました。
bond0 が MASTER で、eth0 と wlan0 が SLAVE になっています。
また、MACアドレスである HWaddr がいずれも同じ値になっています。
!?
MACアドレス変わってる!
MACアドレスフィルタリングで引っかかってるようです。
無線LANルータの設定を見直して成功!
これで無線LAN周りはおしまい。