Configuring networks
This page provides essential guidelines for configuring a network on a multi-interface device to effectively connect with PLCs that use custom IP addresses. A Raspberry Pi is used as example.
When setting up a Connectivity Gateway, it is required that the Gateway device can communicate with the PLCs that are listed in the SDA Console. The following illustrates a scenario with a Raspberry Pi wired to a network switch, which is also connected to two PLCs.

Since PLC 1 has the IP 192.168.0.1
and PLC 2 has 192.168.0.5
, it is reasonable to say that both are in the network 192.168.0.0/24
. Therefore, the Raspberry Pi needs to join this same network and correctly route the packages to the PLCs. Because our WLAN is 192.168.50.0/24
, there is no route collision.
Solution: we are going to use a Linux network interface configuration to set the static IP address 192.168.0.2/24
in the eth0
interface of the Raspberry Pi. To achieve that, create an interface file with the content below.
sudo nano /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet static
address 192.168.0.2/24
Explanation:
auto eth0
instructs the system to bring up a network interface during system initialisation, activating it as soon as we power on the Raspberry Pi.iface eth0
specifies the network interface we are configuring.inet
uses the address family IPv4.static
statically configures the selected IP for theeth0
interface, therefore, it does not accept an IP from DHCP.address 192.168.0.2/24
sets the IP address192.168.0.2
as the Pi's IP on that Ethernet port, and sets the network192.168.0.0/24
on that port, too. As a result, all packages within that subnet will be sent to theeth0
interface.
Now, we need to tell the network stack to reload our interface configuration by running:
sudo ip addr flush eth0 && sudo systemctl restart networking
Another option is to reboot the Raspberry Pi.
Extra: Connecting to PLCs in different networks
Suppose a more complex scenario, in which we add a third PLC. However, the new PLC is in another network 10.0.0.0/24
, that does not coincide with the two other ones.

Luckily, the solution is quite simple: we just add another specification block with an extra IP within that network for the same eth0
interface of the Raspberry Pi. Below, we choose the IP 10.0.0.2
for the Raspberry Pi.
sudo nano /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet static
address 192.168.0.2/24
iface eth0 inet static
address 10.0.0.2/24
sudo ip addr flush eth0 && sudo systemctl restart networking
Last updated