Message Processing

The method and device for in-situ flow detection in transmission networks automatically generate service flow recognition rules, reducing deployment complexity and resource wastage by encapsulating detection options with additional information, addressing the challenges of manual placement in backup paths.

JP2024543698AActive Publication Date: 2024-11-21NEW H3C TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024535967
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2024-11-21
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

In traditional transmission networks, deploying backup links for service flow detection requires significant manual work to arrange detection features at multiple nodes, leading to increased deployment complexity and resource wastage due to unused backup paths.

Method used

A method and device for message processing that includes encapsulating in-situ flow detection options with additional information and instructions, allowing network devices to automatically generate service flow recognition rules for reverse paths, reducing the need for manual placement and optimizing resource usage.

Benefits of technology

This approach reduces the amount of work required for deployment and minimizes resource wastage by enabling automatic acquisition of reverse service flow characteristics without manual arrangement, thus optimizing hardware resources in the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024543698000001_ABST
    Figure 2024543698000001_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and provides a message processing. The present application's technical solution includes receiving a first service message and sending a second service message to a second network device, the second service message including a first in situ flow detection option and a first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic being for generating a first service flow recognition rule for a head node of a first reverse path to detect the in situ flow, the head node being an end node of a first forward path, and the first network device and the second network device being both in the first forward path and the first reverse path. The present application can reduce the workload of configuration.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD This application relates to the field of communications technology, and more particularly to message processing. [Background technology]

[0002] In-situ Operation Administration and Maintenance (IOAM) is an in-situ flow detection technology that inserts control information into messages of specified service traffic. After the transmission equipment recognizes the control information contained in the message, it reports the information extracted from the message to the analyzer, allowing the analyzer to recognize subtle faults in the network, accurately detect performance information such as delays and packet loss conditions for each service, and realize real-time monitoring of network quality, so as to quickly locate network faults and optimize transmission paths.

[0003] In a conventional transmission network, backup links are usually deployed, and in order to realize detection for forward traffic and backhaul traffic, it is necessary to configure the service flow characteristics that require detection at the head node and tail node of each backup link.

[0004] Taking the Segment Routing Internet Protocol Version 6 (SRv6) networking as an example, as shown in Figure 1, devices A, C, D, E, F, G, and H are all located in the bearer network. Device A is the head node (Ingress), and there are two forwarding paths between device A and device B, of which the primary path is device ACEG, the backup path is device ADFH, device G is the end node of the primary path, and device H is the end node of the backup path. If the transmission quality of the service flow from device I to device B in the bearer network is to be measured, the feature of the service flow needs to be configured in device A. If the transmission quality of the reverse flow of the service flow in the bearer network is to be measured, the path that the service flow actually takes may be affected by the quality of the network and may be dynamically switched, so the feature of the reverse flow needs to be configured in each head node of the reverse path, i.e., device G and device H. If there are many backup paths, the number of devices that need to be configured is also large, which increases the amount of configuration work. Summary of the Invention

[0005] The present embodiment aims to provide a message processing method that reduces the workload of configuration.

[0006] In a first aspect, the present embodiment provides a message processing method adapted to a first network device. The method comprises: Receiving a first service message; and sending a second service message to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, the head node being a tail node of a first forward path, and the first network device and the second network device both being on the first forward path and the first reverse path.

[0007] In one possible embodiment, the first in situ flow detection option further includes first instruction information, the first instruction information being for indicating whether the first in situ flow detection option includes first additional information, and when the value of the first instruction information is a first value, the first in situ flow detection option includes the first additional information, and when the value of the first instruction information is a second value, the first in situ flow detection option does not include the first additional information.

[0008] In one possible embodiment, the first in situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule, and when the value of the second instruction information is a first value, instructing the head node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructing the head node not to generate the first service flow recognition rule.

[0009] In one possible embodiment, after receiving the first service message, the method further includes matching the first service message against first forward flow features and second forward flow features, where the first forward flow features are features of a forward service flow for performing in situ flow detection and the second forward flow features are features of a forward service flow corresponding to a reverse service flow for performing in situ flow detection, and if the first service message matches both the first forward flow features and the second forward flow features, encapsulating the first in situ flow detection option in an outer layer of the first service message to obtain the second service message.

[0010] In one possible embodiment, after matching the first service message against the first forward flow features and the second forward flow features, the method further comprises: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to the second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or If the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message and sending the fourth service message to the second network device, wherein the third in situ flow detection option includes the first indication information whose value is a second value and the second indication information whose value is a first value.

[0011] In one possible embodiment, the first reverse service flow characteristic includes an IP address and mask for representing an IP subnet and for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

[0012] In one possible embodiment, the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

[0013] In one possible embodiment, a reserved field of the first in situ flow detection option carries the first additional information.

[0014] In one possible embodiment, a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

[0015] In one possible embodiment, the method further includes receiving a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path; and generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

[0016] In one possible embodiment, after generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic, the method further includes storing the second service flow recognition rule in a forwarding plane, and upon receiving a sixth service message that matches the second service flow recognition rule, encapsulating a fifth in situ flow detection option in the sixth service message and sending the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device, wherein the fifth in situ flow detection option includes first indication information and second indication information, both of which have a value of a second value.

[0017] In one possible embodiment, after storing the second service flow aware rule in a forwarding plane, the method further comprises: The method further includes deleting the second service flow recognition rule from the forwarding plane if a service message matching the second service flow recognition rule is not received within a specified period of time.

[0018] In a second aspect, the present embodiment provides a message processing device adapted to be applied to a first network device. The apparatus comprises: The network includes a receiving module for receiving a first service message; and a sending module for sending a second service message to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, and the first reverse service flow characteristic for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, the head node being an end node of a first forward path, and the first network device and the second network device both being on the first forward path and the first reverse path.

[0019] In one possible embodiment, the first in situ flow detection option further includes first instruction information, the first instruction information being for indicating whether the first in situ flow detection option includes first additional information, and when the value of the first instruction information is a first value, the first in situ flow detection option includes the first additional information, and when the value of the first instruction information is a second value, the first in situ flow detection option does not include the first additional information.

[0020] In one possible embodiment, the first in situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule, and when the value of the second instruction information is a first value, instructing the head node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructing the head node not to generate the first service flow recognition rule.

[0021] In one possible embodiment, the apparatus further includes a matching module used for matching the first service message with first forward flow features and second forward flow features, where the first forward flow features are features of a forward service flow for which in situ flow detection is performed and the second forward flow features are features of a forward service flow corresponding to a reverse service flow for which in situ flow detection is performed, and an encapsulation module for encapsulating the first in situ flow detection option in an outer layer of the first service message if the first service message matches both the first forward flow features and the second forward flow features to obtain the second service message.

[0022] In one possible embodiment, the encapsulation module further comprises: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to the second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or If the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and sending the fourth service message to the second network device, wherein the third in situ flow detection option includes the first indication information whose value is a second value and the second indication information whose value is a first value.

[0023] In one possible embodiment, the first reverse service flow characteristic includes an IP address and mask for representing an IP subnet and for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

[0024] In one possible embodiment, the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

[0025] In one possible embodiment, a reserved field of the first in situ flow detection option carries the first additional information. In one possible embodiment, a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

[0026] In one possible embodiment, the apparatus further includes a generating module, wherein the receiving module is also used for receiving a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, the first network device is a head node of the second reverse path, and the generating module is used for generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

