Network detection method, device and system
By carrying detection information in the Ethernet frame of the service flow in Ethernet, using inner layer VLAN tags, detection tags or HSR tags, in-band detection in Ethernet is realized, solving the problem of insufficient applicability of the prior art to Ethernet, and improving the flexibility and accuracy of detection.
Patent Information
- Application Number
- CN202311416722.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
The existing in-band detection technology is mainly aimed at Internet protocol (IP) networks, with limited applicable scenarios and poor flexibility, so it cannot be directly applied to Ethernet.
By carrying detection information in the Ethernet frame of the service stream, indicating the transmission performance of the service stream is detected, in-band detection in Ethernet is realized. The specific method includes carrying detection information using an inner layer VLAN tag, detection tag or HSR tag.
It expands the applicable scenarios of in-band detection technology, improves the flexibility of in-band detection technology, and realizes high-precision, real-time, and visual network detection in Ethernet.
Smart Images

Figure CN119906646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a network detection method, device and system. Background Art
[0002] In-band detection technology is also called flow detection technology. It detects network delay, packet loss, jitter, etc. by marking service messages with features. Compared with out-of-band detection technology, in-band detection technology has the advantages of high accuracy, real-time performance, and visualization, and can be flexibly adapted to a variety of business scenarios. However, the current in-band detection technology is mainly aimed at Internet protocol (IP) networks, with limited applicable scenarios and poor flexibility. Summary of the invention
[0003] The present application provides a network detection method, device and system, which is an in-band detection method applicable to Ethernet, and helps to expand the applicable scenarios of in-band detection technology and improve the flexibility of in-band detection technology. The solution of the present application is as follows.
[0004] In a first aspect, a network detection method is provided, the method comprising: a first network node receives a first Ethernet frame, the first Ethernet frame includes service data of a first service flow; the first network node obtains a second Ethernet frame based on the first Ethernet frame, the second Ethernet frame includes detection information and the service data, the detection information is used to indicate the detection of transmission performance of the first service flow; the first network node sends the second Ethernet frame. The first Ethernet frame and the second Ethernet frame are both Ethernet frames of the first service flow.
[0005] The technical solution provided by the present application implements in-band detection in Ethernet by carrying detection information in the Ethernet frame of the service flow to indicate the detection of the transmission performance of the service flow, thereby expanding the applicable scenarios of the in-band detection technology and improving the flexibility of the in-band detection technology.
[0006] Optionally, the second Ethernet frame includes an inner virtual local area network (VLAN) tag and an outer VLAN tag, wherein the inner VLAN tag is used to carry the detection information. The VLAN tag is also called an 802.1Q tag, the outer VLAN tag is located outside the inner VLAN tag, and the inner VLAN tag is located between the outer VLAN tag and the service data included in the second Ethernet frame. That is, the second Ethernet frame includes two layers of VLAN tags, also called a double-layer virtual local area network (802.1Q-in-802.1Q, QINQ) tag.
[0007] The technical solution provided by the present application uses the inner VLAN tag to carry detection information to indicate the transmission performance of the detection service flow to achieve in-band detection when the Ethernet frame includes an inner VLAN tag and the inner VLAN tag is not used, for example, when the inner VLAN tag is not used for forwarding. This can avoid major modifications to the Ethernet protocol in order to achieve in-band detection in Ethernet.
[0008] Optionally, the inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
[0009] Optionally, the second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information. The detection tag is a tag extended by the present application and used to carry the detection information, and the detection tag is also called a measurement tag.
[0010] The technical solution provided by the present application expands the detection tag in the Ethernet frame to carry the detection information, which is more convenient for in-band detection. For example, the format of the detection tag can be flexibly defined according to the requirements of in-band detection, which is more convenient for in-band detection based on the detection tag.
[0011] Optionally, the second Ethernet frame further includes a VLAN tag, and the detection tag is located between the VLAN tag and the service data included in the second Ethernet frame. For example, the second Ethernet frame includes a layer of VLAN tag and the service data, and the detection tag is located between the VLAN tag and the service data. For another example, the second Ethernet frame includes two layers of VLAN tags, and the detection tag is located between the inner VLAN tag and the service data. Optionally, the second Ethernet frame includes two layers of VLAN tags, and the detection tag is located between the inner VLAN tag and the outer VLAN tag.
[0012] Optionally, the second Ethernet frame includes a high-availability seamless redundancy (HSR) label, and the HSR label is used to carry the detection information.
[0013] The technical solution provided by the present application, when an Ethernet frame includes an HSR label and the HSR label is not used, for example, when an Ethernet frame includes an HSR label and the Ethernet frame does not carry an HSR service, uses the HSR label to carry detection information to indicate the transmission performance of the detection service flow to achieve in-band detection. This can avoid major modifications to the Ethernet protocol in order to achieve in-band detection in Ethernet.
[0014] Optionally, the HSR tag includes a sequence number (Squence number, SeqNr) field, and the SeqNr field is used to carry the detection information.
[0015] Optionally, the detection information includes a detection task, wherein the detection task includes at least one of a packet loss detection task and a delay detection task.
[0016] The technical solution provided by the present application can detect Ethernet delay, packet loss, etc. based on in-band detection technology, because the detection tasks carried by the Ethernet frame include at least one of the packet loss detection task and the delay detection task.
[0017] Optionally, the detection information also includes reporting mode (reportmode or sentmode) information, which is used to indicate the reporting mode of the collected data. The reporting mode is an intermediate node (transmitnode) reporting mode or an end node (endnode) reporting mode. The intermediate node reporting mode is also called a hop by hop reporting mode, referred to as intermediate node reporting or hop by hop reporting. The end node reporting mode is also called an end-to-end (endto end, E2E) reporting mode, referred to as end node reporting or end-to-end reporting. In the intermediate node reporting mode, the head node, intermediate node and end node in the detection domain of the first business flow all report the collected data. In the end node reporting mode, the head node and intermediate node in the detection domain of the first business flow do not report the collected data, and the end node in the detection domain reports the collected data.
[0018] Optionally, the detection information also includes delay mode information, which is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. Among them, the synchronous delay mode is a delay mode based on time synchronization, and the asynchronous delay mode is a delay mode not based on time synchronization. In the synchronous delay mode, the network nodes in the detection domain need to perform time synchronization when detecting the delay of the first business flow. In the asynchronous delay mode, the network nodes in the detection domain do not need to perform time synchronization when detecting the delay of the first business flow.
[0019] The technical solution provided by the present application is that since the delay mode information carried by the Ethernet frame is used to indicate whether the delay mode is a synchronous delay mode or an asynchronous delay mode, the network node can determine the delay mode based on the delay mode information and perform corresponding delay detection operations. It can detect the delay of Ethernet under different delay modes based on the in-band detection technology, thereby expanding the applicable scenarios of the in-band detection technology.
[0020] Optionally, the method further includes: the first network node obtains the collected data of the first service flow according to the detection information. The collected data includes at least one of delay collection data and packet loss collection data. The delay collection data of the first service flow obtained by the first network node includes the reception timestamp of the Ethernet frame of the first service flow received by the first network node, the transmission timestamp of the Ethernet frame of the first service flow sent by the first network node, the delay of the Ethernet frame of the first service flow in the first network node, etc. The packet loss collection data of the first service flow obtained by the first network node includes the number of Ethernet frames of the first service flow received by the first network node (that is, how many Ethernet frames of the first service flow are received by the first network node), and the number of Ethernet frames of the first service flow sent by the first network node (that is, how many Ethernet frames of the first service flow are sent by the first network node).
[0021] Optionally, the detection information also includes delay mode information, and the delay mode information is used to indicate that the delay mode is an asynchronous delay mode. The first network node obtains the collected data of the first service flow based on the detection information, including: the first network node obtains the delay of the second Ethernet frame in the first network node based on the detection information.
[0022] Optionally, the detection information also includes delay mode information, which is used to indicate that the delay mode is a synchronous delay mode. The first network node obtains the collected data of the first service flow based on the detection information, including: the first network node obtains the receiving timestamp of the first network node receiving the first Ethernet frame and / or the sending timestamp of the first network node sending the second Ethernet frame based on the detection information.
[0023] Optionally, the detection information also includes reporting mode information, and the reporting mode information is used to indicate that the reporting mode of the collected data is an intermediate node reporting mode. The method also includes: the first network node reports the collected data of the first service flow to the controller according to the reporting mode information.
[0024] The technical solution provided by the present application, in which the first network node reports the collected data of the first business flow to the controller, can facilitate the controller to determine the transmission performance of the first business flow based on the collected data of the first business flow, such as determining the delay, packet loss rate, etc. of the first business flow.
[0025] Optionally, the detection information also includes reporting mode information, and the reporting mode information is used to indicate that the reporting mode of the collected data is a tail node reporting mode. The method also includes: the first network node adds the collected data of the first service flow in the second Ethernet frame according to the reporting mode information.
[0026] The technical solution provided by the present application is that the first network node adds the collected data of the first service flow in the second Ethernet frame, so that the tail node in the detection domain of the first service flow reports the collected data of the first service flow to the controller, thereby facilitating the controller to determine the transmission performance of the first service flow.
[0027] Optionally, the first network node is a head node in a detection domain of the first service flow.
[0028] In a second aspect, a network detection method is provided, the method comprising: a second network node receives a second Ethernet frame, the second Ethernet frame includes detection information and service data of a first service flow, the detection information is used to indicate the detection of transmission performance of the first service flow; the second network node obtains the collected data of the first service flow according to the detection information. The second Ethernet frames are all Ethernet frames of the first service flow.
[0029] The technical solution provided by the present application implements in-band detection in Ethernet by carrying detection information in the Ethernet frame of the service flow to indicate the detection of the transmission performance of the service flow, thereby expanding the applicable scenarios of the in-band detection technology and improving the flexibility of the in-band detection technology.
[0030] Optionally, the second Ethernet frame includes an inner VLAN tag and an outer VLAN tag, and the inner VLAN tag is used to carry detection information.
[0031] The technical solution provided by the present application uses the inner VLAN tag to carry detection information to indicate the transmission performance of the detection service flow to achieve in-band detection when the Ethernet frame includes an inner VLAN tag and the inner VLAN tag is not used, for example, when the inner VLAN tag is not used for forwarding. This can avoid major modifications to the Ethernet protocol in order to achieve in-band detection in Ethernet.
[0032] Optionally, the inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
[0033] Optionally, the second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information. The detection tag is a tag extended by the present application and used to carry the detection information, and the detection tag is also called a measurement tag.
[0034] The technical solution provided by the present application expands the detection tag in the Ethernet frame to carry the detection information, which is more convenient for in-band detection. For example, the format of the detection tag can be flexibly defined according to the requirements of in-band detection, which is more convenient for in-band detection based on the detection tag.
[0035] Optionally, the second Ethernet frame further includes a VLAN tag, and the detection tag is located between the VLAN tag and the service data.
[0036] Optionally, the second Ethernet frame includes an HSR label, and the HSR label is used to carry the detection information.
[0037] The technical solution provided by the present application, when an Ethernet frame includes an HSR label and the HSR label is not used, for example, when an Ethernet frame includes an HSR label and the Ethernet frame does not carry an HSR service, uses the HSR label to carry detection information to indicate the transmission performance of the detection service flow to achieve in-band detection. This can avoid major modifications to the Ethernet protocol in order to achieve in-band detection in Ethernet.
[0038] Optionally, the HSR tag includes a sequence number SeqNr field, and the SeqNr field is used to carry the detection information.
[0039] Optionally, the detection information includes a detection task, and the detection task includes at least one of a packet loss detection task and a delay detection task.
[0040] The technical solution provided by the present application can detect Ethernet delay, packet loss, etc. based on in-band detection technology, because the detection tasks carried by the Ethernet frame include at least one of the packet loss detection task and the delay detection task.
[0041] Optionally, the detection information also includes reporting mode information, which is used to indicate the reporting mode of the collected data. The reporting mode is an intermediate node reporting mode or an end node reporting mode. The intermediate node reporting mode is also called a hop-by-hop reporting mode, referred to as intermediate node reporting or hop-by-hop reporting. The end node reporting mode is also called an end-to-end reporting mode, referred to as an end node reporting or end-to-end reporting.
[0042] Optionally, the detection information also includes delay mode information, and the delay mode information is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. Among them, the synchronous delay mode is a delay mode based on time synchronization, and the asynchronous delay mode is a delay mode not based on time synchronization. In the synchronous delay mode, the network nodes in the detection domain need to perform time synchronization when detecting the delay of the first service flow. In the asynchronous delay mode, the network nodes in the detection domain do not need to perform time synchronization when detecting the delay of the first service flow.
[0043] The technical solution provided by the present application is that since the delay mode information carried by the Ethernet frame is used to indicate whether the delay mode is a synchronous delay mode or an asynchronous delay mode, the network node can also determine the delay mode based on the delay mode information to perform corresponding delay detection operations, and can detect the delay of Ethernet under different delay modes based on the in-band detection technology, thereby expanding the applicable scenarios of the in-band detection technology.
[0044] Optionally, the collected data of the first service flow includes at least one of delay collection data and packet loss collection data. The delay collection data of the first service flow obtained by the second network node includes the reception timestamp of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow received by the second network node, the transmission timestamp of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow sent by the second network node, the delay of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow in the second network node, etc. The packet loss collection data of the first service flow obtained by the second network node includes the number of Ethernet frames of the first service flow received by the second network node (i.e., how many Ethernet frames of the first service flow the second network node received), and the number of Ethernet frames of the first service flow sent by the second network node (i.e., how many Ethernet frames of the first service flow the second network node sent).
[0045] Optionally, the detection information also includes delay mode information, and the delay mode information is used to indicate that the delay mode is an asynchronous delay mode. The second network node obtains the collected data of the first service flow based on the detection information, including: the second network node obtains the delay of the second Ethernet frame in the second network node based on the detection information.
[0046] Optionally, the detection information also includes delay mode information, which is used to indicate that the delay mode is a synchronous delay mode. The second network node obtains the collected data of the first service flow based on the detection information, including: the second network node obtains the receiving timestamp of the second network node receiving the second Ethernet frame and / or the sending timestamp of the second network node sending the second Ethernet frame based on the detection information.
[0047] Optionally, the detection information also includes reporting mode information, and the reporting mode information is used to indicate that the reporting mode of the collected data is an intermediate node reporting mode. The method also includes: the second network node reports the collected data of the first service flow to the controller according to the reporting mode information.
[0048] The technical solution provided by the present application, in which the second network node reports the collected data of the first business flow to the controller, can facilitate the controller to determine the transmission performance of the first business flow based on the collected data of the first business flow, such as determining the delay, packet loss rate, etc. of the first business flow.
[0049] Optionally, the detection information also includes reporting mode information, which is used to indicate that the reporting mode of the collected data is a tail node reporting mode, and the second network node is an intermediate node within the detection domain of the first service flow. The method also includes: the second network node adds the collected data of the first service flow in the second Ethernet frame.
[0050] The technical solution provided by the present application is that the second network node adds the collected data of the first service flow in the second Ethernet frame, so that the tail node in the detection domain of the first service flow reports the collected data of the first service flow to the controller, thereby facilitating the controller to determine the transmission performance of the first service flow.
[0051] Optionally, the detection information also includes reporting mode information, which is used to indicate that the reporting mode of the collected data is a tail node reporting mode, and the second network node is the tail node within the detection domain of the first service flow. The method also includes: the second network node reports the collected data of the first service flow to the controller according to the reporting mode information.
[0052] The technical solution provided by the present application, in which the second network node reports the collected data of the first business flow to the controller, can facilitate the controller to determine the transmission performance of the first business flow based on the collected data of the first business flow, such as determining the delay, packet loss rate, etc. of the first business flow.
[0053] In a third aspect, a network detection device is provided, which is applied to a first network node. The network detection device includes modules for executing the method provided in the first aspect or any optional manner of the first aspect.
[0054] In a fourth aspect, a network detection device is provided, which is applied to a second network node. The network detection device includes modules for executing the method provided in the second aspect or any optional manner of the second aspect.
[0055] The modules in the third aspect or the fourth aspect mentioned above may be implemented based on software, hardware or a combination of software and hardware, and the modules may be arbitrarily combined or divided based on the specific implementation.
[0056] In a fifth aspect, a network detection device is provided, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the network detection device performs a method provided in the first aspect or any optional manner of the first aspect, or performs a method provided in the second aspect or any optional manner of the second aspect.
[0057] In the sixth aspect, a network detection device is provided, including a main control board and an interface board, wherein the main control board and the interface board are used to implement the method provided by the above-mentioned first aspect or any optional method of the first aspect, or to implement the method provided by the above-mentioned second aspect or any optional method of the second aspect.
[0058] In a seventh aspect, a network detection system is provided, the network detection system comprising a first network node and a second network node;
[0059] The first network node includes the network detection device provided by the third aspect, the fifth aspect or the sixth aspect;
[0060] The second network node includes the network detection device provided by the fourth aspect, the fifth aspect or the sixth aspect.
[0061] In an eighth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, it implements the method provided by the first aspect or any optional manner of the first aspect, or implements the method provided by the second aspect or any optional manner of the second aspect.
[0062] In the ninth aspect, a computer program product is provided, which includes a program or code, and when the program or code is executed, it implements the method provided by the first aspect or any optional manner of the first aspect, or implements the method provided by the second aspect or any optional manner of the second aspect.
[0063] In the tenth aspect, a chip is provided, which includes a programmable logic circuit and / or program instructions, and when the chip is running, it is used to implement the method provided by the first aspect or any optional embodiment of the first aspect, or to implement the method provided by the second aspect or any optional embodiment of the second aspect.
[0064] The technical effects of the third to tenth aspects mentioned above can refer to the technical effects of the first to second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic diagram of detecting the transmission performance of a service flow provided by an embodiment of the present application;
[0066] Figure 2 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0067] Figure 3 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0068] Figure 4 is a flow chart of a network detection method provided by an embodiment of the present application;
[0069] Figure 5 is a schematic diagram of an Ethernet frame provided in an embodiment of the present application;
[0070] Figure 6 is a schematic diagram of another Ethernet frame provided in an embodiment of the present application;
[0071] Figure 7 is a schematic diagram of another Ethernet frame provided in an embodiment of the present application;
[0072] Figure 8 is a flow chart of another network detection method provided by an embodiment of the present application;
[0073] Fig. 9 is a schematic diagram of detecting the transmission performance of a first service flow provided by an embodiment of the present application;
[0074] Fig.10 is a visualized schematic diagram of the transmission performance of a first service flow provided in an embodiment of the present application;
[0075] Fig.11 is a schematic diagram of a network detection device provided in an embodiment of the present application;
[0076] Fig.12 is a schematic diagram of another network detection device provided in an embodiment of the present application;
[0077] Fig.13 It is a schematic diagram of another network detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] The implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0079] With the rapid development of technologies such as industrial Internet, intelligent manufacturing, and virtualization, industrial control can be performed remotely through programmable logic controllers (PLCs) to reduce the difficulty and complexity of industrial field maintenance. Since industrial control services have strict quality of service (QoS) requirements such as latency, packet loss, and jitter, related performance assurance solutions such as latency, packet loss, and jitter are also required. For example, the Institute of Electrical and Electronics Engineers (IEEE) 802.1 Time Sensitive Networking (TSN) Working Group proposed time synchronization-based forwarding technology (802.1AS) and gated forwarding mechanism (802.1Qbv), which can achieve deterministic forwarding of Ethernet and ensure the QoS requirements of industrial control services.
[0080] When the network is normal, in theory, the above forwarding technology based on time synchronization, gated forwarding mechanism, etc. can ensure the achievement of the business demands of industrial control business. However, in the case of network failure, the above forwarding technology based on time synchronization, gated forwarding mechanism, etc. will not be able to guarantee the achievement of the business demands of industrial control business, and the business demands of industrial control business will not be met, which may cause major problems such as factory shutdown. Therefore, a network detection solution is needed to detect the performance of the network, such as detecting whether the network is faulty, so as to determine the location of the fault in time when the network fails (that is, to locate the fault), to help industrial manufacturers improve fault recovery efficiency and reduce economic losses caused by faults.
[0081] Current network detection technologies include out-band detection technology and in-band detection technology. Out-band detection technology detects network performance indicators such as latency, packet loss, and jitter through additional detection messages. For example, the Y.1731 protocol proposed by the International Telecommunication Union-TelecommunicationStandardization Sector (ITU-T) standard organization is an out-band detection protocol, which defines the use of additional detection messages to detect network connectivity, loopback, link tracking, network diagnosis, network performance management, etc., such as sending additional detection messages to the network to detect network performance indicators such as latency, packet loss, and jitter. However, the detection messages in the out-band detection technology cannot represent the actual services in the network, making it difficult to locate service faults, and the detection effect is poor.
[0082] In-band detection technology is also called flow detection technology. It detects network performance indicators such as latency, packet loss, and jitter by marking service messages. For example, the in-situ flow information telemetry (IFIT) protocol is a flow detection protocol of the Internet Engineering Task Force (IETF). It detects network performance indicators such as latency, packet loss, and jitter by inserting IFIT headers into service messages for feature marking. In IFIT technology, network nodes report collected data (or detection data) to the controller based on the telemetry protocol, and the controller can intuitively present the detection results through a visual interface. IFIT technology is the industry's first complete system of flow quality perception and fault demarcation solution. In-band detection technology has the advantages of high precision, real-time performance, and visualization, and can be flexibly adapted to a variety of business scenarios. However, the current in-band detection technology is mainly aimed at Internet protocol (IP) networks and cannot be directly applied to Ethernet, resulting in limited application scenarios and poor flexibility. For example, the current in-band detection technology supports encapsulation such as multi-protocol label switching (MPLS), segment routing multi-protocol label switching (SR-MPLS), internet protocol version 6 (IPv6), segment routing internet protocol version 6 (SRv6), and internet protocol version 4 (IPv4), but does not support Ethernet encapsulation, which makes it impossible to directly apply to Ethernet. However, industrial networks generally include Ethernet, so the current in-band detection technology cannot be directly applied to industrial networks. Among them, IP network is also called three-layer network, and Ethernet is also called two-layer network.
[0083] An embodiment of the present application provides a network detection solution, which is an in-band detection solution. The network detection solution carries detection information in the Ethernet frame of the service flow to indicate the transmission performance of the service flow, thereby realizing in-band detection (also known as flow detection) in Ethernet, expanding the applicable scenarios of in-band detection technology, and improving the flexibility of in-band detection technology.
[0084] The technical solution of the embodiment of the present application is an in-band detection solution, and IFIT technology is a typical in-band detection technology. In order to facilitate the understanding of the technical solution of the embodiment of the present application, the in-band detection technology is introduced below using IFIT technology as an example.
[0085] IFIT technology detects the transmission performance of a service flow in the network by marking the service packets of the service flow with characteristics. For example, IFIT technology detects the packet loss of the service flow in the network by marking the service packets of the service flow with packet loss (or called packet loss coloring), and / or detects the delay of the service flow in the network by marking the service packets of the service flow with delay (or called delay coloring).
[0086] In IFIT technology, the network node obtains the collected data of the service flow based on the characteristic mark of the service message of the service flow, and reports the collected data of the service flow to the controller based on the telemetry protocol. The controller determines the packet loss, delay, jitter and other transmission performance of the service flow in the network according to the collected data of the service flow reported by the network node. Among them, the collected data includes at least one of the delay collection data and the packet loss collection data. The delay collection data of any service flow obtained by any network node includes the receiving timestamp of the message of the service flow received by the network node, the sending and receiving timestamp of the message of the service flow sent by the network node, etc.; the packet loss collection data of any service flow obtained by any network node includes the number of messages of the service flow received by the network node, the number of messages of the service flow sent by the network node, etc. IFIT technology supports intermediate node (transmitnode) reporting mode and end node (endnode) reporting mode. The intermediate node reporting mode is also called hop by hop reporting mode, referred to as intermediate node reporting or hop by hop reporting. The tail node reporting mode is also called the end-to-end (E2E) reporting mode, abbreviated as tail node reporting, end-to-end reporting or E2E reporting. In the intermediate node reporting mode, the head node, intermediate node and tail node in the detection domain of the service flow all perform IFIT detection on the service flow to obtain the collected data of the service flow, and report the collected data of the service flow to the controller; the controller determines the transmission performance of the service flow based on the collected data of the service flow reported by the head node, intermediate node and tail node in the detection domain. For example, the controller determines the end-to-end transmission performance of the service flow, the hop-by-hop transmission performance of the service flow, the transmission performance of the service flow in a certain network node, the transmission performance of the service flow between two certain network nodes, etc. based on the collected data of the service flow reported by the head node, intermediate node and tail node in the detection domain. In the tail node reporting mode, the head node, the middle node and the tail node in the detection domain of the service flow all perform IFIT detection on the service flow to obtain the collected data of the service flow. The head node and the middle node send the collected data of the service flow to the tail node, and the tail node uniformly reports the collected data of the service flow to the controller; the controller determines the transmission performance of the service flow according to the collected data of the service flow reported by the tail node. For example, the controller determines the end-to-end transmission performance of the service flow, the hop-by-hop transmission performance of the service flow, the transmission performance of the service flow in a certain network node, the transmission performance of the service flow between two certain network nodes, etc. according to the collected data of the service flow reported by the tail node.
[0087] Packet loss rate, delay, and jitter are three important performance indicators of business flows. Among them, the packet loss rate refers to the ratio of the number of messages lost in the business flow (that is, the packet loss amount of the business flow) to the number of messages of the business flow received by the network object (that is, the number of messages of the business flow input to the network object) during the transmission of the business flow in the network object (such as network nodes, links, network domains), and the packet loss amount refers to the difference between the number of messages of the business flow received by the network object and the number of messages of the business flow sent by the network object (that is, the number of messages of the business flow output by the network object). For example, the packet loss amount of a certain business flow in a certain network node is the difference between the number of messages of the business flow received by the network node and the number of messages of the business flow sent by the network node, and the packet loss rate of the business flow in the network node is the ratio of the packet loss amount of the business flow in the network node to the number of messages of the business flow received by the network node. The packet loss of a certain service flow in a certain network domain is the difference between the number of messages of the service flow received by the head node in the network domain and the number of messages of the service flow sent by the tail node in the network domain, and the packet loss rate of the service flow in the network domain is the ratio of the packet loss of the service flow in the network domain to the number of messages of the service flow received by the head node in the network domain. The packet loss of a certain service flow on a certain link is the difference between the number of messages of the service flow received by the head end of the link and the number of messages of the service flow sent by the tail end of the link, and the packet loss rate of the service flow on the link is the ratio of the packet loss of the service flow on the link to the number of messages of the service flow received by the head end of the link. Among them, the delay refers to the time required for the service flow to be transmitted from one end of the network object (such as a network node, a link, a network domain) to the other end of the network object, that is, the time required for the message of the service flow to be transmitted from one end of the network object to the other end of the network object. For example, the delay of a certain service flow in a certain network node is the time difference between the reception timestamp of a certain message of the service flow received by the network node and the transmission timestamp of the certain message sent by the network node. The delay of a certain service flow in a certain network domain is the time difference between the reception timestamp of the certain message received by the head node in the network domain and the transmission timestamp of the certain message sent by the tail node in the network domain. The delay of a certain service flow on a certain link is the time difference between the reception timestamp of a certain message of the service flow received by the head end of the link and the transmission timestamp of the certain message sent by the tail end of the link. Among them, the jitter of the service flow is the difference in the delay of the service flow, for example, the difference between the maximum delay and the minimum delay of the service flow, or the difference in the delay of the service flow within two detection cycles.
[0088] IFIT technology detects the packet loss rate of a service flow by periodically marking the packet loss of the service message of the service flow, and detects the delay of the service flow by periodically marking the delay of the service message of the service flow. For example, the service flow is periodically sampled, and the sampled sample message is delayed to detect the delay of the sample message, thereby detecting the delay of the service flow.
[0089] For examples, please refer to Figure 1 , which shows a schematic diagram of a transmission performance detection service flow 1 provided in an embodiment of the present application. Network node 101 is the head node in the detection domain of service flow 1, network node 103 is the tail node in the detection domain of service flow 1, and network node 102 is an intermediate node in the detection domain of service flow 1 or does not belong to the detection domain of service flow 1. The following takes the example that network node 102 does not belong to the detection domain of service flow 1, that is, network node 102 does not perform IFIT detection on service flow 1. Optionally, network node 101 and network node 103 are both provider edge (PE) nodes, and network node 102 is a provider (P) node.
[0090] refer to Figure 1 , the process of detecting the packet loss rate of service flow 1 from network node 101 to network node 103 is as follows.
[0091] The network node 101 serves as the head node in the detection domain of service flow 1. In each detection cycle: after the network node 101 receives the message of service flow 1, the network node 101 marks the message of service flow 1 as lost and forwards the message of service flow 1, and the network node 101 counts the number of messages of service flow 1 received by the network node 101 according to the packet loss mark in the message of service flow 1 (referred to as the received message count of the network node 101). For example, the network node 101 inserts an IFIT header into the message of service flow 1 and sets the packet loss coloring bit (L bit) in the IFIT header to 0 or 1 (setting to 0 or 1 is flipped according to the detection cycle, for example, setting the L bit to 0 in the i-th detection cycle, setting the L bit to 1 in the i+1-th detection cycle, setting the L bit to 0 in the i+2-th detection cycle, and so on; Figure 1In the dotted box corresponding to the packet loss detection, "0" indicates L position 0, and "1" indicates L position 1). In each detection cycle, the network node 101 counts the number of packets received by the network node 101 and belonging to service flow 1 with L position 0 or 1. For example, in the i-th detection cycle, the network node 101 counts the number of packets received by the network node 101 and belonging to service flow 1 with L position 0; in the i+1-th detection cycle, the network node 101 counts the number of packets received by the network node 101 and belonging to service flow 1 with L position 1. The network node 103 serves as the tail node in the detection domain of service flow 1. In each detection cycle: after the network node 103 receives the packet of service flow 1, the network node 103 can forward the packet of service flow 1, and the network node 103 counts the number of packets of service flow 1 sent by the network node 103 according to the packet loss mark in the packet of service flow 1 (referred to as the sent packet count of the network node 103). For example, in each detection cycle, the network node 103 counts the number of messages sent by the network node 103 that belong to service flow 1 and whose L position is 0 or 1. For example, in the i-th detection cycle, the network node 103 counts the number of messages sent by the network node 103 that belong to service flow 1 and whose L position is 0; in the i+1-th detection cycle, the network node 103 counts the number of messages sent by the network node 103 that belong to service flow 1 and whose L position is 1. Wherein, the packet loss mark is also called a packet loss detection task, the received message count of the network node 101 (that is, the number of messages of service flow 1 received by the network node 101 counted by the network node 101) is the packet loss collection data of service flow 1 obtained by the network node 101 based on the packet loss detection task, and the sent message count of the network node 103 (that is, the number of messages of service flow 1 sent by the network node 103 counted by the network node 103) is the packet loss collection data of service flow 1 obtained by the network node 103 based on the packet loss detection task. In the intermediate node reporting mode, the network node 101 and the network node 103 each report to the controller the packet loss collection data of the service flow 1 obtained by each of them. In the tail node reporting mode, the network node 101 sends the packet loss collection data of the service flow 1 obtained by the network node 101 to the network node 103, and the network node 103 uniformly reports the packet loss collection data of the service flow 1 obtained by the network node 101 and the packet loss collection data of the service flow 1 obtained by the network node 103 to the controller. Assuming that the received message count of network node 101 in the i-th detection cycle is Tx(i) and the sent message count of network node 103 is Rx(i), the controller determines that the packet loss amount of service flow 1 from network node 101 to network node 103 in the i-th detection cycle is Tx(i)-Rx(i) based on the received message count Tx(i) of network node 101 in the i-th detection cycle and the sent message count Rx(i) of network node 103 in the i-th detection cycle, and the packet loss rate is [Tx(i)-Rx(i)] / Tx(i).Assuming that the received message count of network node 101 in the i+1th detection cycle is Tx(i+1) and the sent message count of network node 103 is Rx(i+1), the controller determines that the packet loss amount of service flow 1 from network node 101 to network node 103 in the i+1th detection cycle is Tx(i+1)-Rx(i+1), and the packet loss rate is [Tx(i+1)-Rx(i+1)] / Tx(i+1) based on the received message count Tx(i+1) of network node 101 in the i+1th detection cycle and the sent message count Rx(i+1) of network node 103 in the i+1th detection cycle.
[0092] refer to Figure 1 , the process of detecting the delay of service flow 1 from network node 101 to network node 103 is as follows.
[0093] The network node 101 acts as the head node in the detection domain of service flow 1. In each detection cycle: after the network node 101 receives the message of service flow 1, the network node 101 samples the message of service flow 1 (for example, one message is sampled in each detection cycle), the network node 101 delays the sampled message and forwards the sample message, and the network node 101 counts the receiving timestamp of the sample message received by the network node 101 according to the delay mark in the sample message. For example, the network node 101 inserts the IFIT header into the sample message of service flow 1 and sets the delay coloring bit (D bit) in the IFIT header to 1 ( Figure 1The "0" in the dotted box corresponding to the delay detection indicates D position 0, and the "1" indicates D position 1). In each detection cycle, the network node 101 counts the receiving timestamp of the message belonging to service flow 1 and D position 1 received by the network node 101. The network node 103 acts as the tail node in the detection domain of service flow 1. In each detection cycle: after the network node 103 receives the message of service flow 1, the network node 103 can forward the message of service flow 1, and the network node 103 counts the sending timestamp of the sample message sent by the network node 103 according to the delay mark in the sample message of service flow 1. For example, in each detection cycle, the network node 103 counts the sending timestamp of the message belonging to service flow 1 and D position 1 sent by the network node 103. Among them, the delay mark is also called a delay detection task, the receiving timestamp of the sample message received by the network node 101 counted by the network node 101 is the delay collection data of the service flow 1 obtained by the network node 101 based on the delay detection task, and the sending timestamp of the sample message sent by the network node 103 counted by the network node 103 is the delay collection data of the service flow 1 obtained by the network node 103 based on the delay detection task. In the intermediate node reporting mode, the network node 101 and the network node 103 each report the delay collection data of the service flow 1 obtained by each of them to the controller. In the tail node reporting mode, the network node 101 sends the delay collection data of the service flow 1 obtained by the network node 101 to the network node 103, and the network node 103 uniformly reports the delay collection data of the service flow 1 obtained by the network node 101 and the delay collection data of the service flow 1 obtained by the network node 103 to the controller. Assuming that the receiving timestamp of the sample message obtained by the network node 101 in the i-th detection cycle is t1, and the sending timestamp of the sample message obtained by the network node 103 is t2, the controller determines that the delay (one-way delay) of the service flow 1 from the network node 101 to the network node 103 in the i-th detection cycle is t2-t1 based on the receiving timestamp t1 of the sample message obtained by the network node 101 in the i-th detection cycle and the sending timestamp t2 of the sample message obtained by the network node 103 in the i-th detection cycle. Similarly, the controller can determine the delay (one-way delay) of the service flow 1 from the network node 103 to the network node 101 in the i-th detection cycle, assuming it is t4-t3. Further, the controller can determine the two-way delay of the service flow 1 as (t2-t1)+(t4-t3).
[0094] After the controller determines the delay of service flow 1, the controller may also determine the jitter of service flow 1 according to the delay of service flow 1. For example, the controller determines the difference between the delay of service flow 1 from network node 101 to network node 103 in the i-th detection cycle and the delay of service flow 1 from network node 101 to network node 103 in the i+1-th detection cycle as the jitter of service flow 1 from network node 101 to network node 103; or, the controller determines the difference between the maximum value and the minimum value of the delay of service flow 1 from network node 101 to network node 103 in multiple detection cycles as the jitter of service flow 1 from network node 101 to network node 103. For another example, the controller determines the difference between the delay of service flow 1 from network node 103 to network node 101 in the i-th detection cycle and the delay of service flow 1 from network node 103 to network node 101 in the i+1-th detection cycle as the jitter of service flow 1 from network node 103 to network node 101; or, the controller determines the difference between the maximum value and the minimum value in the delay of service flow 1 from network node 103 to network node 101 in multiple detection cycles as the jitter of service flow 1 from network node 103 to network node 101. For another example, the controller determines the difference between the two-way delay of service flow 1 in the i-th detection cycle and the two-way delay of service flow 1 in the i+1-th detection cycle as the jitter of service flow 1; or, the controller determines the difference between the maximum value and the minimum value in the two-way delay of service flow 1 in multiple detection cycles as the jitter of service flow 1. The controller may also determine the jitter according to the delay in other ways.
[0095] It should be noted that, in order to prevent the disorder of messages from affecting the detection results, the network node 103 is the tail node in the detection domain of the service flow 1. In the packet loss detection scenario, the network node 103 can extend the detection period (or statistical period) when counting the number of messages sent by the network node 103. In this way, different detection periods on the network node 103 side overlap (for example, Figure 1 Optionally, the length of the detection period on the network node 103 side is greater than the length of the detection period on the network node 101 side and less than twice the length of the detection period on the network node 101 side.
[0096] It should be noted that, as the head node in the detection domain of service flow 1, the network node 101 does not actually include the IFIT header, and does not include the L bit and the D bit, but it is understandable that the network node 101 will insert the IFIT header into the message after receiving the message of service flow 1. Therefore, the descriptions of "network node 101 counts the number of messages received by the network node 101 belonging to service flow 1 and with the L bit set to 0 or 1" and "network node 101 counts the reception timestamp of messages received by the network node 101 belonging to service flow 1 and with the D bit set to 1" are used above. Network node 103 serves as the tail node in the detection domain of service flow 1. After network node 103 receives the message of service flow 1, network node 103 strips off the IFIT header in the message of service flow 1 and then forwards the message of service flow 1. In this way, the message of service flow 1 actually sent by network node 103 does not include the IFIT header, and does not include the L bit and the D bit. However, it can be understood that the message actually sent by network node 103 is obtained by stripping off the IFIT header in the message. Therefore, the above description uses "network node 103 counts the number of messages sent by network node 103 belonging to service flow 1 and with L position 0" and "network node 103 counts the sending timestamp of messages sent by network node 103 belonging to service flow 1 and with D position 1".
[0097] Since network node 101 is the head node in the detection domain of service flow 1, and network node 103 is the tail node in the detection domain of service flow 1, the packet loss rate of service flow 1 from network node 101 to network node 103 obtained in the above introduction is the end-to-end packet loss rate of service flow 1, the delay of service flow 1 from network node 101 to network node 103 is the end-to-end delay of service flow 1, and the jitter of service flow 1 from network node 101 to network node 103 is the end-to-end jitter of service flow 1. Figure 1Taking the example that the network node 102 does not belong to the detection domain of service flow 1, in some embodiments, the network node 102 belongs to the detection domain of service flow 1, and the network node 102 also performs IFIT detection on service flow 1. In this case, in the packet loss detection scenario, the network node 102 also performs packet loss statistics on service flow 1 to obtain the packet loss collection data of service flow 1 (including the number of messages of service flow 1 received by the network node 102 and / or the number of messages of service flow 1 sent by the network node 102). In the intermediate node reporting mode, the network node 102 also reports the packet loss collection data of service flow 1 obtained by the network node 102 to the controller. In the tail node reporting mode, the network node 102 reports the packet loss collection data of service flow 1 obtained by the network node 102 to the controller. Carried to network node 103, network node 103 reports to the controller uniformly. The controller can determine the packet loss rate of business flow 1 from network node 101 to network node 102 based on the packet loss collection data of business flow 1 obtained by network node 101 and the packet loss collection data of business flow 1 obtained by network node 102. The controller can determine the packet loss rate of business flow 1 from network node 102 to network node 103 based on the packet loss collection data of business flow 1 obtained by network node 102 and the packet loss collection data of business flow 1 obtained by network node 103. In the delay detection scenario, the network node 102 also performs delay statistics on the service flow 1 to obtain the delay collection data of the service flow 1 (including the reception timestamp of the message of the service flow 1 received by the network node 102 and / or the transmission timestamp of the message of the service flow 1 sent by the network node 102). In the intermediate node reporting mode, the network node 102 also reports the delay collection data of the service flow 1 obtained by the network node 102 to the controller. In the tail node reporting mode, the network node 102 carries the delay collection data of the service flow 1 obtained by the network node 102 to the controller. The data is brought to the network node 103, which is uniformly reported to the controller by the network node 103. The controller can determine the delay of the service flow 1 from the network node 101 to the network node 102 according to the delay collection data of the service flow 1 acquired by the network node 101 and the delay collection data of the service flow 1 acquired by the network node 102. The controller can determine the delay of the service flow 1 from the network node 102 to the network node 103 according to the delay collection data of the service flow 1 acquired by the network node 102 and the delay collection data of the service flow 1 acquired by the network node 103. The controller can also determine the jitter of the service flow 1 from the network node 101 to the network node 102, the jitter from the network node 102 to the network node 103, etc. according to the delay of the service flow 1.
[0098] The above is an introduction to the in-band detection technology. The following introduces the application scenarios of the embodiments of the present application.
[0099] The application scenario of an embodiment of the present application provides a communication network, which may be an Ethernet (also known as a Layer 2 network), and the communication network may be a data center network (DCN), a metropolitan area network, a wide area network, a campus network, an industrial network, etc.
[0100] The communication network includes a plurality of network nodes for service forwarding, and the plurality of network nodes are used to forward services between different user devices accessing the communication network to realize communication between the different user devices. Among them, each network node in the plurality of network nodes may be a physical node or a logical node. The physical node may be a network device for service forwarding such as a switch or a router. The logical node may be a functional module in a network device, for example, a logical node is a virtual switch or a virtual router created in a network device. The types of the plurality of network nodes are the same or different, for example, the plurality of network nodes are switches or routers, or a part of the plurality of network nodes is a switch, and another part of the network nodes is a router. Among them, the plurality of network nodes include edge nodes and may also include core nodes. The edge node is located at the edge of the communication network, and the edge node is used for user devices to access the communication network. The core node is connected between different edge nodes, and the core node is used to forward services between edge nodes. For example, the edge node is a PE node, the core node is a P node, and the user devices accessing the communication network include industrial equipment, user terminals, home gateways, base stations, hosts, servers, virtual machines (VMs) created in servers, etc. The host can be a smartphone, tablet computer, desktop computer, Internet of Things (IoT) device, etc. Industrial equipment includes industrial controllers, industrial actuators, etc. Industrial controllers can be PLC or distributed control system (DCS), and industrial actuators can be sensors, machine tools, transmission equipment, servers, inverters, etc.
[0101] In an embodiment of the present application, the communication network is used to carry a first business flow, for example, the communication network is an industrial network, and the first business flow is a business flow of an industrial control business. The communication network includes a transmission path for the first business flow. The transmission path includes a plurality of network nodes, and the plurality of network nodes may be all or part of the network nodes in the communication network. According to the transmission direction, the plurality of network nodes on the transmission path include a head node and an end node, and may also include at least one intermediate node (transmitnode) between the head node and the end node. Depending on the length of the transmission path, the number of intermediate nodes is different, or the transmission path includes only a head node and an end node, but does not include an intermediate node. Optionally, the head node and the end node on the transmission path are both edge nodes in the communication network, and the intermediate node on the transmission path is a core node in the communication network.
[0102] In an embodiment of the present application, the communication network includes a detection domain of a first service flow, the detection domain includes a plurality of network nodes, and the plurality of network nodes in the detection domain are used to perform in-band detection on the first service flow in the process of forwarding the first service flow. For ease of description, the detection domain of the first service flow is referred to as the first detection domain below. The plurality of network nodes in the first detection domain may include a head node and a tail node, and may also include at least one intermediate node between the head node and the tail node. The plurality of network nodes in the first detection domain may be all network nodes or part of network nodes on the transmission path of the first service flow. In one example, the head node in the first detection domain (for example, referred to as the detection head node) is the same network node as the head node on the transmission path of the first service flow, the tail node in the first detection domain (for example, referred to as the detection tail node) is the same network node as the tail node on the transmission path of the first service flow, the intermediate nodes in the first detection domain are all intermediate nodes on the transmission path of the first service flow, and the plurality of network nodes in the first detection domain are all network nodes on the transmission path of the first service flow. In another example, the detection head node in the first detection domain is the same network node as the head node on the transmission path of the first business flow, the detection tail node in the first detection domain is the same network node as an intermediate node on the transmission path of the first business flow, and the multiple network nodes in the first detection domain are part of the network nodes on the transmission path of the first business flow. In another example, the detection head node in the first detection domain is the same network node as an intermediate node on the transmission path of the first business flow, the detection tail node in the first detection domain is the same network node as the tail node on the transmission path of the first business flow, and the multiple network nodes in the first detection domain are part of the network nodes on the transmission path of the first business flow. In another example, the detection head node in the first detection domain is the same network node as an intermediate node on the transmission path of the first business flow, the detection tail node in the first detection domain is the same network node as another intermediate node on the transmission path of the first business flow, and the multiple network nodes in the first detection domain are part of the network nodes on the transmission path of the first business flow. Optionally, the head node on the transmission path of the first service flow is the service head node of the first service flow, and the tail node on the transmission path of the first service flow is the service tail node of the first service flow. It can be understood that the detection head node of the first service flow and the service head node of the first service flow can be the same network node or different network nodes; the detection tail node of the first service flow and the service tail node of the first service flow can be the same network node or different network nodes. It should be noted that the service head node of the first service flow is the entry node of the first service flow entering the transmission path (or entering the communication network), and the service tail node of the first service flow is the exit node of the first service flow flowing out of the transmission path (or flowing out of the communication network).The detection head node of the first service flow is the network node that starts to detect the transmission performance of the first service flow (or the network node that starts to monitor the first service flow), and the detection tail node of the first service flow is the network node that ends or terminates the detection of the transmission performance of the first service flow (or the network node that ends monitoring the first service flow). Any network node in the communication network can serve as the detection head node or detection tail node of the first service flow, and any network node on the transmission path of the first service flow can serve as the detection head node or detection tail node of the first service flow.
[0103] It should be noted that the names of network nodes, head nodes, intermediate nodes, and tail nodes in the embodiments of the present application are merely exemplary. In some implementation scenarios, network nodes are also referred to as network devices, forwarding nodes, forwarding devices, gateway nodes, gateway devices, routing nodes, routing devices, switching nodes, switching devices, etc. Head nodes are also referred to as head node devices, first nodes, first node devices, ingress nodes, ingress devices, etc. Intermediate nodes are also referred to as intermediate devices, transit nodes, transit devices, etc. Tail nodes are also referred to as tail node devices, egress nodes, egress devices, etc. Transmission paths are also referred to as forwarding paths, communication paths, transmission channels, communication tunnels, etc.
[0104] As an example, see Figure 2 , which shows a schematic diagram of an application scenario provided by an embodiment of the present application. The communication network 200 provided by the application scenario includes network nodes 201-204, and the network nodes 201-204 are connected in sequence. Network nodes 201 and 204 can be edge nodes, and network nodes 202-203 can be core nodes. Figure 2As shown, the communication network includes a transmission path W1 of the first service flow, network nodes 201-204 are all on the transmission path W1, network node 201 is the head node on the transmission path W1, network node 204 is the tail node on the transmission path W1, and network nodes 202-203 are intermediate nodes on the transmission path W1. Wherein, the communication network 200 includes a detection domain (also known as the first detection domain) of the first service flow, the first detection domain includes multiple network nodes among the network nodes 201-204, and the multiple network nodes in the first detection domain are used to perform in-band detection on the first service flow in the process of forwarding the first service flow. The multiple network nodes in the first detection domain include a head node (also known as a detection head node) and a tail node (also known as a detection tail node), and may also include at least one intermediate node located between the detection head node and the detection head node. In one example, the detection head node in the first detection domain is network node 201, the detection tail node is network node 204, the intermediate nodes in the first detection domain are network nodes 202-203, and the network nodes in the first detection domain are all network nodes on the transmission path of the first service flow. In another example, the detection head node in the first detection domain is network node 201, the detection tail node is network node 202 or network node 203, and the network nodes in the first detection domain are some network nodes on the transmission path of the first service flow. In another example, the detection head node in the first detection domain is network node 202 or network node 203, the detection tail node is network node 204, and the network nodes in the first detection domain are some network nodes on the transmission path of the first service flow. In another example, the detection head node in the first detection domain is one of the network nodes 202-203, the detection tail node is another network node in the network nodes 202-203, and the network nodes in the first detection domain are some network nodes on the transmission path of the first service flow.
[0105] Take the case where the detection head node in the first detection domain is the network node 201, the detection tail node in the first detection domain is the network node 204, and the intermediate node in the first detection domain is the network node 202-203 as an example. In the embodiment of the present application, during the transmission of the Ethernet frame of the first service flow along the transmission path W1, the network nodes 201-204 respectively perform in-band detection operations on the first service flow to obtain the collected data of the first service flow. For example, after the network node 201 receives the Ethernet frame of the first service flow, the network node 201 encapsulates the detection information in the Ethernet frame and forwards the Ethernet frame carrying the detection information, and the network node 201 obtains the collected data of the first service flow according to the detection information; after each of the network nodes 202-204 receives the Ethernet frame, it obtains the collected data of the first service flow according to the detection information carried by the Ethernet frame and forwards the Ethernet frame; the network node 204 can remove the detection information carried by the Ethernet frame before forwarding the Ethernet frame. The technical solution provided by the embodiment of the present application supports the intermediate node reporting mode and the tail node reporting mode. In the intermediate node reporting mode, the network nodes 201 to 204 each report the collected data of the first service flow obtained by each of them to the controller, and the controller determines the transmission performance of the first service flow according to the collected data of the first service flow reported by the network nodes 201 to 204. In the tail node reporting mode, the network nodes 201 to 203 each send the collected data of the first service flow obtained by each of them to the network node 204, for example, carry the collected data of the first service flow to the network node 204 through the Ethernet frame of the first service flow, and the network node 204 uniformly reports the collected data of the first service flow to the controller, and the controller determines the transmission performance of the first service flow according to the collected data of the first service flow reported by the network node 204.
[0106] The controller can be integrated into the network node or deployed independently. Figure 2 In the application scenario shown, the controller may be integrated in any network node among the network nodes 201 to 204. Optionally, the controller is deployed independently, and the controller is connected to at least one network node among the network nodes 201 to 204 to communicate with the at least one network node to perform detection control.
[0107] As another example, see Figure 3 , which shows a schematic diagram of another application scenario provided by an embodiment of the present application. Figure 2 The application scenarios shown are different in that Figure 3The application scenario shown also includes an independently deployed controller 300, and the controller 300 is connected to the network nodes 201~204 respectively. For example, the detection head node in the first detection domain (that is, the detection domain of the first service flow) is the network node 201, the detection tail node in the first detection domain is the network node 204, and the intermediate node in the first detection domain is the network node 202~203. In the intermediate node reporting mode, the network nodes 201~204 each report the collected data of the first service flow obtained by each to the controller 300, and the controller 300 determines the transmission performance of the first service flow according to the collected data of the first service flow reported by the network nodes 201~204. In the tail node reporting mode, the network node 204 uniformly reports the collected data of the first service flow obtained by the network nodes 201~204 to the controller, and the controller 300 determines the transmission performance of the first service flow according to the collected data of the first service flow reported by the network node 204.
[0108] Among them, the controller integrates functions such as network management, business control and network analysis. The controller can be a functional module deployed in a server, or a server, or a server cluster composed of several servers, or a cloud computing service center, or other devices or modules with network control functions. In some embodiments, the controller is also called a control device, an analyzer, an analysis device, a network management, a network management device, a network management device, a network control device, a network analysis device, and the like, which is not limited in the embodiments of the present application.
[0109] In an embodiment of the present application, the collected data of the first service flow obtained by any network node in the first detection domain includes at least one of packet loss collection data and delay collection data. The packet loss collection data of the first service flow obtained by any network node includes the number of Ethernet frames of the first service flow received by the network node (that is, how many Ethernet frames of the first service flow the network node has received), the number of Ethernet frames of the first service flow sent by the network node (that is, how many Ethernet frames of the first service flow the network node has sent), etc. The delay collection data of the first service flow obtained by any network node includes the reception timestamp of the Ethernet frame of the first service flow received by the network node, the transmission timestamp of the Ethernet frame of the first service flow sent by the network node, the delay of the Ethernet frame of the first service flow in the network node, etc. The controller determines the packet loss of the first service flow according to the packet loss collection data reported by the network nodes in the first detection domain, and the controller determines the delay of the first service flow according to the delay collection data reported by the network nodes in the first detection domain. For example, the controller determines the packet loss of the first service flow in any network node among network nodes 201 to 204 based on the packet loss collection data of the first service flow obtained by the network node, and determines the packet loss of the first service flow between any two network nodes among network nodes 201 to 204 based on the packet loss collection data of the first service flow obtained by any two network nodes. The controller determines the delay of the first service flow in the network node based on the delay collection data of the first service flow obtained by any network node among network nodes 201 to 204, and determines the delay of the first service flow between any two network nodes according to the delay collection data of the first service flow obtained by any two network nodes among network nodes 201 to 204, which is not limited in the embodiments of the present application.
[0110] It should be noted that the Ethernet frame in the embodiment of the present application is the basic unit of data transmission in Ethernet, and in some embodiments, the Ethernet frame is also described as an Ethernet message. In some embodiments, the detection domain in the embodiment of the present application is also described as a measurement domain.
[0111] also, Figure 2 and Figure 3 The application scenario shown is only used as an example and is not used to limit the technical solution of the present application. In the implementation process, the number of network nodes in the application scenario and the relationship between these network nodes can be configured as needed, and the application scenario may also include other devices, such as a clock source, a security device, etc., which is not limited in the embodiments of the present application.
[0112] The above is an introduction to the application scenario of the present application. The following is an introduction to the method implementation example of the present application.
[0113] Please refer to Figure 4, which shows a flow chart of a network detection method provided by an embodiment of the present application. The network detection method is applied to a network detection system including a first network node and a second network node. The first network node is a head node in a first detection domain (i.e., a detection domain of a first service flow), and the second network node is an intermediate node or a tail node in the first detection domain. For example Figure 2 and Figure 3 As shown, network nodes 201-204 are all in the first detection domain, network node 201 is the head node in the first detection domain, network nodes 202-203 are the intermediate nodes in the first detection domain, and network node 204 is the tail node in the first detection domain. Therefore, the first network node may be network node 201, and the second network node may be any network node among network nodes 202-204. Figure 4 The method includes the following steps S401 to S405.
[0114] S401. A first network node receives a first Ethernet frame, where the first Ethernet frame includes service data A of a first service flow.
[0115] The first network node receives a first Ethernet frame from a previous-hop node of the first network node, where the first Ethernet frame is an Ethernet frame of a first service flow.
[0116] The first network node is a head node in the first detection domain, and the previous hop node of the first network node is located outside the first detection domain. The previous hop node of the first network node can be a network node or a user equipment connected to the first network node.
[0117] S402. The first network node obtains a second Ethernet frame based on the first Ethernet frame, where the second Ethernet frame includes detection information B and service data A of the first service flow, and the detection information B is used to indicate the detection of transmission performance of the first service flow.
[0118] After the first network node receives the first Ethernet frame, the first network node processes the first Ethernet frame to obtain a second Ethernet frame. The second Ethernet frame is an Ethernet frame of the first service flow, and the second Ethernet frame is used to indicate the detection of the transmission performance of the first service flow. The second Ethernet frame includes detection information B and service data A of the first service flow, and the detection information B is used to indicate the detection of the transmission performance of the first service flow. For example, the detection information B is used to instruct the network nodes within the first detection domain to obtain the collected data of the first service flow to detect the transmission performance of the first service flow. For example, the first network node encapsulates the detection information B in the first Ethernet frame to obtain the second Ethernet frame.
[0119] In an optional embodiment, the detection information B includes a detection task, which is used to instruct the detection of the transmission performance of the first service flow. For example, the detection task is used to instruct the network nodes in the first detection domain to obtain the collected data of the first service flow to detect the transmission performance of the first service flow. For example, the detection task includes at least one of a packet loss detection task and a delay detection task. The packet loss detection task is used to instruct the network nodes in the first detection domain to detect the packet loss of the first service flow, for example, the packet loss detection task is used to instruct the network nodes in the first detection domain to obtain the packet loss collection data of the first service flow. The delay detection task is used to instruct the network nodes in the first detection domain to detect the delay of the first service flow, for example, the delay detection task is used to instruct the network nodes in the first detection domain to obtain the delay collection data of the first service flow. The packet loss collection data of the first service flow obtained by any network node in the first detection domain includes at least one of the following: the number of Ethernet frames of the first service flow received by the network node, and the number of Ethernet frames of the first service flow sent by the network node. The delay collection data of the first service flow acquired by any network node in the first detection domain includes at least one of the following: the reception timestamp of the Ethernet frame of the first service flow received by the network node, the transmission timestamp of the Ethernet frame of the first service flow sent by the network node, and the delay of the Ethernet frame of the first service flow in the network node. The reception timestamp of any Ethernet frame received by any network node is the entry timestamp of the Ethernet frame in the network node, that is, the moment when the Ethernet frame enters the network node. The transmission timestamp of any Ethernet frame sent by any network node is the exit timestamp of the Ethernet frame in the network node, that is, the moment when the Ethernet frame is sent from the network node.
[0120] In an optional embodiment, the detection information B also includes reporting mode (report mode or sentmode) information, which is used to indicate the reporting mode of the collected data, and the reporting mode is the reporting mode in which the network node reports the collected data of the first business flow to the controller. Among them, the reporting mode is an intermediate node reporting mode or a tail node reporting mode. The intermediate node reporting mode is also called a hop by hop reporting mode, referred to as intermediate node reporting or hop by hop reporting. The tail node reporting mode is also called an end-to-end (endto end, E2E) reporting mode, referred to as tail node reporting or end-to-end reporting. In the intermediate node reporting mode, the head node, the intermediate node and the tail node in the first detection domain all report the collected data of the first business flow to the controller. In the tail node reporting mode, the head node and the intermediate node in the first detection domain do not report the collected data of the first business flow to the controller, and the tail node in the first detection domain reports the collected data of the first business flow to the controller.
[0121] In an optional embodiment, the detection information B also includes delay mode information, which is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. The synchronous delay mode is a delay mode based on time synchronization, such as a delay mode based on 1588 time synchronization, and the asynchronous delay mode is a delay mode not based on time synchronization. In the synchronous delay mode, the network nodes in the first detection domain need to perform time synchronization when detecting the delay of the first service flow. In the asynchronous delay mode, the network nodes in the first detection domain do not need to perform time synchronization when detecting the delay of the first service flow. For example, in the synchronous delay mode, the delay collection data of the first service flow obtained by any network node in the first detection domain includes at least one of the reception timestamp of the Ethernet frame of the first service flow received by the network node and the transmission timestamp of the Ethernet frame of the first service flow sent by the network node. In the asynchronous delay mode, the delay collection data of the first service flow obtained by any network node in the first detection domain includes the delay (i.e., local delay) of the Ethernet frame of the first service flow in the network node.
[0122] The second Ethernet frame includes the detection information B, that is, the second Ethernet frame carries the detection information B. In the embodiment of the present application, the second Ethernet frame carries the detection information B including any one of the following three implementation methods.
[0123] A first implementation manner: the second Ethernet frame includes an inner (virtual local area network, VLAN) tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information B, that is, the detection information B is located in the inner VLAN tag.
[0124] The outer VLAN tag is located outside the inner VLAN tag, and the inner VLAN tag is located between the outer VLAN tag and the service data A included in the second Ethernet frame. Since the second Ethernet frame includes the inner VLAN tag and the outer VLAN tag, the second Ethernet frame includes two layers of VLAN tags, which are also called double-layer virtual LAN (802.1Q-in-802.1Q, QINQ) tags.
[0125] Optionally, the inner VLAN tag includes a priority field, and the priority field is used to carry the detection information B. For example, the priority field includes a detection task subfield and a reporting mode subfield, and the detection task subfield is used to carry the detection task, and the reporting mode subfield is used to carry the reporting mode information. In one embodiment, the detection task subfield includes a packet loss detection task subfield and a delay detection task subfield, and the packet loss detection task subfield is used to carry the packet loss detection task, and the delay detection task subfield is used to carry the delay detection task. In an example, the length of the priority field is 3 bits, the length of the packet loss detection task subfield, the length of the delay detection task subfield, and the length of the reporting mode subfield are all 1 bit, and the value of the packet loss detection task subfield, the value of the delay detection task subfield, and the value of the reporting mode subfield are all 0 or 1. For example, the value of the packet loss detection task subfield is 0 or 1, and the value "0" or "1" of the packet loss detection task subfield is a packet loss detection task, that is, when the value of the packet loss detection task subfield is 0 or 1, the packet loss detection task subfield carries a packet loss detection task. For example, the value of the delay detection task subfield is 0 or 1; the value "1" of the delay detection task subfield is a delay detection task, and the value "0" of the delay detection task subfield is not a delay detection task, that is, when the value of the delay detection task subfield is 1, the delay detection task subfield carries the delay detection task, and when the value of the delay detection task subfield is 0, the delay detection task subfield does not carry the delay detection task; or, the value "0" of the delay detection task subfield is a delay detection task, and the value "1" of the delay detection task subfield is not a delay detection task, that is, when the value of the delay detection task subfield is 0, the delay detection task subfield carries the delay detection task, and when the value of the delay detection task subfield is 1, the delay detection task subfield does not carry the delay detection task. For example, the value of the reporting mode subfield is 0 or 1, and the value "0" or "1" of the reporting mode subfield is both reporting mode information; the value "0" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode, and the value "1" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the tail node reporting mode; or, the value "0" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the tail node reporting mode, and the value "1" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode.
[0126] In the embodiment of the present application, since the length of the packet loss detection task subfield, the length of the delay detection task subfield and the length of the reporting mode subfield are all 1 bit, the packet loss detection task subfield is also called a packet loss (loss, L) detection task flag, a packet loss detection task bit, an L flag, an L coloring bit, an L bit, etc., the delay detection task subfield is also called a delay (delay, D) detection task flag, a delay detection task bit, a D flag, a D coloring bit, a D bit, etc., and the reporting mode subfield is also called a reporting mode flag or a reporting mode bit. In one example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is a packet loss detection flag, the second bit is a delay detection flag, and the third bit is a reporting mode flag. In another example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is a packet loss detection flag, the second bit is a reporting mode flag, and the third bit is a delay detection flag. In another example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is the delay detection flag, the second bit is the packet loss detection flag, and the third bit is the reporting mode flag. In another example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is the delay detection flag, the second bit is the reporting mode flag, and the third bit is the packet loss detection flag. In another example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is the reporting mode flag, the second bit is the packet loss detection flag, and the third bit is the delay detection flag. In another example, in the priority field included in the inner VLAN tag, among the three bits arranged from high to low, the first bit is the reporting mode flag, the second bit is the packet loss detection flag, and the third bit is the delay detection flag.
[0127] As an example, see Figure 5 , which shows a schematic diagram of a second Ethernet frame provided by an embodiment of the present application. Figure 5 As shown, the second Ethernet frame includes service data A, VLAN tag 1 and VLAN tag 2, VLAN tag 2 is located outside VLAN tag 1, and VLAN tag 1 is located between VLAN tag 2 and service data A, so VLAN tag 2 is an outer VLAN tag, VLAN tag 1 is an inner VLAN tag, and VLAN tag 1 carries detection information B. Specifically, VLAN tag 1 includes a priority field, the length of the priority field may be 3 bits, and the detection information B is located in the priority field in VLAN tag 1.
[0128] like Figure 5 As shown, the second Ethernet frame also includes the following fields: Ethernet type, source media access control (SMAC), destination media access control (DMAC), frame check sequence (FCS). VLAN tag 1 also includes the following fields: Ethernet type, canonical format indicator (CFI), VLAN identifier (VID). Among them, the length of Ethernet type field 1 and the length of Ethernet type field 2 are both 2 bytes, the length of VLAN tag 1, the length of VLAN tag 2 and the length of FCS field are all 4 bytes, the length of SMAC field and the length of DMAC field are both 6 bytes, and the length of service data A is 42 to 1500 bytes. The SMAC field is used to carry the SMAC address. The DMAC field is used to carry the DMAC address. The FCS field is used to carry the FCS. In VLAN tag 1, the value of Ethernet type field 2 is 0x8100, the CFI field is used to carry the CFI, and the VLAN identifier field is used to carry the VLAN identifier. Optionally, VLAN tag 2 also includes an Ethernet type field, a priority field, a CFI field and a VLAN identification field. The meaning of each field in VLAN tag 1 except the priority field and the meaning of VLAN tag 2 can be referred to the VLAN protocol and will not be repeated here.
[0129] Among them, the second Ethernet frame can be an Ethernet frame based on the PROFINET protocol, the Ethernet control automation technology (EtherCAT) protocol or the Ethernet for plant automation (EPA) protocol. In the case where the second Ethernet frame is an Ethernet frame based on the PROFINET protocol, the value of the Ethernet type field 1 is 0x8892. In the case where the second Ethernet frame is an Ethernet frame based on the EtherCAT protocol, the value of the Ethernet type field 1 is 0x88A4. In the case where the second Ethernet frame is an Ethernet frame based on the EPA protocol, the value of the Ethernet type field 1 is 0x8907. Among them, PROFINET was launched by the PROFIBUS International Organization (PROFIBUS International, PI) and is a new generation of automation bus standard based on industrial Ethernet technology.
[0130] In the introduction of the first implementation method, the detection information B including the detection task and the reporting mode information is taken as an example. In some embodiments, the reporting mode of the collected data can be configured in the network node within the first detection domain, so that the detection information B may not include the reporting mode information, and the inner VLAN tag may not carry the reporting mode information. In other embodiments, the detection information B also includes delay mode information. For example, the delay mode information can be carried in the idle field (that is, the unoccupied field) in the inner VLAN tag, or the inner VLAN tag can be field extended, and the delay mode information is carried in the extended field. In some other embodiments, the default delay mode is the synchronous delay mode, so that the detection information B may not include the delay mode information, and the inner VLAN tag may not carry the reporting mode information.
[0131] The second implementation manner: the second Ethernet frame includes a high-availability seamless redundancy (HSR) label, and the HSR label is used to carry the detection information B. That is, the detection information B is located in the HSR label.
[0132] Optionally, the HSR tag includes a sequence number (Squence number, SeqNr) field, and the SeqNr field is used to carry the detection information B. For example, the SeqNr field includes a detection task subfield, a reporting mode subfield and a delay mode subfield, the detection task subfield is used to carry the detection task, the reporting mode subfield is used to carry the reporting mode information, and the delay mode subfield is used to carry the delay mode information. In one embodiment, the detection task subfield includes a packet loss detection task subfield and a delay detection task subfield, the packet loss detection task subfield is used to carry the packet loss detection task, and the delay detection task subfield is used to carry the delay detection task. Among them, the length of the SeqNr field is 2 bytes, the length of the packet loss detection task subfield, the length of the delay detection task subfield, the length of the reporting mode subfield and the length of the delay mode subfield are all at least one bit, and the positions of the packet loss detection task subfield, the delay detection task subfield, the reporting mode subfield and the delay mode subfield in the SeqNr field can be set according to actual conditions. For example, in the SeqNr field, the packet loss detection task subfield, the delay detection task subfield, the reporting mode subfield and the delay mode subfield are arranged in order from high to low, or in order from low to high, and in the packet loss detection task subfield, the delay detection task subfield, the reporting mode subfield and the delay mode subfield, there may or may not be a gap between adjacent subfields.
[0133] In one example, the length of the packet loss detection task subfield, the length of the delay detection task subfield, the length of the reporting mode subfield, and the length of the delay mode subfield are all 1 bit, and the value of the packet loss detection task subfield, the value of the delay detection task subfield, the value of the reporting mode subfield, and the value of the delay mode subfield are all 0 or 1. For example, the value of the packet loss detection task subfield is 0 or 1, and the value "0" or "1" of the packet loss detection task subfield is a packet loss detection task, that is, when the value of the packet loss detection task subfield is 0 or 1, the packet loss detection task subfield carries a packet loss detection task. For example, the value of the delay detection task subfield is 0 or 1; the value "1" of the delay detection task subfield is a delay detection task, and the value "0" of the delay detection task subfield is not a delay detection task, that is, when the value of the delay detection task subfield is 1, the delay detection task subfield carries the delay detection task, and when the value of the delay detection task subfield is 0, the delay detection task subfield does not carry the delay detection task; or, the value "0" of the delay detection task subfield is a delay detection task, and the value "1" of the delay detection task subfield is not a delay detection task, that is, when the value of the delay detection task subfield is 0, the delay detection task subfield carries the delay detection task, and when the value of the delay detection task subfield is 1, the delay detection task subfield does not carry the delay detection task. For example, the value of the reporting mode subfield is 0 or 1, and the value "0" or "1" of the reporting mode subfield is both reporting mode information; the value "0" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode, and the value "1" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the tail node reporting mode; or, the value "0" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the tail node reporting mode, and the value "1" of the reporting mode subfield is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode. For example, the value of the delay mode subfield is 0 or 1, and the value "0" or "1" of the delay mode subfield is both delay mode information; the value "0" of the delay mode subfield is used to indicate the synchronous delay mode, and the value "1" of the delay mode subfield is used to indicate the asynchronous delay mode; or, the value "0" of the delay mode subfield is used to indicate the asynchronous delay mode, and the value "1" of the delay mode subfield is used to indicate the synchronous delay mode.
[0134] When the length of the packet loss detection task subfield is 1 bit, the packet loss detection task subfield is also called the packet loss detection task flag bit, the packet loss detection task bit, the L flag bit, the L coloring bit, the L bit, etc. When the length of the delay detection task subfield is 1 bit, the delay detection task subfield is also called the delay detection task flag bit, the delay detection task bit, the D flag bit, the D coloring bit, the D bit, etc. When the length of the reporting mode subfield is 1 bit, the reporting mode subfield is also called the reporting mode flag bit or the reporting mode bit. When the length of the delay mode subfield is 1 bit, the delay mode subfield is also called the delay mode flag bit or the delay mode bit. In the example, the length of the packet loss detection task subfield, the length of the delay detection task subfield, the length of the reporting mode subfield and the length of the delay mode subfield are all 1 bit, the packet loss detection task subfield, the delay detection task subfield, the reporting mode subfield and the delay mode subfield are adjacent in sequence, and among the four lowest bits of the SeqNr field, the first bit arranged from low to high is the packet loss detection flag (that is, the packet loss detection task subfield), the second bit is the delay detection flag (that is, the delay detection task subfield), the third bit is the reporting mode flag (that is, the reporting mode subfield), and the fourth bit is the delay mode flag (that is, the delay mode subfield).
[0135] As an example, see Figure 6 , which shows a schematic diagram of another second Ethernet frame provided by an embodiment of the present application. Figure 6 As shown, the second Ethernet frame includes a link protocol data unit (LPDU) and an HSR tag, the LPDU includes service data A, and the HSR tag carries detection information B. Specifically, the HSR tag includes a SeqNr field, and the detection information B is located in the SeqNr field.
[0136] like Figure 6 As shown, the second Ethernet frame also includes the following fields: SMAC, DMAC, preamble, and FCS. The HSR label also includes the following fields: Ethernet type, path identifier (pathID), and link service data unit (LSDU) size. Among them, the SMAC field is used to carry the SMAC address. The DMAC field is used to carry the DMAC address. The preamble field is used to carry the preamble. The FCS field is used to carry the FCS. The pathID is used to carry the path identifier. The LSDU size field is used to identify the total length of the LPDU and FCS fields. For the specific meaning of each field in the second Ethernet frame, please refer to the relevant Ethernet protocol, which will not be repeated here.
[0137] The second Ethernet frame may be an Ethernet frame based on the PROFINET protocol, the EtherCAT protocol or the EPA protocol.
[0138] In the introduction of the second implementation method, the detection information B includes the detection task, reporting mode information and delay mode information as an example. In some embodiments, the reporting mode of the collected data can be configured in the network node within the first detection domain, so that the detection information B may not include the reporting mode information, and the HSR tag may not carry the reporting mode information. In other embodiments, the default delay mode is the synchronous delay mode, so that the detection information B may not include the delay mode information, and the HSR tag may not carry the reporting mode information.
[0139] A third implementation manner: the second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information B, that is, the detection information B is located in the detection tag. The detection tag is also called a measurement tag.
[0140] In an optional embodiment, the second Ethernet frame further includes a VLAN tag, and the detection tag is located between the VLAN tag and the service data A included in the second Ethernet frame. For example, the second Ethernet frame includes one layer of VLAN tag, and the detection tag is located between the VLAN tag and the service data A. For another example, the second Ethernet frame includes two layers of VLAN tags, and the detection tag is located between the inner VLAN tag and the service data A. Optionally, the second Ethernet frame includes two layers of VLAN tags, and the detection tag may also be located between the inner VLAN tag and the outer VLAN tag.
[0141] In an optional embodiment, the detection tag includes a detection task field, a reporting mode field and a delay mode field. The detection task field is used to carry the detection task. The reporting mode field is used to carry the reporting mode information. The delay mode field is used to carry the delay mode information. In one embodiment, the detection task field includes a packet loss detection task field and a delay detection task field, the packet loss detection task field is used to carry the packet loss detection task, and the delay detection task field is used to carry the delay detection task. The length of the packet loss detection task field, the length of the delay detection task field, the length of the reporting mode field and the length of the delay mode field are all at least one bit, and the positions of the packet loss detection task field, the delay detection task field, the reporting mode field and the delay mode field in the detection tag can be set according to actual conditions. For example, in the detection tag, the packet loss detection task field, the delay detection task field, the reporting mode field and the delay mode field are arranged in order from high to low, or in order from low to high, and in the packet loss detection task field, the delay detection task field, the reporting mode field and the delay mode field, there may or may not be a gap between adjacent fields.
[0142] In one example, the length of the packet loss detection task field, the length of the delay detection task field, the length of the reporting mode field, and the length of the delay mode field are all 1 bit, and the value of the packet loss detection task field, the value of the delay detection task field, the value of the reporting mode field, and the value of the delay mode field are all 0 or 1. For example, the value of the packet loss detection task field is 0 or 1, and the value "0" or "1" of the packet loss detection task field is a packet loss detection task, that is, when the value of the packet loss detection task field is 0 or 1, the packet loss detection task field carries a packet loss detection task. For example, the value of the delay detection task field is 0 or 1; the value "1" of the delay detection task field is a delay detection task, and the value "0" of the delay detection task field is not a delay detection task, that is, when the value of the delay detection task field is 1, the delay detection task field carries the delay detection task, and when the value of the delay detection task field is 0, the delay detection task field does not carry the delay detection task; or, the value "0" of the delay detection task field is a delay detection task, and the value "1" of the delay detection task field is not a delay detection task, that is, when the value of the delay detection task field is 0, the delay detection task field carries the delay detection task, and when the value of the delay detection task field is 1, the delay detection task field does not carry the delay detection task. For example, the value of the reporting mode field is 0 or 1, and the value "0" or "1" of the reporting mode field is both reporting mode information; the value "0" of the reporting mode field is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode, and the value "1" of the reporting mode field is used to indicate that the reporting mode of the collected data is the tail node reporting mode; or, the value "0" of the reporting mode field is used to indicate that the reporting mode of the collected data is the tail node reporting mode, and the value "1" of the reporting mode field is used to indicate that the reporting mode of the collected data is the intermediate node reporting mode. For example, the value of the delay mode field is 0 or 1, and the value "0" or "1" of the delay mode field is both delay mode information; the value "0" of the delay mode field is used to indicate the synchronous delay mode, and the value "1" of the delay mode field is used to indicate the asynchronous delay mode; or, the value "0" of the delay mode field is used to indicate the asynchronous delay mode, and the value "1" of the delay mode field is used to indicate the synchronous delay mode.
[0143] As an example, see Figure 7 , which shows a schematic diagram of another second Ethernet frame provided in an embodiment of the present application. Figure 7As shown, the second Ethernet frame includes service data A and a detection tag, and the detection tag carries detection information B. Specifically, the detection tag includes an Ethernet type field (i.e., Ethernet type field 2), a length field, a packet loss detection task field, a delay detection task field, a delay mode field, a reporting mode field, and a reserved field. The Ethernet type field 2, the length field, the packet loss detection task field, the delay detection task field, the delay mode field, the reporting mode field, and the reserved field are arranged in order from high to low, and there is no interval between adjacent fields in the Ethernet type field 2, the length field, the packet loss detection task field, the delay detection task field, the delay mode field, the reporting mode field, and the reserved field. Among them, the Ethernet type field 2 is used to carry the Ethernet type. The length field is used to identify the total length of the remaining fields in the detection tag except the Ethernet type field 2 and the length field. The packet loss detection task field is used to carry the packet loss detection task. The delay detection task field is used to carry the delay detection task. The delay mode field is used to carry delay mode information. The reporting mode field is used to carry reporting mode information. The reserved field can be used to carry collected data, such as at least one of the packet loss collection data and delay collection data of the first business flow. For example, the length of the detection tag is 6 bytes, the length of the Ethernet type field 2 is 2 bytes, the length of the length field is 5 bits, the length of the packet loss detection task field, the length of the delay detection task field, the length of the delay mode field and the length of the reporting mode field are all 1 bit, the length of the reserved field is 24 bits and the reserved field can be extended.
[0144] like Figure 7 As shown, the second Ethernet frame also includes the following fields: Ethernet type, VLAN tag, SMAC, DMAC, FCS. The length of the Ethernet type field is 2 bytes, the length of the SMAC field and the length of the DMAC field are both 6 bytes, the length of the VLAN tag and the length of the FCS field are both 4 bytes, and the length of the service data A is 42 to 1500 bytes. The SMAC field is used to carry the SMAC address. The DMAC field is used to carry the DMAC address. The FCS field is used to carry the FCS. The structure and meaning of the VLAN tag can refer to the VLAN protocol, which will not be repeated here. Among them, the second Ethernet frame can be an Ethernet frame based on the PROFINET protocol, the EtherCAT protocol or the EPA protocol. In the case where the second Ethernet frame is an Ethernet frame based on the PROFINET protocol, the value of the Ethernet type field 1 is 0x8892. In the case where the second Ethernet frame is an Ethernet frame based on the EtherCAT protocol, the value of the Ethernet type field 1 is 0x88A4. In the case where the second Ethernet frame is an Ethernet frame based on the epa protocol, the value of the Ethernet type field 1 is 0x8907.
[0145] In the introduction of the third implementation method, the detection information B includes the detection task, reporting mode information and delay mode information as an example. In some embodiments, the reporting mode of the collected data can be configured in the network node within the first detection domain, so that the detection information B may not include the reporting mode information, and the detection tag may not carry the reporting mode information. In other embodiments, the default delay mode is the synchronous delay mode, so that the detection information B may not include the delay mode information, and the detection tag may not carry the reporting mode information. In addition, the third implementation method is described by taking the detection tag including the delay detection task field and the delay mode field as an example. In some embodiments, when the detection tag includes the delay mode field, the delay mode field is not only used to indicate the delay mode, but also can be used to indicate the delay detection task. In this case, the detection tag may not include the delay detection task field, which can reduce the overhead of the second Ethernet frame and improve data transmission efficiency.
[0146] The above three implementations are only examples of carrying detection information in Ethernet frames, and are not used to limit the technical solutions of the embodiments of the present application. In practical applications, the detection information can be carried in any idle field (i.e., unoccupied field) of the Ethernet frame for in-band detection. In addition, the above description takes the detection information including detection tasks, reporting mode information, and delay mode information as an example. In some embodiments, the detection information also includes other information for in-band detection, such as the detection information also includes periodic information, which is used to indicate the detection period of the first service flow so that the network nodes in the first detection domain obtain the collection data of the first service flow according to the detection period. For example, the network nodes in the first detection domain obtain the packet loss collection data of the first service flow according to the detection period. Among them, the packet loss collection data of the first service flow obtained by any network node in the first detection domain in any detection period includes at least one of the following: the number of Ethernet frames of the first service flow received by the network node in the detection period, and the number of Ethernet frames of the first service flow sent by the network node in the detection period. For example, the detection period of the first service flow may be 10 seconds, 30 seconds, 60 seconds (ie, 1 minute), or 300 seconds.
[0147] S403. The first network node sends a second Ethernet frame.
[0148] For example, the first network node searches the MAC forwarding table of the first network node according to the DMAC address of the second Ethernet frame to determine the egress port of the second Ethernet frame, and the first network node sends the second Ethernet frame through the egress port. The second Ethernet frame sent by the first network node through the egress port can be received by the next hop node of the first network node, and the next hop node of the first network node can be located in the first detection domain or outside the first detection domain. In the case where the next hop node of the first network node is located in the first detection domain, the next hop node of the first network node can be an intermediate node in the first detection domain or a tail node in the first detection domain.
[0149] In an example, Figure 2 and Figure 3 As shown, network nodes 201~204 are all within the first detection domain, network node 201 is the head node within the first detection domain, network node 204 is the tail node within the first detection domain, network nodes 202~203 are intermediate nodes within the first detection domain, the first network node is network node 201, the next hop node of the first network node is network node 202, the next hop node of the first network node is within the first detection domain, and the next hop node of the first network node is the intermediate node within the first detection domain.
[0150] In another example, Figure 2 and Figure 3 As shown, network nodes 201-202 are all outside the first detection domain, network nodes 203-204 are all within the first detection domain, network node 203 is the head node within the first detection domain, network node 204 is the tail node within the first detection domain, the first network node is network node 203, the next hop node of the first network node is network node 204, the next hop node of the first network node is within the first detection domain, and the next hop node of the first network node is the tail node within the first detection domain.
[0151] In another example, Figure 2 and Figure 3 As shown, network node 201 and network nodes 203-204 are all within the first detection domain, network node 202 is outside the first detection domain, network node 201 is the head node within the first detection domain, network node 204 is the tail node within the first detection domain, network node 203 is the intermediate node within the first detection domain, the first network node is network node 201, the next hop node of the first network node is network node 202, and the next hop node of the first network node is outside the first detection domain.
[0152] S404. The second network node receives the second Ethernet frame.
[0153] The second network node receives a second Ethernet frame from a previous-hop node of the second network node, where the second Ethernet frame is an Ethernet frame of the first service flow.
[0154] The second network node is an intermediate node or a tail node in the first detection domain, and the previous hop node of the second network node may be located in the first detection domain or outside the first detection domain. When the previous hop node of the second network node is located in the first detection domain, the previous hop node of the second network node is a head node or an intermediate node in the first detection domain.
[0155] In one embodiment, if Figure 2 and Figure 3 As shown, network nodes 201-204 are all in the first detection domain, network node 201 is the head node in the first detection domain, network node 204 is the tail node in the first detection domain, and network nodes 202-203 are intermediate nodes in the first detection domain. In one example, the second network node is network node 202, the previous hop node of the second network node is network node 201, the second network node is an intermediate node in the first detection domain, and the previous hop node of the second network node is the head node in the first detection domain. In another example, the second network node is network node 203, the previous hop node of the second network node is network node 202, and the second network node and the previous hop node of the second network node are both intermediate nodes in the first detection domain. In another example, the second network node is network node 204, the previous hop node of the second network node is network node 203, the second network node is the tail node in the first detection domain, and the previous hop node of the second network node is an intermediate node in the first detection domain.
[0156] In another embodiment, if Figure 2 and Figure 3 As shown, network nodes 201-202 are all outside the first detection domain, network nodes 203-204 are all within the first detection domain, network node 203 is the head node within the first detection domain, network node 204 is the tail node within the first detection domain, the second network node is network node 204, the previous hop node of the second network node is network node 203, the second network node is the tail node within the first detection domain, and the previous hop node of the second network node is the head node within the first detection domain.
[0157] In another embodiment, Figure 2 and Figure 3 As shown, network node 201 and network nodes 203-204 are all within the first detection domain, network node 202 is outside the first detection domain, network node 201 is the head node within the first detection domain, network node 204 is the tail node within the first detection domain, network node 203 is the intermediate node within the first detection domain, the second network node is network node 203, the previous hop node of the second network node is network node 202, the second network node is the intermediate node within the first detection domain, and the previous hop node of the second network node is outside the first detection domain.
[0158] S405. The second network node obtains the collected data of the first service flow according to the detection information B included in the second Ethernet frame.
[0159] After the second network node receives the second Ethernet frame, the second network node parses the second Ethernet frame to obtain the detection information B included in the second Ethernet frame. Then, the second network node obtains the collected data of the first service flow according to the detection information B.
[0160] In an optional embodiment, the detection information B includes a detection task, and the detection task is used to indicate the detection of the transmission performance of the first service flow. The second network node obtains the collected data of the first service flow according to the detection task. The detection task includes at least one of a packet loss detection task and a delay detection task. The packet loss detection task is used to indicate the network nodes in the first detection domain to detect the packet loss of the first service flow. The delay detection task is used to indicate the network nodes in the first detection domain to detect the delay of the first service flow.
[0161] In one embodiment, the detection information B includes a packet loss detection task, and the second network node obtains the packet loss collection data of the first service flow according to the packet loss detection task. The packet loss collection data of the first service flow obtained by the second network node includes at least one of the following: the number of Ethernet frames of the first service flow received by the second network node (for example, the number of Ethernet frames of the first service flow received by the second network node within the detection period), the number of Ethernet frames of the first service flow sent by the second network node (for example, the number of Ethernet frames of the first service flow sent by the second network node within the detection period). For example, the second network node counts the number of Ethernet frames (including the second Ethernet frame) belonging to the first service flow and carrying the packet loss detection task received by the second network node according to the detection period, and / or the second network node counts the number of Ethernet frames belonging to the first service flow and carrying the packet loss detection task (including the second Ethernet frame) sent by the second network node according to the detection period. That is, within each detection cycle, the second network node counts the number of Ethernet frames received by the second network node that belong to the first service flow and carry packet loss detection tasks, and / or the second network node counts the number of Ethernet frames sent by the second network node that belong to the first service flow and carry packet loss detection tasks.
[0162] In another embodiment, the detection information B includes a delay detection task, and the second network node obtains the delay collection data of the first service flow according to the delay detection task. The delay collection data of the first service flow obtained by the second network node includes at least one of the following: a reception timestamp of an Ethernet frame (e.g., a second Ethernet frame) of the first service flow received by the second network node, a transmission timestamp of an Ethernet frame (e.g., a second Ethernet frame) of the first service flow sent by the second network node, and a delay of an Ethernet frame (e.g., a second Ethernet frame) of the first service flow in the second network node.
[0163] It should be noted that the detection information B may include a packet loss detection task or a delay detection task, or may include a packet loss detection task and a delay detection task. In the case where the detection information B includes a packet loss detection task or a delay detection task, the second network node performs one of the above two embodiments according to the detection task included in the detection information B. In the case where the detection information B includes a packet loss detection task and a delay detection task, the second network node performs the above two embodiments simultaneously according to the detection task included in the detection information B.
[0164] In an optional embodiment, the detection information B also includes delay mode information, and the delay mode information is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. The second network node can refer to the delay mode information when acquiring the delay collection data of the first service flow. Specifically, the second network node determines the delay mode according to the delay mode information, and the second network node acquires the delay collection data of the first service flow according to the delay mode. In the case where the delay mode information is used to indicate the asynchronous delay mode, the delay collection data of the first service flow acquired by the second network node includes the delay of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow in the second network node. In the case where the delay mode information is used to indicate the synchronous delay mode, the delay collection data of the first service flow acquired by the second network node includes the reception timestamp of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow received by the second network node, and / or, the transmission timestamp of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow sent by the second network node. The following is an example of the second network node acquiring the delay collection data according to the second Ethernet frame.
[0165] In one embodiment, the detection information B includes a delay detection task and delay mode information, the delay mode information is used to indicate an asynchronous delay mode, and the second network node obtains the delay of the second Ethernet frame in the second network node according to the delay detection task and the delay mode information. In a specific embodiment, the second network node obtains a receiving timestamp of the second Ethernet frame received by the second network node and a sending timestamp of the second Ethernet frame sent by the second network node according to the delay detection task and the delay mode information, and the second network node determines the time difference between the sending timestamp and the receiving timestamp as the delay of the second Ethernet frame in the second network node.
[0166] In another embodiment, the detection information B includes delay mode information, the delay mode information is used to indicate the asynchronous delay mode and is used to indicate the delay of detecting the first service flow, and the second network node obtains the delay of the second Ethernet frame in the second network node according to the delay mode information. In a specific embodiment, the second network node obtains the receiving timestamp of the second Ethernet frame received by the second network node and the sending timestamp of the second Ethernet frame sent by the second network node according to the delay mode information, and the second network node determines the time difference between the sending timestamp and the receiving timestamp as the delay of the second Ethernet frame in the second network node.
[0167] In another embodiment, the detection information B includes a delay detection task and delay mode information, and the delay mode information is used to indicate a synchronous delay mode. The second network node obtains a receiving timestamp of the second network node receiving the second Ethernet frame and / or a sending timestamp of the second network node sending the second Ethernet frame according to the delay detection task and the delay mode information.
[0168] In another embodiment, the detection information B includes delay mode information, which is used to indicate the synchronization delay mode and to indicate the delay of detecting the first service flow. The second network node obtains the receiving timestamp of the second network node receiving the second Ethernet frame and / or the sending timestamp of the second network node sending the second Ethernet frame according to the delay mode information.
[0169] In another embodiment, the detection information B includes a delay detection task but does not include delay mode information, and the second network node obtains the delay collection data of the first service flow according to the delay detection task and the default delay mode. The default delay mode may be a synchronous delay mode or an asynchronous delay mode. For example, the default delay mode is a synchronous delay mode, and the second network node obtains a reception timestamp of the second network node receiving the second Ethernet frame and / or a transmission timestamp of the second network node sending the second Ethernet frame according to the delay detection task and the default delay mode.
[0170] In another embodiment, the detection information B includes a delay detection task but does not include delay mode information. The delay mode can be pre-configured in the second network node, and the second network node obtains the delay collection data of the first service flow according to the delay detection task and the pre-configured delay mode. The pre-configured delay mode can be a synchronous delay mode or an asynchronous delay mode. For example, the pre-configured delay mode is a synchronous delay mode, and the second network node obtains the receiving timestamp of the second Ethernet frame received by the second network node according to the delay detection task and the default delay mode, and / or the sending timestamp of the second Ethernet frame sent by the second network node. For another example, the pre-configured delay mode is an asynchronous delay mode, and the second network node obtains the delay of the second Ethernet frame in the second network node according to the delay detection task and the default delay mode.
[0171] In an optional embodiment, the detection information B also includes reporting mode information, and the reporting mode information is used to indicate the reporting mode of the collected data, and the reporting mode is the reporting mode of the network node reporting the collected data of the first service flow to the controller, and the reporting mode is an intermediate node reporting mode (i.e., a hop-by-hop reporting mode) or a tail node reporting mode (i.e., an end-to-end reporting mode). The second network node can also obtain the reporting mode information by parsing the second Ethernet frame, and the second network node determines the reporting mode of the collected data of the first service flow according to the reporting mode information.
[0172] In one embodiment, the reporting mode information is used to indicate that the reporting mode of the collected data is an intermediate node reporting mode. After the second network node obtains the collected data of the first service flow, the second network node reports the collected data of the first service flow to the controller.
[0173] In another embodiment, the reporting mode information is used to indicate that the reporting mode of the collected data is the tail node reporting mode, the second network node is an intermediate node in the first detection domain, and after the second network node obtains the collected data of the first service flow, the second network node sends the collected data of the first service flow obtained by the second network node to the tail node in the first detection domain. In a specific embodiment, the second network node adds the collected data of the first service flow obtained by the second network node to the Ethernet frame of the first service flow (for example, the second Ethernet frame), and the second network node sends the Ethernet frame of the first service flow (for example, the second Ethernet frame) with the collected data of the first service flow added to it to the tail node in the first detection domain. Optionally, the delay mode information is used to indicate an asynchronous delay mode, the collected data of the first service flow obtained by the second network node includes the delay of the first service flow in the second network node, and the second network node adds the delay of the first service flow in the second network node in the second Ethernet frame. In one embodiment, the second Ethernet frame includes the cumulative value of the delay of the first service flow in each network node located before the second network node in the first detection domain (referred to as the cumulative delay), for example, the second Ethernet frame includes the cumulative delay field (the cumulative delay field can be Figure 7 The accumulated delay is located in the accumulated delay field, the second network node determines the accumulated delay corresponding to the second network node according to the accumulated delay carried by the second Ethernet frame and the delay of the first service flow in the second network node, and the second network node updates the accumulated delay carried by the second Ethernet frame using the accumulated delay corresponding to the second network node. The accumulated delay corresponding to the second network node is the sum of the accumulated value of the delay of the first service flow in each network node before the second network node in the first detection domain and the delay of the first service flow in the second network node.
[0174] In another embodiment, the reporting mode information is used to indicate that the reporting mode of the collected data is the tail node reporting mode, the second network node is the tail node in the first detection domain, and after the second network node obtains the collected data of the first service flow, the second network node reports the collected data of the first service flow to the controller. In a specific embodiment, the second network node receives the collected data of the first service flow sent by the head node and the intermediate node in the first detection domain, and the second network node reports to the controller the collected data of the first service flow obtained by the head node in the first detection domain, the collected data of the first service flow obtained by the intermediate node in the first detection domain, and the collected data of the first service flow obtained by the tail node (i.e., the second network node) in the first detection domain. In a specific embodiment, the head node and the intermediate node in the first detection domain both send the collected data of the first service flow to the tail node in the first detection domain through the Ethernet frame of the first service flow, the second network node receives the Ethernet frame of the first service flow, and the second network node obtains the collected data of the first service flow obtained by the head node and the intermediate node in the first detection domain from the Ethernet frame of the first service flow.
[0175] In an optional embodiment, the second network node reports the collected data of the first business flow to the controller based on the telemetry protocol. When the second network node reports the collected data of the first business flow to the controller, it can also report the indication information of the first business flow to the controller. In one embodiment, the second network node sends a control message to the controller, and the control message can be a telemetry protocol message, and the control message carries the indication information of the first business flow and the collected data of the first business flow. Among them, the indication information of the first business flow can be a flow identifier, a flow label, or an n-tuple for identifying the first business flow, where n is a positive integer. The flow identifier or the flow label can also be allocated by the controller to the first business flow, and the n-tuple can be a binary tuple, a triplet, a quintuple, etc. For example, the n-tuple is a binary tuple, including an SMAC address and a DMAC address.
[0176] In an optional embodiment, the second network node periodically reports the collected data of the first service flow to the controller, and the reporting period of the second network node reporting the collected data of the first service flow to the controller is greater than or equal to the detection period of the first service flow. The collected data of the first service flow reported by the second network node to the controller in each reporting period includes the collected data in at least one detection period. For example, the reporting period of the collected data of the first service flow is greater than the detection period of the first service flow and less than 2 times the detection period of the first service flow, and the collected data of the first service flow reported by the second network node to the controller in each reporting period is the collected data of the first service flow in the previous detection period.
[0177] In an optional embodiment, when the second network node is an intermediate node in the first detection domain, the second network node also forwards the second Ethernet frame to the tail node in the first detection domain. When the second network node is the tail node in the first detection domain, the second network node removes the detection information B in the second Ethernet frame, and the second network node can forward the Ethernet frame after removing the detection information B. For example, for the third implementation in S402, the second network node can strip the detection tag in the second Ethernet frame to remove the detection information B.
[0178] It should be noted that, when the second network node is the tail node in the first detection domain, the second network node removes the detection information B in the Ethernet frame of the first service flow and then forwards the Ethernet frame. Therefore, the Ethernet frame of the first service flow actually sent by the second network node does not include the detection information B, and does not include the detection task. However, it can be understood that the Ethernet frame of the first service flow actually sent by the second network node is obtained by removing the detection information B in the Ethernet frame. Therefore, the introduction of S405 adopts a description similar to "the second network node counts the number of Ethernet frames belonging to the first service flow and carrying the packet loss detection task sent by the second network node". The "Ethernet frame belonging to the first service flow and carrying the packet loss detection task sent by the second network node" is actually the Ethernet frame obtained by the second network node after removing the packet loss detection task.
[0179] For optional embodiments, please refer to Figure 8 , which shows a flow chart of another network detection method provided by an embodiment of the present application. Figure 7 Based on the network detection method shown, Figure 8 The network detection method of the illustrated embodiment further includes the following step S406.
[0180] S406. The first network node obtains collected data of the first service flow according to the detection information B included in the second Ethernet frame.
[0181] In an optional embodiment, the detection information B includes a detection task, and the detection task is used to indicate the detection of the transmission performance of the first service flow. The first network node obtains the collected data of the first service flow according to the detection task. The detection task includes at least one of a packet loss detection task and a delay detection task, and correspondingly, the collected data of the first service flow includes at least one of delay collection data and packet loss collection data.
[0182] In one embodiment, the detection information B includes a packet loss detection task, and the first network node obtains packet loss collection data of the first service flow according to the packet loss detection task. The packet loss collection data of the first service flow obtained by the first network node includes at least one of the following: the number of Ethernet frames of the first service flow received by the first network node, and the number of Ethernet frames of the first service flow sent by the first network node. For example, in each detection cycle, the first network node counts the number of Ethernet frames received by the first network node that belong to the first service flow and carry the packet loss detection task, and / or the first network node counts the number of Ethernet frames sent by the first network node that belong to the first service flow and carry the packet loss detection task.
[0183] In another embodiment, the detection information B includes a delay detection task, and the first network node obtains the delay collection data of the first service flow according to the delay detection task. The delay collection data of the first service flow obtained by the first network node includes at least one of the following: a reception timestamp of an Ethernet frame (e.g., a first Ethernet frame) of the first service flow received by the first network node, a transmission timestamp of an Ethernet frame (e.g., a second Ethernet frame) of the first service flow sent by the first network node, and a delay of the Ethernet frame (e.g., a second Ethernet frame) of the first service flow in the first network node.
[0184] It should be noted that the detection information B may include a packet loss detection task or a delay detection task, or may include a packet loss detection task and a delay detection task. Similar to S405, when the detection information B includes a packet loss detection task or a delay detection task, the first network node performs one of the above two embodiments according to the detection task included in the detection information B. When the detection information B includes a packet loss detection task and a delay detection task, the first network node performs the above two embodiments simultaneously according to the detection task included in the detection information B.
[0185] In an optional embodiment, the detection information B also includes delay mode information, which is used to indicate the delay mode. The first network node can refer to the delay mode information when acquiring the delay collection data of the first service flow. In the case where the delay mode information is used to indicate the asynchronous delay mode, the delay collection data of the first service flow acquired by the first network node includes the delay of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow in the first network node. In the case where the delay mode information is used to indicate the synchronous delay mode, the delay collection data of the first service flow acquired by the first network node includes the reception timestamp of the Ethernet frame (e.g., the first Ethernet frame) of the first service flow received by the first network node, and / or the transmission timestamp of the Ethernet frame (e.g., the second Ethernet frame) of the first service flow sent by the first network node. The following is an example of the first network node acquiring the delay collection data of the first service flow based on the second Ethernet frame. It can be understood from the foregoing description that the second Ethernet frame and the first Ethernet frame are the same Ethernet frame, and the difference between the second Ethernet frame and the first Ethernet frame is whether the detection information B is carried.
[0186] In one embodiment, the detection information B includes a delay detection task and delay mode information, the delay mode information is used to indicate an asynchronous delay mode, and the first network node obtains the delay of the second Ethernet frame in the first network node according to the delay detection task and the delay mode information. In a specific embodiment, the first network node obtains a receiving timestamp of the first Ethernet frame received by the first network node and a sending timestamp of the second Ethernet frame sent by the first network node according to the delay detection task and the delay mode information, and the first network node determines the time difference between the sending timestamp and the receiving timestamp as the delay of the second Ethernet frame in the first network node.
[0187] In another embodiment, the detection information B includes delay mode information, the delay mode information is used to indicate the asynchronous delay mode and is used to indicate the delay of detecting the first service flow, and the first network node obtains the delay of the second Ethernet frame in the first network node according to the delay mode information. In a specific embodiment, the first network node obtains the receiving timestamp of the first Ethernet frame received by the first network node and the sending timestamp of the second Ethernet frame sent by the first network node according to the delay mode information, and the first network node determines the time difference between the sending timestamp and the receiving timestamp as the delay of the second Ethernet frame in the first network node.
[0188] In another embodiment, the detection information B includes a delay detection task and delay mode information, and the delay mode information is used to indicate a synchronous delay mode. The first network node obtains a receiving timestamp of the first network node receiving the first Ethernet frame and / or a sending timestamp of the first network node sending the second Ethernet frame according to the delay detection task and the delay mode information.
[0189] In another embodiment, the detection information B includes delay mode information, which is used to indicate the synchronization delay mode and to indicate the delay of detecting the first service flow. The first network node obtains the receiving timestamp of the first network node receiving the first Ethernet frame and / or the sending timestamp of the first network node sending the second Ethernet frame according to the delay mode information.
[0190] In another embodiment, the detection information B includes a delay detection task but does not include delay mode information, and the first network node obtains the delay collection data of the first service flow according to the delay detection task and the default delay mode. The default delay mode may be a synchronous delay mode or an asynchronous delay mode. For example, the default delay mode is a synchronous delay mode, and the first network node obtains a reception timestamp of the first network node receiving the first Ethernet frame and / or a transmission timestamp of the first network node sending the second Ethernet frame according to the delay detection task and the default delay mode.
[0191] In another embodiment, the detection information B includes a delay detection task but does not include delay mode information. The delay mode can be pre-configured in the first network node, and the first network node obtains the delay collection data of the first service flow according to the delay detection task and the pre-configured delay mode. The pre-configured delay mode can be a synchronous delay mode or an asynchronous delay mode. For example, the pre-configured delay mode is a synchronous delay mode, and the first network node obtains the receiving timestamp of the first Ethernet frame received by the first network node and / or the sending timestamp of the second Ethernet frame sent by the first network node according to the delay detection task and the default delay mode. For another example, the pre-configured delay mode is an asynchronous delay mode, and the first network node obtains the delay of the second Ethernet frame in the first network node according to the delay detection task and the default delay mode.
[0192] In an optional embodiment, the detection information B also includes reporting mode information, and the reporting mode information is used to indicate the reporting mode of the collected data, and the reporting mode is the reporting mode in which the network node reports the collected data of the first business flow to the controller, and the reporting mode is an intermediate node reporting mode or a tail node reporting mode. In the case where the reporting mode information is used to indicate that the reporting mode of the collected data of the first business flow is an intermediate node reporting mode, after the first network node obtains the collected data of the first business flow, the first network node reports the collected data of the first business flow to the controller. In the case where the reporting mode information is used to indicate that the reporting mode of the collected data of the first business flow is a tail node reporting mode, after the first network node obtains the collected data of the first business flow, the first network node sends the collected data of the first business flow obtained by the first network node to the tail node in the first detection domain. The implementation method of the first network node reporting the collected data of the first business flow to the controller and the implementation method of the first network node sending the collected data to the tail node in the first detection domain can refer to the relevant description in S405, which will not be repeated here.
[0193] The detailed implementation process of S406 is similar to that of S406. For technical details not shown in S406, please refer to the relevant description in S405. It should be noted that the first network node is the head node in the detection domain of the first service flow, and the Ethernet frame of the first service flow received by the first network node does not actually include the detection information B, and does not include the detection task. However, it can be understood that after the first network node receives the Ethernet frame of the first service flow, it will add the detection information B to the Ethernet frame, thereby adding the detection task. Therefore, the introduction of S406 adopts a description similar to "the first network node counts the number of Ethernet frames received by the first network node that belong to the first service flow and carry the packet loss detection task". "The Ethernet frame received by the first network node that belongs to the first service flow and carries the packet loss detection task" is actually the Ethernet frame received by the first network node that belongs to the first service flow and does not include the packet loss detection task, but the packet loss detection task will be added by the first network node.
[0194] After the controller receives the collected data of the first service flow acquired by the network nodes in the first detection domain, for example, after the controller receives the collected data of the first service flow reported by the head node, the middle node and the tail node in the first detection domain respectively, or after the controller receives the collected data of the first service flow reported by the tail node in the first detection domain, the controller determines the transmission performance of the first service flow according to the collected data of the first service flow acquired by the network nodes in the first detection domain, for example, determining the end-to-end transmission performance of the first service flow, the hop-by-hop transmission performance of the first service flow, the transmission performance of the first service flow in a certain network node, the transmission performance of the first service flow between two certain network nodes, etc. In an optional embodiment, the controller determines the transmission performance of the first service flow according to the detection period. Specifically, the controller determines the transmission performance of the first service flow in each detection period according to the collected data of the first service flow acquired by the network nodes in the first detection domain.
[0195] In one embodiment, the controller determines the packet loss rate of the first service flow according to the packet loss collection data of the first service flow acquired by the network nodes in the first detection domain. For example, the controller determines the end-to-end packet loss rate of the first service flow (that is, the packet loss rate from the head node in the first detection domain to the tail node in the first detection domain), the hop-by-hop packet loss rate of the first service flow (for example, the packet loss rate between adjacent network nodes of the first service flow in the first detection domain), the packet loss rate between two network nodes in the first detection domain, the packet loss rate of the first service flow in a certain network node in the first detection domain, etc. According to the packet loss collection data of the first service flow acquired by the network nodes in the first detection domain in each detection cycle, the controller determines the end-to-end packet loss rate of the first service flow, the hop-by-hop packet loss rate of the first service flow, the packet loss rate between two network nodes in the first detection domain, the packet loss rate of the first service flow in a certain network node in the first detection domain, etc.
[0196] In another embodiment, the controller determines the delay of the first service flow based on the delay collection data of the first service flow obtained by the network nodes in the first detection domain. For example, the controller determines the end-to-end delay of the first service flow (that is, the delay from the head node in the first detection domain to the tail node in the first detection domain), the hop-by-hop delay of the first service flow (for example, the delay between adjacent network nodes of the first service flow in the first detection domain), the delay between two network nodes in the first detection domain, the delay of the first service flow in a certain network node in the first detection domain, etc., based on the delay collection data of the first service flow obtained by the network nodes in the first detection domain in each detection cycle. In an optional embodiment, the controller determines the end-to-end delay of the first service flow in the detection cycle, the hop-by-hop delay of the first service flow, the delay between two network nodes in the first detection domain, the delay of the first service flow in a certain network node in the first detection domain, etc.
[0197] In an optional embodiment, the controller determines at least one of the maximum delay, minimum delay and average delay of the first service flow in the detection period according to the delay collection data of the first service flow acquired by the network node in the first detection domain in each detection period. For example, in each detection period, the first network node adds detection information B in multiple Ethernet frames of the first service flow, and for each Ethernet frame in the multiple Ethernet frames: the network node in the first detection domain acquires the delay collection data of the first service flow according to the Ethernet frame to obtain the delay collection data corresponding to the Ethernet frame, and the controller determines the delay of the Ethernet frame according to the delay collection data corresponding to the Ethernet frame, so that the controller can obtain the delay of the multiple Ethernet frames. The controller determines the maximum delay among the delays of the multiple Ethernet frames as the maximum delay of the first service flow in the detection period, the controller determines the minimum delay among the delays of the multiple Ethernet frames as the minimum delay of the first service flow in the detection period, and the controller determines the average value of the delays of the multiple Ethernet frames as the average delay of the first service flow in the detection period. Among them, the delay of any Ethernet frame among the multiple Ethernet frames includes the end-to-end delay of the Ethernet frame, the hop-by-hop delay of the Ethernet frame, the delay of the Ethernet frame between two network nodes in the first detection domain, the delay of the Ethernet frame in a network node in the first detection domain, etc. The controller determines the maximum delay, minimum delay and average delay in the same type of delay. For example, the controller determines the maximum delay among the end-to-end delays of the multiple Ethernet frames as the end-to-end maximum delay of the first service flow in the detection period, the controller determines the minimum delay among the end-to-end delays of the multiple Ethernet frames as the end-to-end minimum delay of the first service flow in the detection period, and the controller determines the average value of the end-to-end delays of the multiple Ethernet frames as the end-to-end average delay of the first service flow in the detection period. For another example, the controller determines the maximum delay among the delays between two network nodes in the first detection domain of the multiple Ethernet frames as the maximum delay of the first service flow between the two network nodes in the detection period, the controller determines the minimum delay among the delays between the two network nodes of the multiple Ethernet frames as the minimum delay of the first service flow between the two network nodes in the detection period, and the controller determines the average value of the delays between the two network nodes of the multiple Ethernet frames as the average delay of the first service flow between the two network nodes in the detection period. Wherein, for each of the multiple Ethernet frames: the delay collection data corresponding to the Ethernet frame obtained by any network node in the first detection domain includes: the reception timestamp of the Ethernet frame received by the network node, and / or, the reception timestamp of the Ethernet frame sent by the network node, and / or, the delay of the Ethernet frame in the network node, which is not limited in the embodiments of the present application.
[0198] In an optional embodiment, the latency collection data of the first service flow acquired by each network node in the first detection domain includes the latency of the first service flow in the network node, and the controller determines the sum of the latency of the first service flow in each network node in the first detection domain. The controller determines the sum of the latency of the first service flow in each network node in the first detection domain and the sum of the latency of the link in the first detection domain as the end-to-end latency of the first service flow, where the latency of the link is usually a fixed value. For an example, please refer to Fig. 9 , which shows a schematic diagram of detecting the transmission performance of a first service flow provided by an embodiment of the present application, network nodes 201~204 are all in the first detection domain, network node 201 is the head node in the first detection domain, network node 204 is the tail node in the first detection domain, network nodes 202~203 are intermediate nodes in the first detection domain, the delay of the first service flow in network node 201 is D1, the delay of the first service flow in network node 202 is D2, and the delay of the first service flow in network node 203 is D3 , the delay of the first service flow in network node 204 is D4, the delay of the first service flow on the link between network node 201 and network node 202 is D12, the delay of the first service flow on the link between network node 202 and network node 203 is D23, and the delay of the first service flow on the link between network node 203 and network node 204 is D34. Therefore, the controller determines that the end-to-end delay of the first service flow in the first detection domain is D1+D12+D2+D23+D3+D34+D4.
[0199] In an optional embodiment, after the controller determines the delay of the first service flow, the controller also determines the jitter of the first service flow according to the delay of the first service flow. For example, the controller determines the end-to-end jitter of the first service flow according to the end-to-end delay of the first service flow, the controller determines the hop-by-hop jitter of the first service flow according to the hop-by-hop delay of the first service flow, the controller determines the jitter of the first service flow between two network nodes in the first detection domain according to the delay of the first service flow on the link between the two network nodes, and the controller determines the jitter of the first service flow in a network node in the first detection domain according to the delay in the network node.
[0200] After the controller determines the transmission performance of the first business flow, the controller can also locate the fault according to the transmission performance of the first business flow. The controller can also display (for example, display) the transmission performance of the first business flow, display (for example, display) the fault location result, etc., thereby realizing the visualization of the transmission performance, fault location result, etc. of the first business flow. In addition, the controller can also determine the protection strategy of the first business flow according to the transmission performance of the first business flow and execute the protection strategy to ensure the transmission performance of the first business flow. For example, the protection strategy is a path switching strategy, and the controller switches the transmission path of the first business flow according to the path switching strategy. For another example, the protection strategy is a rate protection strategy, and the controller can control the network nodes on the transmission path of the first business flow to limit the speed of other flows carried by the transmission path to ensure the rate of the first business flow. This paragraph exemplarily describes the application of the transmission performance of the first business flow. The controller can also perform various possible network controls, network service planning, etc. according to the transmission performance of the first business flow, and the embodiments of the present application are not limited to this.
[0201] In an optional embodiment, the controller displays the transmission performance of the first service flow. Fig.10 , which shows a visualized schematic diagram of the transmission performance of a first service flow provided in an embodiment of the present application, Fig.10 Take the transmission performance of the first service flow as an example, which is the end-to-end delay. Fig.10 The maximum end-to-end delay, the minimum end-to-end delay and the average end-to-end delay of the first service flow in four detection cycles are shown. Fig.10 As shown, in the i-th detection cycle: the end-to-end maximum delay of the first service flow is approximately 4.5 microseconds, the end-to-end minimum delay of the first service flow is approximately 2 microseconds, and the end-to-end average delay of the first service flow is approximately 2.5 microseconds. In the i+1-th detection cycle: the end-to-end maximum delay of the first service flow is approximately 4 microseconds, the end-to-end minimum delay of the first service flow is approximately 2 microseconds, and the end-to-end average delay of the first service flow is approximately 2 microseconds. In the i+2-th detection cycle: the end-to-end maximum delay of the first service flow is approximately 3.7 microseconds, the end-to-end minimum delay of the first service flow is approximately 1.4 microseconds, and the end-to-end average delay of the first service flow is approximately 2 microseconds. In the i+3-th detection cycle, the end-to-end maximum delay of the first service flow is approximately 4.8 microseconds, the end-to-end minimum delay of the first service flow is approximately 1 microsecond, and the end-to-end average delay of the first service flow is approximately 2.9 microseconds. In an example, the detection cycle is 1 minute, the i-th detection cycle is 8:01, the i+1-th detection cycle is 8:02, the i+2-th cycle is 8:03, and the i+3-th cycle is 8:04.
[0202] In summary, the technical solution provided by the embodiment of the present application implements in-band detection in Ethernet by carrying detection information in the Ethernet frame of the service flow to indicate the transmission performance of the service flow, expands the applicable scenarios of in-band detection technology, and improves the flexibility of in-band detection technology. The embodiment of the present application can be applied to industrial networks and can help network operators discover and locate network faults.
[0203] The above is an introduction to the method embodiment of the present application. The following is an introduction to the device embodiment of the present application, which is used to execute the method of the present application. For details not disclosed in the device embodiment, please refer to the method embodiment.
[0204] Please refer to Fig.11 , which shows a schematic diagram of a network detection device 1100 provided in an embodiment of the present application. The network detection device 1100 is applied to a first network node or a second network node. For example, the network detection device 1100 is a first network node or a functional component in the first network node, or the network detection device 1100 is a second network node or a functional component in the second network node. The first network node and the second network node are both located in the detection domain of the first service flow, for example Figure 2 or Figure 3 As shown, network nodes 201-204 are all located in the detection domain of the first service flow, the first network node may be network node 201, and the second network node may be any network node among network nodes 202-204. The network detection device 1100 may be implemented as follows Figure 4 or Figure 8 The illustrated embodiment provides all or part of the steps of the network detection method.
[0205] like Fig.11 As shown, the network detection device 1100 includes: a receiving module 1110, a processing module 1120 and a sending module 1130. The receiving module 1110 and the sending module 1130 are used to perform the following Figure 4 or Figure 8 In the network detection method provided in the embodiment shown, the processing module 1120 is used to perform the following steps: Figure 4 or Figure 8 The illustrated embodiment provides operations other than the sending and receiving operations in the network detection method.
[0206] In one embodiment, the network detection device 1100 is applied to a first network node.
[0207] The receiving module 1110 is configured to receive a first Ethernet frame, wherein the first Ethernet frame includes service data of a first service flow. The functional implementation of the receiving module 1110 may refer to the description in the above S401.
[0208] The processing module 1120 is used to obtain a second Ethernet frame based on the first Ethernet frame, wherein the second Ethernet frame includes detection information and the service data, wherein the detection information is used to indicate the transmission performance of the first service flow. The function implementation of the processing module 1120 may refer to the description in the above S402.
[0209] The sending module 1130 is configured to send the second Ethernet frame. The implementation of the function of the sending module 1130 may refer to the description in the above S403.
[0210] Optionally, the second Ethernet frame includes an inner VLAN tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
[0211] Optionally, the inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
[0212] Optionally, the second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
[0213] Optionally, the second Ethernet frame further includes a VLAN tag, and the detection tag is located between the VLAN tag and the service data.
[0214] Optionally, the second Ethernet frame includes an HSR label, and the HSR label is used to carry the detection information.
[0215] Optionally, the HSR tag includes a SeqNr field, and the SeqNr field is used to carry the detection information.
[0216] Optionally, the detection information includes a detection task, wherein the detection task includes at least one of a packet loss detection task and a delay detection task.
[0217] Optionally, the detection information further includes reporting mode information, where the reporting mode information is used to indicate a reporting mode of collected data, and the reporting mode is an intermediate node reporting mode or a tail node reporting mode.
[0218] Optionally, the detection information also includes delay mode information, and the delay mode information is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. Among them, the synchronous delay mode is a delay mode based on time synchronization, and the asynchronous delay mode is a delay mode not based on time synchronization. In the synchronous delay mode, the network nodes in the detection domain need to perform time synchronization when detecting the delay of the first service flow. In the asynchronous delay mode, the network nodes in the detection domain do not need to perform time synchronization when detecting the delay of the first service flow.
[0219] Optionally, the first network node obtains the collected data of the first service flow according to the detection information. The collected data includes at least one of delay collection data and packet loss collection data. The delay collection data of the first service flow obtained by the first network node may include the reception timestamp of the Ethernet frame of the first service flow received by the first network node, the transmission and reception timestamp of the Ethernet frame of the first service flow sent by the first network node, the delay of the Ethernet frame of the first service flow in the first network node, etc. The packet loss collection data of the first service flow obtained by the first network node may include the number of Ethernet frames of the first service flow received by the first network node (that is, how many Ethernet frames of the first service flow are received by the first network node), and the number of Ethernet frames of the first service flow sent by the first network node (that is, how many Ethernet frames of the first service flow are sent by the first network node).
[0220] Optionally, the detection information further includes delay mode information, where the delay mode information is used to indicate that the delay mode is an asynchronous delay mode. The processing module 1120 is used to obtain the delay of the second Ethernet frame in the first network node according to the detection information.
[0221] Optionally, the detection information also includes delay mode information, which is used to indicate that the delay mode is a synchronous delay mode. The processing module 1120 is used to: obtain the receiving timestamp of the first network node receiving the first Ethernet frame and / or the sending timestamp of the first network node sending the second Ethernet frame according to the detection information.
[0222] Optionally, the detection information also includes reporting mode information, and the reporting mode information is used to indicate that the reporting mode of the collected data is an intermediate node reporting mode. The sending module 1130 is further used to report the collected data of the first business flow to the controller according to the reporting mode information.
[0223] Optionally, the detection information also includes reporting mode information, and the reporting mode information is used to indicate that the reporting mode of the collected data is the tail node reporting mode. The processing module 1120 is further used to add the collected data of the first service flow in the second Ethernet frame according to the reporting mode information.
[0224] In another embodiment, the network detection device 1100 is applied to the second network node.
[0225] The receiving module 1110 is used to receive a second Ethernet frame, the second Ethernet frame including detection information and service data of the first service flow, the detection information is used to indicate the detection of the transmission performance of the first service flow. The function implementation of the receiving module 1110 can refer to the description in the above S404.
[0226] The processing module 1120 is used to obtain the collected data of the first service flow according to the detection information. The functional implementation of the processing module 1120 can refer to the description in the above S405.
[0227] Optionally, the second Ethernet frame includes an inner VLAN tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
[0228] Optionally, the inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
[0229] Optionally, the second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
[0230] Optionally, the second Ethernet frame further includes a VLAN tag, and the detection tag is located between the VLAN tag and the service data.
[0231] Optionally, the second Ethernet frame includes an HSR label, and the HSR label is used to carry the detection information.
[0232] Optionally, the HSR tag includes a SeqNr field, and the SeqNr field is used to carry the detection information.
[0233] Optionally, the detection information includes a detection task, wherein the detection task includes at least one of a packet loss detection task and a delay detection task.
[0234] Optionally, the detection information further includes reporting mode information, and the reporting mode information is used to indicate a reporting mode, which is an intermediate node reporting mode or a tail node reporting mode.
[0235] Optionally, the detection information also includes delay mode information, and the delay mode information is used to indicate the delay mode, and the delay mode includes a synchronous delay mode or an asynchronous delay mode. Among them, the synchronous delay mode is a delay mode based on time synchronization, and the asynchronous delay mode is a delay mode not based on time synchronization. In the synchronous delay mode, the network nodes in the detection domain need to perform time synchronization when detecting the delay of the first service flow. In the asynchronous delay mode, the network nodes in the detection domain do not need to perform time synchronization when detecting the delay of the first service flow.
[0236] Optionally, the detection information further includes delay mode information, where the delay mode information is used to indicate that the delay mode is an asynchronous delay mode. The processing module 1120 is used to obtain the delay of the second Ethernet frame in the second network node according to the detection information.
[0237] Optionally, the detection information also includes delay mode information, which is used to indicate that the delay mode is a synchronous delay mode. The processing module 1120 is used to obtain a receiving timestamp of the second network node receiving the second Ethernet frame and / or a sending timestamp of the second network node sending the second Ethernet frame based on the detection information.
[0238] Optionally, the detection information also includes reporting mode information, where the reporting mode information is used to indicate that the reporting mode of the collected data is an intermediate node reporting mode, and the sending module 1130 is used to report the collected data of the first service flow to the controller according to the reporting mode information.
[0239] Optionally, the detection information also includes reporting mode information, which is used to indicate that the reporting mode of the collected data is the tail node reporting mode, the second network node is an intermediate node within the detection domain of the first service flow, and the processing module 1120 is also used to add the collected data of the first service flow in the second Ethernet frame.
[0240] Optionally, the detection information also includes reporting mode information, which is used to indicate that the reporting mode of the collected data is the tail node reporting mode, and the second network node is the tail node within the detection domain of the first business flow. The sending module 1130 is used to report the collected data of the first business flow to the controller according to the reporting mode information.
[0241] It should be understood that the network detection device provided in the embodiment of the present application can also be implemented with an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the above-mentioned PLD can be a complex programmable logical device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The network detection method provided in the above-mentioned method embodiment can also be implemented by software. When the network detection method provided in the above-mentioned method embodiment is implemented by software, each module in the above-mentioned network detection device can also be a software module.
[0242] The embodiment of the present application provides a network detection device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the network detection device performs the following steps: Figure 4 or Figure 8 The illustrated embodiment provides all or part of the steps of the network detection method.
[0243] As an example, see Fig.12, which shows a schematic diagram of another network detection device 1200 provided in an embodiment of the present application. The network detection device 1200 is applied to a first network node or a second network node. For example, the network detection device 1200 is a first network node or a functional component in the first network node, or the network detection device 1200 is a second network node or a functional component in the second network node. The first network node and the second network node are both located in the detection domain of the first service flow, for example Figure 2 or Figure 3 As shown, network nodes 201-204 are all located in the detection domain of the first service flow, the first network node may be network node 201, and the second network node may be any network node among network nodes 202-204. The network detection device 1200 is used to perform Figure 4 or Figure 8 The illustrated embodiment provides a network detection method.
[0244] like Fig.12 As shown, the network detection device 1200 includes a main control board 1210, an interface board 1230 and an interface board 1240. In the case of multiple interface boards, a switching network board ( Fig.12 The switch fabric board is used to complete the data exchange between the interface boards. The main control board is also called the main processing unit (MPU) or the route processing card (routeprocessor card), and the interface board is also called the line processing unit (LPU), line card (linecard), service board or line board. The switch fabric board is also called the switch fabric unit (SFU).
[0245] The main control board 1210 is used to complete functions such as system management, node maintenance, and protocol processing. The interface board 1230 and the interface board 1240 are used to provide various service interfaces and realize message forwarding. These service interfaces include, for example, Packet Over SONET / SDH (POS) interface, Gigabit Ethernet (GE) interface, and Asynchronous Transfer Mode (ATM) interface. There are mainly three types of functional units on the main control board 1210: system management control unit, system clock unit, and system maintenance unit. The main control board 1210, the interface board 1230, and the interface board 1240 are connected to the system backplane through the system bus to achieve intercommunication. The interface board 1230 includes one or more processors 1231. The processor 1231 is used to control and manage the interface board 1230 and communicate with the central processor 1212 on the main control board 1210. The memory 1232 on the interface board 1230 is used to store information such as the forwarding table. The interface board 1230 includes one or more network interfaces 1233 for receiving and sending messages, and the specific implementation is not described here. Fig.12 As shown, the main control board 1210 also includes a memory 1214, and the memory 1214 is used to store system management information, protocols, etc.
[0246] like Fig.12 As shown, the present embodiment includes multiple interface boards, and a distributed forwarding mechanism is adopted. Under this mechanism, the operation on the interface board 1240 is substantially similar to the operation on the interface board 1230. For example, the interface board 1240 includes one or more network interfaces 1243 for receiving and sending messages, a memory 1242 for storing a forwarding table, and a processor 1241 for controlling and managing the interface board 1240 and communicating with the central processor 1212 on the main control board 1210. For the sake of brevity, the interface board 1240 is not described in detail here.
[0247] Fig.12 The processor 1231 in the interface board 1230 and / or the processor 1241 in the interface board 1240 may be dedicated hardware or chips, such as a network processor (NP) or a dedicated integrated circuit to implement the above functions. This implementation is what is commonly referred to as a forwarding plane using dedicated hardware or chip processing. In another embodiment, the processor 1231 in the interface board 1230 and / or the processor 1241 in the interface board 1240 may be a general-purpose processor, such as a central processing unit (CPU).
[0248] In addition, it should be pointed out that there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the network node, the more interface boards are provided. In the case of multiple interface boards, the multiple interface boards can communicate with each other through one or more switching network boards, and when there are multiple boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, the network node may not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system. In a distributed forwarding architecture, the network node includes multiple interface boards, and data exchange between multiple interface boards can be realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the network nodes of the distributed architecture are greater than those of the network nodes of the centralized architecture. Which architecture to adopt depends on the networking deployment scenario, which is not limited here.
[0249] In an optional implementation, the memory 1214 and / or the memory 1232 and / or the memory 1242 is a read-only memory (ROM) or other types of static storage nodes that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage nodes that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1232 can exist independently and be connected to the processor 1231 through a communication bus, or it can be integrated with the processor 1231. The memory 1242 may exist independently and be connected to the processor 1241 via a communication bus, or may be integrated with the processor 1241. The memory 1214 may exist independently and be connected to the processor 1212 via a communication bus, or may be integrated with the processor 1212.
[0250] The memory 1232 is used to store program codes, and the processor 1231 controls the execution to execute part or all of the steps of the method provided in the above embodiment. The memory 1242 is used to store program codes, and the processor 1241 controls the execution to execute part or all of the steps of the method provided in the above embodiment. Optionally, the memory 1214 can also be used to store program codes, and the central processing unit 1212 controls the execution to execute part or all of the steps of the method provided in the above embodiment. The program code may include one or more software modules. The one or more software modules may be the above Fig.11 Functional modules provided in the illustrated embodiment.
[0251] In an optional implementation, the network interface 1233 and the network interface 1243 may be devices using any transceiver type for communicating with other nodes or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0252] As another example, see Fig.13 , which shows a schematic diagram of another network detection device 1300 provided in an embodiment of the present application. The network detection device 1300 is applied to a first network node or a second network node. For example, the network detection device 1300 is a first network node or a functional component in the first network node, or the network detection device 1300 is a second network node or a functional component in the second network node. The first network node and the second network node are both located in the detection domain of the first service flow, for example Figure 2 or Figure 3 As shown, network nodes 201-204 are all located in the detection domain of the first service flow, the first network node may be network node 201, and the second network node may be any network node among network nodes 202-204. The network detection device 1300 is used to perform the following Figure 4 or Figure 8 The network detection method provided by the embodiment shown. Fig.13 As shown, the network detection device 1300 includes a processor 1302, a memory 1304, a communication interface 1306 and a bus 1308. The processor 1302, the memory 1304 and the communication interface 1306 are communicatively connected via the bus 1308. In other embodiments, the processor 1302, the memory 1304 and the communication interface 1306 may also be connected in other ways.
[0253] The memory 1304 is used to store a computer program 13042, which may include instructions and data. The memory 1304 may be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, registers, etc.
[0254] Among them, the processor 1302 can be a general-purpose processor, which can be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 13042) stored in a memory (e.g., memory 1304), and the general-purpose processor may use data stored in the memory in the process of performing the above steps and / or operations. The stored computer program can be executed to implement the relevant functions of the aforementioned processing module 1120. The general-purpose processor can be a CPU. The processor 1302 can also be a special-purpose processor, which is a processor specially designed to perform specific steps and / or operations. The special-purpose processor can be a digital signal processor (DSP), ASIC or FPGA, etc. The processor 1302 can also be a multi-core processor. The processor 1302 includes at least one circuit to perform all or part of the steps of the above-mentioned embodiment method.
[0255] Among them, the communication interface 1306 may include an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to realize the interconnection of devices inside the network detection device 1300, and an interface for realizing the interconnection of the network detection device 1300 with other devices (such as network devices). The physical interface may be a gigabit Ethernet (GE) interface, which can be used to realize the interconnection of the network detection device 1300 with other devices, and the logical interface is an interface inside the network detection device 1300, which can be used to realize the interconnection of devices inside the network detection device 1300. It is easy to understand that the communication interface 1306 can be used for the network detection device 1300 to communicate with other devices, for example, the communication interface 1306 is used for sending and receiving messages between the network detection device 1300 and other devices.
[0256] The bus 1308 may be any type of communication bus, such as a system bus, for interconnecting the processor 1302, the memory 1304, and the communication interface 1306. The bus 1308 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0257] The above devices may be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device independently on different chips or to integrate them on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above devices.
[0258] Fig.13 The network detection device 1300 shown is only an example, and the network detection device 1300 may also include other components. The network detection device 1300 selects a clock source by executing all or part of the steps of the method provided in the above embodiment to perform time synchronization with the clock source.
[0259] Based on the same inventive concept, an embodiment of the present application provides a network detection system, including a first network node and a second network node. At least one of the first network node and the second network node includes: Figures 11 to 13 Any network detection device shown.
[0260] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed (for example, executed by a network node, one or more processors, etc.), it implements all or part of the steps of the network detection method provided in the above method embodiment.
[0261] Based on the same inventive concept, an embodiment of the present application provides a computer program product, which includes a program or code, and when the program or code is executed (for example, executed by a network node, one or more processors, etc.), it implements all or part of the steps of the network detection method provided in the above method embodiment.
[0262] The embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and when the chip is running, is used to implement all or part of the steps of the network detection method provided in the above method embodiment. Optionally, the chip is a processing chip.
[0263] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, and the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0264] It should be understood that the term "at least one" in this application refers to one or more, and "plurality" refers to two or more. In this application, unless otherwise specified, the symbol " / " generally means or, for example, A / B can represent A or B. The term "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, for the convenience of clear description, this application uses words such as "first", "second", and "third" to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first", "second", and "third" do not limit the quantity and execution order.
[0265] Different types of embodiments such as method embodiments and device embodiments provided in the embodiments of the present application can refer to each other, the order of operations of the method embodiments can be appropriately adjusted, and the operations can be increased or decreased in response to the circumstances. Any technician familiar with the technical field can easily think of changes within the technical scope disclosed in the present application, and all of them should be covered within the scope of protection of the present application, so they will not be repeated here.
[0266] In the corresponding embodiments provided in the present application, it should be understood that the disclosed devices and the like can be implemented by other configuration methods. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical or other forms. The modules described as separate components may or may not be physically separated, and the components described as modules may or may not be physical modules, which may be located in one place or distributed on multiple network nodes. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0267] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A network detection method, characterized in that: The method comprises: The first network node receives a first Ethernet frame, wherein the first Ethernet frame includes service data of a first service flow; The first network node obtains a second Ethernet frame based on the first Ethernet frame, where the second Ethernet frame includes detection information and the service data, and the detection information is used to indicate detection of transmission performance of the first service flow; The first network node sends the second Ethernet frame.
2. The method according to claim 1, characterized in that The second Ethernet frame includes an inner virtual local area network (VLAN) tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
3. The method according to claim 2, characterized in that The inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
4. The method according to claim 1, characterized in that: The second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
5. The method according to claim 4, characterized in that The second Ethernet frame also includes a virtual local area network (VLAN) tag, and the detection tag is located between the VLAN tag and the service data.
6. The method according to claim 1, characterized in that The second Ethernet frame includes a high reliability seamless redundancy HSR label, and the HSR label is used to carry the detection information.
7. The method according to claim 6, characterized in that The HSR tag includes a sequence number SeqNr field, and the SeqNr field is used to carry the detection information.
8. The method according to any one of claims 1 to 7, characterized in that: The detection information includes a detection task.
9. The method according to claim 8, characterized in that The detection information also includes reporting mode information.
10. A network detection method, characterized in that: The method comprises: The second network node receives a second Ethernet frame, where the second Ethernet frame includes detection information and service data of the first service flow, where the detection information is used to indicate detection of transmission performance of the first service flow; The second network node obtains the collected data of the first service flow according to the detection information.
11. The method according to claim 10, characterized in that The second Ethernet frame includes an inner virtual local area network (VLAN) tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
12. The method according to claim 11, characterized in that The inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
13. The method according to claim 10, characterized in that The second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
14. The method according to claim 13, characterized in that The second Ethernet frame also includes a virtual local area network (VLAN) tag, and the detection tag is located between the VLAN tag and the service data.
15. The method according to claim 10, characterized in that The second Ethernet frame includes a high reliability seamless redundancy HSR label, and the HSR label is used to carry the detection information.
16. The method according to claim 15, characterized in that The HSR tag includes a sequence number SeqNr field, and the SeqNr field is used to carry the detection information.
17. The method according to any one of claims 10 to 16, characterized in that The detection information includes a detection task.
18. The method according to claim 17, characterized in that The detection information also includes reporting mode information.
19. A network detection device, characterized in that: Applied to a first network node, the device includes: A receiving module, configured to receive a first Ethernet frame, wherein the first Ethernet frame includes service data of a first service flow; A processing module, configured to obtain a second Ethernet frame based on the first Ethernet frame, wherein the second Ethernet frame includes detection information and the service data, and the detection information is used to indicate the detection of the transmission performance of the first service flow; A sending module is used to send the second Ethernet frame.
20. The device according to claim 19, characterized in that The second Ethernet frame includes an inner virtual local area network (VLAN) tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
21. The device according to claim 20, characterized in that The inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
22. The device according to claim 19, characterized in that The second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
23. The device according to claim 22, characterized in that The second Ethernet frame also includes a virtual local area network (VLAN) tag, and the detection tag is located between the VLAN tag and the service data.
24. The device according to claim 19, characterized in that The second Ethernet frame includes a high reliability seamless redundancy HSR label, and the HSR label is used to carry the detection information.
25. The device according to claim 24, characterized in that The HSR tag includes a sequence number SeqNr field, and the SeqNr field is used to carry the detection information.
26. The method according to any one of claims 19 to 25, characterized in that The detection information includes a detection task.
27. The device according to claim 26, characterized in that The detection information also includes reporting mode information.
28. A network detection device, characterized in that: Applied to a second network node, the device comprises: A receiving module, used for receiving a second Ethernet frame, wherein the second Ethernet frame includes detection information and service data of a first service flow, wherein the detection information is used for indicating the detection of transmission performance of the first service flow; A processing module is used to obtain the collected data of the first business flow according to the detection information.
29. The device according to claim 28, characterized in that The second Ethernet frame includes an inner virtual local area network (VLAN) tag and an outer VLAN tag, and the inner VLAN tag is used to carry the detection information.
30. The device according to claim 29, characterized in that The inner VLAN tag includes a priority field, and the priority field is used to carry the detection information.
31. The device according to claim 28, characterized in that The second Ethernet frame includes a detection tag, and the detection tag is used to carry the detection information.
32. The device according to claim 31, characterized in that The second Ethernet frame also includes a virtual local area network (VLAN) tag, and the detection tag is located between the VLAN tag and the service data.
33. The device according to claim 28, characterized in that The second Ethernet frame includes a high reliability seamless redundancy HSR label, and the HSR label is used to carry the detection information.
34. The device according to claim 33, characterized in that The HSR tag includes a sequence number SeqNr field, and the SeqNr field is used to carry the detection information.
35. The device according to any one of claims 28 to 34, characterized in that The detection information includes a detection task.
36. The device according to claim 35, characterized in that The detection information also includes reporting mode information.
37. A network detection device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so that the network detection device performs the method according to any one of claims 1 to 18.
38. A network detection system, characterized in that: comprising a first network node and a second network node; The first network node comprises a network detection device according to any one of claims 19 to 27 and 37; The second network node comprises the network detection device according to any one of claims 28 to 37.
39. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 18 is implemented.
40. A computer program product, characterized in that The computer program product comprises a program or a code, and when the program or the code is executed, the method according to any one of claims 1 to 18 is implemented.
41. A chip, characterized in that: The chip implements the method according to any one of claims 1 to 18 when running.