On a PROFINET line running in a line topology, a single crushed cable or a single switch losing power cuts off every device after that point from the controller. MRP (Media Redundancy Protocol) moves traffic to the backup path within the time defined by the profile in use when there is a single break. When role assignment, ring port selection and PROFINET watchdog times do not match, the ring is redundant on paper but fragile in the field. Below, we describe how MRP works at protocol level, how the recovery profile affects IO connections, common configuration mistakes, and the ring break test that must not be skipped during commissioning.
What problem does a ring topology solve?
The most common cabling on PROFINET sites is the line topology, in which devices are daisy-chained through their two-port embedded switches. It saves cable; in return, every link is a single point of failure. A break in the middle of the chain drops all the IO devices behind it with “station failure” and the line stops. Running one more cable from the last device to the first switch to close the chain doubles the physical path. But Ethernet cannot manage a loop on its own. In an uncontrolled ring, broadcast and unknown unicast frames circulate endlessly, and a broadcast storm locks up the whole line within seconds.
The job of a ring redundancy protocol is therefore two-fold: to keep the ring logically open at one point while it is intact, and, when there is a physical break, to quickly close this open point and let traffic flow in the other direction. MRP does this with a vendor-independent method standardised in IEC 62439-2, and it comes built into many PROFINET devices.
How MRP works: MRM, MRC and test frames
Each device in an MRP ring takes on a role:
- MRM (Media Redundancy Manager): The device that monitors the ring and breaks the loop when necessary. There is only one active MRM in each ring.
- MRC (Media Redundancy Client): All the other devices in the ring. They forward frames between their two ring ports and report link state changes on their own ports to the MRM.
- MRA (Manager Auto): A role found in later editions of the standard and with many manufacturers; among several MRAs, one is elected based on a priority value, the winner acts as MRM and the others as MRCs.
The MRM sends MRP_Test frames from both ring ports at regular intervals. If a test frame leaving one port travels around the ring and comes back through the other port, the ring is closed; the MRM then blocks the secondary ring port for normal traffic (MRP frames continue to pass through this port). The logical topology becomes a line again. No loop forms.
When there is a break in the ring, two mechanisms work together. The MRCs adjacent to the break report the link loss to the MRM with an MRP_LinkChange frame; the MRM also decides that the ring has opened when it fails to receive a set number of test frames back. It then opens the blocked port for forwarding and sends MRP_TopologyChange to all devices. Devices that receive this frame flush their MAC address tables; a switch that does not flush keeps sending traffic towards addresses learned in the old direction, and recovery takes longer. When the break is repaired, test frames circulate again, the MRM blocks the secondary port again and once more announces a topology change.
MRP frames are layer 2 frames using EtherType 0x88E3; they need no IP address and do not depend on VLAN routing. This makes it easy to filter only MRP traffic in Wireshark when troubleshooting.
Recovery profiles and their relationship with the PROFINET watchdog
IEC 62439-2 defines the guaranteed worst-case recovery time for a single break in the ring as profiles; the 500 ms and 200 ms profiles are common, and later editions of the standard also include shorter profiles. A profile determines together the test frame interval, how many test frames must be lost for the ring to be considered open, and the maximum number of devices in the ring. The profile used in PROFINET applications is 200 ms, and for this profile a maximum of 50 devices is envisaged in the ring.
200 ms is the longest reconfiguration time defined for this profile; it is not the total interruption seen by the application. The total effect depends on the ring’s topology, the profile supported by the devices, the IO watchdog setting and how the application continues after a connection loss. While reconfiguration is in progress, cyclic data may not reach the IO device. A PROFINET IO device, in turn, drops the connection if it receives no data for the duration of its watchdog time. The watchdog time is calculated as follows:
watchdog time = update time × number of cycles accepted without IO data
Example calculation:
4 ms × 3 = 12 ms → device drops out during a 200 ms ring recovery
4 ms × 60 = 240 ms → tolerates recovery under the 200 ms profile
If the watchdog time is shorter than the recovery time, MRP repairs the ring successfully but the devices still report “station failure”. The symptom is this: the ring is in place, but devices lose their connection during a planned break test. Some engineering tools raise a warning for this mismatch; even so, check the watchdog value of every device in the ring one by one.
Extending the watchdog time also has a cost: a real device loss is detected later. On lines using functional safety (e.g. PROFIsafe), the F-monitoring time must also be set to cover the ring recovery time; otherwise safety modules go into passivation while the ring is being repaired. These values are part of the safety calculation and are not changed without the safety officer’s approval.
Comparing MRP, RSTP and HRP
In factory networks, we encounter three approaches to ring redundancy. The criteria that drive the choice are below:
| Criterion | MRP | RSTP | HRP |
|---|---|---|---|
| Standard | IEC 62439-2 | IEEE 802.1D-2004 / 802.1Q | Siemens-specific |
| Topology | Single ring | Ring and mesh | Single ring |
| Recovery time | Bounded by the profile (200 ms in PROFINET) | Depends on topology, no firm upper limit | Stated in the manufacturer’s documentation |
| Mixed vendors | All MRP-capable devices | Widely supported | Same manufacturer only |
| Support in field devices | Built into many PROFINET IO devices | Rare in field devices | None, switch level only |
RSTP’s convergence time in a ring varies with the number of bridges, the position of the root bridge and the manufacturer’s implementation. In an office network, this uncertainty causes no problems. In an IO connection whose watchdog time is tens of milliseconds, it does. That is why RSTP stays in the backbone of the factory network infrastructure, on mesh links and in the layer that connects cells to each other; MRP runs in the IO rings within cells. For loop prevention design on the campus side, the STP, RSTP and MSTP comparison provides a detailed framework.
HRP (High Speed Redundancy Protocol) is an older ring protocol specific to the Siemens SCALANCE switch family. It is still found in existing plants. In new projects, MRP is more flexible because of mixed-vendor support and because PROFINET devices can join the ring directly. The two protocols are not run together in the same ring.
Step-by-step MRP configuration and ring port selection
Configuration screens vary by manufacturer; the logic does not. In TIA Portal, these settings are in the “Media redundancy” section under the device’s PROFINET interface.
- Identify the ring members. Verify from the datasheet and GSDML file that all devices in the ring support MRP. A device that does not support MRP is connected not inside the ring but to a non-ring port of a switch in the ring.
- Count the total number of devices. Including the MRM, the ring should not exceed 50 devices. On long conveyor lines, plan multiple rings with a separate interconnection mechanism between them.
- Define the MRP domain. All devices in one ring are assigned to the same MRP domain (default name in TIA Portal:
mrpdomain-1). If there are several rings, give each one a separate domain. - Assign the roles. Preferably make a managed switch or the controller the Manager, and all other devices Clients. If Manager (Auto) is used, set the priority values deliberately; do not leave them all at the default.
- Select the ring ports. On some IO devices the ring ports are fixed (usually ports 1 and 2); on switches they can be selected. Verify in the topology view that the physical cabling and the ports selected in software are exactly the same. This is the most frequent mismatch.
- Align the port settings. Ring ports must run full duplex and at least 100 Mbit/s. Disable STP/RSTP on ring ports; two loop prevention protocols are not applied to one port.
- Update the watchdog times. Check that the watchdog time exceeds 200 ms for every IO device in the ring.
- Enable diagnostic alarms. Enable the MRM to report the “ring open” state to the controller as a diagnostic. Without an alarm, a ring keeps running in a line topology after the first break without anyone noticing; at the second break, the devices behind it lose communication.
Verification with a ring break test
That MRP works as expected is verified with a controlled break test; the status indicator in the engineering tool is not enough on its own. The test is carried out only during planned downtime, with the process owner’s written approval and with rollback steps ready; links are not broken while production is running.
- Before the test, save the controller’s diagnostic buffer and make sure there are no active alarms.
- Record MRP traffic using port mirroring on a managed switch. In Wireshark, the filter
eth.type == 0x88e3shows only MRP frames; test frames must flow at regular intervals. - Open the ring at different points in turn: the segment adjacent to the MRM, the middle of the ring and the side opposite the MRM. For each break, check that the MRM produces the “ring open” diagnostic and that no IO device loses its connection.
- Reconnect the cable; verify that the ring returns to the closed state and that the diagnostic clears. The moment of reconnection is also a topology change, and there must be no loss during it either.
- Power down an MRC. This test simulates two link losses occurring in the ring at the same time; the expected result is that only the powered-down device and the units connected to its non-ring ports drop out, while all other devices in the ring keep running.
- Document the results in columns for break point, observed alarm and device status. You will return to this table with every subsequent change.
If you see a connection loss for any device in the diagnostic buffer during a break, the first suspect is the watchdog time; the second suspect is a device that does not flush its MAC table or implements MRP incompletely. For systematic diagnosis of recurring dropouts, you can use the layered method in the article PROFINET fault diagnosis steps.
Common MRP configuration mistakes
- Two fixed MRMs: If two devices in the same ring are defined as Manager, each tries to block a port; the ring may split or a continuous topology change alarm may occur. There should be a single Manager in the ring, or all candidates should be Manager (Auto).
- Closing the ring through a non-ring port: If the physical cable is plugged into port 3 while MRP is defined on ports 1 and 2, the ring is not under MRP’s control and a real loop forms. The symptom is clear: the moment the ring is closed, the whole line locks up in a broadcast storm.
- MRP domain mismatch: Devices assigned to different domains do not evaluate each other’s MRP frames; the MRM sees the ring as permanently open, or the ring never closes.
- A device in the ring that does not support MRP: If an unmanaged switch or a device without MRP remains inside the ring, MAC table flushing and link notification do not work even if test frames are forwarded; recovery time becomes unpredictable.
- Leaving RSTP enabled on a ring port: The two protocols try to block the same port at different times; an unstable topology and intermittent dropouts result. Intermittent faults of this kind are the ones that waste the most time.
- Joining two rings with two cables: Running two cables to connect rings redundantly creates a loop that no protocol controls. For this need, standard mechanisms such as MRP interconnection or the manufacturer’s ring coupling feature are used.
- Leaving the watchdog at the default: The most common mistake on the list. The ring works, but devices still drop out at the moment of a break.
Most of these mistakes are prevented at the design desk; for general design mistakes, see the article common mistakes in PROFINET network design. Situations where the ring needs to be replaced with a zero-interruption protocol are described in the article seamless redundancy with HSR and PRP. For converting an existing line to a ring or planning a ring break test, see our PROFINET and PROFIBUS communication service page. The current versions of the PROFINET installation guidelines are published on the PROFIBUS & PROFINET International website.
Frequently asked questions
What is the maximum number of devices in an MRP ring?
For the 200 ms recovery profile used in PROFINET, a maximum of 50 devices including the MRM is envisaged in the ring. On longer lines, multiple rings are built and joined with a standard interconnection mechanism.
MRP is working, but devices still drop out when a cable is pulled; why?
The first place to look is the watchdog time: the watchdog time of the IO devices is shorter than the ring recovery time. The product of the update time and the number of accepted cycles should be set so that it exceeds 200 ms, and in safety applications the F-monitoring time should be checked accordingly.
Can MRP and RSTP be used on the same network?
They can, but not on the same ports. The common approach is to run MRP in the IO rings within cells and RSTP on the backbone and inter-cell links; RSTP is disabled on ring ports.
Which device should be chosen as MRM?
Choose a managed switch or controller that stays powered at all times and reports diagnostic information well. It is possible to make a field device the MRM; but a device that might be powered down during maintenance is the wrong candidate for this role.