Network link order preservation detection method and apparatus

By adding a sequence-keeping detection identifier and sequence number field to the BFD control message, combined with out-of-order judgment conditions, the problem of the BFD protocol's inability to detect the order-keeping of network links is solved, enabling real-time order-keeping detection of network paths and improving the service quality of critical services.

CN120750796BActive Publication Date: 2025-12-12格创通信(浙江)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511133997.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-12-12
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

The existing BFD protocol cannot perform order-keeping detection on network links and cannot guarantee the order of data packets, which may lead to logical errors, data corruption or security threats.

Method used

Add a sequence detection flag and sequence number field to the BFD control message. Determine whether an out-of-order event has occurred by using out-of-order judgment conditions, and perform corresponding processing when out-of-order is detected, including state machine switching and alarms, and dynamically adjust the network path to ensure the order of data packets.

Benefits of technology

It enables real-time order preservation detection of network paths, can identify out-of-order events and respond promptly, improves the service quality of critical services, and avoids service failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120750796B_ABST
    Figure CN120750796B_ABST
Patent Text Reader

Abstract

The application provides a network link order preservation detection method and device, and relates to the technical field of communication. The application adds an order preservation detection function for the BFD protocol, adds an order preservation detection flag and a sequence number field in a BFD control message, judges whether an out-of-order event occurs based on an out-of-order judgment condition, and performs corresponding processing in the case of the out-of-order event. The application can detect the message order preservation state between network paths of the established BFD session in real time, responds in time when detecting the out-of-order event, can improve the order preservation sensitivity or the service quality of the key service, and avoids the occurrence of service faults.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, in particular to a network link order preservation detection method and device. BACKGROUND

[0002] BFD (Bidirectional Forwarding Detection) is a fast link fault detection protocol based on the RFC5880 standard, aiming to provide millisecond-level fault awareness for the network, and accelerate route convergence through cooperation with upper-layer protocols (such as OSPF, BGP, etc.) to improve network reliability. BFD not only supports physical link detection, but also can be used for connectivity verification of logical links (such as MPLS tunnels, VPNs), and has strong expansibility.

[0003] BFD detects link connectivity by establishing a session. The session state includes four states: Down, Init, Up, and AdminDown. Session establishment adopts a three-way handshake mechanism to ensure state synchronization at both ends.

[0004] The working process of BFD mainly includes the following steps:

[0005] First, a BFD session is established on the link between two endpoints, relying on the neighbor information provided by the upper-layer protocol. If there are multiple links, a session can be established for each link.

[0006] Secondly, BFD detection is carried out between the two network nodes of the established session. Once a link fault is found, the BFD neighbor is removed and the upper-layer protocol is immediately notified to enable the upper-layer protocol to quickly perform corresponding processing operations.

[0007] The core goal of the existing BFD protocol is to quickly detect link connectivity faults (such as interruption, packet loss), rather than to guarantee data integrity or message order. Its mechanism only focuses on "whether a sufficient number of messages are received within a specified time", so it cannot achieve network link order preservation detection. SUMMARY

[0008] The embodiments of the present application provide a network link order preservation detection method and device for providing order preservation detection capability for the BFD protocol.

[0009] Based on one aspect of the embodiments of the present application, the present application provides a network link order preservation detection method, which comprises:

[0010] When a BFD control message is received, reading an order preservation detection identifier from the message; when the order preservation detection identifier indicates that order preservation detection needs to be performed, reading a sequence number carried by the BFD control message as a current sequence number;

[0011] determining whether a reordering event occurs based on a reordering judgment condition; the reordering judgment condition comprises a sequence number judgment condition, the sequence number judgment condition being: a current sequence number (Current_Seq) is less than a last valid sequence number (Last_Valid_Seq) and a difference between the last valid sequence number and the current sequence number is within a reordering judgment window (Max_Reorder_Gap); the last valid sequence number being a sequence number carried by a last received BFD control packet with a normal sequence number;

[0012] when it is determined that the reordering event occurs, updating a reordering counter and performing a reordering processing procedure.

[0013] Further, the mandatory part of the BFD control packet comprises a 1-bit ordering detection flag (Ordering Flag); in the case that the ordering detection flag indicates that ordering detection needs to be performed, the BFD control packet further comprises a sequence number field used to identify the sending order of the packet.

[0014] Further, in the case that the ordering detection flag indicates that ordering detection needs to be performed, the BFD control packet further comprises a time stamp field used to identify the sending time of the packet; the reordering judgment condition further comprises a time judgment condition, the sequence number judgment condition and the time judgment condition being in a logical AND relationship; the time judgment condition being: a time interval between a current time stamp and a last valid time stamp is greater than a first threshold value;

