A message detection method, device and system
By adding reverse detection indication information to the forward message flow, the detection of the two-way message flow is realized, solving the problem that bidirectional traffic detection requires two deployments in the prior art, reducing the workload and difficulty.
Patent Information
- Application Number
- CN202210199430.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-16
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2039-05-16
AI Technical Summary
The prior art requires two deployments when detecting bidirectional traffic, which is huge in work and difficult to achieve.
By adding reverse detection indication information to the forward message stream, the network device receiving the message is instructed to detect the reverse message stream, thereby realizing the detection of the bidirectional message stream in one detection deployment.
It reduces the workload of detection and deployment, reduces the difficulty of detection and deployment, and realizes efficient detection of bidirectional message flow.
Smart Images

Figure CN114553746B_ABST
Abstract
Description
[0001] This application is a divisional application of an application filed with the China Intellectual Property Office on May 16, 2019, with application number 201910406320.X and invention name “A method, device and system for detecting a message”. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a message detection method, device and system. Background Art
[0003] Inband operation, administration and maintenance (IOAM) is a method of detecting the status of a network transmission path along with the flow. This method adds an IOAM header containing detection information to each message at the ingress node of the detection domain, and the IOAM header is transmitted along with the message flow. The IOAM header is updated at the intermediate node of the transmission path and relevant information is added. All IOAM headers are collected at the egress node of the detection domain and reported to the centralized controller. The centralized controller analyzes the reported data to derive the network quality. However, this method requires detection deployment for each detection domain, and one deployment is only for unidirectional traffic. If bidirectional traffic is detected, two deployments are required, which is a huge workload and difficult to implement. Summary of the invention
[0004] The embodiments of the present application provide a message detection method, device and system, which solve the problem that two deployments are required when detecting bidirectional traffic, which results in a huge workload and great difficulty in implementation.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting a message. The method comprises: a network device obtains reverse detection indication information, wherein the reverse detection indication information is used to indicate detection of a reverse message flow of a first message flow; after receiving the first message flow, the network device adds the reverse detection indication information to a message of the first message flow; and the network device sends the message carrying the reverse detection indication information along a forwarding path of the first message flow.
[0006] By adopting the above method, the network device adds reverse detection indication information to the message of the first message flow, instructing the network device receiving the message, such as the tail node, to detect the reverse message flow of the first message flow. Through a one-time detection deployment, the detection of the bidirectional message flow is realized, the workload of the detection deployment is reduced, and the difficulty of the detection deployment is reduced.
[0007] In one possible design, the method further includes: the network device adds the identifier of the first message flow to the message at the first port, the first port is the port of the network device receiving the first message flow; the network device identifies the message according to the identifier of the first message flow at the second port, and detects the message, the second port is the port of the network device sending the first message flow. The first message flow to be detected is marked with the identifier of the first message flow, and the message to be detected is subsequently identified by the identifier of the first message flow. Compared with identifying the message to be detected by IP address, it can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0008] In one possible design, the method further includes: the network device adds the reverse detection indication information and the identifier of the first message flow to the bottom label of the label stack of the message at the second port. In an MPLS network, encapsulating the label containing the reverse detection indication information and the identifier of the first message flow at the bottom of the MPLS label stack does not affect the message forwarding by each network device on the message transmission path according to the top label.
[0009] In a second aspect, an embodiment of the present application provides a method for detecting a message. The method comprises: a network device receives a first message flow, wherein the message of the first message flow includes reverse detection indication information; the network device detects a second message flow according to the indication of the reverse detection indication information, wherein the second message flow is a reverse message flow of the first message flow.
[0010] By adopting the above method, the network device parses the reverse detection indication information in the message of the first message flow, and detects the reverse message flow of the first message flow according to the indication of the reverse detection indication information. Through a one-time detection deployment, the detection of the bidirectional message flow is realized, which reduces the workload of the detection deployment and reduces the difficulty of the detection deployment.
[0011] In one possible design, the method further includes: the network device adds the identifier of the second message flow to the message of the second message flow at the second port, and the second port is the port of the network device receiving the second message flow; the network device identifies the message of the second message flow according to the identifier of the second message flow at the first port, and detects the message of the second message flow, and the first port is the port of the network device sending the second message flow. The second message flow to be detected is marked with the identifier of the second message flow, and the message to be detected is subsequently identified by the identifier of the second message flow. Compared with identifying the message to be detected by IP address, it can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0012] In one possible design, the method further includes: the network device adds the identifier of the second message flow to the bottom label of the label stack of the message of the second message flow at the first port. In an MPLS network, encapsulating the label containing the identifier of the second message flow at the bottom of the MPLS label stack does not affect the message forwarding by each network device on the message transmission path according to the top label of the stack.
[0013] In a third aspect, an embodiment of the present application provides a method for detecting a message. The method includes: a network device receives a message of a first message flow; the network device adds an identifier of the first message flow to the message at a first port, and detects the message, the first port is a port at which the network device receives the first message flow; the network device identifies the message according to the identifier of the first message flow at a second port, and detects the message, the second port is a port at which the network device sends the first message flow.
[0014] By adopting the above method, the first message flow to be detected is marked by the identifier of the first message flow, and the message to be detected is subsequently identified by the identifier of the first message flow. Compared with identifying the message to be detected by IP address, this method can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0015] In one possible design, the method further includes: the network device adds the identifier of the first message flow to the bottom label of the label stack of the message at the second port. In an MPLS network, encapsulating the label containing the identifier of the second message flow at the bottom of the MPLS label stack does not affect the message forwarding by each network device on the message transmission path according to the top label.
[0016] In one possible design, the method further includes: the network device generates first ingress statistical information at the first port; the network device generates first egress statistical information at the second port; and the network device sends the first ingress statistical information and the first egress statistical information to a controller. The network device performs two message detections at two ports respectively to obtain two sets of detection data, which is conducive to improving detection accuracy. For example, in packet loss detection, by comparing the message count values at the two ports, the packet loss condition occurring inside the network device can be found.
[0017] In one possible design, the method further includes: the network device sends the identifier of the first message flow and the identification information of the network device to the controller, and the identifier of the first message flow is used to instruct the controller to calculate the detection result of the first message flow at the network device according to the first inlet statistical information and the first outlet statistical information. Each network device on the message transmission path can report the statistical information generated by message detection to the controller. The hop-by-hop reporting method of statistical information makes the amount of reported data small, which is convenient for long-term detection of message flows. The reported statistical message includes the identifier of the message flow and the identification information of the network device, so that the controller can accurately calculate the message transmission status at each network device, which is convenient for network maintenance.
[0018] In a fourth aspect, an embodiment of the present application provides a network device that executes the method executed by the network device in the first aspect or any possible implementation of the first aspect. Specifically, the network device includes a unit for executing the method in the first aspect or any possible implementation of the first aspect.
[0019] In a fifth aspect, an embodiment of the present application provides a network device that executes the method executed by the network device in the second aspect or any possible implementation of the second aspect. Specifically, the network device includes a unit for executing the method in the second aspect or any possible implementation of the second aspect.
[0020] In a sixth aspect, an embodiment of the present application provides a network device that executes the method executed by the network device in the third aspect or any possible implementation of the third aspect. Specifically, the network device includes a unit for executing the method in the third aspect or any possible implementation of the third aspect.
[0021] In a seventh aspect, an embodiment of the present application provides a network device, the network device comprising: a processor, a network interface and a memory. The network interface may be a transceiver. The memory may be used to store program code, and the processor is used to call the program code in the memory to execute the method in the aforementioned first aspect or any possible implementation of the first aspect, which will not be repeated here.
[0022] In an eighth aspect, an embodiment of the present application provides a network device, the network device comprising: a processor, a network interface and a memory. The network interface may be a transceiver. The memory may be used to store program code, and the processor is used to call the program code in the memory to execute the method in the aforementioned second aspect or any possible implementation of the second aspect, which will not be repeated here.
[0023] In a ninth aspect, an embodiment of the present application provides a network device, the network device comprising: a processor, a network interface and a memory. The network interface may be a transceiver. The memory may be used to store program code, and the processor is used to call the program code in the memory to execute the method in the aforementioned third aspect or any possible implementation of the third aspect, which will not be repeated here.
[0024] In the tenth aspect, an embodiment of the present application provides a network system, which includes the network device provided by the fourth aspect and the network device provided by the fifth aspect, or the system includes the network device provided by the seventh aspect and the network device provided by the eighth aspect.
[0025] In a tenth aspect, an embodiment of the present application provides a computer storage medium for storing computer software instructions used for the above-mentioned network device, which includes programs for executing the above-mentioned aspects.
[0026] In the eleventh aspect, a computer program product including computer program instructions is provided. When the computer program product runs on a network device, the network device executes the method provided in the first aspect, the second aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, or any possible implementation of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of a network scenario provided for an embodiment of the present application.
[0028] Figure 2 A flow chart of a message detection method provided in an embodiment of the present application.
[0029] Figure 3 A flow chart of a message detection method provided in an embodiment of the present application.
[0030] Figure 4 A schematic diagram of the structure of a network device provided in an embodiment of the present application.
[0031] Figure 5 A schematic diagram of the structure of a network device provided in an embodiment of the present application.
[0032] Figure 6 A schematic diagram of the structure of a network device provided in an embodiment of the present application.
[0033] Figure 7 A schematic diagram of the structure of another network device provided in an embodiment of the present application.
[0034] Figure 8 A schematic diagram of the structure of another network device provided in an embodiment of the present application.
[0035] Fig. 9 A schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0037] Figure 1 A possible application scenario of an embodiment of the present application is shown. The application scenario includes a layer 3 virtual private network (L3VPN) based on multiprotocol label switching (MPLS). MPLS L3VPN has the characteristics of flexible networking and good scalability. It can easily support MPLS quality of service (QoS) and MPLS traffic engineering (TE), and is usually used in service provider networks. The network includes a controller and multiple nodes, and the multiple nodes are connected by network links for transmitting message flows. Figure 1 As shown, external node 1, node A, node B, node C, node D, node E and external node 2 are connected in sequence through network links. For example, node A and node E can be provider edge (PE) devices in the network, which are directly connected to user edge (CE) devices external node 1 and external node 2 respectively, wherein external node 1 can be a core network device and external node 2 can be a wireless base station. Message flows in different directions can be transmitted in the network. For example, a first message flow is transmitted from node A to node E, and a second message flow is transmitted from node E to node A. The two message flows are in opposite directions. The first message flow can be defined as a forward message flow, and the second message flow is a reverse message flow relative to the forward message flow.
[0038] The embodiment of the present application realizes the detection of the network transmission path status in MPLS L3VPN through the inband flow information telemetry (IFIT) method. In this method, by detecting the message flow actually transmitted in the network, collecting and analyzing the detection data, the network transmission path status information can be obtained.
[0039] The method first determines the detection domain of the message flow to be detected. The detection domain is determined by the controller according to the transmission path of the message flow to be detected. In a possible implementation, the network management device or the user device sends the device information of the transmission path of the message flow to be detected to the controller, and the device information includes the first node device identifier and the tail node device identifier of the transmission path of the message flow to be detected. The controller can receive the device information through, for example, a northbound interface (NBI). In another possible implementation, the controller determines the first node device identifier and the tail node device identifier of the transmission path of the message flow to be detected according to a predetermined control strategy. The controller can obtain the topology of a network including multiple network devices, so that the controller determines the first node device identifier and the tail node device identifier of the transmission path of the message flow to be detected according to the topology of the network. For example, the predetermined control strategy is to collect detection information and perform performance detection on the transmission path between the forwarding devices included in the data center (DC). The controller determines the first node device identifier and the tail node device identifier of the transmission path of the message flow to be detected according to the topology of the DC. The controller determines the detection domain according to the first node device identifier and the tail node device identifier, and the detection domain includes all network devices on the transmission path of the message flow to be detected. The entry node device of the detection domain is the first node device of the transmission path, and the exit node device of the detection domain is the tail node device of the transmission path. After determining the detection domain, detection deployment needs to be performed at the entry node of the detection domain so that each node on the transmission path can start to detect the message flow.
[0040] like Figure 1 As shown, for the first message flow, the transmission path of the first message flow is from node A to node E via node B, node C, node D, and the corresponding detection domain includes node A, node B, node C, node D, and node E. Node A is the entry node of the detection domain, and node E is the exit node of the detection domain. For the second message flow, the second message flow is the reverse message flow of the first message flow. The detection domain of the second message flow also includes node A, node B, node C, node D, and node E. At this time, node E is the entry node of the detection domain, and node A is the exit node of the detection domain. For the detection of the first message flow, detection deployment needs to be performed at node A, and for the detection of the second message flow, detection deployment needs to be performed at node E. It can be seen that for the two message flows in opposite directions, two detection deployments are required. However, the efficiency of performing detection deployment on both sides is low, and the difficulty of the work may vary greatly. Combined with Figure 1In the application scenario shown, node A and node E can be PEs. Node A is connected to the core network device, and node E is connected to a wireless base station. The core network is usually connected to multiple wireless base stations. For example, if a core network is connected to 3,000 wireless base stations, the detection deployment at node E may need to be performed on a large number of scattered devices, which is difficult.
[0041] The embodiments of the present application provide a method for detecting a message and a network node and a system based on the method. These methods, network nodes and systems are based on the same inventive concept. The principles of solving problems by the methods, network nodes and systems are similar. Therefore, the embodiments of the methods, network nodes and systems can refer to each other, and the same or similar parts will not be repeated.
[0042] See also Figure 2 , Embodiment 1 of the present application provides a method for detecting a message. By adding reverse detection indication information to the detection information carried by the forward message flow, the egress node of the forward message flow detection domain is instructed to automatically generate a reverse detection rule, and the reverse message flow is continued to be detected, thereby realizing the detection of bidirectional traffic through a one-time detection deployment, improving deployment efficiency, and reducing deployment difficulty. The method includes the following contents.
[0043] S210, the network device 201 obtains reverse detection indication information, where the reverse detection indication information is used to instruct to detect a reverse message flow of the first message flow.
[0044] The network device 201 and the network device 202 may be two PE devices. For example, the network device 201 and the network device 202 may be Figure 1 The node A and the node E. The first message flow is a message flow transmitted from the node A to the node E, that is, a forward message flow. The node A can also detect the first message flow. The node A is the entry node of the detection domain for the first message flow, and the node E is the exit node of the detection domain for the first message flow.
[0045] In an example, node A may receive control information sent by the controller, and generate reverse detection indication information according to the control information, where the reverse detection indication information is used to indicate detection of a reverse message flow of the first message flow.
[0046] In one example, the source IP address of the reverse message flow of the first message flow is the destination IP address of the first message flow, and the destination IP address of the reverse message flow is the source IP address of the first message flow.
[0047] S211, the network device 201 adds the reverse detection indication information to the message of the first message flow.
[0048] In an example, the network device 201 may detect packets of the first packet flow.
[0049] S212: The network device 201 sends the message of the first message flow carrying the reverse detection indication information to the network device 202.
[0050] In one example, the network device 201 sends the message of the first message flow to the network device 202, which may mean that the message is sent by the network device 201, forwarded by several other network devices, and finally reaches the network device 202. For example, the message is sent by the node A, forwarded by the node B, the node C and the node D, and finally reaches the node E. In addition, the network device 201 and the network device 202 may also be directly connected, that is, there is no other node between the network device 201 and the network device 202.
[0051] S213, the network device 202 receives a first message flow sent by the network device 201, where the messages in the first message flow include the reverse detection indication information.
[0052] S214: The network device 202 detects a second message flow according to the reverse detection indication information, where the second message flow is a reverse message flow of the first message flow.
[0053] Combination Figure 1 The application scenario shown in FIG. 1 is used as an example. The first message flow is a message flow transmitted from node A to node E, that is, a forward message flow. The detection domain for the first message flow includes node A, node B, node C, node D and node E. The first network device is node A, which is also the entry node of the detection domain and can be connected to the core network device. The second network device is node E, which is also the exit node of the detection domain and can be connected to the wireless base station. Node A receives the control information sent by the controller and generates reverse detection indication information according to the control information. Node A adds the reverse detection indication information to the message in the first message flow, and sends the message of the first message flow carrying the reverse detection indication information to node E. The message of the first message flow passes through node B, node C, node D, and finally reaches node E. After receiving the message, node E parses the reverse detection indication information in the message, and detects the reverse message flow of the first message flow according to the indication of the reverse detection indication information. The reverse message flow of the first message flow is a message flow transmitted from node E to node A, that is, the second message flow. Thus, by deploying the entry node of the detection domain of the forward message flow once, two detections of the forward message flow and the reverse message flow can be realized. In particular, considering that the entry node E of the detection domain of the reverse message flow is the PE connected to the wireless base station, and in the actual network environment, the number of such nodes E is large and the locations are scattered, the above method can greatly reduce the workload of detection deployment and reduce the difficulty of detection deployment.
[0054] See also Figure 3 , Embodiment 2 of the present application provides a method for detecting a message. Figure 1 In the application scenario shown, network device 301 and network device 302 may be two PE devices, that is, network device 301 and network device 302 are the entry node and the exit node of the detection domain respectively. Controller 303 is a controller in the network. For example, network device 301 and network device 302 may be respectively Figure 1 The node A and node E. Node A is connected to the core network device. Node E is connected to the wireless base station. The first message flow is a message flow transmitted from node A to node E, that is, a forward message flow. Node A is the entry node of the detection domain for the first message flow, and node E is the exit node of the detection domain for the first message flow. The second message flow is the reverse message flow of the first message flow, that is, the message flow transmitted from node E to node A. Obviously, the transmission path of the first message flow or the second message flow can also include more nodes, located between node A and node E. Correspondingly, the detection domain for the first message flow or the second message flow can also include more nodes. These changes are within the conventional expected range of those skilled in the art. Each node includes two ports respectively. For example, node A includes a first port A_I and a second port A_E. For the first message flow, port A_I is a receiving port, and port A_E is a sending port. For the second message flow, port A_E is a receiving port, and port A_I is a sending port. Node B includes port B_I and port B_E, node C includes port C_I and port C_E, node D includes port D_I and port D_E, and node E includes port E_I and port E_E. The way they send and receive message flows is the same as node A, which will not be repeated here. The detection process includes:
[0055] S310, the network device 301 obtains reverse detection indication information, generates a detection instance for the first message flow according to the IP address pair, and performs detection on the first message flow.
[0056] Combination Figure 1 In the application scenario shown, node A obtains reverse detection indication information, for example, an R identifier. The R identifier is used to indicate detection of the reverse message flow of the first message flow. For example, the R identifier can indicate the egress node (i.e., node E) of the detection domain to detect the reverse message flow of the first message flow, and can also indicate the intermediate node (i.e., node B, node C, or node D) of the detection domain to detect the reverse message flow of the first message flow, and can also indicate the ingress node (i.e., node A) of the detection domain to detect the reverse message flow of the first message flow.
[0057] In an embodiment of the present application, each detection instance can be to detect the message flow once at the corresponding detection point. For each node in the detection domain, a detection instance can be generated in the node, or two detection instances can be generated respectively at two ports. For example, node A can generate detection instance A1. For example, node A can generate two detection instances at port A_I and port A_E, detection instance A_I1 and detection instance A_E1, that is to say, two message detections are performed respectively at port A_I and port A_E, which is conducive to improving detection accuracy. For example, in packet loss detection, by comparing the message count values at the two ports, it is possible to find the packet loss condition occurring inside the network device.
[0058] In one example, the first IP address pair includes a first source IP address and a first destination IP address, the first source IP address is the source IP address of the first message flow, and the first destination IP address is the destination IP address of the first message flow. For example, the first IP address pair can be directly issued by the controller through control information. For example, the first IP address pair can also be obtained by node A extracting the source IP address and the destination IP address of a message according to the instruction of the controller. Figure 1 In the application scenario shown, the detection instance A1 generated by node A includes the first IP address pair. Node A identifies the received message through the first IP address pair. For the message matching the first IP address pair, it is considered to be a message belonging to the message flow to be detected, that is, a message in the first message flow, and the message is detected.
[0059] In one example, the network device 302 may also generate a detection instance based on a five-tuple. The five-tuple includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol number. Figure 1 In the application scenario shown, the detection instance A1 generated by node A includes the source IP address, source port, destination IP address, destination port and transport layer protocol number in the five-tuple. When the source IP address, source port, destination IP address, destination port and transport layer protocol number of the message match the source IP address, source port, destination IP address, destination port and transport layer protocol number in the detection instance, node A considers the message to be a message to be detected.
[0060] In one example, the detection instance for the first message flow also includes an identifier of the first message flow, that is, the detection instance establishes a corresponding relationship between the identifier of the first message flow and the first IP address, wherein the identifier of the first message flow is unique in the entire network and is used to identify the first message flow, for example, the identifier of the first message flow is FLOW ID 1. For example, the identifier of the first message flow can take the format of a network device identifier plus serial number information.
[0061] S311, the network device 301 adds the reverse detection indication information and the identifier of the first message flow to the message of the first message flow.
[0062] Combination Figure 1 In the application scenario shown, after node A generates detection instance A1, it further adds the reverse detection indication information and the identifier of the first message flow to the message of the first message flow. The message of the first message flow is transmitted to node E, and node E parses the message in the received first message flow to obtain the reverse detection indication information, and can detect the reverse message flow of the first message flow according to the reverse detection indication information.
[0063] In one example, the identifier of the first message flow may be obtained from the detection instance. For example, node A may extract FLOW ID 1 from detection instance A1 and add it to the message of the first message flow.
[0064] In one example, the network device 301 adds the identifier of the first message flow to the message of the first message flow at the receiving port, identifies the message according to the identifier of the first message flow at the sending port, and detects the message. The receiving port is the port where the network device 301 receives the first message flow, and the sending port is the port where the network device 301 sends the first message flow. Figure 1 In the application scenario shown, the detection instance A_I1 generated by node A at port A_I includes the first IP address pair. Node A identifies the received message at port A_I through the first IP address pair, and for the message matching the first IP address pair, it is considered to be a message belonging to the message flow to be detected, that is, a message in the first message flow, and the message is detected. Node A adds FLOW ID 1 to the message of the first message flow at port A_I. The message arrives at port A_E. At port A_E, node A parses the FLOW ID 1 carried by the message and generates a detection instance A_E1 based on FLOW ID 1. For the message subsequently received at port A_E, if FLOW ID 1 is included in the message, it is considered that the message belongs to the first message flow to be detected, and the message is detected. It can be seen that after the identifier of the first message flow is added to the message of the first message flow at the receiving port of the inlet node of the message transmission path, the sending port of the inlet node can identify the message to be detected by the identifier of the first message flow. If the first message flow does not carry FLOW ID1, the sending port can also generate a detection instance based on the IP address pair. Correspondingly, the detection instance can identify whether to detect the message based on the IP address pair of the message. Compared with the above-mentioned identification of the message to be detected by IP address pairs, the method of using FLOW ID 1 can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0065] S312 , the network device 301 sends the detection instance information and the statistical message to the controller 303 .
[0066] The detection instance information may include an identifier of the first message flow and network device information, wherein the network device information may be identification information of a node or identification information of a port. When the detection instance is to perform message identification through a first IP address pair, the detection instance information may also include the first IP address pair. For example, node A generates detection instance A1, and detection instance A1 includes the first IP address pair, FLOW ID 1, and identification information of node A. For example, node A generates detection instance A_E1 at a transmission port A_E for the first message flow, and detection instance A_E1 includes identification information of FLOW ID 1 and port A_E.
[0067] The statistical message includes the detection data that the network device 301 obtains by detecting the first message flow. The detection data can be one or more copies, corresponding to the number of detection instances. For example, when node A generates a detection instance A1 for the first message flow, the detection data that node A obtains by detecting the first message flow is one copy, corresponding to detection implementation A1. When node A detects implementation A_I1 and A_E1 respectively at the receiving port and the transmitting port for the first message flow, the detection data that node A obtains by detecting the first message flow is two copies, corresponding to detection implementation A_I1 and A_E1.
[0068] Optionally, the statistical message also includes detection instance information.
[0069] Optionally, the network device 301 sends the detection instance information and statistical messages of all detection instances in the network device to the controller together. Optionally, the network device 301 sends the detection instance information and statistical messages to the controller for each detection instance. For example, after node A sends the detection instance information and statistical messages of detection implementation A_I1 to the controller, it sends the detection instance information and statistical messages of detection implementation A_E1 to the controller.
[0070] Optionally, the detection instance information and statistical message of each detection instance can be sent to the controller through a single sending operation. Optionally, the detection instance information and statistical message of each detection instance can also be sent to the controller through two sending operations. For example, after node A generates detection instance A1, it sends the detection instance information to the controller. Node A performs message detection on the first message flow, generates a statistical message based on the detection data, and sends it to the controller. In addition to the message detection data, the statistical message can also include FLOW ID 1 and information of node A.
[0071] S313: The network device 301 sends out the messages of the first message flow.
[0072] In one example, the network device 301 encapsulates the reverse detection indication information and the identifier of the first message flow at the bottom of the MPLS label stack of the message in the first message flow at the sending port for the first message flow and sends it out. For example, node A adds the R identifier and FLOW ID 1 to the message of the first message flow at the receiving port A_I for the first message flow, and node A further encapsulates the above R identifier and FLOW ID 1 to the bottom of the MPLS label stack of the above message at the sending port A_E for the first message flow. In the MPLS network, encapsulating the label containing the reverse detection indication information and the identifier of the first message flow at the bottom of the MPLS label stack does not affect the message forwarding by each network device on the message transmission path according to the top label of the stack.
[0073] S314, the network device 302 generates a detection instance according to the identifier of the first message flow carried in the message of the first message flow, and performs message detection. Optionally, the network device 302 can generate one or two detection instances for the first message flow and perform message detection. Optionally, the network device 302 can generate a detection instance at the receiving port and the sending port for the first message flow respectively. Optionally, the network device 302 can generate a detection instance according to the identifier of the first message flow carried in the message of the first message flow. Optionally, the network device can identify the message of the first message flow to be detected according to the identifier of the first message flow. Optionally, each intermediate node searches for the identifier of the first message flow in the MPLS label stack of the message. For example, the label stack of the message of the first message flow parsed by node E includes FLOW ID 1, and the detection instance E1 is generated according to FLOW ID 1. The FLOW ID 1 is added by node A to the message of the first message flow. For the message subsequently received by node E, if the label stack of the message includes FLOW ID 1, it is considered that the message belongs to the first message flow to be detected, and the message is detected. It can be seen that after the ingress node of the message transmission path adds the identifier of the first message flow to the message of the first message flow, the subsequent nodes of the message transmission path can identify the message to be detected by the identifier of the first message flow. If the first message flow does not carry FLOW ID1, the network device 302 can also generate a detection instance based on the IP address pair. Correspondingly, the detection instance can identify whether to detect the message based on the IP address pair of the message. Compared with the above-mentioned identification of the message to be detected by the IP address pair, the method of using FLOW ID 1 can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0074] S315, the network device 302 sends the detection instance information and the statistical message to the controller 303. This step can be performed in step S312, and the similarities are not repeated here.
[0075] After completing the message detection, the network device 302 sends out the messages of the first message flow.
[0076] Optionally, the network device 302 strips the identifier of the first message flow and the reverse detection indication information carried by the message of the first message flow, and continues to send the message stripped of the identifier of the first message flow and the reverse detection indication information to an external node, such as a wireless base station.
[0077] S316, the controller 303 receives the detection instance information and statistical messages sent by the network device 301 and the network device 302, calculates the detection result for the first message flow according to the message detection data, and restores the network status information in the transmission path of the first message flow according to the first IP address pair, the identifier of the first message flow and the node information.
[0078] In one example, the controller 303 may calculate the detection result after receiving all detection instance information and statistical messages for the first message flow sent by the network device 301 and the network device 302. That is, step S316 may be performed only once for the first message flow.
[0079] In one example, the controller 303 may calculate the detection result once respectively when receiving the detection instance information and the statistical message for the first message flow sent by the network device 301 or the network device 302. That is, step S316 may be performed multiple times for the first message flow.
[0080] S317: The network device 302 generates a detection instance for a second message flow according to the reverse detection indication information in the message of the first message flow, and performs detection on the second message flow, wherein the second message flow is a reverse message flow of the first message flow.
[0081] In one example, the detection instance for the second message flow generated by the network device 302 according to the reverse detection indication information may include a second IP address pair. The second IP address pair includes a second source IP address and a second destination IP address, the second source IP address is the destination IP address of the first message flow, and the second destination IP address is the source IP address of the first message flow. The network device 302 identifies the received message through the second IP address pair, and for the message matching the second IP address pair, it is considered to be a message in the second message flow to be detected, and the message is detected. For example, node E receives the message in the first message flow, and parses the reverse detection indication information at the bottom of the message MPLS label stack, such as the R identifier. Node E swaps the source IP address and the destination IP address of the message in the first message flow to generate a second IP address pair. Node E generates a reverse message flow for the first message flow, that is, a detection instance of the second message flow. Node E identifies the received message through the second IP address pair, and considers the message matching the second IP address pair as a message belonging to the second message flow to be detected, and detects the message.
[0082] The detection process for the second message flow is similar to the detection process for the first message flow. The description of the detection process for the first message flow can also be applied to the second message flow. This is within the expected scope of those skilled in the art and will not be repeated here.
[0083] In one example, the detection instance for the second message flow also includes an identifier of the second message flow, that is, the detection instance establishes a corresponding relationship between the identifier of the second message flow and the second IP address. The identifier of the second message flow is unique in the entire network and is used to identify the second message flow. For example, the identifier of the second message flow is FLOW ID 2. For example, the identifier of the second message flow can take the format of a network device identifier plus serial number information.
[0084] S318: The network device 302 adds the identifier of the second message flow to the message of the second message flow.
[0085] In one example, the network device 302 adds the identifier of the first message flow to the message of the first message flow at the receiving port, identifies the message according to the identifier of the first message flow at the sending port, and detects the message. The receiving port is the port where the network device 302 receives the first message flow, and the sending port is the port where the network device 302 sends the first message flow.
[0086] The specific process of step S318 can refer to the description of step S311, and the similarities are not repeated here.
[0087] S319 , the network device 302 sends the detection instance information and the statistical message to the controller 303 .
[0088] The specific process of step S319 can refer to the description of step S312, and the similarities are not repeated here.
[0089] S320, the network device 302 sends out the messages of the second message flow.
[0090] The specific process of step S320 can refer to the description of step S313, and the similarities are not repeated here.
[0091] S321: The network device 301 generates a detection instance according to an identifier of the second message flow carried in a message of the second message flow, and performs message detection.
[0092] The specific process of step S321 can refer to the description of step S314, and the similarities are not repeated here.
[0093] It should be pointed out that, after the message transmission path inlet node of the second message flow, i.e., the network device 302, adds the identifier of the second message flow to the message of the second message flow, the subsequent nodes of the message transmission path can identify the message to be detected by the identifier of the second message flow. If the second message flow does not carry FLOW ID 2, the network device 301 can also generate a detection instance based on the IP address pair. Accordingly, the detection instance can identify whether to detect the message based on the IP address pair of the message. Compared with the above-mentioned identification of the message to be detected by the IP address pair, the method of using FLOW ID2 can simplify the detection message identification process, shorten the processing time, and improve the detection efficiency.
[0094] S322 , the network device 301 sends the detection instance information and the statistical message to the controller 303 .
[0095] The specific process of step S322 can refer to the description of step S315, and the similarities are not repeated here.
[0096] After completing the message detection, the network device 301 sends the message out.
[0097] Optionally, the network device 301 strips the identifier of the second message flow carried by the message of the second message flow, and continues to send the message stripped of the identifier of the second message flow to an external node, such as a core network device.
[0098] S323, the controller 303 receives the detection instance information and statistical messages sent by the network device 302 and the network device 301, calculates the detection result according to the message detection data, and restores the network status information in the second message flow transmission path according to the second IP address pair, the identifier of the second message flow and the node information.
[0099] The specific process of step S323 can refer to the description of step S316, and the similarities are not repeated here.
[0100] In one example, for each node, the steps of sending the detection instance information and the statistical message and the step of sending the first message flow or the second message flow can be performed in any order. For example, the detection instance information and the statistical message can be sent first, or the first message flow or the second message flow can be sent first, or the first message flow or the second message flow can be sent at the same time as the detection instance information and the statistical message. Figure 3 , wherein S312 and S313, and S319 and S320, can be executed in any order.
[0101] In one example, the method may also involve one or more intermediate nodes of the network. At each intermediate node, one or two detection instances may be generated for the first message flow and message detection may be performed. Optionally, at each intermediate node, a detection instance may be generated based on an identifier of the first message flow carried in a message of the first message flow. Optionally, at each intermediate node, a message of the first message flow to be detected may be identified based on the identifier of the first message flow. Optionally, each intermediate node searches for the identifier of the first message flow in the MPLS label stack of the message. Optionally, each intermediate node also sends detection instance information and statistical messages to the controller. In combination Figure 1 In the application scenario shown, the one or more intermediate nodes may be node B, node C, or node D. For example, at port B_I, node B parses the label stack of the message of the first message flow to include FLOW ID 1, and generates a detection instance B_I1 according to FLOW ID 1. The FLOW ID 1 is added by node A to the message of the first message flow. For the message subsequently received at port B_I, if the label stack of the message includes FLOWID 1, it is considered that the message belongs to the first message flow to be detected, and the message is detected. At port B_E, node B also parses the label stack of the message of the first message flow to include FLOW ID 1, and generates a detection instance B_E1 according to FLOW ID 1. For the message subsequently received at port B_E, if the label stack of the message includes FLOW ID 1, it is considered that the message belongs to the first message flow to be detected, and the message is detected. The content and sending process of the detection instance information and statistical message at node B are similar to those of node A, and will not be repeated here. Similar operations are also performed at nodes C and D. When the detection domain includes more intermediate nodes, these intermediate nodes also perform similar operations, which will not be described in detail here.
[0102] In one example, the detection domain may include only one node, which is both an entry node and an exit node. For example, the detection domain may include only node A. For each message flow, node A may generate a detection instance, or may generate two detection instances at two ports. For example, node A may generate two detection instances at port A_I and port A_E for the first message flow, detection instance A_I1 and detection instance A_E1. Detection instance A_I1 includes a first IP address pair. Node A identifies the received message at port A_I through the first IP address pair. Node A generates first detection information including an R identifier and FLOW ID 1 at port A_I. And the first detection information is added to the message of the first message flow. The message arrives at port A_E. At port A_E, detection instance A_E1 is generated according to FLOW ID 1. And, at port A_E, a reverse detection instance A_E2 for the second message flow is generated according to the R identifier. The reverse detection instance A_E2 includes a second IP address pair. Specifically, node A swaps the source IP address and the destination IP address of the message in the first message flow to generate a second IP address pair. And, at port A_E, the received message is identified by the second IP address pair, and the message matching the second IP address pair is considered to belong to the second message flow to be detected, and the message is detected. Node A generates second detection information including FLOW ID 2 at port A_E. And the second detection information is added to the message of the second message flow. The message of the second message flow arrives at port A_I. At port A_I, a detection instance A_I2 is generated according to FLOW ID 2. For other specific detection processes, please refer to the above. Figure 3 or Figure 4 The description of the relevant steps in , the similarities are not repeated here.
[0103] Figure 4 A possible structural diagram of the network device involved in the above embodiment is shown. The network device 400 can implement the function of the ingress node of the detection domain of the first message flow in the above embodiment. Specifically, the network device 400 can implement Figure 2 The function of the network device 201 shown or Figure 3 The functions of the network device 301 are shown. Figure 4 The network node 400 includes: an acquisition unit 401, a processing unit 402 and a sending unit 403. These units can perform the corresponding functions of the ingress node of the detection domain of the first message flow in the above method example, that is, Figure 1 The corresponding functions of node A are shown. For example,
[0104] An acquiring unit 401 is used to acquire reverse detection indication information, where the reverse detection indication information is used to indicate to detect a reverse message flow of a first message flow;
[0105] The processing unit 402 is configured to add the reverse detection indication information to the first message of the first message flow after the first network device receives the first message flow;
[0106] The sending unit 403 is used to send the first message carrying the reverse detection indication information.
[0107] In the case of an integrated unit, Figure 5 Another possible structural diagram of the ingress node of the detection domain of the first message flow in the above embodiment is shown. The network device 500 can also implement Figure 2 The function of the network device 201 shown or Figure 3 Functions of the network device 301 shown.
[0108] The network device 500 includes: a storage unit 501, a processing unit 502 and a communication unit 503. The processing unit 502 is used to control and manage the actions of the network device 500. For example, the processing unit 502 is used to support the network device 500 to execute Figure 2 In the processes S210 and S211, Figure 3 The communication unit 503 is used to support the communication between the network device 500 and other network entities, such as the communication between other nodes in the detection domain of the first message flow. The storage unit 501 is used to store the program code and data of the network device 500.
[0109] Among them, the processing unit 502 can be a processor, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements a computing function, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit 503 can be a network interface, and the storage unit 501 can be a memory.
[0110] When the processing unit 502 is a processor, the communication unit 503 is a network interface, and the storage unit 501 is a memory, the network device involved in the embodiment of the present invention can be Figure 6 A network device 600 is shown.
[0111] See also Figure 6 As shown, Figure 6 Another possible structural diagram of the ingress node of the detection domain of the first message flow in the above embodiment is shown, and the network device 600 includes: a processor 602, a network interface 603, a memory 601 and a bus 604. Among them,
[0112] Memory 601, used to store instructions; in the implementation Figure 4 In the case of the embodiment shown, and Figure 4 When each unit described in the embodiment is implemented by software, the execution Figure 4 The software or program code required for the functions of the acquisition unit 401, the processing unit 402 and the sending unit 403 are stored in the memory 601.
[0113] Processor 602 is used to execute instructions in memory 601 to execute the above application Figure 2 The packet detection method of the network device 201 in the embodiment shown or Figure 3 The message detection method of the network device 301 in the illustrated embodiment.
[0114] The network interface 603 is used for communication.
[0115] The network interface 603 may include a common physical interface, which may be an Ethernet interface or an Asynchronous Transfer Mode (ATM) interface. The network interface 603, the processor 602, and the memory 601 are interconnected via a bus 604; the bus 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0116] In one example, the processor 602 , the network interface 603 , and the memory 601 may be integrated into one or more independent circuits or hardware, such as an ASIC.
[0117] Figure 7 A possible structural diagram of the network device involved in the above embodiment is shown. The network device 700 can implement the function of the egress node of the detection domain of the first message flow in the above embodiment. Specifically, the network device 700 can implement Figure 2 The function of the network device 202 shown or Figure 3 The functions of the network device 302 are shown. Figure 7 The network device 700 includes: a receiving unit 701 and a processing unit 702. These units can perform the corresponding functions of the egress node of the detection domain of the first message flow in the above method example, that is, Figure 1 The corresponding functions of the node E shown. For example,
[0118] The receiving unit 701 is configured to receive a first message stream, wherein a first message in the first message stream includes reverse detection indication information;
[0119] The processing unit 702 is used to detect a second message flow according to the indication of the reverse detection indication information, where the second message flow is a reverse message flow of the first message flow.
[0120] In the case of an integrated unit, Figure 8 Another possible structural diagram of the egress node of the detection domain of the first message flow in the above embodiment is shown. The network device 800 can also implement Figure 2 The function of the network device 202 shown or Figure 3 Functionality of network device 302 is shown.
[0121] The network device 800 includes: a storage unit 801, a processing unit 802 and a communication unit 803. The processing unit 802 is used to control and manage the actions of the network device 800. For example, the processing unit 802 is used to support the network device 800 to execute Figure 2 In process S214, Figure 3 The communication unit 803 is used to support the communication between the network device 800 and other network entities, such as the communication between other nodes in the detection domain of the first message flow. The storage unit 801 is used to store the program code and data of the network device 800.
[0122] Among them, the processing unit 802 can be a processor, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements a computing function, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit 803 can be a network interface, and the storage unit 801 can be a memory.
[0123] When the processing unit 802 is a processor, the communication unit 803 is a network interface, and the storage unit 801 is a memory, the network device involved in the embodiment of the present invention can be Fig. 9 Network device 900 is shown.
[0124] See also Fig. 9 As shown, Fig. 9 Another possible structural diagram of the egress node of the detection domain of the first message flow in the above embodiment is shown, and the network device 900 includes: a processor 902, a network interface 903, a memory 901 and a bus 904. Among them,
[0125] Memory 901, used to store instructions; in the implementation Figure 7 In the case of the embodiment shown, and Figure 7 When each unit described in the embodiment is implemented by software, the execution Figure 7 The software or program code required for the functions of the receiving unit 701 and the processing unit 702 is stored in the memory 901.
[0126] Processor 902 is used to execute instructions in memory 901 to execute the above application Figure 2 The packet detection method of the network device 202 in the embodiment shown or Figure 3 The message detection method of the network device 302 in the illustrated embodiment.
[0127] The network interface 903 is used for communication.
[0128] The network interface 903 may include a common physical interface, which may be an Ethernet interface or an Asynchronous Transfer Mode (ATM) interface. The network interface 903, the processor 902, and the memory 901 are interconnected via a bus 904; the bus 904 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0129] In one example, the processor 902 , the network interface 903 , and the memory 901 may be integrated into one or more independent circuits or hardware, such as an ASIC.
[0130] The embodiment of the present application also provides a network system, which includes a first network device and a second network device. The first network device in the network system can execute Figure 2 The processing steps of the network device 201 or Figure 3 The processing steps of the network device 301 in the network system can be performed by the second network device in the network system. Figure 2 The processing steps of the network device 202 or Figure 3 Accordingly, the first network device in the network system may be Figure 4 The network device 400 of the embodiment shown in the figure, the second network device in the network system is Figure 7 The network device 700 of the embodiment shown in the figure. Or correspondingly, the first network device in the network system can be Figure 5 The network device 500 of the embodiment shown in the figure, the second network device in the network system is Figure 8 The network device 800 of the embodiment shown in the figure. Or correspondingly, the first network device in the network system can be Figure 6 The network device 600 of the embodiment shown in the figure, the second network device in the network system is Fig. 9 The network device 900 of the illustrated embodiment.
[0131] The present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the above-mentioned application Figure 4 In the embodiment shown, the network device 400 or Figure 5 In the embodiment shown, the network device 500 or Figure 6 The method for detecting packets of the network device 600 in the illustrated embodiment.
[0132] The present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the above-mentioned application Figure 7 In the embodiment shown, the network device 700 or Figure 8 In the embodiment shown, the network device 800 or Fig. 9 The method for packet detection of the network device 900 in the illustrated embodiment.
[0133] An embodiment of the present application also provides a computer program product including computer program instructions. When the computer program product is executed on a network device, the network device executes the method in the aforementioned method embodiment.
[0134] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0136] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical business division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software business units.
[0139] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0140] Those skilled in the art will appreciate that in one or more of the above examples, the services described in the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, the services may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media may be any available media that a general or special-purpose computer can access.
[0141] The above specific implementation modes further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation modes of the present invention.
[0142] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An IFIT method for in-band flow measurement of a message, characterized in that: The method comprises: The first network device adds a flow identifier FLOWID to a message of the first message flow, wherein the FLOWID is used for a second network device receiving the first message flow to generate a first flow detection instance according to the FLOW ID, wherein the first flow detection instance is used to perform flow detection on the first message flow; The first network device sends the message carrying the FLOW ID along the flow detection path of the first message flow.
2. The method according to claim 1, characterized in that The flow identifier is used to identify the first message flow.
3. The method according to claim 1 or 2, characterized in that: The flow identifier is included in the bottom label of the MPLS label stack of the message.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: The first network device generates a second flow detection instance according to a source address and a destination address of the message in the first message flow, and the second flow detection instance is used to perform flow detection on the first message flow.
5. The method according to claim 4, characterized in that The first network device includes a first port, where the first port is a port for the first network device to receive the first message flow, and the second in-flight detection instance is used to perform in-flight detection on the first message flow at the first port.
6. The method according to claim 5, characterized in that The first network device further includes a second port, where the second port is a port for the first network device to send the message of the first message flow; After the first network device adds the FLOWID to the message of the first message flow, the method further includes: The first network device generates a third flow detection instance corresponding to the second port according to the FLOW ID, and the third flow detection instance is used to perform flow detection on the first message flow at the second port.
7. The method according to claim 4, characterized in that The method further comprises: The first network device sends detection instance information and statistical data to the controller; The detection instance information includes the FLOWID, the source address and the destination address of the message of the first message flow, and the statistical data includes the statistical data obtained by the first network device according to the second flow detection instance.
8. The method according to claim 1 or 2, characterized in that: The method further comprises: The first network device adds reverse detection indication information to the message of the first message flow, and the reverse detection indication information is used to instruct the tail node on the flow detection path of the first message flow to perform flow detection on the reverse message flow of the first message flow.
9. An IFIT method for in-band flow measurement of a message, characterized in that: The method comprises: The first network device obtains a message of a first message flow, wherein the message includes a flow identifier FLOWID; The first network device generates a first flow detection instance according to the FLOW ID, where the first flow detection instance is used to perform flow detection on the first message flow.
10. The method according to claim 9, characterized in that The flow identifier is used to identify the first message flow.
11. The method according to claim 9 or 10, characterized in that: The flow identifier is included in the bottom label of the MPLS label stack of the message.
12. The method according to claim 9 or 10, characterized in that: The first network device includes a first port and a second port, and the first network device generates a first flow detection instance according to the flow identifier, including: The first network device generates the first flow detection instance corresponding to the first port according to the flow identifier, wherein the first flow detection instance is used to perform flow detection on the first message flow at the first port; The method further comprises: The first network device generates a second flow detection instance corresponding to the second port according to the flow identifier, and the second flow detection instance is used to perform flow detection on the first message flow at the second port.
13. The method according to claim 9 or 10, characterized in that: The method further comprises: The first network device sends detection instance information and statistical data to the controller; The detection instance information includes the FLOWID, and the statistical data includes statistical data obtained by the first network device according to the first flow detection instance.
14. The method according to claim 9 or 10, characterized in that The first network device is an intermediate node or a tail node on a flow detection path of the first message flow.
15. The method according to claim 9 or 10, characterized in that The first network device is an end node on a flow detection path of the first message flow, and the first message further includes reverse detection indication information; The method further comprises: The first network device generates a third flow detection instance according to the instruction of the reverse detection instruction information, wherein the third flow detection instance is used to perform flow detection on a second message flow, where the second message flow is a reverse message flow of the first message flow.
16. An IFIT system for in-band flow measurement of messages, characterized in that: The system comprises a first network device and a second network device, The first network device is configured to add a flow identifier FLOWID to a message of the first message flow, and send the message carrying the FLOWID along a flow detection path of the first message flow; The second network device is used to receive the message carrying the FLOWID; generate a first flow detection instance according to the FLOW ID, and the first flow detection instance is used to perform flow detection on the first message flow.
17. The system according to claim 16, characterized in that: The first network device is further configured to add reverse detection indication information to the message of the first message flow; The second network device is further configured to generate a second flow detection instance according to the instruction of the reverse detection instruction information, wherein the second flow detection instance is used to perform flow detection on a second message flow, where the second message flow is a reverse message flow of the first message flow.
18. An IFIT method for in-band flow measurement of a message, characterized in that: The method comprises: The first network device receives a first message flow, wherein the message of the first message flow includes reverse detection indication information; The first network device performs a follow-up detection on a second message flow according to the instruction of the reverse detection instruction information, wherein the second message flow is a reverse message flow of the first message flow.
19. The method according to claim 18, characterized in that The method further comprises: The first network device adds a flow identifier FLOWID to a message of the second message flow, the flow detection header is used for the second network device receiving the first message flow to generate a first flow detection instance according to the FLOW ID, the first flow detection instance is used to perform flow detection on the second message flow, and the second network device is a network device on a flow detection path of the second message flow; The first network device sends the message carrying the FLOW ID along the flow detection path of the second message flow.
20. A computer storage medium, the computer storage medium being used to store instructions, and when the instructions are executed on a processor, the method according to any one of claims 1 to 15, 18 to 19 is implemented.
Citation Information
Patent Citations
Method and device for treating fault
CN101826989A
Method and device for detecting path
CN107248941A