WeOS
5.20.1

# Media Redundancy Protocol

## Introduction

The Media Redundancy Protocol (MRP) is a protocol designed to handle redundancy in switched ring layer-2 topologies. Other available ring protocols that can handle the same situations and use-cases include FRNT.

For an example use-case see:

- MRP Basic
- MRP Over Layer 2 Tunnel

## Overview

MRP is used to provide redundancy in ring topologies and it operates on layer-2 of the OSI model. A basic MRP ring consist of one Media Redundancy Manager (MRM) and one or more Media Redundancy Clients (MRC). The goal is that all devices in the ring should be reachable even if there is a link break somewhere in the ring.

    .-------.               .-------.
    |       |S              |       |
    |  MRM  +-||------------+ MRC-1 |
    |       |               |       |
    '---+---'               '---+---'
       P|                       |
        |        MRP RING       |
        |                       |
    .---+---.               .---+---.
    |       |               |       |
    | MRC-3 +---------------+ MRC-2 |
    |       |               |       |
    '-------'               '-------'

Figure 1: Basic MRP ring configuration where the ring is in the CLOSED state, the ring is intact.

The state of an operating MRP ring can be either Closed or Open. When the ring is in the closed state the ring is intact (no link breaks), the MRM will put its secondary ring port in blocking mode to avoid a loop in the topology. An example of this can be seen in Figure 1.

    .-------.               .-------.
    |       |S              |       |
    |  MRM  +---------------+ MRC-1 |
    |       |               |       |
    '---+---'               '---+---'
       P|                       |
        |        MRP RING       |
        |                       |
    .---+---.               .---+---.
    |       |               |       |
    | MRC-3 +------ X ------+ MRC-2 |
    |       |               |       |
    '-------'               '-------'

Figure 2: Basic MRP ring configuration where the ring is in the OPEN state, the ring is broken.

If a link or node in the ring goes down, the ring will effectively broken and MRP will transition to its open state. This will cause the MRM to put its secondary port in forwarding mode. An example of this can be seen in Figure 2.

If the primary port goes down, the other MRM port will become primary, i.e., the roles can change dynamically depending on the link state.

Note

Currently its assumed that all MRCs that is part of the MRP ring are capable of blocking their ring ports. Therefore, utilizing devices in the ring that are incapable of blocking their ports is not supported.

### Ring roles

Each MRP device needs to be configured to a specific role.

- Media Redundancy Manager (MRM): Responsible for managing the ring and ensuring that its second port is blocked when the ring is closed to avoid loops, and that it is put in forwarding when the ring is open. A single MRP ring can only have one MRM in the topology.

- Media Redundancy Automanager (MRA): Currently NOT supported. A MRP node designated as a MRA will be made available for an election process to select the manager of the ring automatically, hence Automanager.

- Media Redundancy Client (MRC): A client node in the MRP ring.

### Multiple instances

Max two instances of MRP are supported but with some restrictions. Two instances can be configured if both are MRM but only one instance is supported when configured as an MRC. Each MRM is configured in the same way as an independent instance but with the restriction that the ring ports can not be shared with other MRM instances.

### MRP Signaling

MRP operates by sending frames called MRP Test frames from the MRM. The frames will be sent in both directions on the ring from the both of the ring ports on the MRM. If the MRP Test frames from one of the ring ports reaches the other ring port, i.e. the frame has traveled around the entirety of the ring, the ring is intact (Ring status closed).

In addition to detecting link failure by observing if the MRP Test frames travel around the ring, the MRCs can also send MRP Link Change frames towards the MRM.

When the MRM notices, in any way, that the ring is broken, it will send out a MRP Topology Change frame towards all of the MRCs in the ring. When a MRC receives a MRP Topology Change frame it informs the client that there has been a topology change in the ring and that the FDBs should be flushed.

The following MAC multicast addresses are used by MRP:

