<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Comparative Analysis of PRP and DRN</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Xiangying Kong</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xuebing Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhenhua Zhang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Jiangsu Automation Research Institute</institution>
          ,
          <addr-line>Shenghu Road 18, Lianyungang</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Southeast University</institution>
          ,
          <addr-line>Sipailou, Nanjing</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <fpage>26</fpage>
      <lpage>32</lpage>
      <abstract>
        <p>This paper introduces the mechanism of two high-availability network communication schemes, IEC 62439-3 parallel redundant communication protocol and marine dual-redundant Ethernet. An in-depth comparison of the two is carried out in six aspects, such as the number of frames lost when the fault occurs, the application communication delay, and the applicability of the scheme, and the applicable occasions and usage suggestions of the two schemes are given.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Dual redundant network</kwd>
        <kwd>Parallel redundant protocol</kwd>
        <kwd>Reliability</kwd>
        <kwd>Communication delay</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Introduction to PRP and DRN 2.1. PRP</title>
      <p>The international standard to which PRP belongs is IEC 62439. The implementation of the PRP
redundancy mechanism mainly relies on two logically or physically separated network cards, which are
respectively connected to two different subnets (LAN A, LAN B, usually referred to as A network and
B network), as shown in Figure 1.</p>
      <p>When sending information, the PRP sender (Source DANP, Doubly Attached Node implementing
PRP) copies the original information frame (called C Frame), and adds an RCT (Redundancy Control
Trailer, redundant control body) to both copies. ) specific fields to form PRP information frames
(referred to as A Frame and B Frame), which are sent out from their own two network card ports
(corresponding to A network and B network respectively), and each reaches the same one through two
independent subnets. PRP receiver (Destination DANP): After the PRP receiver receives the two PRP
information frames from the two network card ports, it uses the repeated frame judgment algorithm to
discard the received frame and use the RCT field of the first received frame. Submit the upper layer
protocol stack after culling. The PRP function is usually implemented by an LRE (Link Redundancy
Entity). The hierarchical relationship between LRE and protocol stack and network card in DANP node
is shown in Figure 1.
2.2. DRN</p>
      <p>The physical composition of DRN is similar to that of PRP network, the difference is that a cascade
mode is added between the two switches. Figure 3.</p>
      <p>The DRN software is managed by the Driver of Dual redundant network cards (DoDRNC), which
is functionally equivalent to the LRE in the PRP.</p>
      <p>Different from the PRP network, at any time, only one port (network card) of the DRN is in the
active (Active) state, and the other is in the standby (Backup) state, and the sending and receiving of
packets is completed by the active port. The network cards corresponding to the two ports use the same
MAC address and the same IP address. In fact, the port corresponding to the standby network card does
not have an IP address. DoDRNC monitors the status of the two ports. When the port in the active state
is faulty, if the port in the backup state is normal, it will become the active state, and subsequent network
transmission and reception are completed by the port in the new active state. When it needs to be
explained, DoDRNC does not do any processing on the message frame sent or received, but directly
submits the message frame to be sent to the network card currently in the Active state; when the network
card receives the message frame, it will receive the message frame. The received data is directly
submitted to the upper-layer protocol stack.</p>
      <p>DAND
A B</p>
      <p>DAND
A B</p>
      <p>DAND
A B</p>
      <p>DAND</p>
      <p>A B
Lan A</p>
      <p>Lan B</p>
      <p>N
SAND</p>
      <p>N
SAND</p>
      <p>
        N
SAND
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Comparison of PRP and DRN</title>
    </sec>
    <sec id="sec-4">
      <title>3.1. Application Available Bandwidth</title>
      <p>PRP changes the frame length and increases the frame processing time due to the addition of the
RCT field, frame duplication, repeated frame detection and other operations. For applications, the
effective transmission bandwidth of the system may be reduced. Assuming that the length of each frame
of the application is leni, the network transmission bandwidth is reduced to the original:
 
− =</p>
      <p>∑ =1  
∑ =1 
 +6</p>
      <p>The actual impact on application transmission performance will also be affected by the following
factors: 1) The ability of the software to process the protocol between the sender and the receiver:
recorded as the software processing capability bandwidth  
carry data: recorded as the bus Carrying capacity bandwidth  
− ; 2) The performance of the bus to
− . The ability of software to process
the protocol is affected not only by the complexity of the PRP software algorithm (mainly duplicate
frame detection), but also by the performance of the processor. Therefore, for the application, the real
communication bandwidth should be:
 