[0015] the current time stamp being a time stamp carried in a currently received BFD control packet, and the last valid time stamp being a time stamp carried by a last received BFD control packet with a normal sequence number.

[0016] Further, the reordering processing procedure comprises:

[0017] calculating a reordering rate within a reordering rate statistical time window, the reordering rate being: a ratio of a number of BFD control packets determined as reordered and a total number of BFD control packets within the reordering rate statistical time window;

[0018] when the reordering rate is greater than a preset first reordering rate threshold value, switching a state machine to an ordering degraded state (OrderingDegraded) and triggering a reordering alarm; when the reordering rate is not greater than the preset first reordering rate threshold value, switching the state machine to an ordering valid state (Ordering Valid).

[0019] Further, when it is detected by the BFD protocol that the current path persistence is in the out-of-order abnormal state, a first in-order request message is reported to a software-defined network (SDN) controller to instruct the SDN controller to perform link switching of the current path to an optimal standby path; the method for judging that the current path persistence is in the out-of-order abnormal state is that the out-of-order rate is continuously greater than a preset second out-of-order rate threshold in a first preset number of out-of-order detection windows.

[0020] Further, when it is detected by the BFD protocol that the current path persistence is in the out-of-order abnormal state and there is no standby path, a second in-order request message is reported to the software-defined network (SDN) controller to instruct the SDN controller to perform a flow limiting operation on low-priority services on the current path to preferentially guarantee bandwidth and queue resources of high-priority services.

[0021] Based on another aspect of the embodiment of the present application, the present application further provides a network link in-order detection device, the device comprising:

[0022] a reading module configured to parse a BFD control packet when the BFD control packet is received, read an in-order detection identifier from the BFD control packet, and read a sequence number carried by the BFD control packet as a current sequence number when the in-order detection identifier indicates that in-order detection needs to be performed;

[0023] a judging module configured to judge whether an out-of-order event occurs based on an out-of-order judgment condition; the out-of-order judgment condition comprises a sequence number judgment condition, and the sequence number judgment condition is that the current sequence number (Current_Seq) is less than a historical sequence number (Last_Valid_Seq) and the difference between the historical sequence number and the current sequence number is within an out-of-order judgment window (Max_Reorder_Gap); the historical sequence number is a sequence number carried by a last received sequence number normal BFD control packet;

[0024] an out-of-order processing module configured to update an out-of-order counter and perform an out-of-order processing process when it is judged that the out-of-order event occurs.

[0025] Further, the in-order detection identifier (Ordering Flag) of 1 bit is included in a mandatory part of the BFD control packet; and the BFD control packet further comprises a sequence number field for identifying the order of packet transmission and a time stamp field for identifying the time of packet transmission when the in-order detection identifier indicates that in-order detection needs to be performed;

[0026] the reading module is further configured to read the time stamp field carried by the BFD control packet as a current time stamp;

[0027] The out-of-order judgment condition further comprises a time judgment condition, and the sequence number judgment condition and the time judgment condition are in a logical AND relationship; the judgment module judges whether the out-of-order event occurs based on the sequence number judgment condition and the time judgment condition.

[0028] The time judgment condition is that a time interval between a current timestamp and a historical timestamp is greater than a first threshold value; and the historical timestamp is a timestamp carried by a BFD control packet with a normal sequence number received last time.

[0029] Further, the out-of-order processing module further comprises:

[0030] An out-of-order rate statistics module is configured to calculate an out-of-order rate in an out-of-order rate statistics time window, and the out-of-order rate is a ratio of a number of BFD control packets determined as out-of-order to a total number of BFD control packets in the out-of-order rate statistics time window.

[0031] A state updating module is configured to switch a state machine to an ordering degraded state when the out-of-order rate is greater than a preset first out-of-order rate threshold value, and trigger an out-of-order alarm; and switch the state machine to an ordering valid state when the out-of-order rate is not greater than the preset first out-of-order rate threshold value.

[0032] An ordering request module is configured to judge whether a current path is continuously in the ordering degraded state, report a first ordering request message to a software defined network (SDN) controller to instruct the SDN controller to perform link switching from the current path to an optimal backup path when it is determined that the current path is continuously in the ordering degraded state and there is an alternative path; and report a second ordering request message to the SDN controller to instruct the SDN controller to perform a flow limiting operation on low-priority services on the current path to preferentially guarantee bandwidth and queue resources of high-priority services when there is no alternative path; and the condition for judging that the current path is continuously in the ordering degraded state is that the out-of-order rate is continuously greater than a preset second out-of-order rate threshold value in a first preset number of continuous out-of-order detection windows.

