Configuring a Linux Bridge for PROFINET MRP
You can configure a Linux system so that it can be connected to a PROFINET MRP ring. This section will explain how to set up and configure the Linux bridge.
For general information about PROFINET MRP see the following: Media redundancy (MRP)
Requirement:
A PROFINET assembly
A real-time capable Linux system (for more information, see the following: Performance Optimization)
The Linux system requires at least 2 Ethernet adapters.
SSH access to the Linux system for configuration
Tip
Use an additional adapter for SSH access. In this way, you avoid locking yourself out of the system.
In order to show how a Linux bridge can be configured for PROFINET MRP, the following names are used in the process:
Name | Function | Note |
|---|---|---|
| The virtual bridge adapter | You can assign any name you want. |
| The first Ethernet adapter used in the MRP ring | This name is assigned by your system. This adapter should not have an IP configured (not even |
| The second Ethernet adapter used in the MRP ring | This name is assigned by your system. This adapter should not have an IP configured (not even |
Create a new bridge adapter.
sudo ip link add name br0 type bridge
Configure both Ethernet adapters which are used in the MRP ring so that you use the new bridge adapter as the master.
sudo ip link set eth0 master br0 sudo ip link set eth1 master br0
Assign an IP address to the bridge. The exact address is not relevant. You can choose an address that is available in your system.
sudo ip addr add 192.168.1.18/24 dev br0
Check the MAC address of the new bridge adapter.
ip a
Sample output of a MAC address:
[ ... ] 5: br0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 52:b5:1e:69:a5:f6 brd ff:ff:ff:ff:ff:ff [ ... ]
Assign a MAC address to each of the two Ethernet adapters. The address must be directly after the address of the bridge adapter. In this example, this is
f7andf8:sudo ip link set dev eno1 address 52:b5:1e:69:a5:f7 sudo ip link set dev enp1s0 address 52:b5:1e:69:a5:f8
Set the bridge adapter to
up.sudo ip link set br0 up
Tip
If the correct topology is not detected in the topology editor, then it might be because LLDP frames are not arriving. Check the adapters to see if a BPF program is active on them to process these frames.
In the output of ip a, you can see if such a program is loaded on an adapter.