[0027] In one possible embodiment, the device further includes a storage module for storing the second service flow recognition rule in a forwarding plane, and the encapsulation module is also used, upon receiving a sixth service message that conforms to the second service flow recognition rule, to encapsulate a fifth in situ flow detection option in the sixth service message and send the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device, and the fifth in situ flow detection option includes first indication information and second indication information, both of which have a value of a second value.

[0028] In one possible embodiment, the device further includes a deletion module that deletes the second service flow recognition rule from the forwarding plane if a service message matching the second service flow recognition rule is not received within a specified period of time.

[0029] In a third aspect, an embodiment of the present application provides a network device, the network device comprising: The system includes a processor, a transceiver, and a machine-readable storage medium having machine-executable instructions executable by the processor stored thereon, the machine-executable instructions causing the processor to: receive a first service message by the transceiver; and send a second service message by the transceiver to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, the head node being a tail node of a first forward path, and both the first network device and the second network device being in the first forward path and the first reverse path.

[0030] In one possible embodiment, the first in situ flow detection option further includes first instruction information, the first instruction information being for indicating whether the first in situ flow detection option includes first additional information, and when the value of the first instruction information is a first value, the first in situ flow detection option includes the first additional information, and when the value of the first instruction information is a second value, the first in situ flow detection option does not include the first additional information.

[0031] In one possible embodiment, the first in situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule, and when the value of the second instruction information is a first value, instructing the head node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructing the head node not to generate the first service flow recognition rule.

[0032] In one possible embodiment, the machine-executable instructions further cause the processor to match the first service message against first forward flow features and second forward flow features, where the first forward flow features are features of a forward service flow for performing in situ flow detection and the second forward flow features are features of a forward service flow corresponding to a reverse service flow for performing in situ flow detection, and if the first service message matches both the first forward flow features and the second forward flow features, encapsulate the first in situ flow detection option in an outer layer of the first service message to obtain the second service message.

[0033] In one possible embodiment, the machine executable instructions may cause the processor to: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to the second network device by the transceiver, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or The method further includes, if the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and transmitting the fourth service message by the transceiver to the second network device, wherein the third in situ flow detection option includes the first indication information whose value is a second value and the second indication information whose value is a first value.

[0034] In one possible embodiment, the first reverse service flow characteristic includes an IP address and mask for representing an IP subnet and for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

[0035] In one possible embodiment, the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

[0036] In one possible embodiment, a reserved field of the first in situ flow detection option carries the first additional information.

[0037] In one possible embodiment, a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

[0038] In one possible embodiment, the machine executable instructions may cause the processor to: The method further includes receiving a fifth service message sent by the transceiver from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path, and generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

[0039] In one possible embodiment, the machine executable instructions may cause the processor to: The method further includes storing the second service flow recognition rule in a forwarding plane, and when the transceiver receives a sixth service message that conforms to the second service flow recognition rule, encapsulating a fifth in situ flow detection option in the sixth service message and sending the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device by the transceiver, wherein the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value.

[0040] In one possible embodiment, the machine executable instructions may cause the processor to: The method further comprises deleting the second service flow recognition rule from the forwarding plane when a service message that matches the second service flow recognition rule is not received by the transceiver within a specified period of time.

[0041] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement method steps of the message processing method described above.

[0042] In a fifth aspect, embodiments of the present application further provide a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method steps of the message processing method set forth above.

[0043] According to the above technical solution, the first network device can encapsulate the first in situ flow detection option in the first service message, and forward the second service message including the first service message and the first in situ flow detection option. The first in situ flow detection option includes the first indication information and the first additional information, so that when the tail node receives the second service message, the tail node can obtain the first reverse service flow feature included in the first additional information. In this way, the tail node of the used path can obtain the first reverse service flow feature, and since the service flow does not pass through other backup paths, there is no need to manually configure the first reverse service flow feature on other backup paths, and the workload of the configuration can be reduced. [Brief description of the drawings]

[0044] In order to more clearly explain the technical solutions of the embodiments of the present application and the prior art, the drawings necessary for the embodiments and the prior art are briefly described below. Of course, the drawings described below are only part of the embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without creative efforts. [Figure 1] FIG. 1 is a schematic diagram of SRv6 networking provided by the background art. [Diagram 2]FIG. 2 is a schematic diagram of an exemplary in situ flow detection network configuration provided in the present embodiment. [Diagram 3] FIG. 3 is a flowchart of a message processing method provided by an embodiment of the present application. [Figure 4] FIG. 4 is a schematic diagram of an in situ flow detection option provided by an embodiment of the present invention. [Figure 5a] FIG. 5a is a schematic diagram showing the configuration of additional information provided by an embodiment of the present invention. [Figure 5b] FIG. 5b is a schematic diagram of another additional information provided by an embodiment of the present invention. [Figure 6] FIG. 6 is a flowchart of another message processing method provided by an embodiment of the present application. [Figure 7] FIG. 7 is a schematic diagram of the configuration of a message processing device provided by an embodiment of the present application. [Figure 8] FIG. 8 is a schematic diagram of a network device provided in the embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0045] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in more detail below by way of examples with reference to the drawings. Of course, the described embodiments are only a part of the embodiments of the present application, and are not all of the embodiments. Based on the embodiments of the present application, all other embodiments that a person skilled in the art can obtain without creative labor fall within the scope of protection of the present application.

[0046] For ease of understanding, the relevant concepts related to the embodiments of the present invention will be explained first.

[0047] The in situ flow detection technology of the present embodiment is an in situ flow detection technology based on IOAM, that is, the service message transmitted in the in situ flow detection networking carries in situ flow detection data, and after each device in the in situ flow detection networking recognizes the in situ flow detection data contained in the service message, it can report measurement data to the analyzer based on the in situ flow detection data.

[0048] As shown in Fig. 2, Fig. 2 is an exemplary schematic diagram of the configuration of an in-situ flow detection network provided by an embodiment of the present application, in which the in-situ flow detection networking includes a leading node, a number of intermediate nodes, and a trailing node, and Fig. 2 exemplarily shows two intermediate nodes, which are intermediate node 1 and intermediate node 2, respectively. Intermediate node 1 cannot detect in-situ flow, and intermediate node 2 can detect in-situ flow.

[0049] When the head node receives an actual service flow and determines that the service flow needs to be subjected to in situ flow detection, the head node sends measurement data for the service flow to an analyzer, adds in situ flow detection data to the service flow, and forwards the service flow with the in situ flow detection data to the intermediate node 1 connected to the head node. Since the intermediate node 1 cannot perform in situ flow detection, the head node directly forwards the service flow to the intermediate node 2.

[0050] The intermediate node 2 is used to receive a service flow, recognize that the service flow includes in-situ flow detection data, and if the measurement type indicated by the in-situ flow detection data is hop-by-hop measurement, send measurement data for the service flow to an analyzer based on the in-situ flow detection data and forward the service flow to an end node; or, if the measurement type indicated by the in-situ flow detection data is end-to-end measurement, there is no need to send measurement data to an analyzer and forward the service flow to an end node.

[0051] When the end node receives a service flow and recognizes that the service flow includes in situ flow detection data, the end node sends measurement data for the service flow to an analyzer based on the in situ flow detection data, deletes the in situ flow detection data in the service flow, and further forwards the service flow.

