0

I have just tried to set static ip on my raspbian.

I have added those line into /etc/dhcpcd.conf

interface INTERFACENAME(ETH0/WLAN0)
static ip_address=192.168.101.46/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 

And then I've reboot the raspberry.

when the system start I can login via SSH to the new local ip, but when I try to ping google there is no response. I have tried to put Google DNS 8.8.8.8 but I have not recevied any respond.

Thanks.

BTW - I've seen similar questions over here but I still unable to fix the problem.

Itzik.B
  • 121
  • 5

3 Answers3

4

If:

static ip_address=192.168.101.46/24
static routers=192.168.1.1

Your router subnet is incorrect for your device because the subnet mask says your devices network is 192.168.101 and your router network is 192.168.1.

HTH

ghosts
  • 71
  • 3
2

I very much doubt you have an interface INTERFACENAME(ETH0/WLAN0) - there are other obvious errors.

If you absolutely MUST set a static address How to set up Static IP Address explains how to do it.

I still fail to understand why so many Pi users WANT to set a static IP address, particularly when they seem to have little understanding of networking.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

@itzikb I think you put wrong address meanwhile in changing IP address process. as @ghost said, your router subnet is incorrect for your device. You have to change your configuration. look at this link might give you answer of your solution.

prince
  • 23
  • 5