[0033] According to another aspect of the embodiments of the present application, the present application further provides a computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps in the above method when executing the program.

[0034] The application adds the sequence detection function to the BFD protocol, adds the sequence detection mark and sequence number field in the BFD control message, judges whether the out-of-order event occurs based on the out-of-order judgment condition, and executes the corresponding processing in the case of the out-of-order event.

[0035] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the specification. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the prior art. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0037] Figure 1 The step flowchart of the network link sequence detection method in an embodiment of the present application is shown in the figure.

[0038] Figure 2 The BFD control message structure used in an embodiment of the present application is shown in the figure.

[0039] Figure 3 The step flowchart of the out-of-order judgment condition in an embodiment of the present application is shown in the figure.

[0040] Figure 4 The BFD state machine in an embodiment of the present application is shown in the figure.

[0041] Figure 5 The structure of the network link sequence detection device in an embodiment of the present application is shown in the figure.

[0042] Figure 6 The structure of the network link sequence detection device in an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0043] The following will describe the exemplary embodiments in detail, and the following description relates to the drawings, and the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the specification, and they are only exemplary embodiments of the devices and methods consistent with some aspects of the specification.

[0044] The terms used in the present specification are merely used to describe specific embodiments, and are not intended to limit the present specification. The singular forms "a," "an," and "the" used in the present specification are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0045] It should be understood that the terms "first", "second", "third", etc. may be used in the present specification to describe various information or structural modules, the purpose of which is to make the scheme more clearly described, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, order or position of the indicated technical features. Therefore, the features defined with "first", "second", "third" etc. can be explicitly or implicitly included one or more of the features. In the description of the present specification, unless otherwise specified, the meaning of "a plurality of" is two or more; "if" can be interpreted as "when" or "when" or "in response to determining".

[0046] In the present specification, unless otherwise expressly specified and limited, the term "connection" should be understood broadly, for example, "connection" can be fixed connection, or detachable connection, or integral; can be directly connected, or indirectly connected through an intermediate medium. In addition, the term "coupling" can be direct electrical connection, or indirect electrical connection through an intermediate medium. The term "contact" can be direct contact, or indirect contact through an intermediate medium.

[0047] In the present specification, "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship.

[0048] The order preservation of message transmission refers to the characteristic that data packets (messages) are correctly received and processed by the receiving end in the order sent by the sending end in network communication. Network message order preservation is crucial, and its importance mainly lies in the following aspects:

[0049] In terms of data integrity, data sequence disorder can cause logical errors or data damage for applications such as file transmission and database operation; in terms of protocol function requirements, protocols such as Transmission Control Protocol (TCP) need to ensure the sequence of byte streams to achieve reliable transmission; in terms of business logic dependence, real-time scenarios such as webpage loading also need to process resources in sequence; and in terms of security requirements, the destruction of order preservation may hide security threats, and attackers may use out-of-order packets to cause abnormal processing at the receiving end, and then implement Denial of Service (DoS) or code injection attacks.

[0050] As described above, the BFD protocol is mainly used for link connectivity detection, and the mechanism has limitations and cannot detect the order preservation of network packets.

[0051] In order to achieve the purpose of network link order preservation detection based on the BFD protocol, the application proposes a network link order preservation detection scheme based on the connectivity of the BFD detected link, aiming to monitor the order preservation of the link, improve the quality of network services, and adapt to the needs of real-time business applications (such as financial transactions, industrial control, distributed database synchronization) that are sensitive to packet order or business applications (such as SD-WAN, 5G slice network) that need to monitor link availability and transmission quality at the same time.

[0052] Figure 1 For the network link order preservation detection method step flowchart of an embodiment of the application, the method steps provided by the embodiment can be applied to any one end of the two devices establishing a BFD session, and the method comprises the following steps:

[0053] Step 102, when receiving the BFD control packet, reading the order preservation detection identifier from the packet; when the order preservation detection identifier indicates that order preservation detection needs to be performed, reading the sequence number carried by the BFD control packet as the current sequence number;

[0054] The application improves the format of the BFD control packet, and at least adds an order preservation detection identifier field for indicating whether to perform order preservation detection and a sequence number field for marking the sending order of the packet.

[0055] Step 104, judging whether an out-of-order event occurs based on an out-of-order judgment condition; the out-of-order judgment condition comprises a sequence number judgment condition, and the sequence number judgment condition is that the current sequence number (Current_Seq) is less than the historical sequence number (Last_Valid_Seq) and the difference between the historical sequence number and the current sequence number is within the out-of-order judgment window (Max_Reorder_Gap); the historical sequence number is the sequence number carried by the last received sequence number normal BFD control packet;