[0052] The analyzer is used to receive the measurement data sent from the head node, the intermediate node and the tail node, and perform aggregation and calculation on the received measurement data. The analyzer and the in situ flow detection device both implement a clock synchronization protocol, and in FIG. 2, the clocks between the analyzer, the head node, the intermediate node 2 and the tail node are synchronized.

[0053] Figure 2 is an example of an in-situ flow detection network, and when the network is deployed, a backup link may be further deployed to improve the reliability of the network. That is, the in-situ flow detection networking may include devices A, C, D, E, F, G, and H in Figure 1, where device A in Figure 1 is a head node, device G and device H are tail nodes, devices A, G, and H are all network side edge (Provider Edge, PE) devices, devices C, D, E, and F can be PE devices or P devices, P (Provider) devices are network side core devices, and devices I and B are all user side edge (Customer Edge, CE) devices. All of these devices can send measurement data to the analyzer according to the in-situ flow detection data carried by the service flow.

[0054] It should be noted that both the device in FIG. 1 and the node in FIG. 2 may be network devices such as switches or routers.

[0055] In the embodiment of the present application, the number of backup paths in the in situ flow detection network is not limited to one, and for example, when multiple paths serve as backups for each other, multiple tail nodes exist. If a reverse flow feature that requires in situ flow detection is placed for each of the multiple tail nodes, the amount of placement work will increase.

[0056] In addition, the reverse flow features need to be distributed to the hardware data forwarding plane of the end node so that the hardware data forwarding plane of the end node can perform in-situ flow detection for the reverse flow based on the reverse flow features. Thus, the reverse flow features occupy the hardware resources of the end node.

[0057] Because the reverse flow only passes through one of the backup paths, that is, the reverse flow does not pass through other backup paths, the reverse flow features located at the tail nodes of other backup paths are not used. Even if these reverse flow features are not used, they cannot be deleted and occupy the hardware resources of the tail node. The more backup paths or the more reverse flow features there are, the more hardware resources are wasted in the bearer network. If the hardware resources are insufficient, other services that require the hardware resources cannot request the hardware resources and cannot be deployed normally.

[0058] In order to solve the above problem, an embodiment of the present invention provides a message processing method applied to a first network device. The method comprises: Receiving a first service message; and sending a second service message to a second network device, the second service message including a first in situ flow detection option and a first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic being for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, the head node being a tail node of a first forward path, and the first network device and the second network device both being in the first forward path and the first reverse path.

[0059] According to the method, after receiving the first service message, the first network device may send a second service message to the second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first indication information and first additional information, so that the end node of the first forward path can obtain the first reverse service flow feature included in the first additional information when receiving the second service message. In this way, the end node of the currently used path can automatically obtain the first reverse service flow feature, and there is no need to manually configure the first reverse service flow feature on other backup paths because the reverse service flow does not pass through other backup paths, thereby reducing the configuration workload.

[0060] The message processing method provided by the embodiment of the present invention will be described in detail below.

[0061] As shown in Figure 3, an embodiment of the present application provides a message processing method applied to a first network device, the method includes the following steps:

[0062] S301, receiving a first service message.

[0063] The first service message is a service message sent from a device outside the in situ flow detection networking to a first network device. Taking the SRv6 network shown in FIG. 1 as an example, the first service message may be a service message sent from device I to device A.

[0064] S302: sending a second service message to a second network device, the second service message including a first in situ flow detection option and a first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow feature, the first reverse service flow feature for generating a first service flow recognition rule for in situ flow detection by a head node of the first reverse path.

[0065] The head node is the tail node of the first forward path, and the first network device and the second network device are both on the first forward path and the first reverse path.

[0066] For example, the first reverse path may be a path from device G to device A in FIG. 1, and accordingly, the first forward path may be a path from device A to device G, with the first reverse path having device G as the first node and, at the same time, device G being the last node of the first forward path.

[0067] Alternatively, the first reverse path may be a path from device H to device A in FIG. 1, and accordingly, the first forward path may be a path from device A to device H, with the first reverse path having device H as the first node and, at the same time, device H having the last node of the first forward path.

[0068] In both of the above two examples, device A is the head node of the first forward path, and the first network device may be device A. The second network device may be device C or device D.

[0069] In the present embodiment, the first network device may send the second service message to the second network device according to its own message forwarding policy. For example, when applied to a SRv6 bearer network, the first network device may encapsulate a Segment Routing Header (SRH) in the first service message and send the second service message in which the SRH and the first in situ flow detection option are encapsulated to the second network device, and the second network device may continue to forward the second service message along the first forward path based on the SRH until the service message is forwarded to the last node of the first forward path.

[0070] The first in situ flow detection option includes the in situ flow detection data described above, and further includes first indication information and first additional information, and the value of the first indication information may be a first value or a second value, for example, the first value may be 1 and the second value may be 0.

[0071] If the value of the first indication information is a first value, the first in situ flow detection option includes first additional information.

[0072] If the value of the first indication information is the second value, the first in situ flow detection option does not include the first additional information.

[0073] The first reverse service flow feature in the first additional information is a feature of a reverse service flow requiring in situ flow detection, and the reverse service flow is a service flow forwarded along a direction from a head node to a tail node in the first reverse path. The first reverse service flow feature may be information for reflecting traffic features requiring in situ flow detection, such as a message 5-tuple, or a source Internet Protocol (IP) address and a source port number, or a destination IP and a destination IP port number. Preferably, the first reverse service flow feature may further include other information for reflecting traffic features, such as a Media Access Control (MAC) address carried in a message, or information for reflecting traffic features in a message load.

[0074] It is understood that after receiving the second service message, the head node of the first reverse path can generate a first service flow recognition rule based on the first reverse service flow feature included in the first additional information, and then the end node of the first reverse path can recognize the reverse service flow requiring in situ flow detection based on the first service flow recognition rule.

[0075] According to the method, after receiving the first service message, the first network device may send a second service message to the second network device, where the second service message includes a first in situ flow detection option and the first service message. Because the first in situ flow detection option includes first indication information and first additional information, when the end node of the first forward path receives the second service message, the end node of the first forward path can obtain the first reverse service flow feature included in the first additional information. In this way, the end node of the currently used path can automatically obtain the first reverse service flow feature, and since the reverse service flow does not pass through other backup paths, there is no need to manually configure the first reverse service flow feature on other backup paths, and the workload of configuration can be reduced.

[0076] In one embodiment, the first in situ flow detection option further includes second instruction information, where the second instruction information is for instructing the head node of the first reverse path whether to generate the first service flow recognition rule.

[0077] The value of the second indication information may be a first value or a second value, for example, the first value may be 1 and the second value may be 0.

[0078] If the value of the second indication information is the first value, it indicates to the head node to generate a first service flow recognition rule.

[0079] When the value of the second indication information is the second value, it indicates that the head node does not generate the first service flow recognition rule.

[0080] In the embodiment of the present application, a first forward flow characteristic and a second forward flow characteristic are pre-configured in the first network device, the first forward flow characteristic is a characteristic of a forward service flow for which in-situ flow detection is performed, and the second forward flow characteristic is a characteristic of a forward service flow corresponding to a reverse service flow for which in-situ flow detection is performed, that is, if a received message matches the first forward flow characteristic, it is necessary to perform in-situ flow detection on the message, and if the message also matches the second forward flow characteristic, it is determined that the reverse service flow corresponding to the message also needs in-situ flow detection.

