-1

I'm able to connect to the local server before static IP is set but after I set a static IP on eth0, I'm no longer able to connect to the server. I tried to configure my static IP in /etc/network/interfaces and restart it by typing /etc/init.d/networking restart but it failed. So 1 user suggested that in the latest Raspbian version(I'm using Raspbian OS) comes with PIXEL and do not need to edit the interfaces file and edit dhcpcd.conf instead. So I went searching for tutorial how to configure static IP in dhcpcd.conf. When I'm done configuring the static IP and rebooted. I'm no longer able to connect to raspberry pi via PuTTy.

This is what I added at the end of /etc/dhcpcd.conf:

interface eth0
static ip_address=192.168.0.110/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

interface wlan
static ip_address=192.168.0.110/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
1
  • 1
    It is not a good idea to use static ip addresses without a reason. The DHCP server nows the best how to configure your network without conflicts.
    – Ingo
    Commented Oct 22, 2019 at 16:46

1 Answer 1

1

You can not assign the same IP-Adress to two different Network adapter (i.e eth0 and wlan) in the same physical network. Use two different then, it should work again. Hopefully ;-)

For example:

interface eth0
static ip_address=192.168.0.110/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

interface wlan
static ip_address=192.168.0.111/24 # <- 110 changed to 111
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

And be sure these IP addresses are not used for other network devices.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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