I'm trying to setup a static IP address on my WIFI that can access Internet.
this my file /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.1.200/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
This is my file resolv.conf
nameserver 192.168.1.1
This is the result of my command, route -ne
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
I can connect through SSH to my pi, once the IP address has been changed.
However, when doing a sudo ping google.com
, this is what I have
ping: unknown host google.com
When I ping 8.8.8.8
I get
(8.8.8.8) 56(84) bytes of data. From 192.168.1.200 icmp_seq=1 Destination Host Unreachable
When I leave it set to DHCP then everything works.
Any ideas on what am I missing?
Cheers
8.8.8.8
3) I can connect to my pi through ssh once the IP address has changed to static one. It is more the pinging that does not work – Andy K Jul 29 '18 at 16:38static domain_name_servers=192.168.1.1 8.8.8.8
– Benny Jul 29 '18 at 16:38PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. From 192.168.1.200 icmp_seq=1 Destination Host Unreachable
– Andy K Jul 29 '18 at 16:40192.168.1.11
– Andy K Jul 29 '18 at 17:15sudo
to run ping? – Seamus Jul 30 '18 at 01:51