[0056] In the case that the network is normal, the sequence number of the BFD control message received later should be greater than the sequence number of the BFD control message received before. When the sequence number of the message received later is less than the sequence number of the message received before, it is indicated that the message order is disordered due to some network reasons, and the reasons for disorder may be various. In order to distinguish the disorder in the special case (for example, network jitter, packet loss, etc.) from the disorder in the non-special case, the application distinguishes them by setting a disorder judgment condition.

[0057] The disorder judgment condition at least includes a sequence number judgment condition. In the embodiment, the sequence number judgment condition is that the current sequence number (Current_Seq) is less than the history sequence number (Last_Valid_Seq) and the difference between the history sequence number and the current sequence number is within a disorder judgment window (Max_Reorder_Gap).

[0058] The disorder judgment window is mainly used to distinguish whether the disorder event is caused by packet loss. If the current sequence number is less than the difference between the history sequence number and the disorder judgment window, it is determined that the network packet is lost.

[0059] It should be noted that the application collectively refers to the case that the sequence number of the BFD control message received later is greater than the sequence number of the BFD control message received before as the normal sequence number case. In the normal sequence number case, after the disorder event detection of the current message is completed, the receiving end assigns the sequence number (Current_Seq) of the control message received currently to the history sequence number (Last_Valid_Seq) to update the history sequence number. In the case that the BFD control message carries a sending timestamp, the current timestamp is also assigned to the history timestamp.

[0060] Step 106, when it is determined that the disorder event occurs, the disorder counter is updated and the disorder processing process is performed.

[0061] The application multiplexes and is compatible with the BFD protocol, adds a sequence detection function to the BFD protocol, can realize real-time detection of the network path message order, identifies disorder events and other transmission quality problems, and gives an early warning of potential faults (such as congestion or hardware abnormalities), so as to make a response in advance, thereby avoiding passive response after the service is damaged.

[0062] Figure 2 The BFD control message structure used in an embodiment of the application is shown in the following schematic diagram.

[0063] 1) Ordering Flag: This flag can be set in the mandatory part of the BFD control packet structure, used to indicate whether the current BFD protocol enables the ordering detection function, and the receiving end of the BFD control packet judges whether to perform ordering detection according to the flag. Figure 2 In the example BFD control packet structure, the ordering detection flag (O) uses the reserved bit of the current BFD control packet, which is set between the query request flag (D, Demand) and the detection timeout multiple (Detect Mult) field, and is a 1-bit binary flag, which is 1 when it represents support for ordering detection function and needs to perform ordering detection. The application does not limit the position of the ordering detection flag in the packet structure, for example, the reserved bit in the diagnosis word (Diag) or a new field can also be reused.

[0064] 2) Sequence Number field: This field is a monotonically increasing positive integer field, usually with an increment of 1, used to identify the sending order of the packet.

[0065] 3) Timestamp field: This field is a time type field, used to mark the timestamp of the sending end sending the BFD control packet.

[0066] Only when the value of the ordering detection flag field indicates that ordering detection is required, the values of the sequence number field and the timestamp field are valid.

[0067] Figure 3 The step flowchart of the ordering judgment condition involved in an embodiment of the application. In this embodiment, the out-of-order judgment condition includes a sequence number judgment condition and a time judgment condition, and the sequence number judgment condition and the time judgment condition are in a logical AND relationship, that is, only when both conditions are true, it is determined that an out-of-order event occurs.

[0068] Among them, the time judgment condition is that the time interval between the current timestamp (cur_Timestamp) and the historical timestamp (last_Timestamp) is greater than the first threshold value.

[0069] That is, the out-of-order judgment condition for determining whether an out-of-order event occurs needs to meet the following three conditions at the same time:

[0070] (1) The current sequence number is less than the historical sequence number, that is:

[0071] Current_Seq< Last_Valid_Seq;

[0072] In the case where the current sequence number is greater than the historical sequence number, it indicates that the sequence number state is normal, as shown in step 302 branch in the figure.

[0073] (2) the difference between the historical sequence number and the current sequence number is within the reordering judgment window, i.e.:

[0074] Last_Valid_Seq - Current_Seq<=Max_Reorder_Gap

[0075] In the case that the current sequence number is greater than the historical sequence number and the difference between the historical sequence number and the current sequence number is greater than the reordering judgment window, it is indicated that a packet loss is detected, as shown in step 306 branch in the figure.

[0076] (3) the time interval between the current timestamp and the historical timestamp is greater than the first threshold, i.e.:

[0077] |cur_Timestamp - last_Timestamp|>first threshold

[0078] In the case that the above (1), (2) and (3) are satisfied, it is determined that a reordering event is detected, as shown in step 305 branch in the figure.

[0079] When the above (1) and (2) are satisfied but (3) is not satisfied, it is determined that the network has a short delay jitter, which is a tolerable case, as shown in step 307 branch in the figure.

[0080] The first threshold is an empirical value, which is mainly used to distinguish whether it is network delay jitter, and can be determined by testing in actual network environment. In an embodiment of the present application, the first threshold is determined by the delay of trace route and ping detection of the network, if the number of hops in the line is large, and the ping delay is high in the case of good network, the delay can be appropriately selected to be larger, and the first threshold is usually in the order of milliseconds, for example, 1 ms.

[0081] The reordering judgment window can be determined according to the network link baseline delay between the two endpoints of the BDF session, for example, Max_Reorder_Gap=3 is preset, if the end-to-end delay is large, the parameter can be adjusted larger according to the situation.

[0082] It should be noted that the above reordering judgment window and the first threshold can be dynamically adjusted in real time according to the specific network situation, for example, the SDN controller or network management system can dynamically adjust according to the specific situation of the network or route when the route changes or the network situation changes to adapt to the specific network scene.

[0083] Figure 4Fig. 1 is a schematic diagram of a BFD state machine in an embodiment of the present application. The state machine of the BFD protocol is mainly used for managing the state conversion of the BFD session. The BFD protocol state machine defines four main states, namely, a session not established state (Down), a session initialized state (Init), a session established state (Up), and a session explicitly managedly closed state (AdminDown) (not shown). The conversion between these states is triggered by the interaction of BFD control messages and the timeout event of a timer. The present application reuses the BFD protocol state machine, and the conversion method between the states of the original BFD protocol remains unchanged, which will not be described in detail.

[0084] The present application improves the BFD protocol state machine on the basis of inheriting the original states and state switching relationship of the BFD protocol state machine, and further divides the UP state into the following two sub-states:

[0085] An ordering valid state: the BFD session is established and the message order is normal, i.e., the ordering is normal.

[0086] An ordering degraded state: the BFD session is established, but the message order is detected to be disordered, i.e., the ordering is abnormal.

[0087] Through the division of the above sub-states, the system can distinguish the state in which the message transmission in the current BFD session maintains the ordering (referred to as the ordering).

[0088] In an embodiment of the present application, when it is determined that the out-of-order event occurs, the out-of-order counter (used for recording the number of out-of-order BFD control messages in the out-of-order rate statistical time window) is first updated, and then the UP state is updated according to the out-of-order rate in the out-of-order processing process. The updating method is as follows:

[0089] First, the out-of-order rate in the out-of-order rate statistical time window is calculated. The calculation method of the out-of-order rate is as follows: the percentage of the number of out-of-order BFD control messages detected in the out-of-order rate statistical time window divided by the total number of BFD control messages in the out-of-order rate statistical time window. In order to avoid the ordering state from changing too frequently, the calculation of the out-of-order rate can be triggered by a statistical timer. The timing value of the statistical timer is set to the time length value of the out-of-order rate statistical time window.

[0090] Then, it is determined whether the calculated out-of-order rate is greater than a preset first out-of-order rate threshold (for example, 2%, which can be configured). When the out-of-order rate is greater than the preset first out-of-order rate threshold, the state machine is switched to the ordering degraded state (Ordering Degraded) and the out-of-order alarm is triggered. When the out-of-order rate is not greater than the preset first out-of-order rate threshold, the state machine is switched to the ordering valid state (Ordering Valid).

[0091] The method of triggering the out-of-order alarm can be generating an alarm log (SNMP Trap / Syslog), and an example of the format of the alarm message or log is as follows:

[0092] Timestamp, Alert Level, Source Device IP, Destination Device IP, Current Out-of-Order Rate, Link Identifier

[0093] 2023-10-01T14:23:45, CRITICAL, 192.168.1.1, 192.168.1.2, Out-of-Order Rate = 8%, (Link-ID = Port1 / 0 / 1) Figure 5

[0094] The out-of-order alarm can be reported to a network management server, and a network management personnel can monitor the out-of-order alarm and out-of-order state information of a network path through a control page, and can also configure and modify parameters related to the out-of-order detection.

