Without setting the IP to static I can easily connect to Pi. The untouched ip is and works great.

How ever upon editing the /etc/dhcpcd.conf and adding

interface wlan0
static ip_address=

I can't seem to connect to it anymore. When I run the ifconfig, it looks like wlan0 is set to that IP, but either way I cannot connect to it.

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 ***::***:****:****:****  prefixlen 64  scopeid 0x20<link>
        ether **:**:**:**:**:**  txqueuelen 1000  (Ethernet)
        RX packets 41  bytes 7129 (6.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 62  bytes 10058 (9.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

What could be the reason the static IP is non accessible?

Is adding static routers and domain_name_servers mandatory?

static routers=IP
static domain_name_servers=
  • 2 is a different subnet to Do you have a route between those two subnets? Usually, if your router supports it, it's easier to assign static addresses using the configuration pages at or
    – Dougie
    Jan 19, 2019 at 21:29

1 Answer 1


"Without setting the IP to static I can easily connect to Pi."

The obvious answer is DON'T - it should not be necessary.

If your are determined to do so anyway How to set up Static IP Address explains how to do it properly.

Not the answer you're looking for? Browse other questions tagged or ask your own question.