Hello,
I finaly found how to setup the network to use both or alternatively Eth0 and Wifi without any reconfiguration.
With my settings I can :
- Boot the PI without any wifi dongle nor cable, then plug the cable (plugin the wifi dongle reboots the PI)
- Boot the PI with both cable and wifi dongle
- Boot the PI only with one or them, usually wifi.
The main trick is to DO NOT set eth0 in auto !! otherwise booting only with the wifi dongle will not work.
Personally I use static adresses but dhcp will do it if you wish.
If you prefer dhcp just replace static by dhcp (2 times) and remove all the lines
containing adresses
All the configuration is done in /etc/network/interfaces only ( no wpa- things )
Here is my /etc/network/interfaces :
Code: Select all
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
auto wlan0
iface wlan0 inet static
address 192.168.1.111
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
wpa-ssid <name of your access point without quotes>
wpa-psk <the wifi password without quotes>
Run the test :
- Reboot the machine and execute ifconfig to check the IPs. As Eth0 is NOT auto you will not see any address, and the system will use the wifi one.
- Try to plug and unplug the cable and do various ping ...
This worked perfectly for me.
Guy