[0095] In an embodiment of the present application, for financial transactions, distributed databases and other out-of-order sensitive services, in order to prevent data errors or logical failures of these services caused by out-of-order of service data packets, ensure transaction consistency, the network link out-of-order detection method provided by the present application is used to detect the out-of-order of the network path where the service traffic is located, and simultaneously supports quantitative evaluation of link quality (such as based on out-of-order rate, etc.), when detecting that the service path is continuously in an out-of-order abnormal state, a first out-of-order request message is reported to a software-defined network (SDN) controller to instruct the SDN controller to perform link switching of the current path to an optimal standby path.

[0096] For example, the condition for determining that the current path is continuously in an out-of-order abnormal state is that the out-of-order rate is continuously greater than a preset second out-of-order rate threshold (such as 2%, 3%, etc., which can be configured) in a continuous first preset number (such as 3) of out-of-order detection windows. The out-of-order detection window is a window for detecting out-of-order persistence on the BFD agent on the forwarding device, for example, for a BFD detection scenario with a detection multiple and a detection interval of 3 3ms, the out-of-order detection window can be set to 1 second, and the specific value can be determined according to the actual application scenario.

[0097] In the case where the BFD Agent (or out-of-order detection device) on the forwarding device determines that the current path is continuously in an out-of-order abnormal state, the software-defined network (SDN) controller can be triggered to perform switching of the optimal standby path through the following steps:

[0098] S11. The forwarding device sends a first out-of-order request (which can use a REST API or a NETCONF interface method) to the SDN controller to notify the SDN controller to perform link switching of the optimal standby path.

[0099] S12. The SDN controller calculates the optimal standby path (such as the shortest delay path);

[0100] S13. The SDN controller issues a flow table update instruction (OpenFlow) to the forwarding device, and the forwarding device switches the service traffic to the optimal backup path based on the issued flow table.

[0101] S14. Verify the in-order state of the new network path. If normal, the SDN controller updates the topology database.

[0102] In another embodiment of the present application, in order to guarantee the quality of service of the in-order sensitive service, the management system (such as the SDN controller) can dynamically schedule the service traffic according to the in-order state of the link, and schedule the in-order sensitive key service with high priority to the path with low out-of-order rate and stable in-order state.

[0103] However, in some cases, there may be no available backup path or no better backup path for the link path of the key service traffic, and the key service traffic on the current path cannot be scheduled to other backup paths. In this case, the management system can dynamically adjust the quality of service or the service priority of multiple service traffics on the current path, such as throttling low-priority service traffic or reducing the priority of non-key service, to reduce the retransmission overhead and improve resource utilization, thereby guaranteeing the quality of service of the in-order sensitive high-priority key service. The specific processing method is as follows:

[0104] S21. When it is detected by the BFD protocol that the current path is continuously in the in-order abnormal state and there is no alternative path, identify the low-priority service (such as video streaming, file downloading, etc.) on the current path;

[0105] S22. Report a second in-order request message to the SDN controller to instruct the SDN controller to perform a throttling operation (such as limiting the bandwidth and / or queue resources of low-priority service through QoS strategy, or reducing the priority of other services) on the low-priority service on the current path, to preferentially guarantee the bandwidth and queue resources of high-priority services (such as VoIP, real-time financial transaction services);

[0106] S22. After verifying again by the BFD protocol that the current path returns to the in-order normal state, the original bandwidth allocation can be restored by reporting a request message.

[0107] Corresponding to the embodiments of the foregoing method, the embodiments of the present application also provide a network link in-order detection device and an embodiment of a device applying the device.

[0108] The embodiment of the network link ordering detection device provided by the specification can be applied to a computer device, such as a server or a terminal device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for running by the processor on the device. From the hardware level, as shown in Figure 5 The network link ordering detection device 531 provided by the embodiment of the specification is located in a computer device, and a hardware structure diagram of the computer device is shown in Figure 6 In addition to the processor 510, the memory 530, the network interface 520, and the non-volatile memory 540 shown in

[0109] ​ The structure of the network link ordering detection device in an embodiment of the specification is shown in the figure. The device 531 is included in a forwarding device (such as a routing device, a switching device, etc.) controlled by an SDN controller, and includes:

[0110] The reading module 610 is configured to parse the BFD control packet when the BFD control packet is received, read the ordering detection identifier from the BFD control packet, and read the sequence number carried by the BFD control packet as the current sequence number when the ordering detection identifier indicates that ordering detection needs to be performed.

[0111] The judgment module 620 is configured to judge whether an out-of-order event occurs based on an out-of-order judgment condition. The out-of-order judgment condition includes a sequence number judgment condition, and the sequence number judgment condition is that the current sequence number is less than the historical sequence number and the difference between the historical sequence number and the current sequence number is within the out-of-order judgment window. The historical sequence number is the sequence number carried by the last received sequence number normal BFD control packet.

