CN-116366510-B - Link detection method and equipment
Abstract
The application provides a link detection method and equipment, wherein the method comprises the steps of setting a private line detection message sending period, a private line overtime time and a private line switching minimum time of a private line RPR port of a private line network section, setting the private line detection message sending period to be equal to the ring network detection message sending period of the RPR port of the RPR ring network, setting the private line overtime time to be larger than the ring network overtime time and smaller than the private line overtime time, sending a keep-alive message through a private line section according to the private line link detection message sending period, receiving the keep-alive message sent by a neighbor node directly connected with the private line section through the private line RPR port, reading the last switching time of the private line RPR port when the keep-alive message is not received through the private line RPR port, switching the private line RPR port to be in a closed loop state when the time difference between the last switching time and the current time is larger than the private line switching minimum time, and switching the private line RPR port in the RPR ring network topology to be in another private line RPR port or RPR port.
Inventors
- XIANG XUEFENG
Assignees
- 新华三技术有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230331
Claims (10)
- 1. A link detection method, characterized in that the method comprises, Setting a special line detection message sending period of a special line RPR port to be equal to a ring network detection message sending period of an RPR port of an RPR ring network, wherein the special line RPR port is directly connected with a neighbor node through a special line network segment of an operator special line network; Setting the special line timeout time of the special line RPR port to be longer than the ring network timeout time of the RPR port; Setting the special line switching minimum time of the special line RPR port, wherein the special line switching minimum time is longer than the special line overtime time; sending a keep-alive message through a private line section according to the private line detection message sending period; receiving a keep-alive message sent by the direct connection neighbor node of the private line section through the private line RPR port; When the keep-alive message sent by the direct connection neighbor node of the private line section is not received through the private line RPR port, exceeding the private line timeout time; reading the recorded last switching time of the special line RPR port; and switching the dedicated line RPR port in the RPR ring network topology to another dedicated line RPR port or RPR port, and refreshing the last switching time according to the current time.
- 2. The method according to claim 1, wherein the method further comprises: And when the time difference between the last switching time and the current time is smaller than the lowest switching time of the private line, maintaining the private line RPR port of the RPR ring network topology.
- 3. The method according to claim 1, wherein the method further comprises: setting a private line section switching strategy of the private line RPR port; Determining that a keep-alive message Wen Xiao sent by the direct connection neighbor node of the private line section is not received by the private line RPR port for the private line timeout time; calculating a packet loss reference value of a special line section according to a special line section switching strategy; when the packet loss reference value accords with the switching condition of the dedicated line section switching strategy; reading the recorded last switching time of the special line RPR port; and switching the dedicated line RPR port in the RPR ring network topology to another dedicated line RPR port or RPR port, and refreshing the last switching time according to the current time.
- 4. The method of claim 3, wherein the private line segment switching strategy comprises switching traffic to a segment with a small average packet loss number, or, Switching the flow to a section with small total packet loss number, or, And switching the flow to a section with small continuous packet loss number.
- 5. The method of claim 4, wherein calculating the packet loss reference value for the dedicated line segment according to a dedicated line segment switching policy comprises: Determining the special line section switching strategy to switch the flow to a section with small average packet loss number, and calculating the average packet loss number of the special line section within the preset statistical time as the packet loss reference value, or Determining the special line section switching strategy to switch the flow to a section with small total packet loss number, calculating the total packet loss number of the special line section within the preset statistical time, or, And determining the special line section switching strategy to switch the flow to a section with small continuous packet loss number, and calculating the continuous packet loss number in the preset statistic time.
- 6. The link detection device is characterized by comprising a processor and a memory, wherein the memory is used for storing processor executable instructions, and the processor is used for executing the following operations by executing the processor executable instructions in the memory: Setting a special line detection message sending period of a special line RPR port to be equal to a ring network detection message sending period of an RPR port of an RPR ring network, wherein the special line RPR port is directly connected with a neighbor node through a special line network segment of an operator special line network; Setting the special line timeout time of the special line RPR port to be longer than the ring network timeout time of the RPR port; Setting the special line switching minimum time of the special line RPR port, wherein the special line switching minimum time is longer than the special line overtime time; sending a keep-alive message through a private line section according to the private line detection message sending period; receiving a keep-alive message sent by the direct connection neighbor node of the private line section through the private line RPR port; When the keep-alive message sent by the direct connection neighbor node of the private line section is not received through the private line RPR port, exceeding the private line timeout time; reading the recorded last switching time of the special line RPR port; and switching the dedicated line RPR port in the RPR ring network topology to another dedicated line RPR port or RPR port, and refreshing the last switching time according to the current time.
- 7. The apparatus of claim 6, wherein the processor further performs the following by executing processor-executable instructions in the memory: And when the time difference between the last switching time and the current time is smaller than the lowest switching time of the private line, maintaining the private line RPR port of the RPR ring network topology.
- 8. The apparatus of claim 6, wherein the processor further performs the following by executing processor-executable instructions in the memory: setting a private line section switching strategy of the private line RPR port; Determining that a keep-alive message Wen Xiao sent by the direct connection neighbor node of the private line section is not received by the private line RPR port for the private line timeout time; calculating a packet loss reference value of a special line section according to a special line section switching strategy; when the packet loss reference value accords with the switching condition of the dedicated line section switching strategy; reading the recorded last switching time of the special line RPR port; and switching the dedicated line RPR port in the RPR ring network topology to another dedicated line RPR port or RPR port, and refreshing the last switching time according to the current time.
- 9. The apparatus of claim 8, wherein the dedicated line segment switching strategy comprises switching traffic to a segment with a small average packet loss number, or, Switching the flow to a section with small total packet loss number, or, And switching the flow to a section with small continuous packet loss number.
- 10. The apparatus of claim 9, wherein the processor performs the following operations by executing processor-executable instructions in the memory to calculate a packet loss reference value for a private line segment according to a private line segment switching policy comprising: Determining the special line section switching strategy to switch the flow to a section with small average packet loss number, and calculating the average packet loss number of the special line section within the preset statistical time as the packet loss reference value, or Determining the special line section switching strategy to switch the flow to a section with small total packet loss number, calculating the total packet loss number of the special line section within the preset statistical time, or, And determining the special line section switching strategy to switch the flow to a section with small continuous packet loss number, and calculating the continuous packet loss number in the preset statistic time.
Description
Link detection method and equipment Technical Field The present application relates to communications technologies, and in particular, to a method and apparatus for detecting a link. Background RPR (RESILIENT PACKET RING ) is a MAC (MEDIA ACCESS Control) protocol that can run over SONET (Synchronous Optical Network )/SDH (Synchronous DIGITAL HIERARCHY, synchronous digital hierarchy), DWDM (DENSE WAVELENGTH Division Multiplexing ) and ethernet. The RPR uses RPR MAC layer frame encapsulation to implement Ethernet Over RPR transparent transmission. The ring structure and topology protection mechanism of the RPR are transparent to the forwarding process of the carried traffic and the access device. In a large-scale park network, different park networks can be interconnected through RPR ring networks to simplify the architecture and improve the reliability, but when links of different sections of the RPR ring networks interconnecting the different park networks are special lines of different operators, data messages among the park networks can reach a destination park network through the shortest path of the RPR ring networks due to the instability of the quality of the operators, but the quantity of lost packets caused by poor quality of selected links can be large in time delay, different links can travel different special lines of the operators, the difference of the quality of the links can be large, and when links with large forwarding delay are traveled, user experience can be poor. Disclosure of Invention The application aims to provide a link detection method and equipment, which select a forwarding path according to the quality of a special line of an operator network in an RPR ring network closed state. The method comprises the steps of setting a special line detection message sending period of a special line RPR port to be equal to a ring network detection message sending period of an RPR port of an RPR ring network, wherein the special line RPR port is directly connected with a neighbor node through a special line network section of an operator special line network, setting a special line timeout time of the special line RPR port to be larger than a ring network timeout time of the RPR port, setting a special line switching minimum time of the special line RPR port to be larger than the special line timeout time, sending a keep-alive message through a special line section according to the special line link detection message sending period, receiving the keep-alive message sent by the direct connection neighbor node of the special line section through the special line RPR port, when the keep-alive message sent by the direct connection neighbor node of the special line section is not received through the special line RPR port, reading a recorded last switching time of the special line RPR port, when a time difference between the last switching time and the current time is larger than the special line switching minimum time and the RPR port is in a closed-loop topology state, and switching the special line RPR port to be in the state, and refreshing the special line RPR port to be the RPR port to be in the current state according to the current RPR topology. A link detection apparatus includes a processor and a memory for storing processor executable instructions, wherein the processor is configured to, by executing the processor executable instructions in the memory, perform the following operations: setting a special line detection message sending period of a special line RPR port to be equal to a ring network detection message sending period of an RPR port of an RPR ring network, wherein the special line RPR port is directly connected with a neighbor node through a special line network segment of an operator special line network; setting the special line timeout time of the special line RPR port to be longer than the ring network timeout time of the RPR port; setting the lowest time of special line switching of a special line RPR port, wherein the lowest time of special line switching is longer than the overtime time of the special line; According to the transmission period of the special line link detection message, a keep-alive message is transmitted through the special line section; receiving a keep-alive message sent by a direct connection neighbor node of a private line section through a private line RPR port; when the keep-alive message sent by the direct connection neighbor node of the private line section is not received through the private line RPR port, the time-out time of the private line is exceeded; reading the recorded last switching time of the special line RPR port; When the time difference between the last switching time and the current time is larger than the lowest switching time of the special line and the RPR ring network is in a closed loop state, switching the special line RPR port in the RPR ring network topology into another special line RPR port or RPR port, and refreshing