My Raspi is connected to our WLAN using the following /etc/network/interfaces
settings
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
address 192.168.65.227
netmask 255.255.254.0
network 192.168.64.0
broadcast 192.168.65.255
gateway 192.168.65.254
dns-nameservers 192.168.65.21 192.168.65.11
And the following settings in /etc/wpa_supplicant/wpc_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="<ssid>"
psk="<psk>"
key_mgmt=WPA-PSK
}
With this config, no hostnames are resolved - I suspect because the Pi can't find my local DNS servers (192.168.65.21 and 192.168.65.11). If I change these in the network interfaces file to 8.8.8.8 and 8.8.4.4 then external hostnames are resolved so I can successfully ping google.com
(whereas previously only specifying the IP address -- e.g ping 8.8.8.8
-- would work).
If I attempt to ping
any local IP addresses, it tells me that the destination host is unreachable; internet works but not local network.
I am also unable to reach the Pi from other machines on my local network. My initial thought was an incorrect subnet mask, but when I run ifconfig
it correctly brings through 255.255.254.0
dhcpcd
)? You must disable it if you want to use/etc/interfaces
. – Hydraxan14 Apr 19 '17 at 21:54