Raspberry Pi brought a network port (eth0), I bought a edup 8188CUS Junk wireless network card (said it garbage because the default can not start the listening mode, to recompile the kernel, very frustrating)
Eth0 Port I want it to connect to the Intranet 1 (192.168.2.0)
Wlan1 Port I want it to connect to the Intranet 2 (192.168.1.0)
This is how you configure the/etc/network/interfaces
192.168. 2.166 255.255. 255.0 192.168. 2.1 Auto Wlan1allow-hotplug wlan1iface wlan1 inetdhcpwpa"wifihotsphot" WPA"xxxxx"
sudo service networking restart after reboot
Only the wlan1 is connected to the wireless network and gets the IP inet addr:192.168.1.156
But Eth0 even did not get IP, day of the dog, this is what reason, I have to configure it static IP, incredibly does not take effect?
Google later found that someone and I encountered a similar problem, he is the situation is eth0 have IP, wlan0 no IP, just the opposite of me
His solution is to execute the following two commands:
sudo ifplugd eth0--kill
sudo ifup wlan0
I happen to be the opposite of him, so my situation is:
sudo ifplugd wlan0--kill
sudo ifup eth0
In order for it to automatically take effect every time, you have to join the/etc/rc.local
Reference connection:
Http://raspberrypi.stackexchange.com/questions/8851/setting-up-wifi-and-ethernet
Raspberry Pi Dual NIC Configuration