A link detection method and device
By setting the detection period and timeout time of the leased line RPR port in the RPR ring network, sending keep-alive messages and automatically selecting forwarding paths based on link quality, the problem of unstable link quality in the campus network is solved, improving user experience and network performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2023-03-31
- Publication Date
- 2026-05-05
AI Technical Summary
In large campus networks, when different campus networks are interconnected via RPR ring networks, the unstable quality of the operator's network leads to large differences in link quality, resulting in a large number of data packet losses, high latency, and poor user experience.
In the RPR ring network closed state, by setting the detection period, timeout time and minimum switching time of the leased line RPR port, keep-alive messages are sent and responses from neighboring nodes are received. Based on the link quality, the forwarding path is automatically selected and switched to a leased line segment with better quality.
It enables automatic selection of forwarding paths based on the quality of the operator's dedicated network, improving user experience, reducing packet loss and latency, and avoiding service instability caused by frequent traffic switching.
Smart Images

Figure CN116366510B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, and in particular to a link detection method and device. Background Technology
[0002] RPR (Resilient Packet Ring) is a MAC (Media Access Control) protocol that can run on SONET (Synchronous Optical Network) / SDH (Synchronous Digital Hierarchy), DWDM (Dense Wavelength Division Multiplexing), and Ethernet. RPR uses RPR MAC layer frame encapsulation to achieve transparent Ethernet over RPR transmission. The ring structure and topology protection mechanisms of RPR are transparent to the forwarding process of the carried traffic and the access devices.
[0003] In large campus networks, interconnecting different campus networks via RPR ring networks can simplify the architecture and improve reliability. However, when the links of different segments of the RPR ring network interconnecting different campus networks are leased lines from different operators, due to the instability of operator network quality, although data packets between campus networks can reach the destination campus network through the shortest path of the RPR ring network, the poor quality of the selected links can lead to a large number of packet losses and latency. Different links may take different operator leased lines, and the link quality may also vary significantly. When using links with high forwarding latency, the user experience will be very poor. Summary of the Invention
[0004] The purpose of this application is to provide a link detection method and device that selects a forwarding path based on the quality of the operator's leased network line in the closed state of the RPR ring network.
[0005] To achieve the above objectives, this application provides a link detection method, which includes: setting the leased line detection message transmission period of the leased line RPR port to be equal to the ring network detection message transmission period of the RPR port of the RPR ring network; wherein the leased line RPR port is directly connected to neighboring nodes through a leased line segment of the operator's leased line network; setting the leased line timeout time of the leased line RPR port to be greater than the ring network timeout time of the RPR port; setting the minimum leased line handover time of the leased line RPR port; the minimum leased line handover time is greater than the leased line timeout time; and, based on the leased line link detection message transmission period, through... The leased line segment sends keep-alive messages; receives keep-alive messages from directly connected neighbor nodes of the leased line segment through the leased line RPR port; when no keep-alive messages are received from directly connected neighbor nodes of the leased line segment through the leased line RPR port for more than the leased line timeout period; reads the recorded last switch time of the leased line RPR port; when the time difference between the last switch time and the current time is greater than the minimum switch time of the leased line and the RPR ring network is in a closed loop state; switches the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refreshes the last switch time according to the current time.
[0006] A link detection device includes a processor and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations:
[0007] The leased line RPR port is configured to send leased line detection messages at a rate equal to that of the RPR ring network port in the RPR ring network; wherein, the leased line RPR port is directly connected to neighboring nodes through the leased line segment of the operator's leased line network.
[0008] Set the leased line timeout time for the RPR port to be greater than the ring network timeout time for the RPR port;
[0009] Set the minimum timeout for leased line switching on the RPR port; the minimum timeout for leased line switching must be greater than the leased line timeout.
[0010] Based on the dedicated line link detection message sending cycle, keep-alive messages are sent through the dedicated line segment;
[0011] Receive keep-alive messages sent by directly connected neighbor nodes in the leased line segment through the leased line RPR port;
[0012] If no keep-alive message is received from a directly connected neighbor node in the leased line segment through the leased line RPR port for more than the leased line timeout period;
[0013] The last switchover time of the leased RPR port that is being read from the records;
[0014] When the time difference between the last switchover time and the current time is greater than the minimum switchover time for the leased line and the RPR ring network is in a closed loop state, switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switchover time according to the current time.
[0015] The beneficial effect of this application embodiment is that the RPR ring network segment of the interconnected campus network is a leased line segment supported by the operator's leased line network, which automatically selects the forwarding link according to the forwarding quality, thereby improving the user experience. Attached Figure Description
[0016] Figure 1 A flowchart illustrating an embodiment of the link detection method provided in this application;
[0017] Figure 2 A network diagram illustrating the application of the link detection method described in this application;
[0018] Figure 3 This is a schematic diagram of an embodiment of the link detection device provided in this application. Detailed Implementation
[0019] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0020] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0021] Figure 1 The diagram shows a flowchart of the link detection method provided in this application. The method includes:
[0022] Step 101: Set the leased line detection message sending period of the leased line RPR port to be equal to the ring network detection message sending period of the RPR port of the RPR ring network; wherein, the leased line RPR port is directly connected to the neighboring node through the leased line segment of the operator's leased line network.
[0023] Step 102: Set the leased line timeout time of the leased line RPR port to be greater than the ring network timeout time of the RPR port;
[0024] Step 103: Set the minimum lease switchover time for the leased line RPR port that is longer than the leased line timeout time.
[0025] Step 104: Based on the dedicated line link detection message sending cycle, send keep-alive messages through the dedicated line segment;
[0026] Step 105: Receive keep-alive messages sent by directly connected neighbor nodes in the leased line segment through the leased line RPR port;
[0027] Step 106: When the leased line does not receive a keep-alive message from a directly connected neighbor node in the leased line segment through the leased line RPR port for more than the leased line timeout period;
[0028] Step 107: Read the last switch time of the leased line RPR port from the record;
[0029] Step 108: When the time difference between the last switching time and the current time is greater than the minimum switching time for the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switching time according to the current time.
[0030] Figure 1 The beneficial effect of this embodiment is that the RPR ring network segments of the interconnected campus network are leased line segments supported by the operator's leased line network, and the forwarding link is automatically selected according to the forwarding quality, thereby improving the user experience.
[0031] Figure 2 In the network diagram of the link detection method of this application shown, campus networks A0, B0, C0, and D0 are interconnected through RPR ring network 200. The leased RPR port A1 of RPR node A and the leased RPR port B2 of node B are directly connected through carrier network 20; the leased RPR port A2 of RPR node A and the leased RPR port D1 of node D are directly connected through carrier network 20. RPR nodes A and B are directly connected through a leased line segment; RPR nodes A and D are directly connected through a leased line segment.
[0032] On node A, the leased line detection message sending period T1p for RPR ports A1 and A2 is set to be equal to the ring network detection message sending period T1r for RPR ports B1, C1, C2, and D2 of the RPR ring network. The leased line timeout t2p for RPR ports A1 and A2 is set to be greater than the ring network timeout t2r for RPR ports B1, C1, and C2; the minimum leased line handover time t3p for RPR ports A1 and A2 is set to be greater than the leased line timeout t2p.
[0033] On node B, the leased line detection message sending period T1p of leased line RPR port B2 is set to be equal to the ring network detection message sending period T1r of RPR ports B1, C1, C2, and D2 of the RPR ring network. The leased line timeout t2p of leased line RPR port B2 is set to be greater than the ring network timeout t2r of RPR ports B1, C1, and C2; the minimum leased line handover time t3p of leased line RPR port B2 is set to be greater than the leased line timeout t2p.
[0034] On node D, the leased line detection message sending period T1p of leased line RPR port D1 is set to be equal to the ring network detection message sending period T1r of RPR ports B1, C1, C2 and D2 of the RPR ring network. The leased line timeout t2p of leased line RPR port D2 is set to be greater than the ring network timeout t2r of RPR ports B1, C1 and C2; the minimum leased line handover time t3p of leased line RPR port D1 is set and this minimum handover time is greater than the leased line timeout t2p.
[0035] The dedicated line RPR ports A1, A2, B2, and D1 of nodes A, B, and D are also configured with dedicated line segment switching strategies.
[0036] Taking node A as an example, in the closed loop state of the RPR ring network 200, if the quality of the leased line segment connected to the RPR leased line ports A1 and A2 of node A is not high, it will be forwarded through the leased line segment with better quality in the other direction.
[0037] Figure 2 In the process, nodes A, B, and D send keep-alive messages through the leased line segments connected by their respective leased line RPR ports according to the leased line link detection message sending period T1p; nodes B, C, and D send keep-alive messages through the segments connected by their RPR ports according to the ring network detection message sending period T1r.
[0038] Node A receives keep-alive messages from its direct neighbors Nodes B and D in the leased line segment via RPR ports A1 and A2.
[0039] When node A fails to receive a keep-alive message from a directly connected neighbor node in the leased line segment through leased line RPR port A1 for more than the leased line timeout period T2p; node A reads the last switching time of leased line RPR port A1 recorded; calculates the time difference based on the last switching time and the current time; if the time difference is greater than the minimum leased line switching time t3p, node A switches leased line RPR port A1 in the RPR ring network 200 topology to another leased line RPR port A2 in the closed-loop state of RPR ring network 200.
[0040] For example, if node A previously determined the shortest path to node B based on the RPR ring network 200 topology and designated the dedicated RPR port A1, node A will change the shortest path's output port to dedicated RPR port A2. Alternatively, if node A previously determined that the two paths to node C are identical but the dedicated RPR port is A1, based on the RPR ring network 200 topology, and selected dedicated RPR port A1 as the shortest path's output port according to the topology routing strategy, node A will change the shortest path's output port to dedicated RPR port A2. In this way, if node A times out without receiving a keep-alive message on dedicated RPR port A1, it will switch traffic to the higher-quality dedicated line segment within the closed loop of the RPR ring network 200. Furthermore, node A will not frequently switch traffic forwarding links; only frequent switching will cause service instability.
[0041] After node A completes the traffic switching of the leased line segment connected to the leased line RPR port A1, node A refreshes the record of the last switching time of the leased line RPR port A1 according to the current time.
[0042] Nodes B and D can, in the same manner, switch the traffic sent through their respective dedicated RPR ports B2 and D1 to the ordinary RPR segment connected to RPR ports B1 or D2 in the dedicated RPR network 200 closed loop state, when the time during which the dedicated RPR port B2 or D1 has not received a keep-alive message from the neighbor node A directly connected to the dedicated line segment exceeds the dedicated line timeout T2p and the time since the last switch is greater than the minimum dedicated line handover time t3p;
[0043] Figure 2 In the process, after node A switches the traffic from dedicated line RPR port A1 to dedicated line RPR port A2, it does not receive a keep-alive message through dedicated line RPR port A2 for more than the dedicated line timeout period T2p. Node A reads the recorded last switch time of dedicated line RPR port A2. It calculates the time difference based on the last switch time and the current time. If the time difference is less than the minimum dedicated line switch time t3p, node A will not perform traffic switching processing for dedicated line RPR port A2.
[0044] Figure 2 In the embodiment, node A receives keep-alive messages from its directly connected neighbor nodes B and C, and can also select the forwarding link in the closed loop state of the RPR ring network 200 according to the link quality based on the leased line segment switching strategy.
[0045] The leased line segment switching strategy set by Node A is to switch traffic to the segment with a lower average packet loss. Node A calculates the average packet loss of the two leased line segments within a preset statistical time (e.g., 60ms) as a packet loss reference value. When the average packet loss of the leased line segment connected to leased line RPR port A1 is less than the average packet loss of the leased line segment connected to leased line RPR port A2, Node A reads the last switching time of leased line RPR port A2. If the time difference between the last switching time of leased line RPR port A2 and the current time is greater than the minimum leased line switching time, the traffic on the leased line segment connected to leased line RPR port A2 is switched to the leased line segment connected to leased line RPR port A1.
[0046] Alternatively, Node A may set its dedicated line segment switching strategy to switch traffic to the segment with the smaller total packet loss. Node A calculates the total packet loss of the two dedicated line segments within a preset statistical time as a packet loss reference value. When the total packet loss of the dedicated line segment connected to dedicated line RPR port A1 is less than the total packet loss of the dedicated line segment connected to dedicated line RPR port A2, Node A reads the last switching time of dedicated line RPR port A2. If the time difference between the last switching time of dedicated line RPR port A2 and the current time is greater than the minimum dedicated line switching time, the traffic on the dedicated line segment connected to dedicated line RPR port A2 is switched to the dedicated line segment connected to dedicated line RPR port A1.
[0047] Alternatively, Node A may set its dedicated line segment switching strategy to switch traffic to the segment with a smaller number of consecutive packet losses. Node A calculates the number of consecutive packet losses of the two dedicated line segments within a preset statistical time as a packet loss reference value. When the number of consecutive packet losses of the dedicated line segment connected to dedicated line RPR port A1 is less than the number of consecutive packet losses of the dedicated line segment connected to dedicated line RPR port A2, Node A reads and records the last switching time of dedicated line RPR port A2. If the time difference between the last switching time of dedicated line RPR port A2 and the current time is greater than the minimum dedicated line switching time, the traffic on the dedicated line segment connected to dedicated line RPR port A2 is switched to the dedicated line segment connected to dedicated line RPR port A1.
[0048] Node A switches the leased RPR port A2 to another leased RPR port A1 in the closed loop state of RPR ring network 200 based on any of the above switching strategies, and refreshes the last switching time of leased RPR port A2 according to the current time.
[0049] Nodes B and C can also switch the leased line RPR port to an RPR port in the closed-loop state of RPR ring network 200 based on any of the above switching strategies, and then refresh the last switching time of the leased line RPR port according to the current time.
[0050] Based on the above embodiments of this application, the dedicated line segment switching strategy for nodes A, B, and C can be flexibly changed to meet business needs.
[0051] Figure 3 The diagram shows a schematic of the link detection device provided in this application. The device 30 includes a processor and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: setting the leased line detection message transmission period of the leased line RPR port to be equal to the ring network detection message transmission period of the RPR port of the RPR ring network; wherein the leased line RPR port is directly connected to neighboring nodes through a leased line segment of the operator's leased line network; setting the leased line timeout of the leased line RPR port to be greater than the ring network timeout of the RPR port; setting the minimum leased line handover time of the leased line RPR port; the minimum leased line handover time is greater than the leased line timeout time. Based on the leased link detection message sending cycle, send keep-alive messages through the leased line segment; receive keep-alive messages sent by directly connected neighbor nodes of the leased line segment through the leased line RPR port; if no keep-alive messages are received through the leased line RPR port for more than the leased line timeout period; read the recorded last switch time of the leased line RPR port; if the time difference between the last switch time and the current time is greater than the minimum switch time of the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switch time according to the current time.
[0052] The processor also performs the following operations by running processor-executable instructions in memory: when the time difference between the last switching time and the current time is less than the minimum time for leased line switching, maintain the leased RPR port of the RPR ring network topology.
[0053] The processor also performs the following operations by running processor-executable instructions in memory: setting the leased line segment handover policy for the leased line RPR port; determining that the number of keep-alive messages not received from the leased line segment's directly connected neighbor node through the leased line RPR port is less than the leased line timeout period; calculating the packet loss reference value for the leased line segment according to the leased line segment handover policy; when the packet loss reference value meets the handover conditions of the leased line segment handover policy; reading the recorded last handover time of the leased line RPR port; when the time difference between the last handover time and the current time is greater than the minimum handover time for the leased line and the RPR ring network is in a closed loop state; switching the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refreshing the last handover time according to the current time.
[0054] Dedicated line segment switching strategies include: switching traffic to segments with a lower average number of packet losses; or switching traffic to segments with a lower total number of packet losses; or switching traffic to segments with a lower number of consecutive packet losses.
[0055] The processor executes the following operations, using processor-executable instructions in the running memory, to calculate the packet loss reference value of the leased line segment according to the leased line segment switching strategy: determining that the leased line segment switching strategy is to switch traffic to a segment with a small average number of packet losses, and calculating the average number of packet losses of the leased line segment within a preset statistical time period as the packet loss reference value; or, determining that the leased line segment switching strategy is to switch traffic to a segment with a small total number of packet losses, and calculating the total number of packet losses of the leased line segment within a preset statistical time period; or, determining that the leased line segment switching strategy is to switch traffic to a segment with a small number of consecutive packet losses, and calculating the number of consecutive packet losses within a preset statistical time period.
[0056] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A link detection method, characterized in that, The method includes, The leased line RPR port is configured to send leased line detection messages at a rate equal to the ring network detection message sending rate of the RPR port in the RPR ring network; wherein, the leased line RPR port is directly connected to neighboring nodes through the leased line segment of the operator's leased line network. The leased line timeout time of the leased line RPR port is set to be greater than the ring network timeout time of the RPR port; Set the minimum lease switchover time for the leased line RPR port; the minimum lease switchover time is greater than the leased line timeout time. Based on the dedicated line detection message sending cycle, keep-alive messages are sent through the dedicated line segment; The dedicated line RPR port receives keep-alive messages sent by the directly connected neighbor nodes of the dedicated line segment. If no keep-alive message is received from the directly connected neighbor node of the leased line segment through the leased line RPR port for more than the leased line timeout period; Read the record of the last switchover time of the leased line RPR port; When the time difference between the last switching time and the current time is greater than the minimum switching time for the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switching time according to the current time.
2. The method according to claim 1, characterized in that, The method further includes: When the time difference between the last switching time and the current time is less than the minimum switching time for the leased line, the leased line RPR port of the RPR ring network topology is maintained.
3. The method according to claim 1, characterized in that, The method further includes: Configure the leased line segment switching strategy for the leased line RPR port; It is determined that the timeout period of the leased line is less than the timeout period of the leased line if no keep-alive message is received from the directly connected neighbor node of the leased line segment through the leased line RPR port. The packet loss reference value of the dedicated line segment is calculated based on the dedicated line segment switching strategy; When the packet loss reference value meets the switching conditions of the dedicated line segment switching strategy; Read the record of the last switchover time of the leased line RPR port; When the time difference between the last switching time and the current time is greater than the minimum switching time for the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switching time according to the current time.
4. The method according to claim 3, characterized in that, The dedicated line segment switching strategy includes: switching traffic to segments with a lower average packet loss rate; or... Switch traffic to a segment with a lower total packet loss rate; or... Switch traffic to a segment with a lower number of consecutive packet losses.
5. The method according to claim 4, characterized in that, The packet loss reference value for the dedicated line segment is calculated based on the dedicated line segment handover strategy, including: The dedicated line segment switching strategy is determined to be to switch traffic to segments with lower average packet loss, and the average packet loss of the dedicated line segment within a preset statistical time period is calculated as the packet loss reference value; or, The dedicated line segment switching strategy is determined to be to switch traffic to segments with lower total packet loss, and the total packet loss of the dedicated line segment within a preset statistical time period is calculated; or, The dedicated line segment switching strategy is determined to be to switch traffic to a segment with a small number of consecutive packet losses, and the number of consecutive packet losses within a preset statistical time period is calculated.
6. A link detection device, characterized in that, The device includes a processor and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: The leased line RPR port is configured to send leased line detection messages at a rate equal to the ring network detection message sending rate of the RPR port in the RPR ring network; wherein, the leased line RPR port is directly connected to neighboring nodes through the leased line segment of the operator's leased line network. The leased line timeout time of the leased line RPR port is set to be greater than the ring network timeout time of the RPR port; Set the minimum lease switchover time for the leased line RPR port; the minimum lease switchover time is greater than the leased line timeout time. Based on the dedicated line detection message sending cycle, keep-alive messages are sent through the dedicated line segment; The dedicated line RPR port receives keep-alive messages sent by the directly connected neighbor nodes of the dedicated line segment. If no keep-alive message is received from the directly connected neighbor node of the leased line segment through the leased line RPR port for more than the leased line timeout period; Read the record of the last switchover time of the leased line RPR port; When the time difference between the last switching time and the current time is greater than the minimum switching time for the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switching time according to the current time.
7. The device according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: When the time difference between the last switching time and the current time is less than the minimum switching time for the leased line, the leased line RPR port of the RPR ring network topology is maintained.
8. The device according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Configure the leased line segment switching strategy for the leased line RPR port; It is determined that the timeout period of the leased line is less than the timeout period of the leased line if no keep-alive message is received from the directly connected neighbor node of the leased line segment through the leased line RPR port. The packet loss reference value of the dedicated line segment is calculated based on the dedicated line segment switching strategy; When the packet loss reference value meets the switching conditions of the dedicated line segment switching strategy; Read the record of the last switchover time of the leased line RPR port; When the time difference between the last switching time and the current time is greater than the minimum switching time for the leased line and the RPR ring network is in a closed loop state; switch the leased line RPR port in the RPR ring network topology to another leased line RPR port or RPR port, and refresh the last switching time according to the current time.
9. The device according to claim 8, characterized in that, The dedicated line segment switching strategy includes: switching traffic to segments with a lower average packet loss rate; or... Switch traffic to a segment with a lower total packet loss rate; or... Switch traffic to a segment with a lower number of consecutive packet losses.
10. The device according to claim 9, characterized in that, The processor performs the following operations by executing processor-executable instructions in the memory to calculate the packet loss reference value of the leased line segment according to the leased line segment handover strategy: The dedicated line segment switching strategy is determined to be to switch traffic to segments with lower average packet loss, and the average packet loss of the dedicated line segment within a preset statistical time period is calculated as the packet loss reference value; or, The dedicated line segment switching strategy is determined to be to switch traffic to segments with lower total packet loss, and the total packet loss of the dedicated line segment within a preset statistical time period is calculated; or, The dedicated line segment switching strategy is determined to be to switch traffic to a segment with a small number of consecutive packet losses, and the number of consecutive packet losses within a preset statistical time period is calculated.
Citation Information
Patent Citations
Connectivity fault management timeout period control
CN102714607A
Method and equipment for forwarding message through shared link of elastic packet ring
CN115604054A