In compliance with high industry standards

Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

How to check Ethernet Configuration

Setup your Raspberry PLC Ethernet network

Introduction - The Raspberry Ethernet Ports

The industrial Raspberry PLC has two Ethernet ports, eth1 and eth0. The Ethernet port controller is based on W5500 IC and generates the eth1 interface, while the eth0 interface is automatically generated by the Raspberry Pi 4.

In the Raspberry Pi PLC family devices, W5500 IC communicates by the Raspberry Pi 4. In the industrial Raspberry Pi PLC family devices, W5500 IC communicates with the Raspberry Pi 4 via SPI1 bus.

By default, we have a virtual interface with the IP address called eth0:1. Likewise, the eth1 has a virtual interface called eth1:1 with the IP address

In case your Raspberry Pi industrial PLC has some Ethernet troubles, check out the following post.

Raspberry Pi PLC

Related links

How to connect Raspberry PLC to Wi-Fi

Read >>

Basics about Raspberry Pi PLC analog outputs

Read >>

How to find your perfect industrial PLC

Read >>

How to program Raspberry PLC interrupt inputs with Python

Read >>

Raspberry PLC
family products

Read >>

TouchBerry Pi
family products

Read >>

Setup Ethernet Connection - Connecting the Raspberry PLC

 Setup a static IP address in your laptop

In case you cannot connect to your Raspberry Pi based PLC family devices through any Ethernet port, let's do some configurations first:

1. First of all, you have to make sure that you have setup a right static Ethernet IP address which is in the same network as the Raspberry PLC . See how in

Example: <---- To connect through Raspberry PLC eth0 interface <---- To connect through Raspberry PLC eth1 interface

2. Connect an Ethernet cable between your laptop and the open source PLC Raspberry Pi, open up a terminal windows in your laptop, and try again :

If the cable is in the eth0 port, then:

ping -c4

If the cable is in the eth1 port, then:

ping -c4

Raspberry Pi Ethernet Ping

If you got 0% packet loss. You are ready to connect to your Ethernet port through SSH using either one commands below:

ssh pi@ <--- Eth0
ssh pi@ <--- Eth1

If you got any other messages from the ping command, let's continue!

 Access through HDMI cable

In case you could not access through SSH, shutdown your Raspberry Pi PLC controller, connect an HDMI cable to a screen, and power it on again. Let's try some options to fix your issues:

The Raspberry PLC credentials are:

user: pi
password: raspberry

3. Open the config.txt file in the boot directory:

sudo nano /boot/config.txt

and check out that there is this configuration for the Ethernet 1:


If you already have the right configuration, exit with Ctrl + X. Otherwise, type the configuration above, reboot with the command below, and try to ping again from a specific interface.

sudo reboot
ping -c4 -I <interface name>

4. Go to the interfaces files with the following commands below, and check out that you have the following configuration:

- Interface eth0:

cat /etc/network/interfaces.d/eth0_1

auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static

- Interface eth1:

cat /etc/network/interfaces.d/eth1_1
auto eth1:1
allow-hotplug eth1:1
iface eth1:1 inet static

You should not edit these files to make sure you can always connect through these IPs. However, if they are not as shown above, set the right configurations and edit the files with the nano editor:

sudo nano /etc/network/interfaces.d/<interface name>

In case you changed something from these files, restart the networking service typing:

sudo systemctl restart networking.service

5. If you still have no connection to the Ethernet port, see the routing table and check out that the following configuration is as shown:

route -n

Raspberry Pi Ethernet Routing Table

If it is not as it should, use "route add" or "route del", to set the right configuration. See how:

6. To check out the dhcp configuration and set a static IP, go the next directory /etc/dhcpcd.conf with the following command:

sudo nano /etc/dhcpcd.conf

 Find out the following lines:

Raspberry Pi Static DHCP Configuration

Copy the lines, paste them below and uncomment them to set your static IP address:

For example:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!