What I want to do :

Device A (PLC, static ip= 
        | eth0 connection 
Device B (raspberry B3, Rasbian lite)
        | wlan0 (wi-fi) OR USB to Network adapter 
Device C (laptop)

I did edit the dhcpcd.conf file :

sudo nano /etc/dhcpcd.conf

Like this :

interface eth0

static ip_address=
static routers=
static domain_name_servers=

#interface wlan0
#static ip_address=
#static routers=
#static domain_name_servers=

What else I need to do to ping or connect Device A from Device C?


First of all: you should not use public routable ip addresses like They are reserved to be used on the internet. Instead use ip addresses for Private networks. would be fine.

Configuration for eth0 in /etc/dhcpcd.conf should be set to:

interface eth0
static ip_address=
static domain_name_servers=

The static router must be on the same subnet as the interface. So setting it to doesn't make sense. Anyway you should only use one static router (default gateway). Usually this is set automatically on the other interface wlan0 if it is configured by DHCP. You will find your default gateway with:

rpi ~$ ip route

Also the domain name server must be reachable from the RasPi. Is it? Otherwise you will have difficulties with name resolution on Device A.

In addition you must enable ip forwarding in /etc/sysctl.conf. Just uncomment this line:


and reboot.

Now you should be able to ping or connect Device A from Device C.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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