0

I’m using a Pi4 with the latest version of Raspbian. I’m looking to set a static IP, and sure it does set, but I can’t access the internet. Can anyone assist? My dhcpcd.conf file looks like this at the bottom -

interface wlan0
 static ip_address=192.168.1.24/8
 static routers=192.168.0.1
 static domain_name_servers 127.0.0.1 8.8.8.8
Milliways
  • 59,890
  • 31
  • 101
  • 209
  • In addition to my answer about Static IP Address you have provided NO diagnostics e.g. ip a & ip r. It is unlikely your WiFi isn't working, but eth0 would have a lower metric, and be used for default routing. – Milliways Oct 10 '20 at 05:23
  • Your /8 netmask is incorrect as that includes 192.xxx.xxx.xxx addresses on the public internet. It should be /24. It can be anywhere between /16 and /24 if you really know what you're doing. – Dougie Oct 10 '20 at 11:26

1 Answers1

0

static ip_address=192.168.1.24/8 is incorrect, other values are inconsistent and static domain_name_servers 127.0.0.1 makes no sense (unless you are running a DNS)

Setting a Static IP Address is not recommended in most cases, (because so many get it wrong and it is rarely necessary) but if you want to How to set up Static IP Address explains alternatives and instructions on how to do it properly.

How to set up networking/WiFi is a more general guide to configuring Raspbian networking.

Milliways
  • 59,890
  • 31
  • 101
  • 209