In-line detection method and system
By controlling the connection status between the intermediate and tail nodes and the control device through control messages carrying configuration information from the first node device, the problem of cumbersome configuration distribution and poor flexibility in the prior art is solved, and the effect of simplifying operation and improving flexibility is achieved.
Patent Information
- Application Number
- CN202310709412.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-06-14
Smart Images

Figure CN116614406B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a method and system for detecting current flow. Background Technology
[0002] IFIT (In-situ Flow Information Telemetry) is a flow-based OAM (Operation Administration and Maintenance) measurement technology. It is a network performance measurement method based on IP (Internet Protocol) data streams. It obtains the actual packet loss rate, latency, and other performance indicators of the IP network by directly measuring service packets.
[0003] Current flow-following detection technology involves the first node device creating an IFIT header and adding it to the network traffic. As the network forwards the data, intermediate and tail nodes identify the IFIT header and dynamically measure the data, then report the measurement data to the control device for processing. However, this approach has two problems: First, the control device needs to distribute configurations to all node devices. Although there are currently methods using scripts to achieve batch distribution, these are cumbersome to operate and difficult to maintain. Second, even when no measurement is needed, each node device establishes a connection with the control device, resulting in high operational pressure on the control device. Furthermore, after the first node device stops measuring, the intermediate and tail nodes need to wait for a timeout before stopping measurement, leading to poor flexibility in flow-following detection. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method and system for detecting flow.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a flow-following detection method applied to a flow-following detection system, the flow-following detection system comprising a first node device, intermediate node devices, and a tail node device connected in communication with each other, and a control device connected in communication with the first node device, the method comprising:
[0007] The control device sends the configuration information to the first node device;
[0008] When the first node device starts flow detection, it sends a first control message carrying the configuration information to the intermediate node device and the tail node device.
[0009] When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message and begin reporting measurement data to the control device.
[0010] When the first node device stops following the flow detection, it sends a second control message carrying the configuration information to the intermediate node device and the tail node device.
[0011] When the intermediate node device and the tail node device identify the received message as the second control message, they disconnect from the control device according to the configuration information in the second control message and stop reporting measurement data to the control device.
[0012] In an optional implementation, when the first node device begins flow detection, it sends a first control message carrying the configuration information to the intermediate node device and the tail node device, including:
[0013] When the first node device starts performing flow detection, it constructs a flow detection header for the received original message, and adds the configuration information and a first operation code indicating a new operation to the flow detection header to generate the first control message.
[0014] The first node device sends the first control message to the intermediate node device and the tail node device.
[0015] In an optional implementation, the configuration information includes the address family, protocol type, port, and address of the control device;
[0016] When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message, and begin reporting measurement data to the control device, including:
[0017] The intermediate node and the tail node device identify the following detection header in the received message. When the following detection header of the received message is identified to contain the configuration information and the first opcode, the received message is determined to be the first control message.
[0018] The intermediate node and the tail node device obtain the configuration information in the first control message, obtain the address family, protocol type, port and address of the control device, and after establishing a connection with the control device according to the address family, port and address of the control device, they start reporting measurement data to the control device according to the protocol type of the control device.
[0019] In an optional implementation, when the first node device stops flow detection, it sends a second control message carrying the configuration information to the intermediate node device and the tail node device, including:
[0020] When the first node device stops following the flow detection, it constructs a following flow detection header for the received original message, and adds the configuration information and a second operation code indicating a deletion operation to the following flow detection header to generate the second control message;
[0021] The first node device sends the second control message to the intermediate node device and the tail node device.
[0022] In an optional implementation, the configuration information includes the address family, protocol type, port, and address of the control device;
[0023] When the intermediate node device and the tail node device identify the received message as the second control message, they disconnect from the control device according to the configuration information in the second control message and stop reporting measurement data to the control device, including:
[0024] The intermediate node and the tail node device identify the following detection header in the received message. When the following detection header of the received message is identified to contain the configuration information and the second opcode, the received message is determined to be the second control message.
[0025] The intermediate node and the tail node device obtain the configuration information in the second control message, obtain the address family, protocol type, port and address of the control device, and after disconnecting from the control device according to the address family, port and address of the control device, stop reporting measurement data to the control device.
[0026] In an optional implementation, the method further includes:
[0027] When the first node begins flow detection, it starts reporting measurement data to the control device.
[0028] When the first node stops flow detection, it stops reporting measurement data to the control device.
[0029] In an optional implementation, the method further includes:
[0030] The tail node device parses the received message to obtain the original message and forwards the original message.
[0031] In a second aspect, the present invention provides a flow detection system, the flow detection system comprising a first node device, an intermediate node device and a tail node device connected in communication, and a control device connected in communication with the first node device;
[0032] The control device is used to send configuration information to the first node device;
[0033] The first node device is used to send a first control message carrying the configuration information to the intermediate node device and the tail node device when the flow detection starts;
[0034] When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message and begin reporting measurement data to the control device.
[0035] The first node device is also used to send a second control message carrying the configuration information to the intermediate node device and the tail node device when the flow detection is stopped;
[0036] The intermediate node device and the tail node device are further configured to disconnect from the control device and stop reporting measurement data to the control device when the received message is identified as the second control message, based on the configuration information in the second control message.
[0037] In an optional implementation, the first node device is further configured to:
[0038] When starting the flow detection, a flow detection header is constructed for the received original message, and the configuration information and a first opcode indicating a new operation are added to the flow detection header to generate the first control message;
[0039] The first control message is sent to the intermediate node device and the tail node device.
[0040] In an optional implementation, the configuration information includes the address family, protocol type, port, and address of the control device; the intermediate node device and the tail node device are further used for:
[0041] The following detection header in the received message is identified. When the following detection header of the received message is identified to contain the configuration information and the first opcode, the received message is determined to be the first control message.
[0042] The configuration information in the first control message is obtained to obtain the address family, protocol type, port and address of the control device. After establishing a connection with the control device according to the address family, port and address of the control device, the measurement data is reported to the control device according to the protocol type of the control device.
[0043] The following invention provides a flow-following detection method and system: A control device sends configuration information to the first node device. When the first node device starts flow-following detection, it sends a first control message carrying the configuration information to intermediate and tail node devices. Upon receiving the first control message, the intermediate and tail node devices establish a connection with the control device based on the configuration information and begin reporting measurement data to the control device. When the first node device stops flow-following detection, it sends a second control message carrying the configuration information to the intermediate and tail node devices. Upon receiving the second control message, the intermediate and tail node devices disconnect from the control device based on the configuration information and stop reporting measurement data to the control device. By having the first node device send the configuration information from the control device to other node devices, the configuration sending operation is simplified. Furthermore, the node devices control their communication status with the control device through the received control messages, achieving the effect of "connecting immediately upon measurement and disconnecting immediately upon stopping," thereby improving the flexibility of flow-following detection.
[0044] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0045] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A schematic diagram of the flow detection system provided in an embodiment of the present invention is shown;
[0047] Figure 2 A schematic diagram of an electronic device provided in an embodiment of the present invention is shown;
[0048] Figure 3 This diagram illustrates a flow chart of the in-flow detection method provided in an embodiment of the present invention.
[0049] Figure 4 An example diagram of the flow detection method provided in an embodiment of the present invention is shown;
[0050] Figure 5Another example diagram of the flow detection method provided in an embodiment of the present invention is shown;
[0051] Figure 6 This diagram illustrates yet another example of the flow detection method provided in an embodiment of the present invention.
[0052] Icons: 110 - Processor; 120 - Memory; 130 - Communication module. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0054] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0055] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0056] IFIT (In-situ Flow Information Telemetry) is a flow-based OAM (Operation Administration and Maintenance) measurement technology. It is a network performance measurement method based on IP (Internet Protocol) data streams. It obtains the actual packet loss rate, latency, and other performance indicators of the IP network by directly measuring service packets.
[0057] Existing flow-following detection technology involves the first node device creating an IFIT header and adding it to the network traffic. As the network forwards, intermediate and tail nodes identify the IFIT header and dynamically measure the data, then report the measurement data to the control device for processing. However, this approach has two problems: First, the control device needs to distribute configurations to all node devices. Although there are currently methods using scripts to achieve batch distribution, these are cumbersome and difficult to maintain. Second, even when no measurement is needed, each node device establishes a connection with the control device, resulting in high operational pressure on the control device. Furthermore, after the first node device stops measuring, intermediate and tail nodes need to wait for a timeout before stopping measurement, leading to poor flexibility in flow-following detection. Therefore, this invention provides a flow-following detection method to solve the above problems.
[0058] Please see Figure 1 This is a schematic diagram of a flow-following detection system provided in an embodiment of the present invention. The flow-following detection system includes multiple communicatively connected node devices, including a head node device, a tail node device, and at least one intermediate node device. The head node device can be understood as the input terminal of the flow-following detection system, and the tail node device can be understood as the output terminal of the flow-following detection system. The flow-following detection system also includes a control device communicatively connected to the head node device.
[0059] The control device can be a server that integrates functions such as Telemetry, NETCONF (Network Configuration Protocol), and SNMP (Simple Network Management Protocol).
[0060] Telemetry is a remote data acquisition technology for monitoring device performance and faults. NETCONF is a network management protocol based on XML (Extensible Markup Language), providing a programmable way to configure and manage network devices. SNMP is a set of network management protocols defined by the IETF (Internet Engineering Task Force).
[0061] The node device can be a network device used to form an information communication network, such as a router or switch, but this embodiment of the invention does not limit it.
[0062] Please see Figure 2 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The structure of this electronic device can be used to implement the above-mentioned... Figure 1The control equipment or node equipment in the process.
[0063] The electronic device includes a processor 110, a memory 120, and a communication module 130. These components are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0064] The processor 110 is used to read / write data or programs stored in the memory 120 and perform corresponding functions. It can be a general-purpose processor, including CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be a DSP digital signal processor, ASIC application-specific integrated circuit, FPGA off-the-shelf programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0065] The memory 120 is used to store programs or data. The memory 120 can be RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.
[0066] The communication module 130 is used for signaling or data communication with other devices.
[0067] Understandable Figure 2 The structure shown is only a schematic diagram of an electronic device; the electronic device may also include components that are larger than those shown. Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown. Figure 2 The components shown can be implemented using hardware, software, or a combination thereof.
[0068] The following will use the above-mentioned flow detection system as the execution subject to execute the various steps in the methods provided in the embodiments of the present invention and achieve the corresponding technical effects.
[0069] Please see Figure 3 , Figure 3 This is a schematic flowchart of a flow detection method provided in an embodiment of the present invention.
[0070] Step S202: The control device sends the configuration information to the first node device;
[0071] Understandably, in the prior art, the control device needs to send configurations to multiple node devices, which makes the operation cumbersome and maintenance difficult. Therefore, in this embodiment, the control device only sends configuration information to the first node device, and then the first node device sends the configuration information to other node devices. This eliminates the need for the control device to send configurations to each node device, which simplifies the operation and facilitates maintenance.
[0072] Step S204: When the first node device starts flow detection, it sends a first control message carrying configuration information to the intermediate node device and the tail node device.
[0073] In this embodiment, after the first node device enables the flow following detection function, it begins to perform flow following detection. At this time, the first node device sends a first control message carrying configuration information to the intermediate node devices and the tail node device to notify other node devices to start performing flow following detection. The first control message can be understood as a message used to notify other node devices to start performing flow following detection.
[0074] In step S206, when the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message and begin to report measurement data to the control device.
[0075] In this embodiment, both the intermediate node device and the tail node device will identify the received message. When they identify the received message as the first control message, they know that they need to start following the flow detection. Then, they will establish a connection with the control device according to the configuration information carried in the first control message and report their own measurement data to the control device so that the control device can detect the network's packet loss rate, latency and other performance indicators based on the received measurement data.
[0076] In step S208, when the first node device stops following the flow detection, it sends a second control message carrying configuration information to the intermediate node device and the tail node device.
[0077] In this embodiment, when the preset detection period ends or the first node device receives a detection stop command, i.e., when the first node device stops the flow detection, it sends a second control message carrying configuration information to the intermediate and tail node devices to notify other node devices to stop the flow detection. The second control message can be understood as a message used to notify other node devices to stop the flow detection.
[0078] In step S210, when the intermediate node device and the tail node device identify that the received message is the second control message, they disconnect from the control device according to the configuration information in the second control message and stop reporting measurement data to the control device.
[0079] In this embodiment, both the intermediate node device and the tail node device will identify the received message. When they identify the received message as the second control message, they know that the flow detection should be stopped. Then, they will disconnect from the control device according to the configuration information carried in the second control message and stop reporting measurement data to the control device.
[0080] In essence, this invention involves the first node device sending control messages to other node devices. These messages allow the other node devices to control their communication with the control device, enabling them to connect to the control device at the start of detection and disconnect when detection stops. This achieves a "connect-as-you-go, disconnect-as-you-stop" effect, significantly improving the flexibility of flow-based detection. Furthermore, the control device only needs to send configuration information to the first node device, which then forwards it to the other node devices. This eliminates the need for the control device to send configuration information to each individual node, simplifying operation and enhancing management and maintenance convenience.
[0081] As can be seen from the above steps, the control device sends configuration information to the first node device. When the first node device starts flow-following detection, it sends a first control message carrying configuration information to the intermediate and tail node devices. Upon receiving the first control message, the intermediate and tail node devices establish a connection with the control device according to the configuration information and begin reporting measurement data to the control device. When the first node device stops flow-following detection, it sends a second control message carrying configuration information to the intermediate and tail node devices. Upon receiving the second control message, the intermediate and tail node devices disconnect from the control device according to the configuration information and stop reporting measurement data to the control device. By having the first node device send the configuration information sent by the control device to other node devices, the configuration sending operation is simplified, and the node devices control their communication status with the control device through the received control messages, achieving the effect of "connecting immediately upon testing and disconnecting immediately upon stopping," thereby improving the flexibility of flow-following detection.
[0082] To facilitate a better understanding of this invention, the following section will introduce the flow detection technology. Flow detection technology involves adding an IFIT header, also known as a flow detection header, to the packet. This flow detection header defines the flow detection rules. When a node device receives a packet carrying the flow detection header, it will measure data and report it according to the flow detection rules defined in the header.
[0083] This invention relates to an embodiment that adds an extended field to the end of the flow detection header and uses this extended field to carry configuration information of the control devices. It is understood that the number of extended fields can be set according to the number of control devices. For example, if only the configuration information of one control device is carried, the number of extended fields can be set to one; if the configuration information of multiple control devices is to be carried, the number of extended fields can be set to multiple, that is, one extended field carries the configuration information of one control device.
[0084] In this embodiment of the invention, the configuration information may include the address family, protocol type, port, and address of the control device. It should be understood that the configuration information can be set according to actual application, and this embodiment of the invention does not impose limitations. Based on the scenario where the configuration information includes the address family, protocol type, port, and address of the control device, this embodiment of the invention provides an example diagram of an extended field; please refer to [reference needed]. Figure 4 .
[0085] The first bit represents the address family of the control device. When it is 0, it means that the address family of the control device is IPv4 (Internet Protocol version 4); when it is 1, it means that the address family of the control device is IPv6 (Internet Protocol Version 6).
[0086] Bits 2 through 4 indicate the protocol type of the control device. When it is 1, the protocol type of the control device is Telemetry; when it is 2, the protocol type of the control device is NETCONF; when it is 3, the protocol type of the control device is SNMP.
[0087] Bits 5 through 7 represent the opcode (operation code), which indicates the operation performed on the configuration information. When it is 0, it indicates that an add operation is performed on the configuration information; when it is 1, it indicates that a delete operation is performed on the configuration information; and when it is 2, it indicates that an update operation is performed on the configuration information.
[0088] Bits 8 through 15 represent the control device port, i.e., the server port. Bits 16 through 32 represent reserved bits.
[0089] The server address represents the address of the controlling device. If the address family of the controlling device is IPv4, then the length of the server address is 32 bits. If the address family of the controlling device is IPv6, then the length of the server address is 128 bits.
[0090] The following will combine Figure 4 The flow detection method provided in the embodiments of the present invention will be described.
[0091] Optionally, when the first node device starts flow detection in step S204 above, the first node device will perform the following steps:
[0092] Step S204-1: The first node device constructs a follow-up detection header for the received original message, and adds configuration information and a first operation code indicating a new operation to the follow-up detection header to generate a first control message;
[0093] Step S204-3: The first node device sends the first control message to the intermediate node device and the tail node device;
[0094] Step S204-5: The first node begins to report measurement data to the control device.
[0095] For ease of understanding, an example is provided in this embodiment of the invention. For example, assume that the flow detection system includes three node devices, namely node device 1, node device 2 and node device 3, and control device A, wherein node device 1 is the first node device, node device 2 is the middle node device, and node device 3 is the tail node device.
[0096] Based on the above examples, an example diagram is provided in this embodiment of the invention. Please refer to... Figure 5 The following will combine Figure 5 The steps S204-1 to S204-3 above will be explained.
[0097] First, control device A sends the flow detection rules and configuration information, namely its own address family, protocol type, port and address, to node device 1.
[0098] Then, when node device 1 starts flow detection, it constructs a flow detection header for the received original packet according to the flow detection rules, and adds the configuration information of control device A, namely address family, protocol type, port and address, to the extended field of the flow detection header. It also adds an opcode and sets the opcode to the first opcode, such as 0, which represents the new operation, thus generating the first control packet.
[0099] Next, node device 1 sends the first control message to node device 2 according to the routing path. Node device 2 then sends the first control message to node device 3 to notify node devices 2 and 3 to begin flow detection. Furthermore, node device 1 measures data according to the flow detection rules and reports it to control device A.
[0100] Optionally, based on the above-described implementation method of the first node device sending the first control message, this embodiment of the invention provides a possible implementation method for step S206.
[0101] Step S206-1: The intermediate node and tail node devices identify the following detection header in the received message. When the following detection header of the received message is identified to contain configuration information and the first opcode, the received message is determined to be the first control message.
[0102] In step S206-3, the intermediate node and tail node devices obtain the configuration information in the first control message, obtain the address family, protocol type, port and address of the control device, and after establishing a connection with the control device according to the address family, port and address of the control device, they start reporting measurement data to the control device according to the protocol type of the control device.
[0103] The following continues... Figure 5 The example shown illustrates steps S206-1 to S206-3.
[0104] First, the intermediate node device, namely node device 2, identifies the following detection header in the received message. If it is identified that the following detection header of the received message carries configuration information and a first opcode such as 0, then it is determined that the received message is the first control message, that is, it is determined that following detection should be started.
[0105] Then, node device 2 obtains configuration information from the extended field of the flow detection header and adds configuration information according to the first opcode, that is, saves the address family, protocol type, port and address of control device A to the local machine; after establishing a connection with control device A according to the address family, port and address of control device A, it measures data according to the flow detection rules defined in the flow detection header, and reports its own measurement data to control device A according to the protocol type of control device A.
[0106] For the tail node device, i.e. node device 3, it establishes a connection with the control device A in a similar manner to node device 2, and reports its own measurement data to the control device A.
[0107] Optionally, when the first node device stops flow detection in step S208 above, the first node device will perform the following steps:
[0108] Step S208-1: The first node device stops reporting measurement data to the control device;
[0109] Step S208-3: When the first node device stops following the flow detection, it constructs a following flow detection header for the received original message, and adds configuration information and a second operation code indicating the deletion operation to the following flow detection header to generate a second control message;
[0110] Step S208-5: The first node device sends the second control message to the intermediate node device and the tail node device;
[0111] Based on the above examples, this embodiment of the invention provides another example diagram. Please refer to... Figure 6 The following will combine Figure 6 Steps S208-1 to S208-5 will be explained.
[0112] First, when the preset flow detection cycle ends or the first node device, i.e., node device 1, receives a detection stop command, node device 1 stops flow detection, that is, it stops reporting measurement data to control device A.
[0113] Then, node device 1 constructs a flow detection header for the received original message according to the flow detection rules, and adds the configuration information of control device A, namely address family, protocol type, port and address, to the extended field of the flow detection header. It also adds a second opcode, such as 1, which represents a deletion operation, and generates a second control message.
[0114] Next, node device 1 sends the second control message to node device 2 according to the routing path, and node device 2 sends the second control message to node device 3 to notify node device 2 and node device 3 to stop following the flow detection.
[0115] Optionally, based on the above-described implementation method of the first node device sending the second control message, this embodiment of the invention provides a possible implementation method for step S210.
[0116] Step S210-1: The intermediate node and tail node devices identify the following detection header in the received message. When the following detection header of the received message is identified to contain configuration information and a second operation code, the received message is determined to be a second control message.
[0117] In step S210-3, the intermediate node and tail node devices obtain the configuration information in the second control message, obtain the address family, protocol type, port and address of the control device, and after disconnecting from the control device according to the address family, port and address of the control device, they stop reporting measurement data to the control device.
[0118] The following continues... Figure 6The example shown illustrates steps S210-1 to S210-3.
[0119] First, the intermediate node device, namely node device 2, identifies the following detection header in the received message. If it is identified that the following detection header of the received message carries configuration information and a second operation code such as 1, then it is determined that the received message is a second control message, that is, it is determined that the following detection should be stopped.
[0120] Then, node device 2 obtains the configuration information from the extended field of the flow detection header and performs a deletion operation on the configuration information according to the second operation code, that is, deletes the address family, protocol type, port and address of control device A locally, so as to disconnect from control device A and stop reporting measurement data to control device A.
[0121] For the tail node device, i.e. node device 3, it disconnects from the control device A in a similar manner to node device 2 and stops reporting measurement data to the control device A.
[0122] Optionally, as described above, a flow detection header is added to the packet during the flow detection process. The flow detection header is not the content of the packet to be transmitted. Therefore, when the tail node device recognizes that the received packet has a flow detection header, it will parse it to obtain the original packet and forward the original packet to forward the content of the packet to be transmitted to other networks.
[0123] This invention also provides a flow-following detection system. It should be noted that the basic principle and technical effects of the flow-following detection system provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The flow-following detection system provided in this embodiment includes a first node device, intermediate node devices, and a tail node device connected in communication, as well as a control device connected in communication with the first node device.
[0124] The control device is used to send configuration information to the first node device;
[0125] The first node device is used to send a first control message carrying configuration information to the intermediate node devices and the tail node device when the flow detection begins;
[0126] The intermediate node device and the tail node device are used to establish a connection with the control device according to the configuration information in the first control message when the received message is identified as the first control message, and to start reporting measurement data to the control device.
[0127] The first node device is also used to send a second control message carrying configuration information to the intermediate node device and the tail node device when the flow detection stops;
[0128] The intermediate node device and the tail node device are also used to disconnect from the control device and stop reporting measurement data to the control device when the received message is identified as a second control message, based on the configuration information in the second control message.
[0129] Optionally, the first node device is also used to: when starting flow detection, construct a flow detection header for the received original message, add configuration information and a first opcode indicating a new operation to the flow detection header to generate a first control message; and send the first control message to the intermediate node device and the tail node device.
[0130] Optionally, the intermediate node device and the tail node device are further configured to: identify the following detection header in the received message; when the following detection header of the received message is identified to contain configuration information and a first opcode, determine that the received message is a first control message; obtain the configuration information in the first control message, obtain the address family, protocol type, port and address of the control device, and after establishing a connection with the control device according to the address family, port and address of the control device, start reporting measurement data to the control device according to the protocol type of the control device.
[0131] Optionally, the first node device is also used to: when stopping flow detection, construct a flow detection header for the received original message, add configuration information and a second opcode indicating a deletion operation to the flow detection header to generate a second control message; and send the second control message to the intermediate node device and the tail node device.
[0132] Optionally, the intermediate node device and the tail node device are also used to: identify the following detection header in the received message; when the following detection header of the received message is identified to contain configuration information and a second opcode, determine that the received message is a second control message; obtain the configuration information in the second control message, obtain the address family, protocol type, port and address of the control device, and after disconnecting from the control device according to the address family, port and address of the control device, stop reporting measurement data to the control device.
[0133] Optionally, the first node device is also configured to: start reporting measurement data to the control device when starting flow-following detection; and stop reporting measurement data to the control device when stopping flow-following detection.
[0134] Optionally, the tail node device is also used to: parse the received message to obtain the original message, and forward the original message.
[0135] In the several embodiments provided by this invention, it should be understood that each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0136] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0137] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0138] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting flow-in-flow, characterized in that, The method is applied to a flow-following detection system, which includes a first node device, intermediate node devices, and a tail node device connected in communication with the first node device, and a control device connected in communication with the first node device. The method includes: The control device sends the configuration information to the first node device; When the first node device starts performing flow detection, it constructs a flow detection header for the received original message, and adds the configuration information and a first operation code indicating a new operation to the flow detection header to generate a first control message. The first node device sends the first control message to the intermediate node device and the tail node device; When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message and begin reporting measurement data to the control device. When the first node device stops following the flow detection, it constructs a following flow detection header for the received original message, and adds the configuration information and a second operation code indicating a deletion operation to the following flow detection header to generate a second control message; The first node device sends the second control message to the intermediate node device and the tail node device; When the intermediate node device and the tail node device identify the received message as the second control message, they disconnect from the control device according to the configuration information in the second control message and stop reporting measurement data to the control device.
2. The method according to claim 1, characterized in that, The configuration information includes the address family, protocol type, port, and address of the control device; When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message, and begin reporting measurement data to the control device, including: The intermediate node and the tail node device identify the following detection header in the received message. When the following detection header of the received message is identified to contain the configuration information and the first opcode, the received message is determined to be the first control message. The intermediate node and the tail node device obtain the configuration information in the first control message, obtain the address family, protocol type, port and address of the control device, and after establishing a connection with the control device according to the address family, port and address of the control device, they start reporting measurement data to the control device according to the protocol type of the control device.
3. The method according to claim 1, characterized in that, The configuration information includes the address family, protocol type, port, and address of the control device; When the intermediate node device and the tail node device identify the received message as the second control message, they disconnect from the control device according to the configuration information in the second control message and stop reporting measurement data to the control device, including: The intermediate node and the tail node device identify the following detection header in the received message. When the following detection header of the received message is identified to contain the configuration information and the second opcode, the received message is determined to be the second control message. The intermediate node and the tail node device obtain the configuration information in the second control message, obtain the address family, protocol type, port and address of the control device, and after disconnecting from the control device according to the address family, port and address of the control device, stop reporting measurement data to the control device.
4. The method according to claim 1, characterized in that, The method further includes: When the first node begins flow detection, it starts reporting measurement data to the control device. When the first node stops flow detection, it stops reporting measurement data to the control device.
5. The method according to claim 1, characterized in that, The method further includes: The tail node device parses the received message to obtain the original message and forwards the original message.
6. A flow-following detection system, characterized in that, The flow detection system includes a first node device, an intermediate node device, and a tail node device that are connected in communication, as well as a control device that is connected in communication with the first node device. The control device is used to send configuration information to the first node device; The first node device is used to construct a flow detection header for the received original message when the flow detection starts, and add the configuration information and a first operation code indicating a new operation to the flow detection header to generate a first control message, and send the first control message to the intermediate node device and the tail node device. When the intermediate node device and the tail node device identify the received message as the first control message, they establish a connection with the control device according to the configuration information in the first control message and begin reporting measurement data to the control device. The first node device is also used to construct a flow detection header for the received original message when the flow detection stops, and to add the configuration information and a second operation code indicating the deletion operation to the flow detection header to generate a second control message, and to send the second control message to the intermediate node device and the tail node device. The intermediate node device and the tail node device are further configured to disconnect from the control device and stop reporting measurement data to the control device when the received message is identified as the second control message, based on the configuration information in the second control message.
7. The system according to claim 6, characterized in that, The configuration information includes the address family, protocol type, port, and address of the control device; the intermediate node device and the tail node device are also used for: The following detection header in the received message is identified. When the following detection header of the received message is identified to contain the configuration information and the first opcode, the received message is determined to be the first control message. The configuration information in the first control message is obtained to obtain the address family, protocol type, port and address of the control device. After establishing a connection with the control device according to the address family, port and address of the control device, the measurement data is reported to the control device according to the protocol type of the control device.
Citation Information
Patent Citations
DHT-based (distributed hash table-based) control network implementation method, system and network controller
CN103051539A
Network delay state detection method and device
CN111769998A