[0081] The first forward flow characteristic and the second forward flow characteristic may be the same, or the second forward flow characteristic may be the first forward flow characteristic plus other characteristics, i.e., all or a portion of a service flow that satisfies the first forward flow characteristic is a service flow that satisfies the second forward flow characteristic.

[0082] The first forward flow characteristic and the second forward flow characteristic may be information for reflecting traffic characteristics requiring in situ flow detection, such as a message 5-tuple, or a source IP address and a source port number, or a source destination IP and a destination IP port number, etc. Preferably, the first forward service flow characteristic and the second forward service flow characteristic may further include other information for reflecting traffic characteristics, such as a MAC address carried in a message or information for reflecting traffic characteristics in a message load.

[0083] Then, after receiving the first service message, the first network device may match the first service message with the first forward flow characteristic and the second forward flow characteristic.

[0084] In addition, the first forward flow feature and the second forward flow feature arranged in the first network device may each include multiple sets, and after receiving the first service message, the head node may match the first service message with each set of the first forward traffic feature and each set of the second forward flow feature respectively. In the embodiment of the present application, a matching process between one set of the first forward flow feature and the second forward flow feature is taken as an example.

[0085] After completing the above matching, the first network device can encapsulate an in situ flow detection option in the service message according to the matching result. Specifically, it may include the following three situations:

[0086] Situation 1: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulate the first in-situ flow detection option in the outer layer of the first service message to obtain a second service message.

[0087] In order to transmit the first service message in the SRv6 network, it is necessary to further encapsulate the SRH in the outer layer of the first service message, that is, the second service message includes the first service message, the first in situ flow detection option, and the SRH.

[0088] Both the first indication information and the second indication information included in the first in situ flow detection option have a first value, and the first in situ flow detection option includes a first reverse service flow feature.

[0089] In one embodiment, the first network device may be configured with first reverse service flow features corresponding to multiple sets of second forward flow features, and the first in situ flow detection option may accordingly include multiple first additional information. For example, if it is necessary to perform in situ flow detection for a reverse flow of a source IP address and a source port 1, and it is necessary to perform in situ flow detection for a reverse flow of a destination IP address and a destination port 2, one set of the first reverse service flow features includes a source IP address and a source port 1, and another set of the first reverse service flow features includes a destination IP address and a destination port 2. Thus, the first in situ flow detection option includes two first additional information, and each first additional information includes a set of the first reverse service flow features.

[0090] Preferably, after matching the message with the first forward flow feature and the second forward flow feature, the message may further include situation 2 or situation 3.

[0091] Situation 2: if the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulate a second in situ flow detection option in the outer layer of the first service message to obtain a third service message, and send the third service message to the second network device.

[0092] The second in situ flow detection option includes first and second indications, both of which have a second value.

[0093] If the first service message matches the first forward flow characteristic, then in situ flow detection needs to be performed on the first service message, and therefore a second in situ flow detection option needs to be encapsulated in the first service message.

[0094] Furthermore, since the first service message does not match the second forward flow characteristic, there is no need to perform in situ flow detection for the reverse service flow corresponding to the first service message, i.e., the end node of the first forward path does not need to generate the first service flow recognition rule, so the first network device sets the second indication information as a second value in the second in situ flow detection option, indicating that the end node of the first forward path does not need to generate the first service flow recognition rule.

[0095] In order to transmit the first service message in the SRv6 network, it is necessary to further encapsulate the SRH in the outer layer of the first service message, that is, the third service message includes the first service message, the second in situ flow detection option, and the SRH.

[0096] Situation 3: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, and the first reverse service flow characteristic is not configured in the first network device, encapsulate a third in situ flow detection option in the first service message to obtain a fourth service message, and send the fourth service message to the second network device.

[0097] The third in situ flow detection option includes a first indication having a second value and a second indication having a first value.

[0098] If the first service message matches both the first forward flow characteristic and the second forward flow characteristic, it indicates that in situ flow detection needs to be performed for the first service message, and also that in situ flow detection needs to be performed for the backward service flow corresponding to the first service message. Therefore, the second indication information may be set as a first value in the third in situ flow detection option, so that the end node of the first forward path needs to inform the generation of the first service flow recognition rule.

[0099] Since the first reverse service flow feature is not configured in the first network device, the first reverse service flow feature cannot be encapsulated in the third in situ flow detection option. Therefore, the first indication information is configured as a second value in the third in situ flow detection option to indicate to the tail node that the third in situ flow detection option does not include the first additional information. Furthermore, the tail node can automatically generate a first service flow recognition rule according to the 5-tuple of the first service message, and does not need to manually configure the reverse service flow feature in the tail node, and does not need to manually configure the reverse flow feature in the tail nodes of other backup paths, thereby reducing the amount of configuration work. Furthermore, the hardware resources of the tail nodes of other backup paths are not occupied, and the occupation of hardware resources in the bearer network is reduced.

[0100] In one case, the source IP address and source port of the forward service flow are the destination IP address and destination port of the reverse service flow, and the destination IP address and destination port of the forward service flow are the source IP address and source port of the reverse service flow, so that the end node of the first forward path can generate a reverse service flow characteristic based on the 5-tuple of the forward service flow.

[0101] However, the forward service flow characteristic and the reverse service flow characteristic of some service flows are asymmetric, i.e., the source port of the forward service flow is different from the destination port of the reverse service flow, or the source IP address of the forward service flow is different from the destination IP address of the reverse service flow. In this case, the tail node cannot directly generate the reverse service flow characteristic according to the 5-tuple of the forward service flow. Therefore, in the embodiment of the present application, the first reverse service flow characteristic may be configured in the first network device in advance, and the first network device may have the first reverse service flow characteristic in the first additional information of the first in situ flow detection option. Furthermore, the tail node may generate the first service flow recognition rule based on the first reverse service flow characteristic held in the first additional information. In this way, even if the 5-tuple of the reverse service flow is asymmetric with the 5-tuple of the forward service flow, the tail node can accurately generate the first service flow recognition rule, which realizes the reduction of the configuration workload and the assurance of the accuracy of the first service flow recognition rule generated by the tail node.

[0102] Here, the first in situ flow detection option, the second in situ flow detection option, and the third in situ flow detection option have the same configuration, and all of them include an extended flow detection type field, a service flow direction identification field, and a reservation field, and one bit in the extended flow detection type field carries a first indication information, and the service flow direction identification field carries a second indication information. In any of the in situ flow detection options, when the value of the first indication information is a first value, it indicates that the in situ flow detection option includes the first additional information, and when the value of the first indication information is a second value, it indicates that the in situ flow detection option does not include the first additional information. In any of the in situ flow detection options, when the value of the second indication information is a first value, it instructs the head node of the backward path to generate a service flow recognition rule, and when the value of the second indication information is a second value, it instructs the head node of the backward path not to generate a service flow recognition rule.

[0103] The in situ flow detection option may be encapsulated in the Destination Options extension header of an Internet Protocol Version 6 (IPv6) message, and the structure of the in situ flow detection option is shown in FIG.

[0104] Option Type is the type of in situ flow detection option.

[0105] Opt Data Len is the length of the in situ flow detection option.

[0106] FlowMonID occupies 20 bits and is the ID of the detected service flow.

[0107] L occupies 1 bit and is the packet loss mark.