= 
( 
− ,  
− ,  
− )</p>
      <p>− mainly considers adding RCT when sending, repeating frame judgment when receiving
(involving table lookup), stripping RCT and submitting it to the upper protocol stack. If Bprp−s ≥
Bprp−n, Bprp−b ≥ 2 ∗ Bprp−n, the available bandwidth of the application using the PRP scheme can
still approach the original network bandwidth. If the hardware performance is low (processor, bus),
when Bprp−b &lt; 2 ∗ Bprp−n, or Bprp−s &lt; Bprp−n, PRP is used, and the application is valid Bandwidth
may be significantly reduced.</p>
      <p>For DRN, since the content of the message is not changed during transmission and reception, only
one frame of ARP message needs to be sent during switching to notify the switch and other nodes that
the mapping between IP/MAC and switch ports has changed. Therefore, the application communication
  =</p>
      <p>(  − ,   ,   )</p>
      <p>Usually Bj−s, Bb is greater than Bn. Obviously, the DRN solution has higher bandwidth available
bandwidth for:
to the application than the PRP.</p>
    </sec>
    <sec id="sec-5">
      <title>3.2. Reliability</title>
      <p>As shown in Figures 2 and 3, in the two schemes, the devices that may fail are: the network card
(Port-A, Port-B) and the network cable between it and the switch (we regard it as a whole), the switch
(Switch- A, Switch-B), its reliability is: Rn, Rs.</p>
      <p>Then in the PRP network, there are two parallel communication links for communication between
