Message Processing
The message processing method in SRv6 networking automatically configures in-situ flow detection by encapsulating options in service messages, addressing the high workload and resource wastage issues in configuring backup paths, thereby optimizing network efficiency.
Patent Information
- Application Number
- JP2024535967
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-06-14
AI Technical Summary
In conventional transmission networks, configuring in-situ flow detection for backup paths in Segment Routing Internet Protocol Version 6 (SRv6) networking requires significant manual effort due to the large number of devices that need to be configured, leading to increased workload and resource wastage.
A message processing method that encapsulates in-situ flow detection options in service messages, allowing network devices to automatically obtain reverse service flow features without manual configuration on backup paths, reducing the configuration workload and resource occupation.
Automatically obtaining reverse service flow features reduces the need for manual configuration on backup paths, minimizing workload and hardware resource usage in the network.
Smart Images

Figure 0007767624000001 
Figure 0007767624000002 
Figure 0007767624000003
Abstract
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 device recognizes the control information contained in the message, it reports the information extracted from the message to the analyzer, allowing the analyzer to identify subtle network malfunctions and accurately detect performance information such as delays and packet loss for each service. This enables real-time monitoring of network quality, allowing for quick location of network faults and optimization of transmission paths.
[0003] In conventional transmission networks, backup links are typically deployed, and in order to achieve detection for forward traffic and backhaul traffic, it is necessary to locate the service flow characteristics that require detection at the head node and tail node of each backup link.
[0004] Taking 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 ingress node, and there are two transmission paths between device A and device B. The primary path is device ACEG, and 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. To measure the transmission quality of a service flow from device I to device B in the bearer network, the characteristics of that service flow must be configured in device A. To measure the transmission quality of the reverse flow of that service flow in the bearer network, the actual path the service flow takes may be affected by network quality and may change dynamically. Therefore, the characteristics of the reverse flow must be configured at each end 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, resulting in a large configuration workload. Summary of the Invention
[0005] The purpose of the present embodiment is to provide message processing that reduces the workload of configuration. The specific technical solutions are as follows:
[0006] In a first aspect, the present embodiment 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 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 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, which indicates 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, which is 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, instructs the head node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructs 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 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 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 feature and the second forward flow feature, the method 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 display 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 further includes 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 second reverse service flow characteristics, 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 the 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 characteristics.
[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 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.
[0017] In one possible embodiment, after storing the second service flow recognition rule in the forwarding plane, the method includes: The method further includes deleting the second service flow recognition rule from the forwarding plane if no service message matching the second service flow recognition rule is received within a specified period of time.
[0018] In a second aspect, an embodiment of the present invention provides a message processing device applied to a first network device. The device comprises: The network device 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 first reverse service flow characteristics, and the first reverse service flow characteristics 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.
[0019] In one possible embodiment, the first in-situ flow detection option further includes first instruction information, which indicates 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, which is 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, instructs the head node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructs the head node not to generate the first service flow recognition rule.
[0021] In one possible embodiment, the device further includes a matching module used to match 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 that, if the first service message matches both the first forward flow features and the second forward flow features, encapsulates the first in situ flow detection option in an outer layer of the first service message 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, encapsulate a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and send 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, 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 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, 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.
[0026] In one possible embodiment, the apparatus further includes a generating module, and 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 second reverse service flow characteristics, 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, 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 characteristics.
[0027] In one possible embodiment, the device further includes a storage module that stores 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 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 no service message matching the second service flow recognition rule is received within a specified period of time.
[0029] In a third aspect, an embodiment of the present invention provides a network device, the network device comprising: The system includes a processor, a transceiver, and a machine-readable storage medium, the machine-readable storage medium having stored thereon machine-executable instructions executable by the processor, 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 first reverse service flow characteristics, the first reverse service flow characteristics 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 on 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, which indicates 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, which is for instructing the leading node whether to generate the first service flow recognition rule, and when the value of the second instruction information is a first value, instructs the leading node to generate the first service flow recognition rule, and when the value of the second instruction information is a second value, instructs the leading 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 direct 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 If the first service message matches both the first forward flow feature and the second forward flow feature and the first reverse service flow feature is not configured in the first network device, the method further 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, 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 direct 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 second reverse service flow characteristics, 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 the 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 characteristics.
[0039] In one possible embodiment, the machine-executable instructions may direct 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 transmitting 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 direct the processor to: The method further comprises deleting the second service flow recognition rule from the forwarding plane if the transceiver does not receive a service message that matches the second service flow recognition rule 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 that, when invoked and executed by a processor, cause the processor to implement the 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 including instructions that, when executed on a computer, cause the computer to perform the method steps of the message processing method described 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 transmit a second service message including the first service message and the first in-situ flow detection option. The first in-situ flow detection option includes first indication information and first additional information, so that when the tail node receives the second service message, it 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. 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, thereby reducing the configuration workload. [Brief explanation 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 will be briefly described below. Of course, the drawings described below are only a part of the embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without any creative work. [Figure 1] FIG. 1 is a schematic diagram of the SRv6 networking configuration provided by the background art. [Figure 2]FIG. 2 is an exemplary schematic diagram of an in situ flow detection network configuration provided by the present embodiment. [Figure 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 the in situ flow detection option provided by the present embodiment. [Figure 5a] FIG. 5a is a schematic diagram showing the configuration of additional information provided in the embodiment of the present invention. [Figure 5b] FIG. 5b is a schematic diagram showing the structure of other 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 invention. [Figure 8] FIG. 8 is a schematic diagram of the configuration of a network device provided in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0045] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention 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 present invention, and are not all of the present invention. Based on the present invention, all other embodiments that can be obtained by a person skilled in the art without creative efforts fall within the scope of protection of the present invention.
[0046] For ease of understanding, the relevant concepts related to the present embodiment 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 each device in the in-situ flow detection networking recognizes the in-situ flow detection data contained in the service message, and then can report measurement data to the analyzer based on the in-situ flow detection data.
[0048] As shown in Figure 2, Figure 2 is an exemplary schematic diagram of the configuration of an in-situ flow detection network provided by an embodiment of the present application, where the in-situ flow detection networking includes a leading node, multiple intermediate nodes, and a trailing node. Figure 2 exemplarily shows two intermediate nodes, intermediate node 1 and intermediate node 2, respectively. Intermediate node 1 cannot detect in-situ flow, while intermediate node 2 can detect in-situ flow.
[0049] When the head node receives an actual service flow and determines that in situ flow detection is required for the service flow, it 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 in situ flow detection data to the intermediate node 1 connected to it. Since the intermediate node 1 cannot perform in situ flow detection, it forwards the service flow directly 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, it 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 to aggregate and calculate the received measurement data. The analyzer and the in-situ flow detection device all implement a clock synchronization protocol, and in Figure 2, the clocks between the analyzer, the head node, the intermediate node 2, and the tail node are synchronized.
[0053] Figure 2 shows an example of an in-situ flow detection network. When the network is deployed, backup links may be further deployed to improve network reliability. That is, the in-situ flow detection network may include devices A, C, D, E, F, G, and H in Figure 1. Device A in Figure 1 is the head node, devices G and H are tail nodes, devices A, G, and H are all provider edge (PE) devices, devices C, D, E, and F may be PE devices or P devices, where provider (P) devices are network core devices, and devices I and B are customer edge (CE) devices. These devices can send measurement data to an analyzer according to the in-situ flow detection data carried by the service flow.
[0054] The devices in FIG. 1 and the nodes in FIG. 2 may be network devices such as switches or routers.
[0055] In the present embodiment, the number of backup paths in the in-situ flow detection network is not limited to one. For example, if multiple paths serve as backups for each other, multiple tail nodes exist. Placing backward flow features that require in-situ flow detection for each of the multiple tail nodes increases the amount of work required for placement.
[0056] In addition, the backward 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 backward flow based on the backward flow features. In this way, the backward flow features occupy the hardware resources of the end node.
[0057] Because the reverse flow only passes through one of the backup paths, i.e., because the reverse flow does not pass through other backup paths, the reverse flow features located at the end nodes of other backup paths are unused. These reverse flow features cannot be deleted even if they are not used, and occupy hardware resources at the end nodes. The more backup paths or reverse flow features there are, the more hardware resources are wasted in the bearer network. If there are not enough hardware resources, other services that require them cannot request them and cannot be deployed successfully.
[0058] 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, wherein the second service message includes a first in-situ flow detection option and a first service message, wherein the first in-situ flow detection option includes first additional information, wherein the first additional information includes first reverse service flow characteristics, and wherein the first reverse service flow characteristics are for generating a first service flow recognition rule for in-situ flow detection by a head node of the first reverse path, wherein the head node is a 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.
[0059] In this 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, and the first in-situ flow detection option including first indication information and first additional information, so that when the end node of the first forward path receives the second service message, it 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 because 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, thereby reducing the configuration workload.
[0060] The message processing method provided in the embodiment of the present invention will be described in detail below.
[0061] As shown in Figure 3, an embodiment of the present invention provides a message processing method applied to a first network device, which 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 Figure 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 first reverse service flow characteristics, the first reverse service flow characteristics for generating a first service flow recognition rule for in-situ flow detection by the 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 the path from device G to device A in FIG. 1, and accordingly the first forward path may be the path from device A to device G, with device G being the first node of the first reverse path and 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 Figure 1, and accordingly the first forward path may be a path from device A to device H, with device H being the first node of the first reverse path and device H being 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 this 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, in an 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 encapsulating the SRH and the first in situ flow detection option to the second network device. 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 first reverse path from a head node to a tail node. The first reverse service flow feature may be information for reflecting traffic features requiring in-situ flow detection, such as a message 5-tuple, a source Internet Protocol (IP) address and source port number, or a destination IP and 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 tail 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] In this 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 tail node of the first forward path receives the second service message, it can obtain the first reverse service flow feature included in the first additional information. In this way, the tail node of the currently used path can automatically obtain the first reverse service flow feature. Because 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, thereby reducing the configuration workload.
[0076] In one embodiment, the first in situ flow detection option further includes second instruction information, and 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 instruction information is the first value, the first instruction information instructs the head node to generate a first service flow recognition rule.
[0079] If 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 this embodiment, a first network device is pre-configured with a first forward flow feature and a second forward flow feature. The first forward flow feature is a feature of a forward service flow for which in-situ flow detection is performed, and the second forward flow feature is a feature 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 feature, it is necessary to perform in-situ flow detection on the message. If the message also matches the second forward flow feature, 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 part of a service flow that satisfies the first forward flow characteristic also 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 configured 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 first forward flow feature and each set of second forward flow feature, respectively. In this embodiment, the matching process of one set of first forward flow feature and one set of 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, which 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] To transmit the first service message in an SRv6 network, it is necessary to further encapsulate the SRH in the outer layer of the first service message, i.e., the second service message includes the first service message, the first in-situ flow detection option, and the SRH.
[0088] The first indication information and the second indication information included in the first in-situ flow detection option both 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 multiple sets of first reverse service flow features corresponding to the second forward flow features, and the first in situ flow detection option may accordingly include multiple sets of first additional information. For example, if in situ flow detection needs to be performed on a reverse flow with a source IP address and a source port of 1, and if in situ flow detection needs to be performed on a reverse flow with a destination IP address of 2 and a destination port of 2, one set of first reverse service flow features includes the source IP address and the source port of 1, and another set of first reverse service flow features includes the destination IP address of 2 and the destination port of 2. Thus, the first in situ flow detection option includes two sets of first additional information, and each of the first additional information includes one set of 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 but 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, in situ flow detection needs to be performed on the first service message, so 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 characteristics, there is no need to perform in situ flow detection for the reverse service flow corresponding to the first service message, i.e., the last 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 to indicate that the last node of the first forward path does not need to generate the first service flow recognition rule.
[0095] To transmit the first service message in an SRv6 network, it is necessary to further encapsulate the SRH in the outer layer of the first service message, i.e., 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 that in situ flow detection also needs to be performed for the reverse 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 creation of the first service flow recognition rule.
[0099] Because 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 the 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 the first service flow recognition rule based on the 5-tuple of the first service message, eliminating the need to manually configure the reverse service flow feature in the tail node and the need to manually configure reverse flow features in tail nodes of other backup paths, thereby reducing the configuration workload. Furthermore, the hardware resources of the tail nodes of other backup paths are not occupied, thereby reducing the hardware resource occupation in the bearer network.
[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 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 characteristics and reverse service flow characteristics of some service flows may be asymmetric. For example, the source port of the forward service flow may differ from the destination port of the reverse service flow, or the source IP address of the forward service flow may differ from the destination IP address of the reverse service flow. In this case, the terminating node cannot directly generate the reverse service flow characteristics according to the 5-tuple of the forward service flow. Therefore, in this embodiment, a first reverse service flow characteristic may be configured in the first network device in advance, and the first network device may include the first reverse service flow characteristic in the first additional information of the first in situ flow detection option. Furthermore, the terminating node may generate a first service flow recognition rule based on the first reverse service flow characteristic included in the first additional information. In this way, even if the 5-tuple of the reverse service flow and the 5-tuple of the forward service flow are asymmetric, the terminating node can accurately generate the first service flow recognition rule. This reduces the configuration workload and ensures the accuracy of the first service flow recognition rule generated by the terminating 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 include an extended flow detection type field, a service flow direction identification field, and a reserved field. One bit in the extended flow detection type field carries first indication information, and the service flow direction identification field carries second indication information. In any of the in-situ flow detection options, a first value of the first indication information indicates that the in-situ flow detection option includes first additional information, and a second value of the first indication information indicates that the in-situ flow detection option does not include first additional information. Furthermore, in any of the in-situ flow detection options, a first value of the second indication information instructs the head node of the reverse path to generate a service flow recognition rule, and a second value of the second indication information instructs the head node of the reverse 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] Optional Data Length (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 a 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, which carries second instruction information. If the value is 1, it instructs the head node of the first reverse path to generate the first service flow recognition rule. If 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 used to represent the detection type, which includes end-to-end detection and hop-by-hop detection.
[0115] The Extension Flow Monitor Type (Ext FM Type) field may be coded in the form of a bitmap. In this embodiment, the Ext FM Type may carry first indication information in one reserved bit to indicate whether the in situ flow detection option has first additional information including first reverse service flow characteristics. For example, the first indication information may be carried by occupying the 13th reserved bit. A value of 1 in this bit indicates that the option has first additional information including first reverse service flow characteristics, and a value of 0 in this bit indicates that the option does not have first additional information including first reverse service flow characteristics.
[0116] Taking Figure 4 as an example of the first in situ flow detection option, the 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 the 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] All of the additional information in the present embodiment is in TLV format, and as shown in Figure 5a, Type indicates the type of additional data. For example, if Type = 1, it indicates that the additional data is the first reverse service flow feature.
[0118] The Length indicates the length of the additional data, and the Value indicates the details of the additional data, that is, the first reverse service flow feature.
[0119] For example, as shown in Figure 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 for representing the first reverse service flow feature may be included, but this embodiment 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] Furthermore, if in situ flow detection is required for reverse service flows in the same IP subnet, the tail node of the first forward path must generate a first service flow recognition rule for each IP address in the subnet, which wastes a lot of hardware resources. For example, if the IP subnet for which in situ flow detection is required contains 100 IP addresses, the tail node must generate a first service flow recognition rule for each IP address in the 100 IP addresses after receiving a service message for each IP address. In this way, 100 rules must be generated and distributed to the hardware data forwarding plane, occupying a lot of hardware resources.
[0121] In this embodiment, the first reverse service flow feature configured in the first network device includes an IP address and a mask representing an IP subnet, and is used to instruct the head node of the first reverse path to perform in situ flow detection for reverse service flows belonging to the IP subnet. Thus, when the first network device determines that in situ flow detection is required for reverse service flows belonging to the same IP subnet, the first reverse service flow feature added to the first in situ flow detection option includes the IP address and a mask representing the IP subnet. Furthermore, the head node of the first reverse path can generate a first service flow recognition rule for the IP subnet and mask, thereby realizing in situ flow detection for reverse flows belonging to the IP subnet and reducing the occupation of hardware resources.
[0122] In the above embodiment, the first network device is the head node of the first forward path. In addition, the first network device may be the tail node of another forward path. In this scenario, as shown in FIG. 6, the method includes the following steps:
[0123] S601: 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, 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 transfer direction in the second forward path is from the third network device to the first network device, the service flow transfer 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, Device A is the first network device, and Device A is both the last node of the second forward path and the first 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 feature.
[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 on service messages that match the second reverse service flow characteristics.
[0129] According to 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 characteristics 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 characteristics. 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, eliminating the need to manually configure the second reverse service flow characteristics at the tail node and eliminating the need to manually configure the second reverse service flow characteristics for other unused backup paths, thereby reducing the amount of configuration work.
[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 five-tuple of the fifth service message, the first network device can accurately generate the second service flow recognition rule even if the five-tuple of the fifth service message and the backhaul message are asymmetric.
[0131] In the above S602, after generating the 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 the 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 Figure 4, where the second indication information may be the value of the F field in Figure 4, and 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 Figure 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 the second forward path and at the same time the head node of the 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. The 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 second indication information.
[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 indicator information contained in 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 perform step 5.
[0140] Step 4: Generate a service flow recognition rule based on 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 from 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 further needs to delete the SRH extension header included in the fifth service message, and then forward the original fifth service message in which the SRH header is not encapsulated.
[0144] To further avoid occupying too much 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 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.
[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 reasons such as switching between primary and backup paths, the first network device may age and delete the second service flow recognition rule to release the hardware resources of the end node occupied by the second service flow recognition rule and avoid wasting the hardware resources.
[0146] Hereinafter, a message processing method provided by an embodiment of the present application will be described by way of example with reference to Figure 1. In Figure 1, device A is a leading node. When device A receives a first service message from a CE device outside the bearer network, it can analyze the characteristics of the first service message to determine whether the first service message matches the first forward flow characteristics and whether it matches the second forward flow characteristics. If the first service message matches both the first forward flow characteristics and the second forward flow characteristics, 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 can be seen in FIG. 4, where the F flag bit and one designated bit of Ext FM Type are both set to 1, and the first additional information includes the first reverse service flow characteristics preconfigured in device A.
[0148] In addition, device A may further report measurement data to the analyzer according to a detection period for the preconfigured first forward flow characteristic. The measurement data may include the number of service messages matching the first forward flow characteristic received in one detection period and a timestamp when each service message is received. The present embodiment does not limit the detection period and the specific content 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, the device G, which is the end node, analyzes the first in situ flow detection option included in the second service message. 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 first reverse service flow characteristics from the first additional information, generates a first service flow recognition rule based on the first reverse service flow characteristics, and 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] Subsequently, when device G receives a service message from device B, if the SRH of the service message matches the first service flow recognition rule, device G 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 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 a receiving module 701 for receiving a first service message; and a sending module 702, which is used to send 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 to generate 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, and the second instruction information is for instructing the head node whether to generate the first service flow recognition rule; If the value of the second instruction information is a first value, it instructs the leading node to generate a first service flow recognition rule, and if the value of the second instruction information is a second value, it instructs the leading 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 to match 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; 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 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, and 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: A deletion module is included, which deletes the second service flow recognition rule from the forwarding plane if no service message matching the second service flow recognition rule is received within a specified period of time.
[0166] Based on the same inventive idea, as shown in Figure 8, in accordance with the message processing method provided by the 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 first reverse service flow characteristics, and the first reverse service flow characteristics 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 on the first forward path and the first reverse path.
[0167] Preferably, the first in-situ flow detection option further includes first indication information, and the first indication information is 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, and the second instruction information is for instructing the head node whether to generate the first service flow recognition rule; If the value of the second indication information is the first value, instruct the head node to generate a first service flow recognition rule; If 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 instruct 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 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; If the first service message matches both the first forward flow characteristic and the second forward flow characteristic, a first in-situ flow detection option is encapsulated in the outer layer of the first service message to obtain a second service message.
[0170] Preferably, the machine executable instructions further instruct 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 feature and the second forward flow feature and the first reverse service flow feature is not configured in the first network device, the method executes the following: 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 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 instruct 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 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; 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 second value.
[0177] Preferably, the machine executable instructions further instruct 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] 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), non-volatile memory (NVM), such as at least one magnetic disk memory, or 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 as the message processing method provided by the above-mentioned embodiment of the present application, the embodiment of the present application also provides a machine-readable storage medium storing machine-executable instructions executable by a processor to implement the steps of any of the above-mentioned message processing methods.
[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] It should be noted that, in this context, 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 order between those entities or operations. Furthermore, the terms "comprise," "include," "includes," or any other variant thereof, mean "comprise" in an inclusive sense. Thus, a process, method, product, or device comprising a set of elements does not include only those elements, but also other elements not expressly listed, or elements inherent in such process, method, product, or device. Absent further limitations, an element limited by a phrase "comprising ..." does not exclude the presence of other identical elements in a process, method, product, or device that includes the recited element.
[0185] The embodiments in this specification are described in a related manner, and the same or similar parts between the embodiments may be cross-referenced. 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 in the method embodiments.
[0186] The above description is only a 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 method of message processing performed by 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 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; the head node is a tail node of a first forward path, the first network device and the second network device are both on the first forward path and the first reverse path, After receiving the first service message, the message processing method includes: Matching the first service message with first and second forward flow features, wherein 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; The message processing method further comprises, 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.
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, wherein when the value of the second instruction information is a second value, the head node is instructed not to generate the first service flow recognition rule.
4. 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, encapsulate a second in-situ flow detection option in an outer layer of the first service message to obtain a third service message, and send 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 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 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.
5. The message processing method of any one of claims 1 to 4, 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 head node to perform in situ flow detection for reverse service flows belonging to the IP subnet.
6. 5. The message processing method of claim 4, 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.
7. 7. The message processing method of claim 6, wherein a reserved field of the first in-situ flow detection option carries the first additional information.
8. 8. The message processing method of claim 7, 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.
9. 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 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; The message processing 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 characteristics.
10. After generating a second service flow recognition rule for in-situ flow detection based on the second reverse service flow characteristics, the message processing method includes: storing the second service flow recognition rule in a forwarding plane; 10. The message processing method of claim 9, 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.
11. After the second service flow recognition rule is stored in the forwarding plane, the message processing method includes:
11. The message processing method of claim 10, 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.
12. A message processing device applied to a first network device, a receiving module for receiving a first service message; a sending module, which is used to send 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 first reverse service flow characteristics, the first reverse service flow characteristics 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 is a tail node of a first forward path, the first network device and the second network device are both on the first forward path and the first reverse path, 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, wherein 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 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.
13. 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 12, 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.
14. 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; 14. The message processing device according to claim 13, 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.
15. 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 13. The message processing device of claim 12, wherein, 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 device is 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 the first indication information whose value is a second value and the second indication information whose value is a first value.
16. The message processing device according to any one of claims 12 to 15, 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 head node to perform in situ flow detection for reverse service flows belonging to the IP subnet.
17. 16. The message processing device of claim 15, 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.
18. 18. The message processing device of claim 17, wherein a reserved field of the first in-situ flow detection option carries the first additional information.
19. 20. The message processing device according to claim 18, 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.
20. 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 device according to claim 12, wherein the generating module is used to generate a second service flow recognition rule for in-situ flow detection based on the second reverse service flow characteristics.
21. 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; 21. The message processing device of claim 20, 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.
22. The message processing device further comprises:
22. The message processing device of claim 21, further comprising: a deletion module that deletes 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.
23. a network device, the network device being a first network device; a processor; A transmitter / receiver, a machine-readable storage medium; The machine-readable storage medium stores machine-executable instructions that are executable by the processor; The machine-executable instructions may 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; the head node is a tail node of a first forward path, the first network device and the second network device are both on the first forward path and the first reverse path, The machine-executable instructions further cause the processor to: Matching the first service message with first and second forward flow features, wherein 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 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.
24. 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; 24. The network device of claim 23, 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.
25. 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; 25. The network device according to claim 24, 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.
26. The machine-executable instructions further 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 24. The network device of claim 23, 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 to the second network device by the transceiver, 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.
27. The network device of any one of claims 23 to 26, 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 head node to perform in situ flow detection for reverse service flows belonging to the IP subnet.
28. 27. The network device of claim 26, 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.
29. 30. The network equipment of claim 28, wherein a reserved field of the first in situ flow detection option carries the first additional information.
30. 30. The network equipment of claim 29, 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.
31. The machine-executable instructions further cause the processor to: 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 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 characteristics.
32. The machine-executable instructions further cause the processor to: storing the second service flow recognition rule in a forwarding plane; 32. The network device of claim 31, wherein 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, wherein the fifth in-situ flow detection option includes first indication information and second indication information, both of which have a second value.
33. The machine-executable instructions further cause the processor to:
33. The network device of claim 32, further comprising: if the transceiver does not receive a service message that matches 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.
34. A machine-readable storage medium having stored thereon machine-executable instructions, the machine-executable instructions, when called and executed by a processor, causing the processor to implement steps in a message processing method according to any one of claims 1 to 4 and 6 to 11.
35. A computer program causing a processor to implement the steps of the message processing method according to any one of claims 1 to 4 and 6 to 11.
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