Parallel redundant network transmission method for three-layer network transmission
By extending the redundant check endsuffix of the PRP protocol and adding the sending end MAC address and NPRP frame identification, the problem that the PRP protocol cannot transmit and deduplicate in the layer three network is solved, and high reliability and zero packet loss transmission in the layer three network is achieved.
Patent Information
- Application Number
- CN202510311545.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-17
AI Technical Summary
The existing parallel redundant protocol (PRP) can only be effective in a layer two network and cannot achieve redundant transmission in a layer three network, because in a layer three network, the router will replace the source MAC address in the Ethernet frame, causing the receiver to be unable to recognize the sending end.
By extending the redundant check endsuffix of the PRP protocol, adding the sender's MAC address and NPRP frame identification, a 14-byte redundant check endsuffix is formed to ensure that the receiver can identify the sender and deduplicate it.
It realizes the transmission and deduplication of PRP frames in the third-layer network, meeting the requirements of providing high reliability and zero packet loss in the third-layer network environment.
Smart Images

Figure CN120165819A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network transmission, and particularly relates to a parallel redundant network transmission method for three-layer network transmission. Background Art
[0002] Ethernet is the current main data link layer transmission method. In the OSI and TCP / IP models, the data link layer and the network layer do not provide reliable transmission, and reliable transmission needs to be achieved through the transport layer protocol. The reliable transmission provided by the transport layer protocol is based on the retransmission mechanism, and the real-time performance is poor, which cannot meet the application scenarios with high requirements for transmission timeliness.
[0003] For this kind of high-reliability and high-real-time network transmission requirement, device redundancy has always been a common way to improve network reliability. Common methods include: dual hot standby of network devices, VRRP protocol of the network layer, bond of physical interfaces, etc. The network systems using these technologies often provide reliability through redundant backup of devices or lines. When a failure occurs, the network system can detect the faulty device or line and restore communication by switching the network to the redundant device. However, these methods will cause communication interruptions at the second level. For scenarios such as information systems with less strict requirements for reliability, the above methods are still applicable. However, with the increasing requirements for the reliability of computer network transmission in fields such as industrial Internet and Internet of Vehicles, the requirement of "zero packet loss" has been put forward in some application scenarios.
[0004] Based on this requirement, some high-reliability protocols have been developed. For example, Parallel Redundancy Protocol (PRP). The PRP protocol is defined by IEC 62439-3. The protocol provides a unique redundancy mechanism for redundant backup of network links. The implementation of the PRP redundancy mechanism mainly relies on two logically or physically separated subnets (LAN A, LAN B). The sender copies the original information frame and adds a redundancy check trailer (RCT) to the two frames to form two PRP information frames (A Frame, B Frame), which are sent out from two ports respectively and reach the same PRP receiver through two independent subnets. After receiving these two PRP information frames from the two ports respectively, the PRP receiver discards the later-arriving PRP information frame according to the principle of "first come, first served", retains only one earlier-arriving PRP information frame, removes the redundancy check trailer, and restores it to an Ethernet frame and passes it to the upper layer.
[0005] One of the key problems that the PRP protocol needs to solve in redundant transmission is duplicate removal at the receiving end. Since the receiving end will receive two identical frames, the duplicate frames received need to be discarded. In the PRP protocol, the redundant check suffix records a frame sequence number. When the receiving end receives frames from the same sender with the same sequence number, the later received frame is discarded.
[0006] In the PRP protocol, the sending end is distinguished by the source MAC address in the frame, that is, the same source MAC address is considered to come from the same sending end. However, in Ethernet, when three-layer communication is carried out through a router, the source MAC in the Ethernet frame will be replaced by the MAC address of the router, resulting in the PRP receiving end being unable to distinguish which sender the frame comes from, thus unable to remove duplicates. Therefore, the PRP protocol can only be applied to two-layer network transmission.
[0007] Since the network structure is very complex in actual use and there is also a need for reliable transmission in three-layer networks, designing a parallel redundant network transmission method for three-layer network transmission is still an urgent problem to be solved at present. Summary of the Invention
[0008] (1) Technical problems to be solved
[0009] The technical problem to be solved by the present invention is: how to design a parallel redundant network transmission method for three-layer network transmission to realize the transmission of the PRP protocol in a three-layer network environment.
[0010] (2) Technical solutions
[0011] To solve the above technical problems, the present invention provides a parallel redundant network transmission method for three-layer network transmission, which is used to realize the transmission of PRP frames in a three-layer network environment and can be normally duplicate-removed by the receiving end. In this method, the redundant check suffix of the PRP frame is extended to form a network layer PRP, that is, an NPRP frame. The extended redundant check suffix is 14 bytes, consisting of the sender MAC address, NPRP frame identifier, frame sequence number, PRP channel number, payload size, and PRP frame identifier; among them, the added sender MAC address is 6 bytes to ensure that the receiving end can still identify the sender after the PRP frame passes through three-layer forwarding; the added NPRP frame identifier is 2 bytes, which is used to distinguish between PRP frames and NPRP frames.
[0012] Preferably, for the three-layer sending and receiving scenarios of IP data packets, the data sending process of this method is as follows:
[0013] 1) Extract the source MAC address from the IP packet in the network layer, add the source MAC address to the end of the IP packet, and add two bytes of hexadecimal number "88FC" after the source MAC address as the NPRP frame identifier;
[0014] 2) Add a six-byte redundant check suffix after the NPRP frame identifier, including the frame sequence number, PRP channel number, payload size, and two bytes of hexadecimal number "88FB" as the standard PRP identifier;
[0015] 3) Add an Ethernet frame header to the IP packet to form an Ethernet frame for transmission;
[0016] The data receiving process of this method is as follows:
[0017] 1) Receive an Ethernet frame from the Ethernet network card;
[0018] 2) Check whether there is a standard PRP identifier of two bytes of hexadecimal number "88FB" at the end of the frame. If not, it means it is not a PRP frame. Strip the Ethernet frame header and then send it up to the network layer. If it is a PRP frame, check whether the 7th to 8th bytes from the end are "88FC". If not, it represents a standard PRP frame, and extract the source MAC address of the frame header as the index. If so, extract the 9th to 14th bytes from the end of the frame, that is, the source MAC address, as the index;
[0019] 3) Use the MAC address as the index to query the frame sequence number sent by the source;
[0020] 4) If a frame with the same sequence number has been received, it means the frame received at this time is a duplicate frame, and then discard this frame;
[0021] 5) If a frame with the same sequence number has not been received, then strip the redundant check suffix and the Ethernet frame header of this frame and send it up to the network layer.
[0022] Preferably, in this method, the network topology adopts a dual-Ethernet connection mode of the PRP protocol. Each network node has two Ethernet network cards, which are respectively connected to two parallel Ethernet networks through switches, adopting a star topology. The Ethernet frame format adopts the format defined by the IEEE 802.3 standard; the network layer data needs to be processed by the data link layer and sent out in the format of an Ethernet frame.
[0023] Preferably, in this method, a redundant transmission method using the PRP protocol is adopted, and a reliable transmission mechanism is added to the network protocol stack of the computer: at the sending end, by replicating the Ethernet frame and adding a redundant identifier RCT at the end of the frame, the frame is sent out from two Ethernet network cards respectively; at the receiving end, the data is received from the computer data link layer, and after deduplication, the data is output to the network layer for processing.
[0024] Preferably, in this method, by adding the sending end MAC address to the RCT, when the frame is transmitted through the router in the three-layer network, the router replaces the source MAC address in the frame header with its own MAC address, but the MAC address in the RCT remains unchanged for the receiving end to perform deduplication.
[0025] Preferably, in this method, at the receiving end, a node table is used to record the latest sequence number of the frames received from the sending end. The node table uses the MAC address in the RCT as the sending end index. When the sequence number of the frame received from a certain sending end already exists in the node table, it indicates that the frame from this sending end has been received, and the duplicate frame is discarded.
[0026] The present invention also provides a system for implementing the above method.
[0027] Preferably, the system is an NPRP processing module, which is located between the network layer and the link layer of the operating system network protocol stack.
[0028] (III) Advantageous Effects
[0029] The present invention adopts the method of extending the redundant check suffix of the PRP protocol. At the sending end of the computer network data, the MAC address of the sending end is added to the redundant check tail of the PRP frame to ensure that the frame will not be stripped by the router during cross-network segment transmission, so as to realize the transmission of the PRP frame in the three-layer network. In terms of the frame format, the present invention adopts the method of extending the redundant check suffix of the PRP, retaining the redundant check suffix of the original PRP protocol, so it can be compatible with the PRP protocol; by extending the redundant check suffix of the PRP to add the sending end MAC address, the PRP frame can be transmitted in the three-layer network and can be normally deduplicated by the receiving end. Description of the Drawings
[0030] Figure 1 It is a frame format design diagram of a parallel redundant network transmission method for three-layer network transmission according to the present invention; where A is the redundant check tail format of the PRP frame, and B is the redundant check tail format of the three-layer reliable redundant transmission protocol frame;
[0031] Figure 2 It is a frame sending flow chart of a parallel redundant network transmission method for three-layer network transmission according to the present invention;
[0032] Figure 3It is a flowchart for frame reception of a parallel redundant network transmission method for three-layer network transmission according to the present invention. Specific embodiments
[0033] To make the objectives, content and advantages of the present invention clearer, the following further describes in detail the specific embodiments of the present invention with reference to the accompanying drawings and embodiments.
[0034] The present invention proposes a parallel redundant network transmission method for three-layer network transmission, called NPRP (Network layer Parallel Redundancy Protocol), which can realize the transmission of PRP frames in a three-layer network environment.
[0035] A parallel redundant network transmission method (NPRP) of the present invention extends the redundancy check suffix of the PRP frame defined in IEC 62439-3. The redundancy check suffix of the PRP frame defined in IEC 62439-3 is 6 bytes, which are the frame sequence number, PRP channel number, payload size and PRP frame identifier respectively, as shown in Figure 1 A of the figure. The extended redundancy check suffix of the present invention is 14 bytes, which consists of the source MAC, NPRP frame identifier, frame sequence number, PRP channel number, payload size and PRP frame identifier, as shown in Figure 1 B of the figure. Among them, a 6-byte source MAC address is added to record the MAC address of the sending end, ensuring that the receiving end can still identify the sending end after the PRP frame passes through three-layer forwarding. And 2 bytes of NPRP frame identifier are added to distinguish the PRP frame defined in IEC 62439-3 from the NPRP frame.
[0036] In the present invention, the network topology adopts a dual Ethernet connection mode of the PRP protocol. Each network node has two Ethernet network cards, which are respectively connected to two parallel Ethernet networks through switches, adopting a star topology. The Ethernet frame format adopts the format defined by the IEEE 802.3 standard. Due to the design of the network protocol stack processing mechanism in the computer operating system, the network layer data needs to be processed by the data link layer and sent out in the format of an Ethernet frame.
[0037] In the present invention, a redundant transmission method of the PRP protocol is adopted, and a reliable transmission mechanism is added to the network protocol stack of the computer. At the sending end, by copying the Ethernet frame and adding a redundant identifier RCT at the end of the frame, the frame is sent out from two Ethernet network cards respectively; at the receiving end, the data is received from the computer data link layer, and after deduplication, the data is output to the network layer for processing.
[0038] In the present invention, by improving the RCT, the sender MAC address is added to the RCT. When a frame is transmitted through a router in a three-layer network, the router replaces the source MAC address in the frame header with its own MAC address, but the MAC address in the RCT remains unchanged, which can be used for duplicate removal by the receiver.
[0039] In the present invention, at the receiving end, a node table is used to record the latest sequence number of the frames received from the sender. The node table uses the MAC address in the RCT as the sender index. When the sequence number of the frame received from a certain sender already exists in the node table, it indicates that the frame from this sender has been received, and the duplicate frame is discarded.
[0040] Through the above method, it can be ensured that the PRP protocol can correctly remove duplicates during transmission in a three-layer network environment.
[0041] The NPRP processing module implemented by a parallel redundant network transmission method for three-layer network transmission according to the present invention is located between the network layer and the link layer of the operating system network protocol stack. Taking the three-layer sending and receiving of IP data packets as an example, the sending steps of a parallel redundant network transmission method for three-layer network transmission according to the present invention are as Figure 2 shown:
[0042] 1) The network layer sends the IP packet to the NPRP processing module;
[0043] 2) The NPRP processing module extracts the sender MAC address, adds the sender MAC address to the end of the IP packet, and adds two bytes of hexadecimal number "88FC" after the sender MAC address as the NPRP frame identifier;
[0044] 3) The NPRP processing module adds a six-byte redundant check suffix after the NPRP frame identifier, including the frame sequence number, the PRP channel number, the payload size (data length), and two bytes of hexadecimal number "88FB" as the standard PRP identifier;
[0045] 4) Add an Ethernet frame header to the IP packet to form an Ethernet frame for sending;
[0046] Taking the three-layer sending and receiving of IP data packets as an example, the receiving steps of a parallel redundant network transmission method for three-layer network transmission according to the present invention are as Figure 3 shown:
[0047] 1) The Ethernet network card receives the Ethernet frame and sends it up to the NPRP processing module;
[0048] 2) The NPRP processing module checks whether there is a standard PRP identifier of the hexadecimal number "88FB" with 2 bytes at the frame tail. If not, it indicates that it is not a PRP frame. The Ethernet frame header is stripped and then sent upward to the network layer. If it is a PRP frame, it checks whether the 7th to 8th bytes from the tail are "88FC". If not, it represents a standard PRP frame, and the source MAC address of the frame header is extracted as the index. If so, the 9th to 14th bytes starting from the frame tail, that is, the sender MAC address, are extracted as the index;
[0049] 3) Use the MAC address as the index to query the sequence number of the frame sent by the sender;
[0050] 4) If a frame with the same sequence number has been received, it means that the frame received at this time is a duplicate frame, and then this frame is discarded;
[0051] 5) If a frame with the same sequence number has not been received, the frame is stripped of the redundant check suffix (if the sender is a standard PRP sender, the redundant check suffix is 6 bytes; if it is NPRP, the check suffix is 14 bytes) and the Ethernet frame header, and then sent upward to the network layer.
[0052] It can be seen that a parallel redundant network transmission method for three-layer network transmission in the present invention adopts the method of expanding the PRP redundant check suffix in the frame format, retains the redundant check suffix of the original PRP protocol, so it can be compatible with the PRP protocol; by expanding the PRP redundant check suffix to add the sender MAC address, the PRP frame can be transmitted in the three-layer network and can be normally de-duplicated by the receiving end.
[0053] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and deformations can be made, and these improvements and deformations should also be regarded as the protection scope of the present invention.
Claims
1. A parallel redundant network transmission method for three-layer network transmission, characterized in that: The method is used to realize the transmission of PRP frames in a three-layer network environment and can be normally deduplicated by the receiving end. In the method, the redundant check suffix of the PRP frame is extended to form a network layer PRP, namely, an NPRP frame. The extended redundant check suffix is 14 bytes, which consists of a sender MAC address, an NPRP frame identifier, a frame sequence number, a PRP channel number, a payload size and a PRP frame identifier; wherein the added sender MAC address is 6 bytes, which ensures that the receiving end can still identify the sender after the PRP frame is forwarded through the three layers; the added NPRP frame identifier is 2 bytes, which is used to distinguish between PRP frames and NPRP frames.
2. The method according to claim 1, characterized in that For the three-layer sending and receiving scenarios of IP data packets, the data sending process of this method is as follows: 1) Extract the sender MAC address from the network layer IP message, add the sender MAC address to the end of the IP message, and add a 2-byte hexadecimal number "88FC" after the sender MAC address as the NPRP frame identifier; 2) Add a 6-byte redundancy check suffix after the NPRP frame identifier, including the frame sequence number, PRP channel number, payload size, and a 2-byte hexadecimal number "88FB" as the standard PRP identifier; 3) Adding an Ethernet frame header to the IP message to form an Ethernet frame for transmission; The data receiving process of this method is as follows: 1) Receive Ethernet frames from the Ethernet network card; 2) Check whether there is a 2-byte hexadecimal number "88FB" standard PRP identifier at the end of the frame. If not, it indicates that it is not a PRP frame. Strip the Ethernet frame header and then send it to the network layer. If it is a PRP frame, check whether the 7th to 8th bytes from the end are "88FC". If not, it means it is a standard PRP frame. Extract the sender MAC address of the frame header as the index. If yes, extract the 9th to 14th bytes from the end of the frame, that is, the sender MAC address, as the index. 3) Use the MAC address as an index to query the sequence number of the frame sent by the sender; 4) If a frame with the same sequence number has been received, it means that the frame received at this time is a duplicate frame, so the frame is discarded; 5) If no frame with this sequence number has been received, the frame is stripped of the redundant check suffix and Ethernet frame header and sent upward to the network layer.
3. The method according to claim 2, characterized in that In this method, the network topology adopts a dual Ethernet connection mode of the PRP protocol. Each network node has two Ethernet network cards, which are connected to two parallel Ethernet networks through switches. A star topology is adopted, and the Ethernet frame format adopts the format defined by the IEEE 802.3 standard. The network layer data needs to be processed by the data link layer and sent out in the Ethernet frame format.
4. The method according to claim 2, characterized in that In this method, the redundant transmission method of the PRP protocol is adopted to add a reliable transmission mechanism in the computer's network protocol stack: at the sending end, the Ethernet frame is copied and a redundant identifier RCT is added to the end of the frame, and the frame is sent out from two Ethernet cards respectively; at the receiving end, data is received from the computer data link layer, and after deduplication, the data is output to the network layer for processing.
5. The method according to claim 2, characterized in that In this method, by adding the sender MAC address in the RCT, when the frame is transmitted through the router in the three-layer network, the router replaces the source MAC address in the frame header with the router's MAC, but the MAC address in the RCT remains unchanged and is used for deduplication at the receiving end.
6. The method according to claim 2, characterized in that In this method, a node table is used at the receiving end to record the latest sequence number of the frame received from the sender. The node table uses the MAC address in the RCT as the sender index. When the sequence number of a frame received from a certain sender is already in the node table, it indicates that the frame from this sender has been received, and the duplicate frame is discarded.
7. The method according to any one of claims 1 to 6, characterized in that This method is applied in network security.
8. A system for implementing the method according to any one of claims 1 to 7.
9. The system according to claim 8, characterized in that The system is a NPRP processing module located between the network layer and the link layer of the operating system network protocol stack.
10. The system according to claim 8, characterized in that The system is used in network security.
Citation Information
Cited By
Parallel redundancy Ethernet message processing method and system
CN121619305A