[0108] D occupies 1 bit and is a delay mark.

[0109] R, Rsv and Reserved are all reserved fields.

[0110] The Header Type Indication (HTI) indicates the type of extension data that is included. A value of 0 indicates that there is no extension data, and a value other than 0 indicates that there is extension data.

[0111] NodeMonID occupies 20 bits and is a device node identifier. When a leading node encapsulates an in situ flow detection option in a service message, the leading node may add its own node identifier to this field.

[0112] F occupies 1 bit, and is a service flow direction identification field for carrying second instruction information. When the value is 1, it instructs the head node of the first reverse path to generate the first service flow recognition rule, and when the value is 0, it instructs the head node of the first reverse path not to generate the first service flow recognition rule.

[0113] P is the measurement period.

[0114] T occupies 1 bit and is for representing the detection type, which includes end-to-end detection and hop-by-hop detection.

[0115] The extension flow monitor type field (Ext FM Type) may be indicated in the form of a bitmap. In the present embodiment, the Ext FM Type may carry the first indication information in one reserved bit, which indicates whether the in situ flow detection option has the first additional information including the first reverse service flow characteristic. For example, the first indication information may be carried by occupying the 13th reserved bit. If the value of the bit is 1, it indicates that the first additional information including the first reverse service flow characteristic is present, and if the value of the bit is 0, it indicates that the first additional information including the first reverse service flow characteristic is not present.

[0116] Taking Figure 4 as an example of the first in situ flow detection option, a reserved field after the extended flow detection type field can carry the first additional information, where the reserved field includes a Type-Length-Value (TLV) configuration, and a Value field of the TLV configuration carries the first additional information. If the in situ flow detection option includes multiple first additional information, the in situ flow detection option includes multiple TLV configurations, and each TLV configuration carries one piece of first additional information.

[0117] The additional information in the present embodiment is all in a TLV structure, and as shown in FIG. 5a, Type is the type of additional data, for example, Type=1 indicates that the additional data is the first reverse service flow characteristic.

[0118] Length indicates the length of the additional data, and Value indicates the detailed content of the additional data, that is, the first reverse service flow characteristic.

[0119] For example, as shown in Fig. 5b, the first reverse service flow feature included in the Value may be family, source IP address (SIP), source IP mask (SIP Mask), destination IP address (DIP), destination IP mask (DIP Mask), protocol number (Protocol), source port (Sport) and destination port (Dport). Other information may be included to represent the first reverse service flow feature, but the embodiment of the present application is not limited thereto. Here, family is used to represent the type of IP address included in the first reverse service flow feature, for example, the type of IP address may be an IPv6 address or an IPv4 address.

[0120] In addition, when in situ flow detection needs to be performed for the reverse service flows of the same IP subnet, if the tail node of the first forward path generates a first service flow recognition rule for each IP address in the subnet, a lot of hardware resources of the tail node will be wasted. For example, if the IP subnet that needs to perform in situ flow detection includes 100 IP addresses, the tail node needs to construct one first service flow recognition rule after receiving the service message of each IP address in the 100 IP addresses. In this way, 100 rules need to be constructed and distributed to the hardware data forwarding plane, occupying a lot of hardware resources.

[0121] In the present embodiment, the first reverse service flow feature configured in the first network device includes an IP address and a mask for representing an IP subnet, and is for instructing the head node of the first reverse path to perform in situ flow detection for the reverse service flow belonging to the IP subnet. In this way, when the first network device determines that it is necessary to perform in situ flow detection for the reverse service flow belonging to the same IP subnet, the first reverse service flow feature added to the first in situ flow detection option includes an IP address and a mask for representing the IP subnet. Furthermore, the head node of the first reverse path may generate a first service flow recognition rule for the IP subnet and mask, that is, it is possible to realize in situ flow detection for the reverse flow belonging to the IP subnet, and the occupation of hardware resources can be reduced.

[0122] In the above embodiment, the first network device is the head node of the first forward path. In addition, the first network device can be the tail node of another forward path. In this scenario, as shown in FIG. 6, the method includes the following steps:

[0123] S601: receiving a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, and the second additional information including a second reverse service flow feature.

[0124] The first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is the head node of the second reverse path.

[0125] Here, the service flow forwarding direction in the second forward path is from the third network device to the first network device, the service flow forwarding direction in the second reverse path is from the first network device to the third network device, and the first network device is the end node of the second forward path.

[0126] For example, if the second forward path is Device 1-Device 2-Device 3-Device A and the second reverse path is Device A-Device 3-Device 2-Device 1, then Device A is the first network device and Device A is both the end node of the second forward path and the start node of the second reverse path.

[0127] S602, generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

[0128] Here, the second service flow recognition rule generated by the first network device, which is the head node of the second reverse path, may be to perform in situ flow detection for a service message that matches the second reverse service flow characteristic.

[0129] With this method, when the first network device is the head node of the second reverse path, the received fifth service message includes a fourth in situ flow detection option, and the first network device can obtain the second reverse service flow feature from the second additional information of the fourth in situ flow detection option, and generate a second service flow recognition rule based on the second reverse service flow feature. In this way, even when there are multiple backup paths, the tail node of the currently used backup path can automatically generate the second service flow recognition rule, and there is no need to manually configure the second reverse service flow feature in the tail node, and there is no need to manually configure the second reverse service flow feature in other unused backup paths, thereby reducing the workload of configuration.

[0130] Furthermore, since the first network device can directly generate the second service flow recognition rule based on the second reverse service flow feature in the fourth in situ flow detection option of the fifth service message, rather than based on the 5-tuple of the fifth service message, the first network device can accurately generate the second service flow recognition rule even if the 5-tuple of the fifth service message and the backhaul message are asymmetric.

[0131] In the above S602, after generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic, the first network device may store the second service flow recognition rule in a forwarding plane, and upon receiving a sixth service message conforming to the second service flow recognition rule, encapsulate a fifth in situ flow detection option in the sixth service message, and send the sixth service message with the fifth in situ flow detection option encapsulated to a third network device.

[0132] Here, the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value. The second indication information having a second value indicates that the end node of the second reverse path does not need to generate a reverse service flow recognition rule, and the first indication information having a second value indicates that the fifth in situ flow detection option does not include additional information. The configuration of the fifth in situ flow detection option may refer to FIG. 4, where the second indication information may be a value of the F field in FIG. 4, the value of the second indication information is 0, and the first indication information may be 1 bit in the Ext FM Type field in FIG. 4, and the value of the first indication information is 0.

[0133] Here, the sixth service message that complies with the second service flow recognition rule is a service message received from a CE device when the first network device is the end node of a second forward path and at the same time the first node of a second reverse path.

[0134] In this embodiment, after receiving the fifth service message sent from the third network device, the first network device, which is the end node of the second forward path, may analyze the fourth in situ flow detection option in the fifth service message, and perform subsequent operations on the analysis result. A specific analysis process is as follows:

[0135] Step 1, analyze the F-field of the fourth in situ flow detection option, and the F-field has a second indication.

[0136] If the value of the second indication information is the first value, step 2 is executed; if the value of the second indication information is the second value, step 4 is executed.

[0137] Step 2: Analyze the first indication information held by the Ext FM Type of the fourth in situ flow detection option.

[0138] If the first indication information is the first value, execute step 3; if the first indication information is the second value, execute step 5.

