I already tried How do I set up networking/WiFi/Static IP but without success.
The IP address I would like to assign the pi would be 10.0.0.5
. This worked well and at the time I am connected to it via SSH. But unfortunately I can not resolve any hostnames.
E.g. ping www.google.com
results in unknown host
but ping 8.8.8.8
works. I also cannot get any packages which is obvious because it cannot resolve the hostnames.
Below is my current /etc/network/interfaces
file. The address, netmask and gateway are correct. I also disabled dhcpcd
and enabled networking
as mentioned in Network Interfaces method at the linked answer. I also tried the dhcpcd method but it is not working either. I am running Raspbian Jessie on it.
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.255.255.0
gateway 10.0.0.138
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
I cannot find a way to get it working and I am hoping someone could help me to be able to resolve the hostnames again
gateway
. Yourgateway
looks unusual. Also if you want to manually set IP you really need to understand what the settings mean.