Media Redundancy Protocol

 Please be advised that this article is work-in-progress. The information here may be vague, incomplete, misleading or plainly wrong.  -> MRP -> Definition -> Media Redundancy Protocol -> Layer 2 protocol -> provides redundancy at layer 2 for ring topologies ONLY -> designed by Hirschmann as proprietary protocol, but has been standardized in IEC 62439-2 -> used in environments where network availability is critical, because it guarantees very small failover times (200ms, 500ms) -> Mechanics -> overview of MRP functions in ring topologies -> a ring topology is basically a loop topology -> MRP is used to automatically block or unblock ports of the MRP Manager (MRM) device, based on the state of the ring topology -> if all links in the topology are up, MRP will block one port of the MRM to stop the traffic from looping -> if one (or more) link in the topology is down, MRP unblocks both ports of the MRM, so the traffic is forwarded to all devices. -> see 'DIAGRAMS' sections -> a ring topology where MRP is configured is called a 'MRP ring'. -> the ports of each device, used to form the ring topology are called 'ring ports'. -> devices in a MRP configured ring topology can be of two types   -> called MRM and MRC. A device which is part of a MRP ring topology HAS to be configured either as one or the other. -> MRM -> Media Redundancy Manager -> there can be only ONE per ring -> MRM devices more than one in a ring is a misconfiguration. -> its purpose is -> to monitor the STATE OF THE RING -> CLOSED -> all the links within the ring topology are up. -> OPEN -> a link failure has been detected somewhere within the ring -> since a link is down, the ring topology is no longer 'a ring'. -> UNDEFINED -> shown by MRM before the actual state of the ring is known. -> shown by MRC devices (if applicable, based on vendor) since it is not their job to know the state of the ring. -> to react to link failures within the ring, by changing the STATE OF ITS PORTS -> DISABLED -> all traffic is discarded -> BLOCKING -> all traffic is discarded, except MRP frames -> FORWARDING -> the traffic is forwarded (regular switching) -> has one primary port and one secondary port -> conceptually, the primary port is the one where the ring topology 'starts' -> conceptually, the secondary port is the one where the ring topology 'ends' -> MRC -> Media Redundancy Client -> they are all the other devices in the ring. -> their main purpose is to forward the MRP multicast frames sent by the MRP -> the MRM sends multicast MRP TEST FRAMES from its both ring ports, at a regular interval. -> during regular operation of the ring topology -> all links within the topology are up -> the MRP TEST frames sent by MRM from each ring port reach the other port, which means the ring is CLOSED. -> when the ring is closed, MRM places one of its ports in 'BLOCKED' state, and the other one in 'FORWARING' state -> the physical ring topology, logically, becomes a linear topology -> this prevents traffic loops from forming -> when a link fail appears within the ring topology -> the MRP TEST frames set by MRM from each ring port, no longer reach the other port, which means the ring is OPEN. -> MRM will place its both ports in FORWARDING state, so traffic can be forwarded to the MRCs on the other port as well.

-> MRP parameters -> DOMAIN ID -> the identifier of the MRP ring -> used in MRP frames -> MRM and MRC devices use this ID to identify which MRP ring they are part of. -> DOMAIN NAME -> description of the ring -> set by user -> optional parameter and doesn't affect the ring in any way -> different names can be set on diffrerent participants to the MRP ring, and it would still work. -> OPERATIONAL STATUS -> wheter MRP protocol is enabled or disabled -> ROLE -> device's role in the ring -> can be either MRM or MRC -> STATUS -> closed -> open -> undefined -> PORT STATUS -> disabled -> blocking -> forwarding -> VLAN ID -> the VLAN used by MRP to send the MRP frames. -> used, probably, to separate MRP control traffic from regular user traffic. -> note that MRP does NOT work on VLANs -> for example -> you cannot set MRM's blocking port to discard traffic from a specific VLAN only. -> you cannot set MRM's forwarding port to forward a specific VLAN's traffic only. -> you may get these functionalities via VLAN configurations on the ring ports, but these are not things you can accomplish via MRP configurations. -> from an MRP point of view, an MRP forwarding port forwards all traffic, an MRP blocking port discards all traffic. -> RECOVERY TIME -> 200ms or 500ms -> MRP provides a recovery time of ~200ms or ~500ms -> these are the maximum times for MRM to change the status of its ports -> setting the recovery time determines the number of MRP Test frames sent by the MRM. -> DIAGRAMS -> 1. -> A ring topology with NO link fails, and MRP is configured. -> +---+				  +--|  MRM  |-X+ |	  <- +---+		 |				   |			      	 |				 ^ | |			       ^ |			   	 | | V			       | | |				 |			      +---+                      +---+			       |  MRC1 |	              |  MRC3 | +---+		     +---+				   |                             |				 ^ | |			       ^ | |				 | | V			       | | V				   |				 | |      -> +---+ ->	 |				   +--|  MRC2 |--+ <- +---+ <-

-> Notes -> All the links in the topology are up			         -> this is the 'closed ring' state of the topology -> traffic flows in both directions from each MRC -> the link on the MRM blocked port is still up, and MRC3 sends traffic towards it. -> on the blocked port, MRM transmits no traffic and discards received traffic, to avoid loops. -> without MRP configured, such a topology must have traffic blocked in some way on one of the links to stop loops from forming.

-> 2. -> A ring topology where a link failed, and MRP is configured. -> +---+ ->				  +--|  MRM  |--+ |	  <- +---+	<-	 |				   |			      	 |				 ^ | |			       ^ |			   	 | | V			       | | |				 |			      +---+                      +---+			       |  MRC1  |	              |  MRC3  | +---+		     +---+				   |                             |				   | 			       ^ | |				   | 			       | | V				   |				 | |         +---+ ->	 |				   +--X---|  MRC2 |--+ +---+ <-

-> Notes -> The link between MRC1 and MRC2 is down. -> this is the 'open ring' state of the topology -> traffic still flows in both directions from each MRC -> the previously MRM blocked port is now transmitting and receiving traffic. -> redundancy is provided since, even with a link down, all devices can comunicate on the network. -> without MRP configured, in case of a link down, some devices would remain isolated.