[0139] Step 3: obtain second additional information included in the fourth in situ flow detection option, generate a second service flow recognition rule based on the second reverse service flow feature included in the second additional information, store the second service flow recognition rule in the forwarding plane, and execute step 5.

[0140] Step 4: Generate a service flow recognition rule according to the 5-tuple information of the fifth service message, store the generated service flow recognition rule in the forwarding plane, and execute step 4.

[0141] Here, the first network device can use the source IP address and source port number included in the 5-tuple information as the destination IP address and destination port number, respectively, of the reverse direction recognition rule, the destination IP address and destination port number included in the 5-tuple information as the source IP address and source port number, respectively, of the reverse direction recognition rule, and the protocol number included in the 5-tuple information as the protocol number of the reverse direction recognition rule.

[0142] Step 5, delete the fourth in-situ flow detection option in the fifth service message, and forward the fifth service message without the fourth in-situ flow detection option to the CE device.

[0143] Here, the tail node must further delete the SRH extension header in the fifth service message, and then forward the original fifth service message in which the SRH header is not encapsulated.

[0144] In order to further avoid occupying too many hardware resources of the end node, after the first network device stores the second service flow recognition rule in the forwarding plane, if the first network device does not receive a message matching the second service flow recognition rule within a specified period of time, the second service flow recognition rule is deleted from the forwarding plane.

[0145] If the first network device does not receive a message matching the second service flow recognition rule for a long period of time due to a reason such as switching of the primary / backup path, the first network device may age and delete the second service flow recognition rule, so as to release the hardware resources of the end node occupied by the second service flow recognition rule and avoid the hardware resources from being wasted.

[0146] Hereinafter, a message processing method provided by an embodiment of the present application will be described by way of example with reference to FIG. 1. In FIG. 1, device A is a leading node. When device A receives a first service message from a CE device outside a bearer network, device A can analyze the characteristics of the first service message to determine whether the first service message matches the first forward flow characteristic and whether the first service message matches the second forward flow characteristic. If the first service message matches both the first forward flow characteristic and the second forward flow characteristic, it determines that in situ flow detection needs to be performed on the first service message and that in situ flow detection needs to be performed on a backhaul message of the first service message.

[0147] Then, device A sequentially adds a first in situ flow detection option and an SRH after the IPv6 header of the first service message to obtain a second service message, and forwards the second service message to device C. The configuration of the first in situ flow detection option may refer to FIG. 4, in which the F flag bit and one designated bit of Ext FM Type are both 1, and the first additional information has a first reverse service flow characteristic preconfigured in device A.

[0148] In addition, device A needs to further report measurement data to the analyzer according to a detection period for the pre-configured first forward flow characteristic. The measurement data may include the number of service messages that match the first forward flow characteristic received in one detection period and a timestamp when each service message is received. The embodiment of the present application does not limit the detection period and the specific contents included in the measurement data.

[0149] After receiving the second service message, device C forwards the second service message along the path to device E, and device E forwards the second service message to device G. Device C, device E and device G can all report measurement data to the analyzer according to the first in situ flow detection option in the second service message.

[0150] After receiving the second service message, device G, which is the end node, analyzes the first in situ flow detection option contained in the second service message, and if it finds that the F flag bit is 1 and the bit specified in Ext FM Type is 1, it continues to analyze the first additional information, obtains a first reverse service flow characteristic from the first additional information, generates a first service flow recognition rule based on the first reverse service flow characteristic, and further stores the first service flow recognition rule in the forwarding plane.

[0151] In addition, device G can remove the SRH and the first in situ flow detection option in the encapsulated second service message, recover the original service message, and send the original service message to device B according to the local forwarding table.

[0152] Next, when device G receives a service message from device B, if the SRH of the service message matches the first service flow recognition rule, it encapsulates the SRH and the in situ flow detection option in the service message, and the F flag bit included in the in situ flow detection option is 0 and the bit specified in the Ext FM Type is 0.

[0153] Furthermore, the service message is transferred to device A via device E and device C in this order.

[0154] Corresponding to the above method embodiment, the present embodiment further provides a message processing device applied to the first network device. As shown in FIG. 7, the device includes: A receiving module 701 for receiving a first service message; and a sending module 702, which is used for sending a second service message to a second network device, the second service message including a first in situ flow detection option and a first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow feature, the first reverse service flow feature being used for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, the head node being a tail node of a first forward path, and the first network device and the second network device both being on the first forward path and the first reverse path.

[0155] In another embodiment of the present application, the first in situ flow detection option further includes first instruction information, and the first instruction information is for indicating whether the first in situ flow detection option includes first additional information, and when the value of the first instruction information is a first value, the first in situ flow detection option includes the first additional information, and when the value of the first instruction information is a second value, the first in situ flow detection option does not include the first additional information.

[0156] In another embodiment of the present application, the first in-situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule; When the value of the second instruction information is a first value, it instructs the head node to generate a first service flow recognition rule, and when the value of the second instruction information is a second value, it instructs the head node not to generate a first service flow recognition rule.

[0157] In another embodiment of the present application, the apparatus comprises: a matching module, which is used for matching a first service message with a first forward flow feature and a second forward flow feature, where the first forward flow feature is a feature of a forward service flow for performing in situ flow detection, and the second forward flow feature is a feature of a forward service flow corresponding to a reverse service flow for performing in situ flow detection; and an encapsulation module that, if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulates the first in situ flow detection option in an outer layer of the first service message to obtain a second service message.

[0158] In another embodiment of the present application, the encapsulation module comprises: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to a second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or If the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, the method is also used to encapsulate a third in situ flow detection option in the first service message to obtain a fourth service message, and send the fourth service message to the second network device, wherein the third in situ flow detection option includes first indication information whose value is the second value and second indication information whose value is the first value.

[0159] In another embodiment of the present application, the first reverse service flow characteristic includes an IP address and a mask for representing an IP subnet, and is for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

[0160] In another embodiment of the present application, the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, in which one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

[0161] In another embodiment of the present application, a reserved field of the first in situ flow detection option carries the first additional information.

[0162] In another embodiment of the present application, the reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

[0163] In another embodiment of the present application, the apparatus further comprises a generating module, The receiving module 701 is also used for receiving a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path; The generating module is used for generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

[0164] In another embodiment of the present application, the apparatus further comprises: a storage module for storing the second service flow recognition rule in a forwarding plane; The encapsulation module is also used, when receiving a sixth service message that conforms to the second service flow recognition rule, to encapsulate a fifth in situ flow detection option in the sixth service message and send the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device, where the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value.

[0165] In another embodiment of the present application, the apparatus further comprises: The method further includes a deletion module for deleting the second service flow recognition rule from the forwarding plane when a service message matching the second service flow recognition rule is not received within a specified period of time.

[0166] Based on the same inventive idea, as shown in Fig. 8, according to the message processing method provided by the above embodiment of the present application, the embodiment of the present application further provides a network device, which includes a processor 801, a machine-readable storage medium 802, and a transceiver 804. The machine-readable storage medium 802 stores machine-executable instructions executable by the processor 801, and the machine-executable instructions cause the processor 801 to: The method includes receiving a first service message by the transceiver 804; and sending a second service message by the transceiver 804 to a second network device, the second service message including a first in situ flow detection option and a first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, and the first reverse service flow characteristic for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path, where the head node is a tail node of a first forward path, and the first network device and the second network device are both in the first forward path and the first reverse path.

