3

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
   address 192.168.0.144
   netmask 255.255.255.0
   gateway 192.168.0.1
   dns-nameservers 8.8.8.8 8.8.4.4

auto wlan0
iface wlan0 inet static
   metric 2
   address 192.168.0.244
   netmask 255.255.255.0
   gateway 192.168.0.1
   dns-nameservers 8.8.8.8 8.8.4.4
   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
eat-sleep-code
  • 131
  • 1
  • 5

1 Answers1

1

Try allow-hotplug eth0 in the config above

Mike Redrobe
  • 961
  • 7
  • 13