OUI | Extension Identifier | Meaning
--- | --- | ---
01:15:4E | 00:00:01 | Used for MRP Test frames.
01:15:4E | 00:00:02 | Used for MRP Link Change, MRP Topology Change and MRP Option frames

### Recovery profiles

Multiple different recovery profiles can configured for MRP, that defines what the max reconfiguration time of the topology should be. The profiles are specified in milliseconds. Below the currently supported recovery profiles are presented, along with some of the differences:

Parameter | Max Recovery Time Profile
--- | ---
200 ms | 30 ms
MRP Test Frames default interval | 20 ms | 3.5 ms
MRP Test Frames short interval | 10 ms | 1 ms

The lower the profile selected, based on the ms, the more traffic will sent on the network. The profile changes the timing on the MRP Test frames that are sent from the MRM. In order to support the lower profiles reconfiguration times the MRP Test frames will be sent more frequently, which will increase the load on the network.

However, as long as the devices that are part of the MRP ring can detect link-down on their own ring ports and they can send MRP Link Change frames, the reconfiguration times will essentially be the same regardless of the selected profile. This is because the MRM will react instantly on the MRP Link Change frames and will not need to wait until it detects a loss of MRP Test frames.

## Configuration

MRP is configured from the ring configuration context in the CLI:

    example:/#> configure
    example:/config/#> ring
    example:/config/ring/#> mrp 1
    example:/config/ring/mrp-1/#>

`[no] enable`

  Enable or disable this MRP ring instance.

  no
    Disable the MRP ring instance.
`[no] ports [portP,portS]`

  Set ring ports, a.k.a. primary port , secondary port.

  In normal operation, the MRP toggle between primary or secondary port and keep secondary blocked. I.e if primary goes down then secondary becomes primary.

  no
    Remove configured ring ports.
`[no] mode [manager,client]`

  Set the mode of the MRP ring instance.

  Default: manager.

  no
    Reset to the default.
  manager
    Manager (MRM): Media Redundancy Manager.
  client
    Client (MRC) : Media Redundancy Client.
`[no] profile [200,30]`

  Set MRP ring recovery profile mode.

  The following failover times are supported:

  - 200 msec
  - 30 msec

  Default: 200

  no
    Reset to the default.
`[no] vid [1-4094]`

  Enable/disable VLAN encapsulation of MRP signalling with given VLAN id.

  Default: (0) Disabled.

  no
    Disable VLAN encapsulation.

### Manager Specific Settings

The following settings are only configurable on the Media Redundancy Manager (MRM).

    example:/config/ring/mrp-1/#> mode manager

`[no] link-react`

  Enable/disable React on link change.

  When enabled the manager will respond directly on a link change detected by clients.

  Default: Enabled.

  no
    Disable react on link change.

## Status Overview

The status of MRP can be observed in both a summary view and a more detailed MRP instance view. The summary view is intended to provide a more detailed view of multiple rings, when support for multiple rings have been added.

### Summary View

In order to get a current status summary overview of MRP, use the following command:

    example:/#> show mrp
    MRP Enabled : Yes, running as PID 2233
    RID  MODE  PROFILE  STATUS  T-COUNT  PORT 1               PORT 2
    1    MRM   200      Closed  1        eth1 FORWARDING      eth2 BLOCKED

### Instance View

In order to get a more detailed status overview for an individual instance, use the following command:

    example:/#> show mrp 1
    Ring ID              : 1
    Enabled              : Yes running as PID 2233
    Mode                 : MRM
    Status               : Closed (CHK_RC)
    Profile              : 200
    Port 1               : eth1 FORWARDING (UP)
    Port 2               : eth2 BLOCKED (UP)
    VLAN ID              : 0
    React on link change : Enabled
    Transitions          : 1
    Last topology change : 0 Days 0 Hours 16 Mins 31 Secs
    MRM Src Addr         : 74:69:6e:67:20:6d

« Previous Next »