I have a headless Raspberry PI model B, with a RealTek 802.11n dongle, running the very latest version of Raspbian.

I would like to configure both the wired and wireless connections so that I can choose to plugin to the Ethernet if need be. However, most of the time I would like to connect via wireless. The wireless network utilizes WPA2 Personal with a hidden SSID.

  • If I boot with both the Ethernet and Wifi plugged in, the network connectivity will work over both Ethernet and WiFi.

  • If I boot without the Ethernet, I can not connect to the Pi via WiFi.

    • About 15-30 seconds after plugging in the Ethernet, both Ethernet and WiFi network connectivity will work.
  • If I unplug the Ethernet, I can no longer connect to the Pi via WiFi.

Below is my /etc/network/interfaces file. What changes do I need to make so I can use the Wireless connection without the wire? :-)

auto lo
iface lo inet loopback

iface eth0 inet static
   metric 1

auto wlan0
iface wlan0 inet static
   metric 2
   wpa-scan-ssid 1
   wpa-ap-scan 1
   wpa-key-mgmt WPA-PSK
   wpa-proto RSN WPA
   wpa-pairwise CCMP TKIP
   wpa-group CCMP TKIP
   wpa-ssid SSIDWASHERE
   wpa-psk PSKWASHERE
  • I have a similar arrangement, albeit using dhcp, my configuration doesn't have the metric statement in the configuration of either interface
    – nwaltham
    Commented Mar 8, 2016 at 12:40
  • Since upgrading to Jessie, the system locks up after about 20 seconds if the wifi adapter is plugged in. I am using a 2.4a charger. I think the 1st generation Pi just doesn't have the guts to do much of anything. Commented Mar 8, 2016 at 15:53

1 Answer 1


Try allow-hotplug eth0 in the config above

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.