- Code: Select all
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.2.155 # Static IP you want
netmask 255.255.255.0
gateway 192.168.2.1 # IP of your router
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
But for whatever reason, this did not work. I had to reserve the static IP address in my router's DHCP settings. Then the wireless worked even when I'd yank out the ethernet. Unsure why this is, but I wanted to report it here should anyone else be banging their head against the wall. So my etc/network/interfaces looks like this now:
- Code: Select all
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
And my /etc/wpa_supplicant/wpa_supplicant.conf looks like this:
- Code: Select all
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="2-11"
psk="457654aA."
key_mgmt=WPA-PSK
}
network={
ssid="2"
psk="457654aA."
key_mgmt=WPA-PSK
}
network={
ssid="ASUS"
psk="enter your wireless password here"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
I called this out here to hopefully help anyone else banging their head on the wall. The reason I didn't want to reserve the IP address in the router DHCP config is that it has a limit of 16 reserved IP addresses and I was already at my max. So I had to remove one of the reservations to make room for this one.