two DANP nodes: the reliability of the two parallel links is:</p>
      <p>
        (
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
      </p>
      <p>For DRN, since two switches are cascaded, there are four links for communication between two
DAND nodes. For simplicity, we consider the reliability of the cascaded line of two switches in the
DRN solution to be 1. Then the reliability of the scheme is:</p>
      <p>
        =1 − （1 −  2  ）2
Rdrn =1−(1 − R2nRs − R2nR2s(1 − Rn))
2
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
      </p>
      <p>
        Since Rprp=1 − （1 − R2nRs）2, and the last item in the brackets in formula (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) R2nR2s(1 − Rn) &gt;
0, so Rdrn &gt;= Rprp, that is to say, DRN reliability is higher than PRP network, see Figure 4.
      </p>
    </sec>
    <sec id="sec-6">
      <title>3.3. Number of frames dropped</title>
      <p>PRP adopts the method of copying and sending, and detecting and discarding duplicate frames.
Therefore, when a single-channel fault occurs, theoretically, frame loss will not occur.</p>
      <p>Since the DRN adopts the Active-Backup mode, on the one hand, there is a certain delay in detecting
the status of the Active NIC, and on the other hand, it takes time for the Backup NIC to convert to the
Active. Therefore, the DRN failure recovery time is greater than 0, which is usually 20ms in most
current implementations.</p>
      <p>A single Ethernet frame consists of a 7Byte preamble and a 1Byte frame start delimiter (Start Frame
Delimiter, SFD), followed by a 14Byte Ethernet header, followed by 46~1500Byte payload data,
followed by a 4Byte frame check sequence (Frame Check Sequence, FCS), and then at least 12Byte
interval between every two frames.</p>
      <p>Figure 5 Ethernet frame format</p>
      <p>For a 1Gbps network, the maximum number of frames that can be transmitted within 1ms is (when
all the shortest packets are):
1000Mbps/1000/8(7+1+14+46+4+12)=1488</p>
      <p>For a 100Mbps network, the maximum number of frames that can be transmitted within 1ms is 149
frames</p>
      <p>Multiplying these two numbers by 20 is the theoretical maximum number of message frames that
may be lost within the DRN fault recovery time, which are 29760 and 2980 frames, respectively.
However, in practical applications, the number of frames sent or received within the switching time (20
ms) of each node is relatively small, usually only a few or a dozen frames. But for the control system,
even if only one frame is lost, if the key information is lost, it may still have serious consequences, so
the advantage of PRP zero frame loss is extremely important.</p>
    </sec>
    <sec id="sec-7">
      <title>3.4. Impact on application communica- tion delay</title>
      <p>The PRP sending and receiving process is shown in Figure 6. Compared with the standard Ethernet
sending and receiving process, because PRP firstly needs to copy the message (the network protocol
stack usually emphasizes zero copy), and secondly, it needs to perform repeated frame judgment
processing (red font) when receiving, and both the receiving and sending processes need to be processed.
The RCT field requires a certain amount of time, thus increasing the communication delay
TCP/UDP Socket</p>
      <p>App
TCP/UDP Socket
IP
Ioctl
Driver</p>
      <p>A 网</p>
      <p>B网</p>
      <p>Nic B as Active
Send</p>
      <p>Send</p>
      <p>Recv</p>
      <p>Recv</p>
      <p>Data Addr
Transmit NicA Receive
Discriptor Backup Discriptor</p>
      <p>Transmit NicB Receive
Discriptor Active Discriptor</p>
    </sec>
    <sec id="sec-8">
      <title>Compatibility with common communication nodes</title>
      <p>The common communication node of non-PRP node (SAN) needs to rely on RedBox[2] to access
the PRP network. A common communication node that is not a dual-redundant network node can
normally access any switch in the dual-redundant network, and when the switch is fault-free, it can
communicate normally with a node using a dual-redundant network card.</p>
      <p>In addition, PRP frames without additional MAC address information cannot be exchanged through
Layer 3; DRN does not change the frame data, so it can be exchanged through Layer 3. It can be seen
that DRN compatibility is better.</p>
    </sec>
    <sec id="sec-9">
      <title>3.6. Applicability of scheme</title>
      <p>DRN
higher
Same as standard
Ethernet</p>
      <p>Good
20ms
Max: 1Gbps：29780
0</p>
    </sec>
    <sec id="sec-10">
      <title>4. Conclusion</title>
      <p>The highlight of PRP lies in zero packet loss and zero failover time, but it requires a high cost to
send replicated frames. When the actual communication network bandwidth and processor load are low,
and the processor does not have heavy load calculations, choosing PRP will neither It affects the
processing and computing performance, and can ensure zero switching time and zero packet loss. The
advantage of the DRN solution is that it does not increase the load on the processor and network
communication, and does not affect the application computing performance. The disadvantage is that a
certain number of frames will be lost when a failure occurs. In the future, we will carry out research on
DRN network technology with zero frame loss without increasing the computational load.</p>
    </sec>
    <sec id="sec-11">
      <title>5. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>IEC.</surname>
          </string-name>
          <article-title>Industrial communication net-works-high availability automation networks-Part 3: parallel redundancy protocol(PRP) and high-availability seamless redundancy(HSR): IEC 62439-</article-title>
          3- 2012[S].
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Zhang</given-names>
            <surname>Teng</surname>
          </string-name>
          ,
          <article-title>Design and Application of Network Dual Redundancy Based on VxWorks</article-title>
          [J],
          <source>Modern Navigation, No. 3</source>
          ,
          <year>2018</year>
          .
          <fpage>200</fpage>
          -
          <lpage>202</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Xie</given-names>
            <surname>Li</surname>
          </string-name>
          et al.,
          <article-title>A new type of dual-network redundant equipment for smart substations and its implementation</article-title>
          [J],
          <source>Power System Protection and Control</source>
          ,
          <source>2019 No. 11</source>
          , Vol.
          <volume>47</volume>
          No.
          <volume>11</volume>
          <fpage>151</fpage>
          -
          <lpage>156</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Jin</given-names>
            <surname>Jianyu</surname>
          </string-name>
          et al.,
          <article-title>Research on parallel redundancy method and protocol of train communication network [J]</article-title>
          ,
          <source>Journal of Railways</source>
          ,
          <year>December 2017</year>
          , Vol.
          <volume>39</volume>
          No.
          <volume>12</volume>
          .
          <fpage>76</fpage>
          -
          <lpage>85</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Liu</given-names>
            <surname>Shaohai</surname>
          </string-name>
          ,
          <article-title>Application of Parallel Redundancy Protocol in the Control Network of Reactor Instrumentation</article-title>
          and
          <string-name>
            <given-names>Control</given-names>
            <surname>System</surname>
          </string-name>
          [M], University of Chinese Academy of Sciences,
          <source>Master's Thesis</source>
          ,
          <year>2015</year>
          .3.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>