I have a Raspberry Pi 2 rocking Wheezy. It generally has both a dedicated Ethernet cable plugged in that I have set to a static IP. And a wifi dongle (Alfa AWUS036H) that I also like to use with a static IP.
What should my interfaces file look like? I want the Pi to auto-detect what interfaces are plugged in, and if both interfaces are plugged in at the same time, I'd like the Pi to choose Ethernet.
This is my current interfaces file, any help is greatly appreciated.
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.199
netmask 255.255.255.05
gateway 192.168.1.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.199
netmask 255.255.255.0
gateway 192.168.1.1
wpa-passphrase mypasswordhere
wpa-ssid myssidhere