[0112] The out-of-order processing module 630 is configured to update the out-of-order counter and perform an out-of-order processing process when it is determined that an out-of-order event occurs.

[0113] In an embodiment of the specification, the mandatory part of the BFD control packet includes a 1-bit ordering detection identifier (Ordering Flag), a 3-byte sequence number field, and a 3-byte timestamp field.

[0114] The reading module is further configured to read a time stamp field carried in the BFD control packet as a current time stamp; the out-of-order judgment condition further comprises a time judgment condition, and the sequence number judgment condition and the time judgment condition are in a logical AND relationship. The judgment module jointly judges whether an out-of-order event occurs based on the sequence number judgment condition and the time judgment condition. The time judgment condition is that a time interval between the current time stamp and a historical time stamp is greater than a first threshold value; the historical time stamp is a time stamp carried in a BFD control packet with a normal sequence number that is received last time.

[0115] In an embodiment of the present specification, the out-of-order processing module further comprises:

[0116] The out-of-order rate statistical module is configured to calculate an out-of-order rate in an out-of-order rate statistical time window, the out-of-order rate being a ratio of a number of BFD control packets determined as out-of-order to a total number of BFD control packets in the out-of-order rate statistical time window;

[0117] The state updating module is configured to switch the state machine to an ordering abnormal state and trigger an out-of-order alarm when the out-of-order rate is greater than a preset first out-of-order rate threshold value; and switch the state machine to an ordering normal state (Ordering Valid) when the out-of-order rate is not greater than the preset first out-of-order rate threshold value.

[0118] The ordering request module is configured to judge whether the current path is continuously in the ordering abnormal state, report a first ordering request message to a software-defined network (SDN) controller to instruct the SDN controller to perform link switching from the current path to an optimal backup path when it is determined that the current path is continuously in the ordering abnormal state and there is an alternative path; and report a second ordering request message to the SDN controller to instruct the SDN controller to perform a flow limiting operation on low-priority services on the current path to preferentially guarantee bandwidth and queue resources of high-priority services when there is no alternative path. The condition for judging that the current path is continuously in the ordering abnormal state is that the out-of-order rate is continuously greater than a preset second out-of-order rate threshold value in a first preset number of continuous out-of-order detection windows.

[0119] The functions and effects of the modules in the above device are achieved in the implementation process of the corresponding steps in the above method, which will not be described here.

[0120] For the apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts are referred to the part of the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e., can be located in one place or distributed on multiple network modules. Some or all of the modules can be selected to achieve the purposes of the schemes of the present specification according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0121] The exemplary embodiments of the present specification are described above, and it should be understood that in some cases, the modules described in the present specification can be divided in a manner different from the embodiments, and the described actions or steps can be executed in an order different from the embodiments, and the desired results can still be achieved. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.

[0122] Other embodiments of the present specification will be readily apparent to those skilled in the art upon considering the specification in its entirety. The present specification is intended to cover any variations, uses, or adaptations of the present specification following the general principles thereof and including modifications and equivalents which are obvious to those skilled in the art.

[0123] The above is only the preferred embodiments of the present specification, and is not intended to limit the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present specification shall be included in the scope of protection of the present specification.

Claims

1. A network link order preservation detection method, characterized by, The method comprises: reading a sequence detection identifier from the message when a bidirectional forwarding detection (BFD) control message is received; reading a sequence number carried by the BFD control message as a current sequence number when the sequence detection identifier indicates that sequence detection needs to be performed; the sequence detection identifier in the forced part of the BFD control message comprises 1 bit; and the BFD control message further comprises a sequence number field for identifying the sending sequence of the message and a time stamp field for identifying the sending time of the message when the sequence detection identifier indicates that sequence detection needs to be performed; determining whether an out-of-sequence event occurs based on an out-of-sequence judgment condition; the out-of-sequence judgment condition comprises a sequence number judgment condition, and the sequence number judgment condition is that the current sequence number is less than the historical sequence number and the difference between the historical sequence number and the current sequence number is within an out-of-sequence judgment window; the historical sequence number is the sequence number carried by the last received BFD control message with a normal sequence number; the out-of-sequence judgment condition further comprises a time judgment condition, and the sequence number judgment condition and the time judgment condition are in a logical AND relationship; the time judgment condition is that the time interval between the current time stamp and the historical time stamp is greater than a first threshold value; the current time stamp is the time stamp carried in the currently received BFD control message, and the historical time stamp is the time stamp carried by the last received BFD control message with a normal sequence number; when only the sequence number judgment condition is met, it is determined that there is a short delay jitter of the network; when the sequence number judgment condition and the time judgment condition are both met, it is determined that an out-of-sequence event is detected, and an out-of-sequence counter is updated and an out-of-sequence processing process is performed when it is determined that an out-of-sequence event occurs.