[0167] Preferably, the first in-situ flow detection option further includes first indication information, the first indication information being for indicating whether the first in-situ flow detection option includes first additional information; If the value of the first indication information is a first value, the first in-situ flow detection option includes first additional information; If the value of the first indication information is the second value, the first in situ flow detection option does not include the first additional information.

[0168] Preferably, the first in-situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule; If the value of the second indication information is a first value, instruct the head node to generate a first service flow recognition rule; When the value of the second instruction information is the second value, it instructs the head node not to generate the first service flow recognition rule.

[0169] Preferably, the machine executable instructions further include causing the processor 801 to: Matching the first service message with first forward flow features and second forward flow features, where the first forward flow features are features of a forward service flow for performing in situ flow detection, and the second forward flow features are features of a forward service flow corresponding to a reverse service flow for performing in situ flow detection; If the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulating a first in situ flow detection option in an outer layer of the first service message to obtain a second service message.

[0170] Preferably, the machine executable instructions further include causing the processor 801 to: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and transmitting the third service message to the second network device by the transceiver 804, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or If the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, the method executes: encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and transmitting the fourth service message to the second network device by the transceiver 804, wherein the third in situ flow detection option includes first indication information whose value is the second value and second indication information whose value is the first value.

[0171] Preferably, the first reverse service flow characteristic includes an IP address and a mask for representing an IP subnet, for instructing the head node to perform in situ flow detection for the reverse service flows belonging to the IP subnet.

[0172] Preferably, the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

[0173] Preferably, a reserved field of the first in situ flow detection option carries said first additional information.

[0174] Preferably, the reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

[0175] Preferably, the machine executable instructions further include causing the processor 801 to: receiving a fifth service message sent by the transceiver 804 from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path; generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic;

[0176] Preferably, the machine-executable instructions further cause the processor 801 to store the second service flow recognition rule in the forwarding plane, and when the transceiver 804 receives a sixth service message that conforms to the second service flow recognition rule, encapsulate a fifth in situ flow detection option in the sixth service message and send the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device by the transceiver 804, wherein the fifth in situ flow detection option includes first indication information and second indication information, both of which have a value of a second value.

[0177] Preferably, the machine executable instructions further include causing the processor 801 to: If the transceiver 804 does not receive a service message that matches the second service flow recognition rule within a specified period of time, the second service flow recognition rule is deleted from the forwarding plane.

[0178] As shown in Fig. 8, the electronic device may further include a communication bus 803. The processor 801, the machine-readable storage medium 802, and the transceiver 804 communicate with each other via the communication bus 803, which may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 803 may be divided into an address bus, a data bus, a control bus, etc.

[0179] The transceiver 804 may be a wireless communication module, and the transceiver 804 performs data interaction with other devices (AC and terminal) under the control of the processor 801.

[0180] The machine-readable storage medium 802 may include Random Access Memory (RAM) and / or Non-Volatile Memory (NVM), such as at least one magnetic disk memory. Note that the machine-readable storage medium 802 may be a storage device remote from the at least one processor.

[0181] The processor 801 may be a general-purpose processor including a central processing unit (CPU), a network processor (NP), etc., or may be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly.

[0182] Based on the same inventive concept, the embodiments of the present application provide a message processing method as described above, and further provide a machine-readable storage medium having machine-executable instructions executable by a processor to implement the steps of any of the message processing methods described above.

[0183] In a further embodiment provided herein, there is further provided a computer program product comprising instructions which, when executed on a computer, cause the computer to implement the steps of any of the message processing methods in the above embodiments.

[0184] In this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not require or imply any actual relationship or sequence between these entities or operations. Additionally, the terms "comprise", "include", or any other variant thereof means "comprise" in a non-exclusive sense. Thus, a process, method, product, or device that includes a set of elements does not include only those elements, but also includes other elements not expressly listed, or includes elements inherent in such process, method, product, or device. In the absence of further limitations, an element limited by a statement "including a ..." does not exclude the presence of other identical elements in the process, method, product, or device that includes the recited element.

[0185] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments may be cross-referenced, and the emphasis in each embodiment is on the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so they will be described relatively briefly, and the relevant parts may be referred to the method embodiments.

[0186] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. 1. A message processing method applied to a first network device, comprising: receiving a first service message; sending a second service message to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic being for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path; A method for processing a message, comprising: the first node being a last node of a first forward path; and the first network device and the second network device both being on the first forward path and the first reverse path.

2. The first in-situ flow detection option further includes first indication information, the first indication information being for indicating whether the first in-situ flow detection option includes first additional information; When the value of the first indication information is a first value, the first in-situ flow detection option includes the first additional information; The message processing method according to claim 1 , wherein, when the value of the first indication information is a second value, the first in-situ flow detection option does not include the first additional information.

3. The first in-situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule; If the value of the second indication information is a first value, instruct the head node to generate the first service flow recognition rule; 3. The message processing method according to claim 2, further comprising the step of: instructing the head node not to generate the first service flow recognition rule when the value of the second instruction information is a second value.

4. After receiving the first service message, the message processing method includes: Matching the first service message with first forward flow features and second forward flow features, the first forward flow features being features of a forward service flow for which in situ flow detection is performed, and the second forward flow features being features of a forward service flow corresponding to a reverse service flow for which in situ flow detection is performed; 2. The message processing method of claim 1, further comprising: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulating the first in situ flow detection option in an outer layer of the first service message to obtain the second service message.

5. After matching the first service message with the first forward flow feature and the second forward flow feature, the message processing method includes: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to the second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or 5. The message processing method of claim 4, further comprising: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and sending the fourth service message to the second network device, wherein the third in situ flow detection option includes the first indication information whose value is a second value and the second indication information whose value is a first value.

6. The message processing method according to any one of claims 1 to 5, characterized in that the first reverse service flow feature includes an IP address and a mask for representing an IP subnet, and is for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

7. 6. The message processing method of claim 5, wherein the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

8. 8. The method of claim 7, wherein a reserved field of the first in situ flow detection option carries the first additional information.

9. 9. The method of claim 8, wherein a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

10. The message processing method includes: receiving a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path; The method of claim 1 , further comprising: generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

11. After generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic, the message processing method includes: storing the second service flow recognition rule in a forwarding plane; 11. The message processing method of claim 10, further comprising: upon receiving a sixth service message that conforms to the second service flow recognition rule, encapsulating a fifth in situ flow detection option in the sixth service message and sending the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device, wherein the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value.

12. After storing the second service flow recognition rule in a forwarding plane, the message processing method includes: The message processing method of claim 11 , further comprising: deleting the second service flow-aware rule from the forwarding plane if no service message matching the second service flow-aware rule is received within a specified period of time.

13. A message processing device for use in a first network device, comprising: a receiving module for receiving a first service message; a sending module, which is used for sending a second service message to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including a first reverse service flow characteristic, the first reverse service flow characteristic being for generating a first service flow recognition rule for a head node of a first reverse path to detect an in situ flow; A message processing device, characterized in that the head node is a tail node of a first forward path, and the first network device and the second network device are both on the first forward path and the first reverse path.

14. The first in-situ flow detection option further includes first indication information, the first indication information being for indicating whether the first in-situ flow detection option includes first additional information; When the value of the first indication information is a first value, the first in-situ flow detection option includes the first additional information; The message processing device according to claim 13, characterized in that, when the value of the first indication information is a second value, the first in-situ flow detection option does not include the first additional information.

