In-line detection method, node device and in-line detection system
By configuring high and low priority ACL entries on the switching chip for alternating use, the statistical packet loss problem caused by periodic switching in the flow detection of the switch is solved, and the accuracy of zero packet loss measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MAIPU COMM TECH CO LTD
- Filing Date
- 2025-09-30
- Publication Date
- 2026-07-24
AI Technical Summary
When using ACLs to implement flow detection on switches, existing technologies may result in statistical packet loss during periodic switching, leading to inaccurate packet loss measurements.
Two ACL entries with different priorities are pre-configured on the switching chip. The high-priority ACL entry is only active during odd-numbered measurement periods, while the low-priority ACL entry is always active. The switching chip identifies and marks traffic packets through different ACL entries during different measurement periods, and the processor reads the packet statistics results after each measurement period.
It achieves zero-missing-packet measurement without increasing hardware burden, ensuring the accuracy of switch flow detection.
Smart Images

Figure CN121098762B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a flow detection method, node device, and flow detection system. Background Technology
[0002] With the rapid development of information technology, the internet has become an indispensable part of modern society. Enterprises and individuals have increasingly higher demands for network service quality, especially driven by emerging technologies such as 5G, cloud computing, and the Internet of Things, leading to an explosive growth in network traffic. At the same time, network architectures are becoming increasingly complex, making traditional network monitoring methods inadequate for current needs. For example, in data centers and carrier networks, traditional probe-based or simulated traffic flow detection methods cannot accurately reflect the state of real traffic flow, resulting in inaccurate network performance assessments and inefficient fault location. Against this backdrop, flow-based detection technology has emerged.
[0003] In-situ Flow Information Telemetry (IFIT) is a technology used for real-time monitoring of network traffic performance. It directly labels the characteristics of real network traffic flows to directly detect transmission quality indicators such as latency, packet loss, and jitter. Combined with telemetry technology, it sends the detected data to the network controller in real time. After comprehensive calculation by the controller, the network transmission quality can be intuitively displayed to the user through a graphical interface.
[0004] Flow detection technology is typically used in network communication devices such as switches or routers. On routers, traffic is forwarded by the CPU (Central Processing Unit) software, which can naturally perform custom processing on packets to meet the feature marking and statistical actions in flow detection technology. However, on switches, after traffic enters the switching chip, it first queries the routing table in the switching chip and forwards the packet directly according to the matched routing table to achieve efficient forwarding. The entire forwarding process is entirely a hardware behavior of the switching chip, and the software cannot directly access the packet forwarding process. Therefore, it is necessary to utilize the switching chip's capabilities to identify and perform feature marking and statistics on packets to complete the collection of packet data. For commonly used switching chips on the market, they do not yet have the ability to perform flow detection independently and usually need to be combined with software control to achieve this.
[0005] ACLs (Access Control Lists) are currently the mainstream technology used in switching chips to implement flow detection functionality. Specifically, the software pre-deploys the flow characteristics to be monitored to the switching chip based on business requirements. For example, flow characteristics can be packet 5-tuple information. When a packet enters the switching chip, it performs packet statistics based on whether the ACL rules are matched. After a period of time, the packet loss rate is calculated by analyzing the values collected from the ACLs of multiple devices.
[0006] Since flow-following detection is calculated and aggregated according to measurement cycles, in the existing implementation, during cycle switching, the software interacts with the switching chip. During this period, the measurement is in a vacuum, meaning the ACL is not effective, resulting in missed packets in the statistics and inaccurate calculation results. Specifically, at the measurement entry node, the ACL can only match packet characteristics. Packets that match the ACL rule are processed with alternating coloring: in the first cycle, the packet is colored with 1, and in the second cycle, it is colored with 0, marking the packet as a flow-following detection packet. Subsequent forwarding devices match the coloring bits to identify and count the packets. When the cycle switches, the ACL at the measurement entry node also needs to be switched. The purpose of the switch is to update the coloring action of the ACL entries and count the packets in the corresponding ACL entries. During the switch, the switching chip cannot collect packets. If the traffic rate is greater than the time overhead of the ACL update, it will cause missed packets in the statistics. This part of the traffic will not be counted by flow-following detection. If this part of the traffic is lost, it will lead to the measurement results not matching the actual situation, resulting in inaccurate traffic statistics and packet loss measurement results.
[0007] Providing highly reliable network services is a common pursuit in the communications technology industry. Monitoring network transmission quality and optimizing it as needed through technical means is a necessary approach. The core advantage of flow detection technology is that it reflects the true quality of traffic transmission. Therefore, it is essential to solve the problem that the existing technical implementation methods of switches lead to inaccurate packet loss measurement. Summary of the Invention
[0008] The purpose of this application is to provide a flow detection method, node device, and flow detection system to solve the problem that statistical packet loss occurs during periodic switching when using ACLs to implement flow detection on switches in the prior art, resulting in inaccurate packet loss measurement.
[0009] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0010] In a first aspect, embodiments of this application provide a flow-following detection method applied to an ingress node device. The ingress node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries of different priorities. The high-priority ACL entry and the low-priority ACL entry are respectively associated with odd-numbered and even-numbered measurement periods of the flow-following detection. The method includes:
[0011] The processor controls the high-priority ACL entries to be active only during the odd-numbered measurement periods, and controls the low-priority ACL entries to be active at all times.
[0012] After receiving a traffic packet, if the current measurement period is odd, the switching chip will identify the target traffic packet through the high-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics. If the current measurement period is even, the switching chip will identify the target traffic packet through the low-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics.
[0013] After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
[0014] Optionally, the processor controls the high-priority ACL entry to be active only during the odd-numbered measurement periods, including:
[0015] After the flow detection is enabled or the current measurement cycle is reached, the processor determines the cycle type of the next measurement cycle based on the system timestamp at the current moment.
[0016] If the period type of the next measurement period is an odd measurement period, then the high-priority ACL entry is activated to make the high-priority ACL entry active.
[0017] If the period type of the next measurement period is an even-numbered measurement period, then the high-priority ACL entry is deactivated to make it inactive.
[0018] Optionally, the period type of the next measurement period is determined based on the system timestamp of the current moment, including:
[0019] Calculate the ratio between the system timestamp of the current moment and the set measurement period duration to obtain the period ID;
[0020] If the period ID is odd, then the period type of the next measurement period is determined to be the odd measurement period;
[0021] If the period ID is even, then the period type of the next measurement period is determined to be the even-numbered measurement period.
[0022] Optionally, the switching chip identifies the target traffic packets through the high-priority ACL entries, marks the target traffic packets as colored packets, and then performs statistics, including:
[0023] If the flow characteristics of the traffic packet are consistent with the flow characteristics in the high-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, colors the target traffic packet to position 1, and then performs statistics on the colored packet.
[0024] The switching chip identifies target traffic packets through the low-priority ACL entries, marks the target traffic packets as colored packets, and then performs statistics, including:
[0025] If the flow characteristics of the traffic packet match the flow characteristics in the low-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, colors the packet loss position of the target traffic packet to 0, and then performs statistics on the colored packets.
[0026] Secondly, embodiments of this application provide a flow-following detection method applied to an intermediate node device. The intermediate node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with odd-numbered and even-numbered measurement periods of the flow-following detection. The method includes:
[0027] After receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, the switching chip determines the traffic packet as a colored packet and includes the colored packet in the odd-numbered measurement period; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, the traffic packet is determined as a colored packet and includes the colored packet in the even-numbered measurement period. The colored packet is obtained by the ingress node device through the flow detection method described in the first aspect above.
[0028] After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
[0029] Optionally, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd-numbered measurement period, including:
[0030] If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd measurement period and the coloring bit of the traffic packet is 1, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd measurement period.
[0031] If the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period, including:
[0032] If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period.
[0033] Thirdly, embodiments of this application provide a flow-following detection method applied to an egress node device. The egress node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with odd-numbered and even-numbered measurement periods of the flow-following detection. The method includes:
[0034] After receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, the switching chip determines that the traffic packet is a colored packet, adds the colored packet to the odd-numbered measurement period, and removes the mark; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, the traffic packet is determined to be a colored packet, adds the colored packet to the even-numbered measurement period, and removes the mark. The colored packet is obtained by the ingress node device through the flow detection method described in the first aspect above.
[0035] After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
[0036] Optionally, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd-numbered measurement period and de-marked, including:
[0037] If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd measurement period and the coloring bit of the traffic packet is 1, then the traffic packet is determined to be a colored packet, the colored packet is counted in the odd measurement period, and the coloring bit of the colored packet is set to 0.
[0038] If the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, then the traffic packet is determined to be a colored packet. The colored packet is then counted in the even-numbered measurement period and de-marked, including:
[0039] If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, then the traffic packet is determined to be a colored packet, the colored packet is counted in the even-numbered measurement period and the coloring bit of the colored packet is kept at 0.
[0040] Fourthly, embodiments of this application provide an ingress node device, which includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries with different priorities. The high-priority ACL entry and the low-priority ACL entry are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection.
[0041] The processor is configured to control the high-priority ACL entries to be active only during the odd-numbered measurement periods, and to control the low-priority ACL entries to be active at all times.
[0042] The switching chip, upon receiving a traffic packet, if it is currently in the odd-numbered measurement period, will identify the target traffic packet through the high-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics; if it is currently in the even-numbered measurement period, it will identify the target traffic packet through the low-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics.
[0043] The processor is also configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
[0044] Fifthly, embodiments of this application provide an intermediate node device, which includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection.
[0045] The switching chip, upon receiving a traffic packet, determines the traffic packet as a colored packet if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, and includes the colored packet in the odd-numbered measurement period; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, it determines the traffic packet as a colored packet and includes the colored packet in the even-numbered measurement period, wherein the colored packet is marked by the ingress node device using the flow detection method described in the first aspect above.
[0046] The processor is configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
[0047] In a sixth aspect, embodiments of this application provide an egress node device, the egress node device including a processor and a switching chip, the switching chip being pre-configured with two ACL entries, the two ACL entries being associated with odd-numbered measurement periods and even-numbered measurement periods of flow detection, respectively;
[0048] The switching chip, upon receiving a traffic packet, determines the traffic packet as a colored packet if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, and then adds the colored packet to the odd-numbered measurement period and removes the mark; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, it determines the traffic packet as a colored packet, adds the colored packet to the even-numbered measurement period and removes the mark, wherein the colored packet is marked by the ingress node device using the flow detection method described in the first aspect above;
[0049] The processor is configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
[0050] In a seventh aspect, embodiments of this application provide a flow detection system, including an inlet node device as described in the fourth aspect, an intermediate node device as described in the fifth aspect, and an outlet node device as described in the sixth aspect, wherein the system clocks of the inlet node device, the intermediate node device, and the outlet node device are synchronized.
[0051] Compared to existing technologies, the flow detection method, node device, and flow detection system provided in this application, for the ingress node device, pre-configure two ACL entries with different priorities on the switching chip. The high-priority ACL entry and the low-priority ACL entry are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection. The processor controls the high-priority ACL entry to be active only during the odd-numbered measurement period, and controls the low-priority ACL entry to be active at all times. When the switching chip receives a traffic packet, if it is currently in an odd-numbered measurement period, the high-priority ACL entry and the low-priority ACL entry will be activated. Both are valid, so the target traffic packets will be identified through the high-priority ACL entries and marked as colored packets before statistics. If the current measurement period is an even number, only the low-priority ACL entries are valid, so the target traffic packets will be identified through the high-priority ACL entries and marked as colored packets before statistics. After each measurement period, the processor reads the packet statistics results of that measurement period from the switching chip. In this way, by using two ACL entries with different priorities alternately, in conjunction with the periodic switching mechanism, zero-missing-packet measurement in the flow detection of the switch can be achieved without increasing the hardware burden.
[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, 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 this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A schematic diagram of a flow detection system provided in an embodiment of this application is shown.
[0055] Figure 2 The illustration shows a flow-following detection method for an ingress node device provided in an embodiment of this application.
[0056] Figure 3 An example diagram is shown, illustrating a flow detection method for an ingress node device provided in an embodiment of this application.
[0057] Figure 4 The illustration shows a flowchart of a flow detection method for intermediate node devices provided in an embodiment of this application.
[0058] Figure 5 The illustration shows a flow chart of a method for detecting data in an exit node device according to an embodiment of this application.
[0059] Figure 6 A block diagram of a node device provided in an embodiment of this application is shown.
[0060] Icons: 10-Node device; 11-Processor; 12-Memory; 13-Switching chip; 14-Communication module. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations.
[0062] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0063] 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.
[0064] like Figure 1 As shown, in the application scenario of IP unicast forwarding on a switch, it is necessary to detect whether there is packet loss and the amount of traffic during the process of target traffic entering from switch SW1 and leaving the outgoing interface of switch SW3. In order to implement flow detection in the above application scenario, it is first necessary to synchronize the system clocks of the three switches through a high-precision clock protocol, and then configure a flow detection instance on each device and configure flow characteristics, such as packet 5-tuples, packet triples, etc.
[0065] When deploying measurement points, the SW1 inlet interface is deployed as the ingress measurement point (In node), indicating that when target traffic enters the measurement and detection domain, packets need to be identified and colored according to the configured flow characteristics, and then measured. The SW2 inlet interface is deployed as the middle measurement point (Middle node), indicating that when target traffic flows through it, intermediate measurements need to be performed based on the coloring information added by the In node, but the packet markings are not modified. The SW3 outgress interface is deployed as the egress measurement point (Out node), indicating that when target traffic leaves the measurement and detection domain, measurements need to be performed based on the coloring information added by the In node, and the packet coloring information is removed to restore the packet and ensure normal traffic forwarding. All measurement points are measured within the same time window. After measurement, the measurement data is sent to the data analyzer via telemetry technology for packet loss data aggregation and calculation.
[0066] It should be noted that the ingress interface of switch SW1 is deployed as an In node. This means that the configuration of this interface determines that when processing traffic coming from this interface, switch SW1 needs to act as an In node, and the measurement work is performed by the hardware (switching chip) and software system of switch SW1. Similarly, the same applies to switches SW2 and SW3.
[0067] Therefore, in Figure 1 Based on the application scenarios shown, this application provides a flow detection system, including an ingress node device (such as a switch SW1), an intermediate node device (such as a switch SW2), and an egress node device (such as a switch SW3). The system clocks of the ingress node device, the intermediate node device, and the egress node device are synchronized. Furthermore, the ingress node device, the intermediate node device, and the egress node device all include a processor and a switching chip, and the processor and the switching chip are connected through a driver.
[0068] In this embodiment, for the ingress node device (such as switch SW1), the processor can send ACL entries of different priorities to the switching chip according to odd and even cycles, and periodically control the activation status of high-priority ACL entries to achieve 100% accurate measurement of target traffic and ensure accurate packet loss measurement. For example, in the above... Figure 1 In the forwarding scenario shown, the user configures a flow detection instance (Instance A) on switch SW1, configures the flow detection flow characteristics (e.g., srcIP + dstIP + Protocol), deploys the measurement point In node on the traffic ingress interface, and switches SW2 and SW3 are also configured as needed, and the three devices start measurement.
[0069] The following sections provide a detailed description of the flow detection work performed by the inlet node device, intermediate node device, and outlet node device.
[0070] Please refer to Figure 2 , Figure 2 The flowchart illustrating the flow detection method for ingress node devices provided in this application embodiment is shown, which may include the following steps:
[0071] S101, the processor controls high-priority ACL entries to be active only during odd-numbered measurement periods, and controls low-priority ACL entries to be active at all times.
[0072] S102, after receiving a traffic packet, if the current measurement period is odd, the switching chip will identify the target traffic packet through the high-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics; if the current measurement period is even, the switching chip will identify the target traffic packet through the low-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics.
[0073] S103, after each measurement cycle ends, the processor reads the message statistics results of that measurement cycle from the switching chip.
[0074] Flow-following detection is typically continuous. After a measurement window, the results of that window are calculated. This window is called the measurement period, and the specific time interval is not limited, but is measured in seconds. In this embodiment, the flow-following detection measurement periods are classified into odd-numbered and even-numbered measurement periods. An ACL entry is assigned to each of the odd and even measurement periods for independent detection of the flow in their respective periods. By setting different priorities for the two ACL entries, the lower-priority ACL entry is always active, and the activation state of the higher-priority ACL entry is controlled by software to achieve a measurement effect without measurement vacuum periods.
[0075] During the continuous flow monitoring period, a cycle ID is generated for each measurement cycle. The calculation method is: Cycle ID = System Timestamp / Set Measurement Cycle Duration. The measurement cycle is divided into odd-numbered measurement cycles and even-numbered measurement cycles based on the parity of the cycle ID value, and the odd-even measurement cycles always alternate. The devices participating in the flow monitoring must ensure that the system clocks of each device are synchronized through a high-precision clock synchronization protocol. Therefore, it can be guaranteed that the cycle ID calculated by each device at the same time is consistent.
[0076] The points where traffic flow data is collected are called measurement points. When deploying flow detection functionality, measurement points need to be deployed first. The measurement point where traffic enters the measurement domain is called the entry measurement point, which is also the location where traffic is first identified, counted, and colored. Figure 1 In the context of the In node; the measurement points that the traffic passes through along the way are called intermediate measurement points. These points only identify and count the traffic, such as... Figure 1The Middle node in the measurement domain; the measurement point where the flow leaves the measurement domain is called the exit measurement point. It is used for flow identification, statistics, and decolorization, such as... Figure 1 The Out node in the switch. Deploying flow detection functionality on the switch requires issuing corresponding ACL entries for each measurement point based on its category. This is used to identify, statistically analyze, color, or decolorize traffic. Each flow detection instance has a flow characteristic, which will serve as the ACL matching condition to identify target traffic.
[0077] Optionally, the flow characteristics configured in the ACL entry can be a packet 5-tuple, including source IP address, destination IP address, source port number, destination port number, and transport layer protocol, i.e., srcIP + dstIP + srcPort + dstPort + Protocol; or a packet triple, including source IP address, destination IP address, and transport layer protocol, i.e., srcIP + dstIP + Protocol; this embodiment does not impose any restrictions on this.
[0078] At the entry measurement point, the software running on the processor allocates two ACL entries and sends them to the switching chip (ACL entries corresponding to odd-numbered measurement cycles can be used with ACL). 奇 This indicates that ACL entries corresponding to even-numbered measurement periods can be used with ACL. 偶 (This indicates that the software records the indices of the two ACL entries for subsequent updates.) These two ACLs have the same matching rules and the same flow characteristics, but different actions: ACL 奇 Used to color position 1 of the message, ACL 偶 Used to color position 0 of the message, critically, to set the ACL. 奇 Set the priority to high priority, ACL 偶 Set its priority to low.
[0079] It should be noted that coloring is usually not about modifying application layer data, but rather about inserting a special instruction header (e.g., INT Header, IOAM Header) into the network layer or tunnel layer header, or utilizing certain reserved fields in the existing message header (e.g., VXLAN, NVGRE, Geneve). The switching chip is programmed to recognize and manipulate this special header.
[0080] For example, at the entry measurement point, the software requests two ACL entries, and the two ACL entries are added to the switching chip as shown in Table 1:
[0081] Table 1
[0082]
[0083] In step S101, the processor controls high-priority ACL entries to be active only during odd-numbered measurement cycles. This includes: after flow detection is enabled or the current measurement cycle is reached, the processor determines the cycle type of the next measurement cycle based on the system timestamp at the current moment; if the cycle type of the next measurement cycle is an odd-numbered measurement cycle, the high-priority ACL entries are activated to ensure they are in an active state; if the cycle type of the next measurement cycle is an even-numbered measurement cycle, the high-priority ACL entries are deactivated to ensure they are in an inactive state.
[0084] In one possible implementation, determining the cycle type of the next measurement cycle based on the system timestamp of the current moment includes: calculating the ratio between the system timestamp of the current moment and the set measurement cycle duration to obtain the cycle ID; if the cycle ID is odd, then the cycle type of the next measurement cycle is determined to be an odd measurement cycle; if the cycle ID is even, then the cycle type of the next measurement cycle is determined to be an even measurement cycle.
[0085] In other words, after receiving the enable command for flow detection, the processor initiates measurement, and the software starts a timer. Upon receiving the enable command or after the timer expires (i.e., after flow detection is enabled or the current measurement cycle has ended), the processor calculates the cycle ID for the current moment and applies the ACL based on the parity of the cycle ID. 奇 Activating or deactivating ACL entries involves performing an activation (install) or deactivation (uninstall) operation. This operation only changes the activation status of the ACL entry in the switching chip; it does not add or delete ACL entries, resulting in minimal processing overhead. For example, when the time window of the previous measurement cycle ends and the software calculates that the cycle ID at the current moment is even, it determines that the cycle type of the next measurement cycle is an odd-numbered measurement cycle. This requires activating the ACL... 奇 Deactivate the entry to enable ACL 奇 The entry is inactive in the switching chip; when the software calculates that the current period ID is odd, it determines that the period type of the next measurement period is an even measurement period, and applies this to the ACL. 奇 Activate the entry to enable ACL 奇 The entry is active in the switching chip, while the ACL 偶 The entry remains active at all times.
[0086] In step S102, the switching chip identifies the target traffic packet through the high-priority ACL entry and marks the target traffic packet as a colored packet before counting. This includes: when the flow characteristics of the traffic packet are consistent with the flow characteristics in the high-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, marks the target traffic packet at position 1, and counts the colored packet.
[0087] In step S102, the switching chip identifies the target traffic packet through the low-priority ACL entry and marks the target traffic packet as a colored packet before statistics. This includes: when the flow characteristics of the traffic packet are consistent with the flow characteristics in the low-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, colors the packet loss position of the target traffic packet to 0, and then performs statistics on the colored packet.
[0088] In step S103, after each measurement cycle ends, the processor reads the message statistics results of that measurement cycle from the switching chip. At the same time, after associating the message statistics results with the cycle ID of the corresponding measurement cycle, it sends them to the data analyzer through Telemetry technology for comprehensive calculation of packet loss data.
[0089] The following example illustrates the flow detection process performed by the ingress node device:
[0090] 1. After receiving the flow detection enable command, the processor starts measurement, the software starts a timer, and the software calculates the current period ID. Assuming the calculated period ID is odd, the measurement period is determined to start from an odd-numbered measurement period. When a traffic packet enters the switching chip, since it is currently in an odd-numbered measurement period, the ACL... 奇 Table entries and ACLs 偶 Both ACL entries are valid. According to the matching rules, both ACL entries will be matched, confirming the traffic packet as the target traffic packet. However, due to the ACL... 奇 The entry with higher priority takes effect first, so the message is colored with position 1, and the message is counted in the odd-numbered measurement period;
[0091] 2. When the time window of the odd-numbered measurement period ends, the software timer is triggered. The software calculates that the period ID at the current moment is even, switches the current measurement period to an even-numbered measurement period, and the software immediately updates the ACL. 奇 The table entry is being deactivated. Since we are currently in an even-numbered measurement period, only ACL is being deactivated at this time. 偶 The entry is valid, ACL 偶 The entry will be matched, identifying the traffic packet as the target traffic packet. The packet will be marked with a 0, and this packet will be counted in even-numbered measurement periods. Meanwhile, after the time window of the odd-numbered measurement period ends, the software can read the ACL. 奇Statistical results for the table items;
[0092] 3. When the time window of an even-numbered measurement cycle ends and an odd-numbered measurement cycle begins again, the software immediately adjusts the ACL. 奇 The entry is activated, and subsequent packets are processed according to the ACL. 奇 When the entry takes effect, the packet's coloring bit is set to 1. This packet is then counted in odd-numbered measurement periods. Simultaneously, after the time window of an even-numbered measurement period ends, the software can read the ACL. 偶 Statistical results for the table items.
[0093] like Figure 3 As shown, Figure 3 During the measurement process, switch SW1 periodically controls the ACL. 奇 The system monitors the activation status of entries and reads ACL statistics for the corresponding measurement period, continuously alternating to achieve precise measurement. Green indicates the ACL entries that are actually active in the current measurement period. On the measurement timeline, the measurement period is divided into multiple time windows, for example, the T1-T2 window. At time T1, the period ID is calculated as 10001, indicating that this period is an odd-numbered measurement period. The ACL is then... 奇 When an entry is set to active, packets are counted in the ACL. 奇 In the table entry, when time reaches T2, the period ID changes to 10002, indicating a switch to an even-numbered measurement period, and the ACL is set. 奇 When an entry is set to inactive, packets are counted in the ACL. 偶 In the table entry, when time reaches T3, the period ID changes to 10003, indicating a switch to an odd-numbered measurement period, and the ACL is re-entered. 奇 The entry is set to active status to allow packets to be counted in the ACL. 奇 In the table entries, at times T2 and T3, the software needs to operate the switching chip. Before the ACL entry processing is completed, the packets still take effect according to the old rules. This continues until the software completes the switching chip operation, enabling the switching chip's measurement cycle to switch. Throughout this process, any packet that matches the flow characteristics defined by the ACL will hit an ACL and be counted. Because the In node implements coloring of all target traffic packets, the Middle and Out nodes can also count all target traffic packets based on the colored packets, ultimately achieving the goal of high-precision packet loss measurement.
[0094] Please refer to Figure 4 , Figure 4 The flowchart of the flow detection method for intermediate node devices provided in this application embodiment is shown, which may include the following steps:
[0095] S201: After receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to an odd-numbered measurement period, the switching chip determines that the traffic packet is a colored packet and includes the colored packet in the odd-numbered measurement period; if the traffic packet matches an ACL entry corresponding to an even-numbered measurement period, the traffic packet is determined to be a colored packet and includes the colored packet in the even-numbered measurement period. The colored packet is obtained by the ingress node device through the aforementioned flow detection method.
[0096] S202, after each measurement cycle ends, the processor reads the message statistics results of that measurement cycle from the switching chip.
[0097] For intermediate node devices (such as switch SW2), the software running on the processor allocates two ACL entries and sends them to the switching chip, corresponding to the ACLs for odd-numbered measurement periods. 奇 ACL with even-numbered measurement periods 偶 These two ACLs perform the same action: statistically coloring packets, but their matching rules differ. 奇 Including flow characteristics and packet coloring bits set to 1, used to hit colored packets with coloring bits set to 1, ACL 偶 This includes flow characteristics and packet coloring bits set to 0, used to hit colored packets with coloring bits set to 0, and simultaneously, ACL 奇 and ACL 偶 They have the same priority.
[0098] For example, at an intermediate measurement point, the software requests two ACL entries, which are then added to the switch chip as shown in Table 2.
[0099] Table 2
[0100]
[0101] In step S201, if a traffic packet matches an ACL entry corresponding to an odd-numbered measurement period, the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd-numbered measurement period. This includes: if the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd-numbered measurement period and the coloring bit of the traffic packet is 1, the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd-numbered measurement period.
[0102] In step S201, if a traffic packet matches an ACL entry corresponding to an even-numbered measurement period, the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period. This includes: if the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period.
[0103] It should be noted that for intermediate node devices, ACLs are configured on the switching chip. 奇 and ACL 偶 The goal is to accurately count colored packets according to their respective parity measurement periods, achieving high-precision packet loss measurement. For example, consider two consecutive traffic packets; assuming the first traffic packet conforms to the ACL... 奇 If the matching rules in the ACL are met, the traffic packet is determined to be a colored packet, and it is included in the statistics of odd-numbered measurement periods. The subsequent traffic packet conforms to the ACL. 偶 If the matching rules in the data are correct, the traffic packet is determined to be a colored packet and needs to be included in the even-numbered measurement period.
[0104] Similarly, after receiving the enable command for flow detection, the processor starts the measurement and the software starts a timer. After receiving the enable command or after the timer expires, that is, after flow detection is enabled or the current measurement cycle is reached, the processor calculates the cycle ID at the current moment. At the same time, after the end of each measurement cycle, the processor reads the packet statistics results of that measurement cycle from the switching chip. Then, after associating the packet statistics results with the cycle ID of the corresponding measurement cycle, the processor sends them to the data analyzer through telemetry technology for comprehensive calculation of packet loss data.
[0105] Please refer to Figure 5 , Figure 5 This paper illustrates a flowchart of a flow-following detection method for an exit node device provided in an embodiment of this application, which may include the following steps:
[0106] S301: After receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to an odd-numbered measurement period, the switching chip determines that the traffic packet is a colored packet, and the colored packet is counted in the odd-numbered measurement period and de-marked; if the traffic packet matches an ACL entry corresponding to an even-numbered measurement period, the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period and de-marked. The colored packet is obtained by the ingress node device through the aforementioned method.
[0107] S302, after each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
[0108] For egress node devices (such as switch SW3), the software running on the processor allocates two ACL entries and sends them to the switching chip, corresponding to the ACLs for odd-numbered measurement periods. 奇 ACL with even-numbered measurement periods 偶 These two ACLs have different matching rules: ACL 奇 Including flow characteristics and packet coloring bits set to 1, used to hit colored packets with coloring bits set to 1, ACL 偶Including flow characteristics and packet coloring bits set to 0, used to hit colored packets with coloring bits set to 0; the actions are also different: ACL 奇 Used for statistical analysis of colored packets and marking their position as 0, ACL 偶 Used for statistical analysis of colored packets. Also, ACL 奇 and ACL 偶 They have the same priority.
[0109] For example, at the exit measurement point, the software requests two ACL entries, and the two ACL entries are added to the switching chip as shown in Table 3 below:
[0110] Table 3
[0111]
[0112] In step S301, if a traffic packet matches an ACL entry corresponding to an odd-numbered measurement period, the traffic packet is determined to be a colored packet. The colored packets are counted in the odd-numbered measurement period and the marking is removed. This includes: if the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd-numbered measurement period and the coloring bit of the traffic packet is 1, the traffic packet is determined to be a colored packet. The colored packets are counted in the odd-numbered measurement period and the coloring bit of the colored packet is set to 0.
[0113] In step S302, if a traffic packet matches an ACL entry corresponding to an even-numbered measurement period, the traffic packet is determined to be a colored packet. The colored packets are counted in the even-numbered measurement period and the marking is removed. This includes: if the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, the traffic packet is determined to be a colored packet. The colored packets are counted in the even-numbered measurement period and the coloring bit of the colored packets is kept at 0.
[0114] Similarly, for the egress node device, after the flow detection is enabled or the current measurement cycle is reached, the processor calculates the cycle ID at the current moment. At the same time, after the end of each measurement cycle, the processor reads the packet statistics results of that measurement cycle from the switching chip, associates the packet statistics results with the cycle ID of the corresponding measurement cycle, and sends them to the data analyzer through telemetry technology for comprehensive calculation of packet loss data.
[0115] Compared with the prior art, the in-flow detection method provided in this application has the following advantages:
[0116] First, improve packet loss detection accuracy: By optimizing existing technical solutions, the measurement vacuum period problem in the interaction process between software and switching chip is solved, improving the accuracy of packet loss measurement. Especially in high-speed traffic scenarios, any packet loss can be detected, which has high practical application value.
[0117] Secondly, it enhances the flexibility and adaptability of flow detection on switches: by using the native ACL function of the switching chip, it solves the problem that when using ACL to implement flow detection on switches in the existing technology, statistical packet loss will occur during the periodic switching process, resulting in inaccurate packet loss measurement. It is applicable to all mainstream switches and the solution has good universality.
[0118] Third, optimize resource utilization: Due to the adoption of a periodic ACL policy update mechanism, detection efficiency can be effectively improved without significantly increasing the system load. This method avoids the resource waste or excessive consumption problems that may be caused by traditional detection methods, and helps to optimize the overall network performance.
[0119] Please refer to Figure 6 , Figure 6 The diagram shows a block diagram of a node device 10 provided in an embodiment of this application. The node device 10 can be any one of an ingress node device (such as a switch SW1), an intermediate node device (such as a switch SW2), and an egress node device (such as a switch SW3).
[0120] Node device 10 includes a processor 11, a memory 12, a switching chip 13, and a communication module 14. These components are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected via one or more communication buses or signal lines. The processor 11 is responsible for control and management, the switching chip 13 is responsible for high-speed data exchange, the memory 12 is responsible for storing instructions and data, and the communication module 14 is responsible for sending and receiving network packets.
[0121] The memory 12 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0122] Processor 11 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor 11 may be a general-purpose processor, including a central processing unit (CPU), a microcontroller unit (MCU), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), an embedded ARM chip, etc.
[0123] Switching chip 13 is an integrated circuit chip with high-speed data packet switching and processing capabilities. The aforementioned switching chip 13 can be a dedicated switching chip, including Ethernet switch chips, router switch chips, programmable switch chips, network processor units (NPUs) with integrated switching functions, and system-on-a-chip (SoCs), etc.
[0124] In one possible implementation, when node device 10 is used as an ingress node device, the switching chip 13 is pre-configured with two ACL entries with different priorities. The high-priority ACL entry and the low-priority ACL entry are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection.
[0125] Processor 11 is used to control high-priority ACL entries to be active only during odd-numbered measurement periods, and to control low-priority ACL entries to be active at all times.
[0126] The switching chip 13 is used to identify the target traffic packet through a high-priority ACL entry and mark the target traffic packet as a colored packet before counting if it is currently in an odd-numbered measurement period after receiving the traffic packet; if it is currently in an even-numbered measurement period, it will identify the target traffic packet through a low-priority ACL entry and mark the target traffic packet as a colored packet before counting.
[0127] The processor 11 is also used to read the message statistics results of the measurement cycle from the switching chip 13 after each measurement cycle ends.
[0128] In another possible implementation, when node device 10 is used as an intermediate node device, the switching chip 13 is pre-configured with two ACL entries, which are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection.
[0129] The switching chip 13 is used to determine the traffic packet as a colored packet if the traffic packet matches the ACL entry corresponding to an odd-numbered measurement period after receiving the traffic packet, and to count the colored packet in the odd-numbered measurement period; if the traffic packet matches the ACL entry corresponding to an even-numbered measurement period, the traffic packet is determined as a colored packet, and the colored packet is counted in the even-numbered measurement period. The colored packet is obtained by the ingress node device through the aforementioned flow detection method.
[0130] The processor 11 is used to read the message statistics results of the measurement cycle from the switching chip 13 after each measurement cycle ends.
[0131] In another possible implementation, when node device 10 is used as an egress node device, the switching chip 13 is pre-configured with two ACL entries, which are respectively associated with the odd-numbered and even-numbered measurement cycles of the flow detection.
[0132] The switching chip 13 is used to determine the traffic packet as a colored packet if it matches an ACL entry corresponding to an odd-numbered measurement period after receiving the traffic packet, and to count the colored packets in the odd-numbered measurement period and remove the marking; if the traffic packet matches an ACL entry corresponding to an even-numbered measurement period, it is determined as a colored packet, and to count the colored packets in the even-numbered measurement period and remove the marking. The colored packets are marked by the ingress node device through the aforementioned flow detection method.
[0133] Processor 11 is used to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
[0134] It should be understood that, Figure 6 The structure shown is only a schematic diagram of the node device 10. The node device 10 may also include components that are larger than... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown. Figure 6 The components shown can be implemented using hardware, software, or a combination thereof.
[0135] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for detecting flow-in-flow, characterized in that, The method is applied to an ingress node device, which includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries with different priorities. The high-priority ACL entry and the low-priority ACL entry are associated with odd-numbered and even-numbered measurement periods of flow detection, respectively. The processor controls the high-priority ACL entries to be active only during the odd-numbered measurement periods, and controls the low-priority ACL entries to be active at all times. After receiving a traffic packet, if the current measurement period is odd, the switching chip will identify the target traffic packet through the high-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics. If the current measurement period is even, the switching chip will identify the target traffic packet through the low-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics. After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
2. The in-flow detection method according to claim 1, characterized in that, The processor controls the high-priority ACL entries to be active only during the odd-numbered measurement periods, including: After the flow detection is enabled or the current measurement cycle is reached, the processor determines the cycle type of the next measurement cycle based on the system timestamp at the current moment. If the period type of the next measurement period is an odd measurement period, then the high-priority ACL entry is activated to make the high-priority ACL entry active. If the period type of the next measurement period is an even-numbered measurement period, then the high-priority ACL entry is deactivated to make it inactive.
3. The in-flow detection method according to claim 2, characterized in that, The system timestamp at the current moment determines the period type of the next measurement period, including: Calculate the ratio between the system timestamp of the current moment and the set measurement period duration to obtain the period ID; If the period ID is odd, then the period type of the next measurement period is determined to be the odd measurement period; If the period ID is even, then the period type of the next measurement period is determined to be the even-numbered measurement period.
4. The in-flow detection method according to claim 1, characterized in that, The switching chip identifies target traffic packets through the high-priority ACL entries, marks the target traffic packets as colored packets, and then performs statistics, including: If the flow characteristics of the traffic packet are consistent with the flow characteristics in the high-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, colors the target traffic packet to position 1, and then performs statistics on the colored packet. The switching chip identifies target traffic packets through the low-priority ACL entries, marks the target traffic packets as colored packets, and then performs statistics, including: If the flow characteristics of the traffic packet match the flow characteristics in the low-priority ACL entry, the switching chip determines that the traffic packet is the target traffic packet, colors the packet loss position of the target traffic packet to 0, and then performs statistics on the colored packets.
5. A method for detecting flow in the air, characterized in that, The method is applied to an intermediate node device, which includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with odd-numbered and even-numbered measurement periods of flow detection. The method includes: Upon receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, the switching chip determines the traffic packet as a colored packet and includes the colored packet in the odd-numbered measurement period; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, the traffic packet is determined as a colored packet and includes the colored packet in the even-numbered measurement period. The colored packet is obtained by the ingress node device through the method described in any one of claims 1-4. After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
6. The in-flow detection method according to claim 5, characterized in that, If the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd-numbered measurement period, including: If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd measurement period and the coloring bit of the traffic packet is 1, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the odd measurement period. If the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period, including: If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, then the traffic packet is determined to be a colored packet, and the colored packet is counted in the even-numbered measurement period.
7. A method for detecting flow-in-flow, characterized in that, The method is applied to an egress node device, which includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with odd-numbered and even-numbered measurement periods of flow detection. Upon receiving a traffic packet, if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, the switching chip determines the traffic packet as a colored packet, adds the colored packet to the odd-numbered measurement period, and removes the mark; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, the traffic packet is determined to be a colored packet, adds the colored packet to the even-numbered measurement period, and removes the mark, wherein the colored packet is marked by the ingress node device using the method described in any one of claims 1-4; After each measurement cycle ends, the processor reads the message statistics results of the measurement cycle from the switching chip.
8. The in-flow detection method according to claim 7, characterized in that, If the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, then the traffic packet is determined to be a colored packet. The colored packet is then counted in the odd-numbered measurement period and de-marked, including: If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the odd measurement period and the coloring bit of the traffic packet is 1, then the traffic packet is determined to be a colored packet, the colored packet is counted in the odd measurement period, and the coloring bit of the colored packet is set to 0. If the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, then the traffic packet is determined to be a colored packet. The colored packet is then counted in the even-numbered measurement period and de-marked, including: If the flow characteristics of the traffic packet are consistent with the flow characteristics in the ACL entry corresponding to the even-numbered measurement period and the coloring bit of the traffic packet is 0, then the traffic packet is determined to be a colored packet, the colored packet is counted in the even-numbered measurement period and the coloring bit of the colored packet is kept at 0.
9. An entry node device, characterized in that, The ingress node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries with different priorities. The high-priority ACL entry and the low-priority ACL entry are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection. The processor is configured to control the high-priority ACL entries to be active only during the odd-numbered measurement periods, and to control the low-priority ACL entries to be active at all times. The switching chip, upon receiving a traffic packet, if it is currently in the odd-numbered measurement period, will identify the target traffic packet through the high-priority ACL entry, mark the target traffic packet as a colored packet, and then perform statistics. If the current measurement period is an even number, the target traffic packet will be identified through the low-priority ACL entry, and the target traffic packet will be marked as a colored packet before being counted. The processor is also configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
10. An intermediate node device, characterized in that, The intermediate node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection. The switching chip, upon receiving a traffic packet, determines the traffic packet as a colored packet if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, and includes the colored packet in the odd-numbered measurement period; if the traffic packet matches an ACL entry corresponding to the even-numbered measurement period, it determines the traffic packet as a colored packet and includes the colored packet in the even-numbered measurement period, wherein the colored packet is marked by the ingress node device using the method described in any one of claims 1-4. The processor is configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
11. An export node device, characterized in that, The exit node device includes a processor and a switching chip. The switching chip is pre-configured with two ACL entries, which are respectively associated with the odd-numbered measurement period and the even-numbered measurement period of the flow detection. The switching chip is configured to, upon receiving a traffic packet, determine that the traffic packet is a colored packet if the traffic packet matches an ACL entry corresponding to the odd-numbered measurement period, and then include the colored packet in the odd-numbered measurement period and remove the mark. If the traffic packet matches the ACL entry corresponding to the even-numbered measurement period, the traffic packet is determined to be a colored packet. The colored packet is counted in the even-numbered measurement period and de-marked. The colored packet is marked by the ingress node device using the method described in any one of claims 1-4. The processor is configured to read the message statistics results of the measurement cycle from the switching chip after each measurement cycle ends.
12. A flow-following detection system, characterized in that, It includes the entry node device as described in claim 9, the intermediate node device as described in claim 10, and the exit node device as described in claim 11, wherein the system clocks of the entry node device, the intermediate node device, and the exit node device are synchronized.