2. The method of claim 1, wherein, The out-of-sequence processing process comprises: calculating an out-of-sequence rate within an out-of-sequence rate statistical time window, the out-of-sequence rate being the ratio of the number of BFD control messages determined to be out of sequence to the total number of BFD control messages within the out-of-sequence rate statistical time window; when the out-of-sequence rate is greater than a preset first out-of-sequence rate threshold value, switching a state machine to a sequence-keeping abnormal state and triggering an out-of-sequence alarm; when the out-of-sequence rate is not greater than the preset first out-of-sequence rate threshold value, switching the state machine to a sequence-keeping normal state; the sequence-keeping normal state and the sequence-keeping abnormal state are sub-states of a UP state of a BFD protocol.

3. The method of claim 2, wherein when it is detected through the BFD protocol that the current path is persistently in the sequence-keeping abnormal state, a first sequence-keeping request message is reported to a software-defined network (SDN) controller to instruct the SDN controller to perform link switching of the current path to an optimal backup path; the method of determining that the current path is persistently in the sequence-keeping abnormal state is that the out-of-sequence rate is continuously greater than a preset second out-of-sequence rate threshold value within a first preset number of out-of-sequence detection windows.

4. The method of claim 3, wherein when it is detected through the BFD protocol that the current path is persistently in the sequence-keeping abnormal state and there is no backup path, a second sequence-keeping request message is reported to the SDN controller to instruct the SDN controller to perform a flow limiting operation on low-priority services on the current path to preferentially guarantee the bandwidth and queue resources of high-priority services.

5. A network link order detection apparatus, characterized by, The device comprises: The reading module is configured to parse the BFD control packet when the BFD control packet is received, read an in-order detection identifier from the BFD control packet, read a sequence number carried by the BFD control packet as a current sequence number when the in-order detection identifier indicates that in-order detection needs to be performed, and read a time stamp field carried by the BFD control packet as a current time stamp when the in-order detection identifier included in the forced part of the BFD control packet is 1 bit. The judgment module is configured to judge whether an out-of-order event occurs based on an out-of-order judgment condition. The out-of-order judgment condition includes a sequence number judgment condition and a time judgment condition, and the sequence number judgment condition and the time judgment condition are in a logical AND relationship. The sequence number judgment condition is that the current sequence number is less than a historical sequence number and a difference between the historical sequence number and the current sequence number is within an out-of-order judgment window. The historical sequence number is a sequence number carried by a last received BFD control packet with a normal sequence number. The time judgment condition is that a time interval between the current time stamp and a historical time stamp is greater than a first threshold value. The historical time stamp is a time stamp carried by a last received BFD control packet with a normal sequence number. When only the sequence number judgment condition is met, it is determined that there is a short delay jitter of a network. When the sequence number judgment condition and the time judgment condition are both met, it is determined that the out-of-order event is detected. The out-of-order processing module is configured to update an out-of-order counter and perform an out-of-order processing process when it is determined that the out-of-order event occurs.

6. The apparatus of claim 5, wherein, The out-of-order processing module further includes: The out-of-order rate statistical module is configured to calculate an out-of-order rate within an out-of-order rate statistical time window. The out-of-order rate is a ratio of a number of BFD control packets determined as out-of-order to a total number of BFD control packets within the out-of-order rate statistical time window. The state updating module is configured to switch a state machine to an in-order abnormal state and trigger an out-of-order alarm when the out-of-order rate is greater than a preset first out-of-order rate threshold value, and switch the state machine to an in-order normal state when the out-of-order rate is not greater than the preset first out-of-order rate threshold value. The in-order request module is configured to judge whether a current path is continuously in the in-order abnormal state. In a case where the current path is continuously in the in-order abnormal state and there is an alternative path, a first in-order request message is reported to a software-defined network (SDN) controller to instruct the SDN controller to perform link switching from the current path to an optimal alternative path. In a case where there is no alternative path, a second in-order request message is reported to the SDN controller to instruct the SDN controller to perform a flow limiting operation on low-priority services on the current path to preferentially guarantee bandwidth and queue resources of high-priority services. A condition for judging whether the current path is continuously in the in-order abnormal state is that the out-of-order rate is continuously greater than a preset second out-of-order rate threshold value within a first preset number of out-of-order detection windows.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method in any one of claims 1-4 when executing the program.

Citation Information

Patent Citations

  • Periodic line quality detecting method and device

    CN101247288A

  • Network quality identification method based on RTT calculation

    CN118018386A