15. The first in-situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule; If the value of the second indication information is a first value, instruct the head node to generate the first service flow recognition rule; The message processing device according to claim 14, wherein, when the value of the second instruction information is a second value, the device instructs the head node not to generate the first service flow recognition rule.

16. The message processing device includes: a matching module, which is used to match the first service message with first forward flow features and second forward flow features, the first forward flow features being features of a forward service flow for performing in situ flow detection, and the second forward flow features being features of a forward service flow corresponding to a reverse service flow for performing in situ flow detection; 14. The message processing device of claim 13, further comprising: an encapsulation module that, if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulates the first in situ flow detection option in an outer layer of the first service message to obtain the second service message.

17. The encapsulation module further comprises: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and sending the third service message to the second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or 17. The message processing device of claim 16, further comprising: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and sending the fourth service message to the second network device, wherein the third in situ flow detection option includes the first indication information whose value is a second value and the second indication information whose value is a first value.

18. The message processing device according to any one of claims 13 to 17, characterized in that the first reverse service flow feature includes an IP address and a mask for representing an IP subnet, and is for instructing the leading node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

19. 18. The message processing device of claim 17, wherein the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

20. 20. The message processing apparatus of claim 19, wherein a reserved field of the first in situ flow detection option carries the first additional information.

21. 21. The message processing apparatus of claim 20, wherein a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

22. The message processing device further includes a generating module; The receiving module is also used to receive a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device are both on a second forward path and a second reverse path, and the first network device is a head node of the second reverse path; The message processing apparatus according to claim 13, wherein the generating module is adapted to generate a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

23. The message processing device further includes a storage module and an encapsulation module; The storage module is configured to store the second service flow recognition rule in a forwarding plane; 23. The message processing device of claim 22, wherein the encapsulation module is used, when receiving a sixth service message that conforms to the second service flow recognition rule, to encapsulate a fifth in situ flow detection option in the sixth service message and send the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device, and the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value.

24. The message processing device further comprises:

24. The message processing device according to claim 23, further comprising: a deletion module for deleting the second service flow-aware rule from the forwarding plane when a service message matching the second service flow-aware rule is not received within a specified period of time.

25. A network device, A processor; A transceiver; a machine-readable storage medium; The machine-readable storage medium stores machine-executable instructions executable by the processor; The machine executable instructions may be configured to cause the processor to: receiving a first service message by the transceiver; sending a second service message by the transceiver to a second network device, the second service message including a first in situ flow detection option and the first service message, the first in situ flow detection option including first additional information, the first additional information including first reverse service flow characteristics, the first reverse service flow characteristics being for generating a first service flow recognition rule for in situ flow detection by a head node of a first reverse path; A network device, characterized in that the head node is an end node of a first forward path, and the first network device and the second network device are both on the first forward path and the first reverse path.

26. The first in-situ flow detection option further includes first indication information, the first indication information being for indicating whether the first in-situ flow detection option includes first additional information; When the value of the first indication information is a first value, the first in-situ flow detection option includes the first additional information; 26. The network device of claim 25, wherein, when a value of the first indication information is a second value, the first in-situ flow detection option does not include the first additional information.

27. The first in-situ flow detection option further includes second instruction information, the second instruction information being for instructing the head node whether to generate the first service flow recognition rule; If the value of the second indication information is a first value, instruct the head node to generate the first service flow recognition rule; 27. The network device according to claim 26, wherein, when the value of the second instruction information is a second value, the network device instructs the head node not to generate the first service flow recognition rule.

28. The machine executable instructions further include causing the processor to: Matching the first service message with first forward flow features and second forward flow features, the first forward flow features being features of a forward service flow for which in situ flow detection is performed, and the second forward flow features being features of a forward service flow corresponding to a reverse service flow for which in situ flow detection is performed; 26. The network device of claim 25, further comprising: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic, encapsulating the first in situ flow detection option in an outer layer of the first service message to obtain the second service message.

29. The machine executable instructions further include causing the processor to: If the first service message matches the first forward flow characteristic and does not match the second forward flow characteristic, encapsulating a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and transmitting the third service message by the transceiver to the second network device, wherein the second in-situ flow detection option includes first indication information and second indication information, both of which have a second value; or 29. The network device of claim 28, further comprising: if the first service message matches both the first forward flow characteristic and the second forward flow characteristic and the first reverse service flow characteristic is not configured in the first network device, encapsulating a third in situ flow detection option in the first service message to obtain a fourth service message, and transmitting the fourth service message by the transceiver to the second network device, wherein the third in situ flow detection option includes the first indication information having a second value and the second indication information having a first value.

30. The network device of any one of claims 25 to 29, characterized in that the first reverse service flow feature includes an IP address and mask for representing an IP subnet, and is for instructing the head node to perform in situ flow detection for reverse service flows belonging to the IP subnet.

31. 30. The network device of claim 29, wherein the first in situ flow detection option, the second in situ flow detection option and the third in situ flow detection option all include an extended flow detection type field, a service flow direction identification field and a reserved field, wherein one bit in the extended flow detection type field carries the first indication information and the service flow direction identification field carries the second indication information.

32. 32. The network equipment of claim 31, wherein a reserved field of the first in situ flow detection option carries the first additional information.

33. 33. The network equipment of claim 32, wherein a reserved field of the first in situ flow detection option includes a TLV configuration, and a value field of the TLV configuration carries the first additional information.

34. The machine executable instructions further include causing the processor to: receiving, by the transceiver, a fifth service message sent from a third network device, the fifth service message including a fourth in situ flow detection option, the fourth in situ flow detection option including second additional information, the second additional information including a second reverse service flow characteristic, the first network device and the third network device both being on a second forward path and a second reverse path, and the first network device being a head node of the second reverse path; and generating a second service flow recognition rule for in situ flow detection based on the second reverse service flow characteristic.

35. The machine executable instructions further include causing the processor to: storing the second service flow recognition rule in a forwarding plane; 35. The network device of claim 34, characterized in that, when the transceiver receives a sixth service message that conforms to the second service flow recognition rule, the transceiver encapsulates a fifth in situ flow detection option in the sixth service message and transmits the sixth service message in which the fifth in situ flow detection option is encapsulated to the third network device by the transceiver, wherein the fifth in situ flow detection option includes first indication information and second indication information, both of which have a second value.

36. The machine executable instructions further include causing the processor to:

36. The network device of claim 35, further comprising: if the transceiver does not receive a service message matching the second service flow recognition rule within a specified period of time, the transceiver deletes the second service flow recognition rule from the forwarding plane.

37. A machine-readable storage medium having stored thereon machine-executable instructions, characterized in that when called up and executed by a processor, the machine-executable instructions cause the processor to implement steps in a message processing method according to any one of claims 1 to 12.

38. A computer program product, characterized in that when it is executed by a processor, it causes the steps of the message processing method according to any one of claims 1 to 12 to be carried out.

Citation Information

Patent Citations

  • Message detection method, network device and system

    CN111953553A

  • Packet Measurement Method, Device, and System

    US20220078106A1

  • Message detection method, device and system

    WO2020228398A1

  • Network performance measurement method, apparatus, device and system, and storage medium

    WO2021244439A1

  • In-band edge-to-edge round-trip time measurement

    WO2022115114A1