A time delay measurement method, device, forwarding node and storage medium

By copying and forwarding latency-colored packets to multiple outgoing interfaces at forwarding nodes, the problem of missing timestamp information for multiple links in load-sharing scenarios is solved, enabling accurate measurement of latency metrics for multiple links.

CN119892695BActive Publication Date: 2026-04-21NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2025-01-14
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In load-sharing scenarios, the lack of timestamp information on multiple links leads to the problem of missing latency measurement results.

Method used

After receiving the delay-colored message, if the service flow corresponds to multiple outgoing interfaces, the forwarding node will copy the delay-colored message and forward one delay-colored message through each outgoing interface, so that there is a delay-colored message forwarding on the link corresponding to each outgoing interface, ensuring that the analyzer can obtain the timestamp information on multiple links.

Benefits of technology

This invention solves the problem of missing timestamp information on multiple links in load-sharing scenarios, which leads to missing latency measurement results, and enables accurate measurement of latency metrics for multiple links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892695B_ABST
    Figure CN119892695B_ABST
Patent Text Reader

Abstract

This application provides a latency measurement method, apparatus, forwarding node, and storage medium, relating to the field of communication technology and applied to forwarding nodes. The latency measurement method includes: receiving a first packet of a service flow through a first ingress interface; if the forwarding node is an ingress node or an intermediate node, forwarding the first packet to obtain a second packet; if the second packet is a latency-colored packet for the current statistical period, and the service flow corresponds to multiple egress interfaces, copying the second packet to obtain a second number of third packets; forwarding the second packet and the first number of third packets through multiple egress interfaces, and sending a first timestamp and a second timestamp corresponding to each egress interface to an analyzer; the analyzer measuring the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each egress interface. This solution can solve the problem of missing latency measurement results due to missing timestamp information on multiple links in load-sharing scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a delay measurement method, apparatus, forwarding node, and storage medium. Background Technology

[0002] Currently, in-situ flow information telemetry (iFIT) is generally used to measure performance metrics such as packet loss and delay (D). Taking delay as an example, the ingress node colors the first iFIT packet in each statistical period to obtain a delay-colored packet, which is then forwarded to the transit node or egress node. At the measurement point (MP) on each forwarding node, the timestamps of receiving and forwarding the delay-colored packet are recorded and reported to the analyzer. Based on the timestamps, the analyzer measures the delay between each measurement point.

[0003] In load-sharing scenarios, multiple links exist between ingress and egress nodes. Within each statistical period, for each iFIT packet, the ingress node randomly selects one link to forward it, and this link selection has a degree of randomness. Within each statistical period, only one latency-colored packet exists; consequently, this latency-colored packet can only be forwarded through one link, resulting in only obtaining the timestamp information from that single link and not from other links. This lack of timestamp information from other links leads to missing latency measurement results on those links. Summary of the Invention

[0004] The purpose of this application is to provide a latency measurement method, apparatus, forwarding node, and storage medium to solve the problem of missing latency measurement results due to the lack of timestamp information on multiple links in load-sharing scenarios. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a latency measurement method applied to a forwarding node, the method comprising:

[0006] Receive the first message of the service flow through the first ingress interface;

[0007] If the forwarding node is an ingress node or an intermediate node, the first message is forwarded to obtain the second message;

[0008] If the second message is a delay-colored message for the current statistical period, and the service flow corresponds to multiple outgoing interfaces, then the second message is copied to obtain a first number of third messages, where the first number is the number of the multiple outgoing interfaces minus 1;

[0009] The second packet and the first number of third packets are forwarded through the multiple outgoing interfaces, and a first timestamp and a second timestamp corresponding to each outgoing interface are sent to the analyzer so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first packet through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second packet or the third packet through each outgoing interface.

[0010] Secondly, embodiments of this application provide a latency measurement device applied to a forwarding node, the device comprising:

[0011] The receiving module is used to receive the first message of the service flow through the first ingress interface;

[0012] The processing module is used to forward the first message to obtain the second message if the forwarding node is an ingress node or an intermediate node.

[0013] The copying module is used to copy the second message if the second message is a delay-colored message of the current statistical period and the service flow corresponds to multiple outgoing interfaces, so as to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1.

[0014] The sending module is configured to forward the second packet and the first number of third packets through the plurality of outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first packet through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second packet or the third packet through each outgoing interface.

[0015] Thirdly, embodiments of this application provide a forwarding node, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement any of the delay measurement methods described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the delay measurement methods described above.

[0017] Fifthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the time delay measurement methods described above.

[0018] Beneficial effects of the embodiments in this application:

[0019] In the technical solution provided in this application embodiment, after the forwarding node receives the service flow's packet, for the processed delay-colored packet, if the service flow corresponds to multiple outgoing interfaces, the delay-colored packet is copied to obtain multiple delay-colored packets. One delay-colored packet is forwarded through each outgoing interface, ensuring that delay-colored packets are forwarded on each link corresponding to each outgoing interface. Furthermore, the forwarding node can obtain timestamp information from multiple links and report it to the analyzer. The analyzer can then measure the delay metrics on multiple links based on the timestamp information, solving the problem of missing delay measurement results due to missing timestamp information on multiple links in load-sharing scenarios.

[0020] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0022] Figure 1 This is a schematic diagram of the iFIT network model;

[0023] Figure 2 A schematic diagram of the iFIT packet loss measurement mechanism;

[0024] Figure 3 This is a schematic diagram of the iFIT delay measurement mechanism;

[0025] Figure 4 A schematic diagram of an iFIT network model in a load-sharing scenario;

[0026] Figure 5 A schematic diagram of the iFIT packet loss and latency measurement mechanism in a load-sharing scenario;

[0027] Figure 6 This is a schematic diagram of a first type of delay measurement method provided in an embodiment of this application;

[0028] Figure 7 A diagram illustrating the iFIT packet format in an MPLS network provided in this application embodiment;

[0029] Figure 8 A diagram illustrating the iFIT message format based on SRH encapsulation in an SRv6 network provided in this application embodiment;

[0030] Figure 9 A diagram illustrating the iFIT message format based on DOH encapsulation in an SRv6 network provided in this application embodiment;

[0031] Figure 10 This is a second flowchart illustrating the time delay measurement method provided in the embodiments of this application;

[0032] Figure 11 A schematic diagram of the iFIT delay measurement mechanism provided in the embodiments of this application;

[0033] Figure 12 This is a schematic diagram of a third type of delay measurement method provided in an embodiment of this application;

[0034] Figure 13 This is a schematic diagram of a first process for delay measurement provided in an embodiment of this application;

[0035] Figure 14 A schematic diagram of an intermediate node in a load-sharing scenario provided in an embodiment of this application;

[0036] Figure 15 This is a schematic diagram of a second process for delay measurement provided in an embodiment of this application;

[0037] Figure 16 A schematic diagram of an iFIT network model in a load-sharing scenario provided in an embodiment of this application;

[0038] Figure 17 A schematic diagram of the time delay measurement device provided in the embodiments of this application;

[0039] Figure 18 This is a schematic diagram of a forwarding node provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0041] The fifth-generation mobile communication technology (5G) network is currently booming. The three main service scenarios of 5G networks include: enhanced mobile broadband (eMBB), massive machine-type communication (mMTC), and ultra-reliable and low-latency communication (uRLLC). These three service scenarios place higher demands on the network operation and maintenance and performance monitoring of the transport network, leading to the development of streaming performance monitoring solutions such as iFIT.

[0042] iFIT is a flow-based Operations Administration and Maintenance (OAM) detection technology that directly measures service packets to obtain performance metrics such as actual packet loss rate and latency in Internet Protocol (IP) networks. It is applied to Multiprotocol Label Switching (MPLS) networks, Segment Routing over MPLS (SR-MPLS) networks based on the MPLS forwarding plane, and Segment Routing over IPv6 (SRv6) networks based on the Internet Protocol Version 6 (IPv6) forwarding plane.

[0043] iFIT offers the following features and advantages: 1) Extended functionality: iFIT boasts high detection accuracy, simple deployment, and excellent scalability. 2) Rapid fault location: iFIT provides real-time detection capabilities, enabling real-time monitoring of packet loss, latency, and jitter in service flows. 3) Visualization: iFIT displays performance data through a visual interface, allowing for rapid fault location.

[0044] iFIT supports two measurement types: end-to-end measurement and point-to-point measurement. These two types are suitable for different business scenarios. When users want to measure the performance metrics of the entire network, they can choose the end-to-end measurement type of iFIT. When users want to accurately locate the performance metrics of each forwarding node in the network, they can choose the point-to-point measurement type of iFIT. When the measurement results indicate that some performance metrics in the end-to-end statistical scenario do not meet business requirements, the network between end-to-end nodes can be divided into multiple smaller measurement segments, and the performance metrics between every two forwarding nodes can be measured to further locate the forwarding nodes affecting network performance.

[0045] The iFIT network model uses a multi-point data collection and centralized computation approach to measure performance metrics, such as... Figure 1 As shown, taking the router (R) as the forwarding node in the iFIT network model as an example, the iFIT network model includes the following elements:

[0046] Service flow: The object of iFIT measurement is the data flow in the network that conforms to specified matching rules. Network administrators can define a service flow by combining parameters such as source IP address or network segment, destination IP address or network segment, protocol type, source port number, and destination port number.

[0047] Ingress Node: The device that allows service flows to enter the measurement network, supporting iFIT, such as... Figure 1 R1 in the process is responsible for filtering service flows, encapsulating iFIT headers into the service flow packets to obtain iFIT packets, collecting service flow statistics and reporting them to the analyzer, such as... Figure 1 The dotted line indicates that the ingress node also forwards the service flow to the intermediate nodes.

[0048] Intermediate nodes: iFIT-enabled devices through which the service flow passes, such as... Figure 1 In R2, the intermediate node automatically identifies the service flow based on the iFIT header contained in the received iFIT message and forwards the service flow to the next-hop device. When using point-to-point measurement type iFIT, the intermediate node can collect statistical data of the service flow according to the measurement type carried in the iFIT header and report it to the analyzer before forwarding the service flow to the next-hop device.

[0049] Outgoing node: A device that allows traffic to leave the measurement network and supports iFIT, such as... Figure 1 In R4, the outgoing node automatically identifies the service flow based on the iFIT header contained in the received iFIT message, and collects statistical data of the service flow according to the measurement type carried in the iFIT header and reports it to the analyzer. Then, it removes the iFIT header and forwards the service flow to the next-hop device.

[0050] Analyzer: Responsible for collecting statistical data sent by inbound nodes, intermediate nodes and outbound nodes, and completing the data aggregation and calculation to obtain performance indicators such as packet loss and latency of the corresponding business flow.

[0051] Measurement Points (MPs): Bound to the Layer 3 physical interface on the forwarding node, responsible for performing measurement actions and generating statistical data. Depending on their responsibilities, MPs are divided into three types: Ingress MPs (i.e., traffic ingress measurement points), Outgress MPs (i.e., traffic egress measurement points), and Intermediate MPs. Figure 1 In the middle, the input MP is MP1 on R1, the output MP is MP6 on R4, and the intermediate MPs are MP2 on R1, MP3 and MP4 on R2, and MP5 on R4.

[0052] Figure 1 The iFIT network model shown also includes devices that do not support or have not enabled iFIT, such as R3, which forward traffic flows but do not collect statistics. Figure 1 In the process, the forwarding service flow links are R1-R2-R3-R4. MP1 to MP6 is an end-to-end measurement, while MP1 to MP2, MP2 to MP3, MP3 to MP4, MP4 to MP5, and MP5 to MP6 are point-to-point measurements.

[0053] To facilitate network administrators' timely understanding of network conditions, iFIT measures performance metrics according to its statistical periods. For packet loss measurement, a periodic alternating coloring technique is used to distinguish packets from two adjacent iFIT statistical periods. The specific measurement mechanism is as follows.

[0054] (1) Enter MP performs packet loss coloring on the service flow packets.

[0055] iFIT uses the Loss (L) field in the iFIT header as a packet loss measurement coloring bit. Setting this bit to 1 indicates packet loss is colored, and setting it to 0 indicates packet loss is not colored. Subsequent packets with the packet loss measurement coloring bit set to 1 are called packet loss colored packets, and packets with the packet loss measurement coloring bit set to 0 are called packet loss uncolored packets. Incoming MP alternately applies packet loss coloring and uncolored processing to service flow packets according to the iFIT statistical period to distinguish iFIT packets from two adjacent iFIT statistical periods.

[0056] like Figure 2 The diagram illustrates the iFIT packet loss measurement mechanism. 1 represents a packet loss message with coloring, and 0 represents a packet loss message without coloring. The sending (Tx) end performs packet loss coloring processing during the coloring packet transmission statistics period (e.g., the i-th iFIT statistics period and the (i+2)-th iFIT statistics period) and sends a packet loss message with coloring to the receiving (Rx) end. Conversely, it performs packet loss non-coloring processing during the non-coloring packet transmission statistics period (e.g., the (i+1)-th iFIT statistics period) and sends a packet loss non-coloring to the receiving end.

[0057] (2) Each MP counts the number of messages received or forwarded according to the iFIT statistical period.

[0058] Each MP (Multi-Processor) counts the number of lost packets (marked and unmarked) received or forwarded. In iFIT, the receiver's packet counting period is longer than the sender's packet counting period to minimize the adverse effects of network latency and out-of-order delivery on the statistical results. Figure 2 In the process, the sending end first sends a packet loss colored message X to the receiving end, and then sends a packet loss uncolored message Y. The packet loss colored message X arrives with a delay. The receiving end receives the packet loss uncolored message Y first, and then receives the packet loss colored message X. At this time, the receiving end will still count the packet loss colored message X in the i-th iFIT statistical period.

[0059] That is, at the sending end, the duration of the packet sending statistics period for colored messages = the duration of the packet sending statistics period for uncolored messages = the duration of the iFIT statistics period, and the duration of the iFIT statistics period can be configured according to the actual situation; at the receiving end, the duration of the packet receiving statistics period for colored messages = the duration of the packet receiving statistics period for uncolored messages = (1+1 / 3)× the duration of the iFIT statistics period.

[0060] According to the packet conservation law, in the i-th iFIT statistical period, the difference in the number of iFIT packets received or forwarded by any two MPs is the number of packet losses in the service flow between these two MPs. Figure 2 The number of packet losses between the sender and receiver in the i-th iFIT statistical period is: PacketLoss[i] = Tx[i] - Rx[i], where Tx[i] represents the number of packet loss packets with coloring counted by the sender in the i-th iFIT statistical period, and Rx[i] represents the number of packet loss packets with coloring counted by the receiver in the i-th iFIT statistical period. Similarly, the number of packet losses between the sender and receiver in the (i+1)-th iFIT statistical period is: PacketLoss[i+1] = Tx[i+1] - Rx[i+1], where Tx[i+1] represents the number of packet loss packets without coloring counted by the sender in the (i+1)-th iFIT statistical period, and Rx[i+1] represents the number of packet loss packets without coloring counted by the receiver in the (i+1)-th iFIT statistical period.

[0061] (3) After the MP decapsulates and strips the iFIT packet header, it forwards the packet to the next-hop device.

[0062] For latency metrics, measurement can be performed simultaneously with packet loss metrics, and coloring and statistics can be performed using the same iFIT statistical period. The specific measurement mechanism is as follows.

[0063] (1) Incoming MP performs delay coloring on the packets of the service flow.

[0064] iFIT uses the D field in the iFIT header as a latency measurement coloring bit. Setting this bit to 1 indicates latency coloring, and setting it to 0 indicates no latency coloring. Subsequent packets with the latency measurement coloring bit set to 1 are called latency-colored packets, and packets with the latency measurement coloring bit set to 0 are called latency-uncolored packets. Incoming MP only performs latency coloring on the first packet of the service flow received within each iFIT statistical period.

[0065] like Figure 3 The diagram shown illustrates the iFIT latency measurement mechanism. 11 represents a packet with packet loss and latency coloring, 10 represents a packet with packet loss and latency coloring, 01 represents a packet with packet loss and latency coloring, and 00 represents a packet with packet loss and latency coloring.

[0066] (2) Each MP records the timestamp of the delayed colored message passing through this MP.

[0067] In the i-th iFIT statistical period, the difference in timestamps between any two MP records represents the transmission delay of the service flow between these two MPs. Figure 3 The transmission delay between the sender and receiver in the i-th iFIT statistical period is: Delay[i] = t'[i] - t[i], where t[i] represents the timestamp recorded by the sender in the i-th iFIT statistical period, and t'[i] represents the timestamp recorded by the receiver in the i-th iFIT statistical period. Similarly, the transmission delay between the sender and receiver in the (i+1)-th iFIT statistical period is: Delay[i+1] = t'[i+1] - t[i+1], where t[i+1] represents the timestamp recorded by the sender in the (i+1)-th iFIT statistical period, and t'[i+1] represents the timestamp recorded by the receiver in the (i+1)-th iFIT statistical period.

[0068] (3) After the MP decapsulates and strips the iFIT packet header, it forwards the packet to the next-hop device.

[0069] In load-sharing scenarios, there are multiple links between ingress and egress nodes, such as Figure 4 The iFIT network model shown ( Figure 4 (Analyzer omitted). The ingress node is R1 and the egress node is R5. There are three links between R1 and R5: R1-R2-R5, R1-R3-R5 and R1-R4-R5. When the service flow is forwarded from R1 to R5, load sharing is formed among these three links.

[0070] Within each statistical period, for each iFIT packet, the ingress node randomly selects a link to forward the iFIT packet. The selection of the link has a certain degree of randomness, such as... Figure 5As shown, iFIT packets can be forwarded to R5 through different links, where t[i+2] represents the timestamp recorded by the sender in the (i+2)th iFIT statistical period. Taking the i-th iFIT statistical period as an example, MP1 sends the 1st, 2nd, and 5th iFIT packets in this period through the links where MP2, MP5, MP8, and MP11 are located; sends the 4th iFIT packet in this period through the links where MP3, MP6, MP9, and MP12 are located; and sends the 3rd and 6th iFIT packets in this period through the links where MP4, MP7, MP10, and MP13 are located. During the forwarding process, the iFIT packets pass through the corresponding MPs. Figure 5 It can indicate whether the iFIT message passes through MP2, MP3, and MP4, or whether the iFIT message passes through MP5, MP6, and MP7, that is, Figure 5 This can indicate the situation where an iFIT message passes through any of MP2 to MP13.

[0071] For packet loss measurement, regardless of whether it's the statistical period for colored or uncolored packets, the number of received packets can be accurately counted within MP2~MP13. Therefore, the number of lost packets in any interval from MP2 to MP5, MP8, or MP11 can be accurately calculated; similarly, the number of lost packets in any interval from MP3 to MP6, MP9, or MP12, and from MP4 to MP7, MP10, or MP13 can also be accurately calculated. Since MP1 and the intervals MP2, MP3, or MP4 all fall within R1, the total packet loss within R1 can also be accurately calculated.

[0072] For latency measurement, since only one latency-colored message is generated per statistical period, this message can only be forwarded through one link. Consequently, only the timestamp information of that link is available, and timestamp information from other links is unavailable. This lack of timestamp information from other links leads to missing latency measurement results for those links.

[0073] like Figure 5In the i-th iFIT statistical period, the delay-colored message is forwarded through link R1-R2-R5, and can only be received by MP2, MP5, MP8, and MP11; the delay-colored messages of the (i+1)-th and (i+2)-th iFIT statistical periods are forwarded through link R1-R3-R5, and can only be received by MP3, MP6, MP9, and MP12, while MP4, MP7, MP10, and MP13 cannot receive any delay-colored messages. Therefore, only MP2, MP5, MP8, and MP11 can record the timestamp t'[i] of the i-th iFIT statistical period, and only MP3, MP6, MP9, and MP12 can record the timestamp t'[i+1] of the (i+1)-th iFIT statistical period and the timestamp t'[i+2] of the (i+2)-th iFIT statistical period.

[0074] Due to the lack of timestamp information recorded by the receiving end, only the timestamp information of the i-th iFIT statistical period can be counted for any interval from MP1 to MP2, MP5, MP8 or MP11. Only the timestamp information of the (i+1)-th and (i+2)-th iFIT statistical periods can be counted for any interval from MP1 to MP4, MP7, MP10 or MP13. In contrast, the timestamp information of these three iFIT statistical periods cannot be counted for any interval from MP1 to MP4, MP7, MP10 or MP13, which leads to the lack of latency measurement results on the link.

[0075] To address the aforementioned issues, this application provides a latency measurement method applied to a forwarding node. The forwarding node can be a network device such as a router or switch that supports iFIT, and can be categorized into ingress nodes, intermediate nodes, and egress nodes. Ingress nodes can also be understood as head nodes, and egress nodes as tail nodes. For ease of description, the following explanation will use ingress and egress nodes as examples, without limitation. The link where the forwarding node resides may also include devices that do not support or have not enabled iFIT; this is not limited.

[0076] See Figure 6 This is a schematic diagram of the first type of delay measurement method provided in the embodiments of this application, applied to a forwarding node. The delay measurement method includes the following steps.

[0077] Step S61: Receive the first message of the service flow through the first ingress interface.

[0078] Step S62: If the forwarding node is an ingress node or an intermediate node, the first message is forwarded to obtain the second message.

[0079] Step S63: If the second message is a delay-colored message for the current statistical period and the service flow corresponds to multiple outgoing interfaces, then copy the second message to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1.

[0080] Step S64: Forward the second message and a first number of third messages through multiple outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first message through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second message or the third message through each outgoing interface.

[0081] In the technical solution provided in this application embodiment, after the forwarding node receives the latency-colored packet of the service flow, if the service flow corresponds to multiple outgoing interfaces, it copies the forwarded latency-colored packet to obtain multiple latency-colored packets. One latency-colored packet is forwarded through each outgoing interface, ensuring that latency-colored packets are forwarded on each link corresponding to each outgoing interface. Furthermore, the forwarding node can obtain timestamp information from multiple links and report it to the analyzer. The analyzer can then measure the latency metrics on multiple links based on the timestamp information, solving the problem of missing latency measurement results due to the lack of timestamp information on multiple links in load-sharing scenarios.

[0082] In step S61 above, the service flow is any data flow whose performance metrics are measured using iFIT. The first message is any message from the service flow received by the forwarding node in the current statistical period, and the first ingress interface is the ingress interface on the forwarding node corresponding to the service flow that receives the first message.

[0083] In this embodiment of the application, the forwarding node receives service flow packets through the first ingress interface during the current statistical period, and the received iFIT packet is the first packet.

[0084] In this embodiment of the application, when the forwarding node is an ingress node, the first packet does not carry an iFIT header and is the original packet; when the forwarding node is an intermediate node or an egress node, the first packet carries an iFIT header and is the iFIT packet.

[0085] In step S62 above, when the forwarding node is an ingress node or an intermediate node, after receiving the first packet, the forwarding node can perform corresponding forwarding processing on the first packet to obtain the forwarded packet, which is the second packet. For example, in an MPLS network, the forwarding node can modify the MPLS label in the first packet. As another example, in an SRv6 network, the forwarding node can modify the Segment Routing Header (SRH) and the destination IPv6 address in the first packet. The forwarding processing method of the forwarding node is not limited here. The case where the forwarding node is an egress node will be described in detail later and will not be elaborated on here.

[0086] In this embodiment, the second message carries an iFIT header and is an iFIT message. When the forwarding node is an intermediate node, the first message is an iFIT message, and the second message obtained by the forwarding node is also an iFIT message. When the forwarding node is an ingress node, the first message is the original message, and the forwarding node can encapsulate the first message with an iFIT header, perform delay coloring and / or packet loss coloring, etc., to obtain an iFIT message (i.e., the second message). The process of the ingress node forwarding the first message to obtain the second message will be described in detail later, and will not be described in detail here.

[0087] Upon receiving the second message, the forwarding node can determine whether the second message is a delay-colored message based on the value of the D field (i.e., the delay measurement coloring bit) in the iFIT header carried by the second message. When the value of the D field is a first preset value, the second message is a delay-colored message; when the value of the D field is not the first preset value, the second message is not a delay-colored message (i.e., the second message is a delay-uncolored message). The first preset value can be 1 or 0, etc. For ease of description, the following explanation will use a first preset value of 1 as an example, and it does not serve as a limitation.

[0088] If the value of the D field is 1, the forwarding node determines that the second message is a delay-colored message, and the forwarding node records the timestamp of receiving the first message (i.e., the first timestamp). The first timestamp corresponds to the first ingress interface and is the timestamp recorded by the forwarding node at the MP corresponding to the first ingress interface.

[0089] In this embodiment of the application, the second message is the first time-delay colored message processed by the forwarding node in the current statistical period. The forwarding node can also record the timestamp of forwarding the second message (i.e., the second timestamp). For ease of description, this timestamp will be referred to as the second timestamp corresponding to the second message.

[0090] After determining that the second message is a delay-colored message, the forwarding node can further determine whether the number of outgoing interfaces (denoted as N) corresponding to the service flow is greater than 1. When N>1, the service flow corresponds to multiple outgoing interfaces, and the forwarding node executes step S63.

[0091] In step S63 above, the first quantity is the number of outgoing interfaces corresponding to the service flow minus 1, that is, the first quantity is N-1. The third message is a copy of the second message, that is, the third message is a delay-colored message and a copy (for ease of description, it will be referred to as a delay-colored copy message below), and the D field of the third message takes the first preset value.

[0092] The forwarding node copies a first number of second packets, resulting in a first number of copies of the second packets. Each copied packet is a third packet. After copying the second packets, the forwarding node can obtain a number of delay-colored packets for the outgoing interface (including 1 second packet and N-1 third packets).

[0093] In this embodiment of the application, the iFIT header may include a Dup field. The length of the Dup field can be 1 bit, 2 bits, etc. For ease of description, the following description will use a Dup field length of 1 bit as an example, and there is no limitation thereon.

[0094] The Dup field carries a replication identifier, which indicates that the message is a replicated message. The Dup field can be located in a reserved field of the iFIT header, such as... Figures 7-9 The iFIT messages shown are from different networks.

[0095] iFIT messages in MPLS networks, such as Figure 7 As shown, an iFIT message includes: Destination Address (DA) / Source Address (SA) / Virtual Local Area Network (VLAN), Segment Routing (SR) / MPLS header, iFIT header, and Payload. The iFIT header includes: a bootstrap label, a basic section, and extended sections, as indicated on the right side of the iFIT header.

[0096] The instruction label includes: a Flow Instruction Indicator Label (FIILabel) field (value 12), a reserved bit (EXP) field, and a Time To Live (TTL) field.

[0097] The basic header includes: Flow Identity (Flow ID) field, L field, D field, Reserve (R) field, Non-stack bottom / stack bottom (S / R) field, NextHeader field (value 9), Extended (Ext) field, Statistical Pattern (E) field, Mismatch (P) field, Forward Flow Identifier (F) field, Reserved (R) field, Extended Length (Len) field (value 6), Reserved (Rsv) field, and Metadata Indicator Bitmap (Trace Type (bitmap)) field.

[0098] The extended header includes: Bit 0, Bit 1, Bit 2, and Bit 3. Bit 0 is used to measure packet-by-packet latency and includes the Reserved Bit (RSV) / Timestamp (seconds) field and the Reserved Bit (RSV) / Timestamp (nanoseconds) field. Bit 1 is a control field, including the Destination IP (DIP) Mask field, Source IP (SIP) Mask field, Protocol (Proto) / Ports field, Reverse Flow (V) field, Differentiated Services Code Point (DSCP) field, Tunnel (T) field, and Synchronization Reporting Period (Period) (s) field. Bit 2 is used to measure out-of-order detection and includes the Sequence field. Bit 3 is used to implement packet detection through checksum and includes the Checksum field.

[0099] iFIT messages based on SRH encapsulation in SRv6 networks, such as Figure 8 As shown, an iFIT message includes: an Ethernet header (ETH), an IPv6 basic header, a Segment Routing Header (SRH), and a payload. The SRH includes an SRH basic header, a segment list, and an iFIT header with an optional type length value (Optional TLV). The iFIT header includes a boot label, a basic section, and an extension section.

[0100] The header label includes a Type field (value 130), a Length field, and a Reserved Bits (Rsv) field. The basic and extended parts correspond to the basic and extended parts in the iFIT header of the MPLS network described above, and will not be described in detail here.

[0101] iFIT messages encapsulated based on the Destination Options Header (DOH) in an SRv6 network are as follows: Figure 9 As shown, an iFIT message includes: ETH, IPv6 basic header, DOH1, Routing Header (RH) / SRH, Other Headers, and payload; or ETH, IPv6 basic header, RH / SRH, DOH2, Other Headers, and payload. The DOH can be encapsulated in two locations, and one can be chosen at a time.

[0102] The iFIT header includes: Option Type field, Option Data Len field, Flow Monitor Identity (FlowMonID) field, L field, D field, Reserved bit (R) field, Header Type Indication (HTI) field (value 16), Node Monitor Identity (NodeMonID) field, Flow Direction Indicator (F) field, Measurement Period (P) field, Measurement Type (T) field, Reserved bit (Rsv) field, ExtFlow Measurement Type (Ext FM Type) (bitmap) field, and Reserved bit field.

[0103] Based on the encapsulation format of the iFIT header under different networks, the forwarding node can use the 1-bit reserved bit (R) immediately following the D field as the Dup field to carry the replication identifier. The forwarding node can also use bits of the corresponding length (e.g., 1 bit) from other reserved bit fields (such as R, Rsv, etc.) as the Dup field. Here, the position of the Dup field is not limited.

[0104] The replication identifier can be a second preset value, which can be either 0 or 1. For example, when the second preset value is 1, a value of 1 in the Dup field indicates that the message carries a replication identifier and is a replicated message; a value of 0 in the Dup field indicates that the message does not carry a replication identifier and is not a replicated message. For ease of description, the following explanation will use a second preset value of 1 as an example, and this is not intended to be limiting.

[0105] Since forwarding nodes only copy delay-colored packets, the replication flag can also indicate that a packet is a delay-colored replicated packet. That is, when the Dup field is 1, the packet carries the replication flag, and the packet is a delay-colored replicated packet; the D field is 1.

[0106] In this embodiment of the application, the forwarding node can copy a first number of second packets and add a copy identifier to the copied packets. That is, the Dup field in the iFIT header carried by the copied packets is set to a second preset value (such as 1), and a first number of third packets carrying the copy identifier are obtained.

[0107] In this embodiment of the application, the second message obtained by the forwarding node in step S62 may carry a replication identifier, that is, the value of the Dup field in the iFIT header carried by the second message may be 1. In this case, the second message is a delay-colored replication message; the second message may also not carry a replication identifier, that is, the value of the Dup field in the iFIT header carried by the second message may be 0. In this case, the second message is the original message of the delay-colored message (for ease of description, it will be referred to as the delay-colored original message below).

[0108] In this embodiment, the forwarding node can also record the timestamp (i.e., the second timestamp) of each third message forwarded, resulting in a first number (N-1) second timestamps. For ease of description, this timestamp will be referred to as the second timestamp corresponding to the third message. Since the forwarding node also records the second timestamp corresponding to the second message before executing step S63, the forwarding node records a total of N second timestamps. The forwarding node can also use the timestamp information when the copying is completed as the second timestamp corresponding to each third message and record it; this is not limited.

[0109] In step S64 above, the forwarding node forwards a packet through each outgoing interface. This packet can be either a second packet or a third packet. The forwarding node can determine one outgoing interface (referred to as the third outgoing interface) from multiple outgoing interfaces corresponding to the service flow, forward the second packet through the third outgoing interface, and forward a third packet through each of the other outgoing interfaces. The forwarding node can randomly determine one outgoing interface as the third outgoing interface from multiple outgoing interfaces, or it can determine the third outgoing interface according to the link of the original packet colored by the forwarding delay; there is no limitation on this.

[0110] The second timestamp corresponding to each message (the second or third message) corresponds to the outgoing interface that forwarded the message, and is the timestamp recorded by the forwarding node at the MP corresponding to that outgoing interface. For example, the second timestamp corresponding to the second message corresponds to the third outgoing interface, and is the timestamp recorded by the forwarding node at the MP corresponding to the third outgoing interface. By recording the second timestamp, the forwarding node determines the timestamp for forwarding messages at each outgoing interface.

[0111] In this embodiment, after the current statistical period ends, the forwarding node reports the recorded first timestamp and multiple second timestamps to the analyzer. This reports the timestamp corresponding to the first ingress interface and the timestamps corresponding to the multiple egress interfaces of the service flow to the analyzer. The analyzer can then measure the latency between the first ingress interface and the multiple egress interfaces to obtain the internal latency of the forwarding node. For example, for each second timestamp, the analyzer can calculate the difference between the second timestamp and the first timestamp; the difference is the latency between the ingress interface and the egress interface corresponding to that second timestamp.

[0112] In this embodiment, an upstream forwarding node can forward a second or third message to a downstream forwarding node, and a downstream forwarding node can receive the second or third message forwarded by the upstream forwarding node as the first message. Each forwarding node (incoming node or intermediate node) can record and report the second timestamp of forwarding the second or third message and the first timestamp of receiving the first message to the analyzer. The analyzer can measure the latency between forwarding nodes by combining the first and second timestamps recorded by multiple forwarding nodes, based on the first and second timestamps reported by the current forwarding node and the first and second timestamps reported by other forwarding nodes on the link where the current forwarding node is located.

[0113] When the current forwarding node is an ingress node or an intermediate node, the analyzer can measure the latency between the ingress interface (i.e., the first ingress interface) that receives the first packet on the next-hop device that supports iFIT (hereinafter referred to as the next-hop device for ease of description) and the egress interface that forwards the second or third packet on the current forwarding node, based on the first timestamp reported by the next-hop device that supports iFIT (hereinafter referred to as the next-hop device for ease of description) and the egress interface that forwards the second or third packet on the current forwarding node.

[0114] When the current forwarding node is an intermediate node, the analyzer can measure the latency between the first ingress interface on the current forwarding node and the egress interface on the previous hop device that supports iFIT (hereinafter referred to as the previous hop device for ease of description) based on the second timestamp reported by the previous hop device and the first timestamp reported by the current forwarding node.

[0115] In some embodiments, when the forwarding node is an ingress node, the first message received by the forwarding node through the first ingress interface is the original message, and the above step S62 can be: encapsulating the first message with an iFIT message header; performing time delay coloring on the encapsulated first message to obtain the second message.

[0116] In this embodiment, the ingress node encapsulates the first message with an iFIT header, and the encapsulated message becomes the iFIT message. Then, the ingress node performs delay coloring on the iFIT message to obtain the second message.

[0117] For the first raw packet of a service flow received within the current statistical period, the ingress node, after encapsulating the packet with an iFIT header, sets the D field in the iFIT header to 1, resulting in a delay-colored packet. For other raw packets of a service flow received within the current statistical period, the ingress node, after encapsulating the packet with an iFIT header, sets the D field in the iFIT header to any value other than 1 (such as 0), resulting in a delay-uncolored packet. In other words, the second packet received by the ingress node can be either a delay-colored packet or a delay-uncolored packet.

[0118] In this embodiment, after encapsulating the first message with an iFIT header, the ingress node can also perform packet loss coloring to measure packet loss metrics. Applying the technical solution of this embodiment, the ingress node encapsulates the original message with an iFIT header, constructs an iFIT message, and reports the timestamp of receiving the original message as the first timestamp to the analyzer to achieve latency metric measurement.

[0119] In some embodiments, when the forwarding node is an ingress node or an intermediate node, after determining that the second packet is a delay-colored packet, if the forwarding node determines that the service flow corresponds to only one egress interface (i.e., if N=1), then the forwarding node only needs this one delay-colored packet (the second packet) to measure the latency metric of the link. The forwarding node does not need to copy the second packet; it directly forwards the second packet through the egress interface corresponding to the service flow and sends the first timestamp and the second timestamp corresponding to the egress interface to the analyzer. The analyzer measures the latency metric based on the first and second timestamps. For details on how the forwarding node sends the first and second timestamps to the analyzer and how the analyzer measures the latency metric, please refer to the relevant description in step S64 above.

[0120] like Figure 10 The diagram shows a second flowchart of a time delay measurement method, which may include the following steps.

[0121] Step S101: Receive the first message of the service flow through the first ingress interface. This is the same as step S61 above.

[0122] Step S102: If the forwarding node is an ingress node or an intermediate node, the first packet is forwarded to obtain the second packet. This is the same as step S62 above. After executing step S102, the forwarding node continues to execute step S103 or step S105.

[0123] Step S103: If the second message is a delay-colored message for the current statistical period, and the service flow corresponds to multiple outgoing interfaces, then copy the second message to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1. This is the same as step S63 above. After executing step S103, the forwarding node continues to execute step S104.

[0124] Step S104: Forward the second message and a first number of third messages through multiple outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first message through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second message or the third message through each outgoing interface.

[0125] Step S105: If the second message is a delay-colored message of the current statistical period and the service flow corresponds to an outgoing interface, then the second message is forwarded through an outgoing interface, and a first timestamp and a second timestamp corresponding to the outgoing interface are sent to the analyzer.

[0126] In the technical solution provided in this application embodiment, when a service flow corresponds to an outgoing interface, the forwarding node can measure the latency index of the link by forwarding the second message through this outgoing interface, thereby improving the message forwarding speed and saving message processing resources.

[0127] by Figure 4 In the network model shown, R1 is taken as the current forwarding node. R1 includes one ingress interface (corresponding to MP1) and three egress interfaces (corresponding to MP2, MP3 and MP4 respectively). R1 ​​receives the original packets (i.e., the first packets) of the service flow sent by the previous hop device through the ingress interface (i.e. the first ingress interface), encapsulates the iFIT packet header, and performs delay coloring and packet loss coloring.

[0128] like Figure 11 The iFIT delay measurement mechanism is shown. Figure 11In the diagram, 110 represents the original packet with packet loss and delay coloring; 010 represents the original packet with packet loss but no coloring and delay coloring; 000 represents the packet with packet loss but no coloring and delay coloring; 100 represents the packet with packet loss and no delay coloring; 111 represents the copied packet with packet loss and delay coloring; and 011 represents the copied packet with packet loss but no coloring and delay coloring. For ease of description, the example of an iFIT packet forwarded by MP1 passing through MP2, MP3, and MP4 will be used.

[0129] In the i-th statistical period, R1 records the first timestamp t[i] of the received original message at MP1, and forwards the corresponding time-delay-colored message from the outgoing interface corresponding to MP2 to R2, recording the second timestamp t'[i] of the forwarded time-delay-colored message at MP2. Since R1 also includes outgoing interfaces corresponding to MP3 and MP4, R1 copies two time-delay-colored messages, and forwards one time-delay-colored copied message from the outgoing interface corresponding to MP3 to R3, recording the second timestamp t''[i] of the forwarded time-delay-colored copied message at MP3. Similarly, R1 forwards another time-delay-colored copied message from the outgoing interface corresponding to MP4 to R4, recording the second timestamp t'''[i] of the forwarded other time-delay-colored copied message at MP4.

[0130] R1 reports timestamps t[i], t'[i], t''[i], and t'''[i] to the analyzer. The analyzer calculates t'[i]-t[i] to obtain the delay between MP1 and MP2 in the i-th statistical period, calculates t''[i]-t[i] to obtain the delay between MP1 and MP3 in the i-th statistical period, and calculates t'''[i]-t[i] to obtain the delay between MP1 and MP4 in the i-th statistical period.

[0131] Since R1 forwards the delay-colored copy message to R3 and R4 respectively, R3 and R4 can also receive the delay-colored message and record the first timestamp of receiving the delay-colored message and the second timestamp of forwarding the delay-colored message. Therefore, based on the received delay-colored message, the internal delay of the device and the delay between the device and R1 and R5 can be measured respectively.

[0132] Similarly, in the (i+1)th and (i+2)th statistical periods, R1 can record timestamps t[i+1], t'[i+1], t''[i+1], and t'''[i+1], as well as t[i+2], t'[i+2], t''[i+2], and t'''[i+2], and report them to the analyzer, which will then calculate the latency between each MP in the (i+1)th and (i+2)th statistical periods.

[0133] Based on this, two additional delay-colored copy messages are added in each statistical period, so that there are delay-colored messages (i.e., 1 original delay-colored message + 2 delay-colored copy messages) on the three load-sharing links in each statistical period, in order to record the timestamp information on each link and then calculate the delay index.

[0134] In this embodiment of the application, if the value of the D field in the iFIT header carried by the second message is 0, the forwarding node determines that the second message is a delay-uncolored message, does not record the timestamp, and directly forwards the second message through the outgoing interface corresponding to the service flow.

[0135] In some embodiments, when the forwarding node is an outgoing node, the first message received by the forwarding node is an iFIT message carrying an iFIT header. In this case, the forwarding node does not execute step S62, that is, it does not forward the first message and obtains the second message. See also Figure 12 This is a schematic diagram of a third time delay measurement method provided in an embodiment of this application. The time delay measurement method may include the following steps:

[0136] Step S121: Receive the first packet of the service flow through the first ingress interface. This is the same as step S61 above. After executing step S121, the forwarding node continues to execute steps S122, S126, or S127.

[0137] Step S122: If the forwarding node is an ingress node or an intermediate node, the first packet is forwarded to obtain the second packet. This is the same as step S62 above. After executing step S122, the forwarding node continues to execute either step S123 or step S125.

[0138] Step S123: If the second message is a delay-colored message for the current statistical period, and the service flow corresponds to multiple outgoing interfaces, then copy the second message to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1. This is the same as step S63 above. After executing step S123, the forwarding node continues to execute step S124.

[0139] Step S124: Forward the second message and a first number of third messages through multiple outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first message through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second message or the third message through each outgoing interface.

[0140] Step S125: If the second message is a delay-colored message for the current statistical period, and the service flow corresponds to an outgoing interface, then the second message is forwarded through an outgoing interface, and a first timestamp and a second timestamp corresponding to the outgoing interface are sent to the analyzer. This is the same as step S115 above.

[0141] Step S126: If the forwarding node is an outgoing node, the first packet is a latency-colored packet for the current statistical period, and the first packet does not carry a replication identifier, then the iFIT packet header carried by the first packet is stripped to obtain the fifth packet. The replication identifier indicates that the packet is a replicated packet. The fifth packet is forwarded through the second outgoing interface corresponding to the service flow, and the first timestamp and the sixth timestamp are sent to the analyzer so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the sixth timestamp. The sixth timestamp is the timestamp of forwarding the fifth packet through the second outgoing interface.

[0142] Step S127: If the forwarding node is an outgoing node, the first message is a time-delay colored message of the current statistical period, and the first message carries a replication identifier, then discard the first message and send the first timestamp to the analyzer.

[0143] By applying the technical solution provided in the embodiments of this application, when the forwarding node is an outgoing node, for the delay-colored packets of the current statistical period, it is determined whether they are duplicated packets. By discarding redundant packets, the number of packets that the outgoing node needs to process is reduced, thereby reducing the impact on the forwarding of subsequent packets.

[0144] In this embodiment of the application, after receiving the first message, the outgoing node can determine whether the first message is a time-delay stained message. If the outgoing node determines that the first message is a time-delay stained message, it then determines whether the first message carries a replication identifier (that is, whether the value of the Dup field in the iFIT header is a second preset value), which means determining whether the first message is a time-delay stained replication message.

[0145] If the first message does not carry a replication identifier, the outgoing node determines that the value of the Dup field in the iFIT header is not the second preset value, and the first message is not a time-delayed coloring replication message (i.e., the time-delayed coloring original message), and then executes step S126; if the first message carries a replication identifier, the outgoing node determines that the value of the Dup field in the iFIT header is the second preset value, and the first message is a time-delayed coloring replication message, and then executes step S127.

[0146] In step S126 above, the second outgoing interface is the outgoing interface corresponding to the service flow on the outgoing node. The outgoing node removes the iFIT header carried by the first packet to obtain the corresponding original packet, which is the fifth packet. The outgoing node can record the first timestamp of receiving the first packet and the timestamp of forwarding the fifth packet (i.e., the sixth timestamp). This sixth timestamp corresponds to the outgoing interface (i.e., the second outgoing interface) that forwards the fifth packet and is the timestamp recorded by the outgoing node at the MP corresponding to the second outgoing interface. The outgoing node forwards the fifth packet to the next-hop device through the second outgoing interface.

[0147] In this embodiment, after the current statistical period ends, the outgoing node reports its first and sixth timestamps to the analyzer, which then measures the latency of the link where the outgoing node resides. Based on the first and sixth timestamps, the analyzer can measure the latency between the first ingress interface and the second egress interface to obtain the internal latency of the forwarding node.

[0148] In this embodiment, the analyzer can measure the latency between forwarding nodes based on the second timestamp reported by other forwarding nodes on the link where the outgoing node is located. For example, the analyzer can measure the latency between the first ingress interface on the outgoing node and the outgress interface of the corresponding second or third packet forwarded on the previous hop device based on the second timestamp reported by the outgoing node and the first timestamp reported by the outgoing node. The process of the analyzer measuring the latency based on the first and sixth timestamps is similar to the process of measuring the latency based on the first and second timestamps described above, and can be found in the relevant description of step S63 above.

[0149] In step S127 above, the outgoing node determines that the first message is not the original message with delay coloring, discards the first message, records the first timestamp of receiving the first message, and reports the first timestamp to the analyzer, which then measures the delay index based on the first timestamp.

[0150] In this embodiment of the application, the outgoing node may record the first timestamp of receiving the first message after determining that the first message is a time-delayed colored message. Here, the time for recording the first timestamp is not limited.

[0151] In this embodiment of the application, when the outgoing node determines that the first message is not a delay-colored message, the outgoing node strips the iFIT message header carried by the first message to obtain the corresponding original message, and forwards the corresponding original message to the next-hop device through the second outgoing interface.

[0152] In some embodiments, after receiving the first message, the forwarding node can continue to receive other messages of the service flow in the current statistical period through the ingress interface on the forwarding node. When the forwarding node is an intermediate node or an egress node, the other messages received by the forwarding node can be iFIT messages. In this case, the above latency measurement method further includes the following step: receiving the fourth message of the service flow through the first ingress interface or the second ingress interface.

[0153] In this embodiment, the second ingress interface is any ingress interface on the forwarding node other than the first ingress interface. There may be one, multiple, or none of the second ingress interfaces; the number of second ingress interfaces is not limited here. The fourth message is any message from the service flow received by the forwarding node in the current statistical period, carrying an iFIT header; that is, the fourth message is an iFIT message.

[0154] After receiving the first message, the forwarding node can continue to receive service flow messages through any ingress interface on the forwarding node. In this embodiment, the iFIT message received by the forwarding node before receiving the first delay-colored message is the first message, and the iFIT message received by the forwarding node after receiving the first delay-colored message is the fourth message.

[0155] Upon receiving the fourth message, the forwarding node can parse it and determine whether it is a delay-colored message based on the value of the D field in the iFIT header. If the D field value is 1, the forwarding node determines that the fourth message is a delay-colored message, meaning it is one of the other delay-colored messages processed by the forwarding node in the current statistical period (i.e., not the first delay-colored message received). The fourth message can be either the original delay-colored message or a copy of the delay-colored message.

[0156] In this embodiment of the application, the forwarding node can determine whether the current delay-colored message is the first delay-colored message in the following way, that is, determine whether the current delay-colored message is the first message or the fourth message.

[0157] Method 1: The forwarding node can count the number of delay-colored packets received within the current statistical period and determine whether the current delay-colored packet is the first delay-colored packet based on the count. If the count counted by the forwarding node is 0, the forwarding node can determine that the current delay-colored packet is the second packet and increment the count by 1; if the count counted by the forwarding node is greater than 0 (e.g., 1, 2, etc.), the forwarding node can determine that the current delay-colored packet is the fourth packet and increment the count by 1.

[0158] Method 2: The forwarding node can record an identifier value indicating whether a delay-colored message has been received within the current statistical period. If the identifier value is 0, the forwarding node determines that no delay-colored message has been received within the current statistical period, the current delay-colored message is the second message, and sets the identifier value to 1; if the identifier value is 1, the forwarding node determines that a delay-colored message has been received within the current statistical period, the current delay-colored message is the fourth message.

[0159] Method 3: The forwarding node can also record each delay-colored message received within the current statistical period, and record the type of each message and the ingress interface of the received message. For example, when the forwarding node receives a delay-colored copy message through the first ingress interface and then receives another delay-colored copy message through the second ingress interface, the forwarding node can record that the first delay-colored message is a delay-colored copy message and the ingress interface of the received message is the first ingress interface, and record that the second delay-colored message is a delay-colored copy message and the ingress interface of the received message is the second ingress interface. In this case, if the forwarding node receives the current delay-colored message through the first ingress interface, the same second ingress interface, or another second ingress interface, the forwarding node determines that a delay-colored message has been received within the current statistical period, the current delay-colored message is the fourth message, records the current delay-colored message as the third delay-colored message, and records the type of the message and the ingress interface of the received message.

[0160] If no delay-colored message is recorded in the forwarding node, the forwarding node determines that no delay-colored message has been received in the current statistical period. The current delay-colored message is the second message. The forwarding node records the current delay-colored message as the first delay-colored message and records the message type and the ingress interface of the received message.

[0161] Depending on the ingress interface through which the forwarding node receives the fourth message, the timestamp for receiving the fourth message can be recorded by the forwarding node in two ways.

[0162] Scenario 1: The fourth message's ingress interface is the second ingress interface, meaning the forwarding node receives the fourth message through the second ingress interface. In this case, the forwarding node sends a third timestamp to the analyzer so that the analyzer can measure the latency metrics of the link where the forwarding node is located based on the first, second (or sixth) timestamp, and the third timestamp. The third timestamp is the timestamp used to receive the fourth message through the second ingress interface.

[0163] In this embodiment, the forwarding node records the timestamp of receiving the fourth message (i.e., the third timestamp). This third timestamp corresponds to the second ingress interface and is the timestamp recorded by the forwarding node at the MP corresponding to the second ingress interface. After the current statistical period ends, the forwarding node reports the recorded first timestamp, multiple second timestamps (or the sixth timestamp corresponding to the second egress interface), and third timestamp to the analyzer. Furthermore, the analyzer can measure the latency metrics between the first ingress interface, the second ingress interface, and the multiple egress interfaces to obtain the internal latency of the forwarding node.

[0164] Downstream forwarding nodes can also receive the second packet forwarded by the upstream forwarding node as the fourth packet. The analyzer can measure the latency between forwarding nodes based on the timestamps reported by other forwarding nodes on the link where the current forwarding node is located. For example, the analyzer can measure the latency between the second ingress interface of the fourth packet and the egress interface of the corresponding second packet forwarded by the previous hop device based on the third timestamp reported by the current forwarding node and the second timestamp reported by the previous hop device. Similar to the process of measuring latency based on the first and second timestamps (or the sixth timestamp) described above, please refer to the relevant description in step S63 above.

[0165] Scenario 2: The fourth message's ingress interface is the first ingress interface, meaning the forwarding node receives the fourth message through the first ingress interface. In this case, if the fourth message does not carry a replication identifier, the forwarding node updates the first timestamp to the fourth timestamp, which is the timestamp used to receive the fourth message through the first ingress interface.

[0166] In this embodiment, the forwarding node determines whether the fourth packet carries a replication identifier, that is, whether the first packet is a time-delay-colored replication packet. When the forwarding node determines that the fourth packet does not carry a replication identifier, the fourth packet is a time-delay-colored original packet, that is, the first packet is a time-delay-colored replication packet. Then, the forwarding node updates the first timestamp corresponding to the first ingress interface to the timestamp of receiving the fourth packet (i.e., the fourth timestamp), that is, updates the first timestamp to the timestamp corresponding to the time-delay-colored original packet.

[0167] After the current statistical period ends, the forwarding node reports the updated first timestamp and the second timestamp corresponding to each outgoing interface (or the sixth timestamp corresponding to the second outgoing interface) to the analyzer. The analyzer can then measure the latency metrics of the link where the forwarding node resides, as detailed in step S63 above.

[0168] In this embodiment of the application, when a service flow corresponds to an outgoing interface, the forwarding node can also report the updated first timestamp and a second timestamp (or sixth timestamp) corresponding to the outgoing interface to the analyzer after the current statistical period ends.

[0169] In both Case 1 and Case 2, the forwarding node can determine whether the fourth message carries a replication identifier after receiving it.

[0170] When a forwarding node determines that the fourth packet carries a replication identifier, the fourth packet is a time-delayed colored replication packet. The forwarding node can discard the fourth packet without processing or forwarding it, in order to save processing resources for the forwarding node.

[0171] When the forwarding node determines that the fourth packet does not carry a replication identifier, the fourth packet is the original packet with time delay coloring. The forwarding node can forward the fourth packet to obtain the processed fourth packet. When the forwarding node is an intermediate node, it can forward the processed fourth packet through the first outgoing interface corresponding to the service flow. The first outgoing interface is any outgoing interface corresponding to the service flow on the forwarding node. For details on the forwarding process of the fourth packet, please refer to the relevant description of step S62 above. When the forwarding node is an outgoing node, it can remove the iFIT packet header carried by the fourth packet to obtain the fifth packet. It forwards the fifth packet through the second outgoing interface corresponding to the service flow and sends the updated first and sixth timestamps (or first, third, and sixth timestamps) to the analyzer after the current statistical period ends. For details, please refer to the relevant descriptions of step S126, case 1, and case 2 above.

[0172] When the forwarding node is an intermediate node, before forwarding the fourth packet, the forwarding node can also update the second timestamp corresponding to the first outgoing interface to the fifth timestamp. The fifth timestamp is the timestamp of forwarding the fourth packet through the first outgoing interface. That is, the corresponding second timestamp is updated to the timestamp corresponding to the original delayed-colored packet.

[0173] In scenario 1, after the current statistical period ends, the forwarding node can send the first timestamp, the updated second timestamp corresponding to the first outgoing interface, and the second timestamp corresponding to other outgoing interfaces besides the first outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the timestamps reported by the forwarding node.

[0174] In scenario 2, after the current statistical period ends, the forwarding node can send the updated first timestamp, the updated second timestamp corresponding to the first outgoing interface, and the second timestamps corresponding to other outgoing interfaces besides the first outgoing interface to the analyzer. This allows the analyzer to measure the latency metrics of the link where the forwarding node is located based on the timestamps reported by the forwarding node. The specific process of the analyzer measuring latency metrics can be found in the above description.

[0175] In this embodiment of the application, when a service flow corresponds to an outgoing interface, the forwarding node can forward the processed fourth message through an outgoing interface, update the second timestamp corresponding to an outgoing interface to the timestamp of forwarding the fourth message through that outgoing interface, and send the first timestamp and the updated second timestamp corresponding to an outgoing interface to the analyzer.

[0176] In this embodiment of the application, after the forwarding node determines that the fourth message is the delay-colored message of the current statistical period and that the fourth message carries a replication identifier, it may not discard the fourth message, but process the fourth message as the first message and record multiple timestamps. The recorded timestamps are then reported to the analyzer so that the analyzer can measure the delay index based on the multiple timestamps.

[0177] In this embodiment of the application, when the service flow corresponds to multiple outgoing interfaces, the forwarding node can also copy the fourth message and forward the original fourth message and the copied fourth message through multiple outgoing interfaces to record the timestamp of forwarding the fourth message through multiple outgoing interfaces. In this way, the analyzer can measure the latency index between the incoming interface that receives the fourth message and multiple outgoing interfaces.

[0178] In this embodiment of the application, after receiving the fourth message, the forwarding node can continue to receive the fourth message through the first ingress interface, the same second ingress interface, or another second ingress interface, and perform the above-mentioned processing on the fourth message, which will not be repeated here.

[0179] In the technical solution provided in this application embodiment, when a forwarding node has multiple ingress interfaces, since delay-colored packets are forwarded on multiple links, the forwarding node can receive multiple delay-colored packets. Before receiving the fourth packet, the forwarding node has already received the first packet and forwarded the second packet. That is, it has already forwarded a delay-colored packet once through each egress interface corresponding to the service flow, and the delay metric of the link where each egress interface is located can be measured. Based on this, the forwarding node can determine whether other received delay-colored packets are duplicate packets, and only forward delay-colored packets that are not duplicate packets, thereby further saving equipment processing and forwarding resources.

[0180] In some embodiments, the forwarding node can also measure packet loss metrics. The above latency measurement method can also include the following steps: counting a second quantity and a third quantity within the current statistical period, where the second quantity is the number of sixth packets received from the service flow, and the third quantity is the number of sixth packets forwarded, wherein the sixth packets do not carry a replication identifier, and the replication identifier indicates that the packet is a replicated packet; sending the second quantity and the third quantity to the analyzer so that the analyzer measures the packet loss metrics of the link where the forwarding node is located based on the second quantity and the third quantity.

[0181] In this embodiment, the sixth message is any iFIT message in the service flow. Depending on the current statistical period, the sixth message is either a packet loss-marked message or a packet loss-unmarked message. If the current statistical period is a marked message statistical period, then the sixth message is a packet loss-marked message; if the current statistical period is an unmarked message statistical period, then the sixth message is a packet loss-unmarked message. The sixth message does not carry a replication identifier, meaning it is not a replicated message. The forwarding node can count the number of sixth messages received within the current statistical period (e.g., the second count) and the number of sixth messages forwarded within the current statistical period (e.g., the third count). After the current statistical period ends, the second and third counts are reported to the analyzer.

[0182] In this embodiment of the application, other forwarding nodes on the link where the forwarding node is located can also count the second and third quantities, and report the second and third quantities to the analyzer respectively. The analyzer calculates the number of packet losses and the packet loss rate between each forwarding node based on the second and third quantities reported by each forwarding node.

[0183] In the technical solution provided in this application embodiment, the forwarding node only counts the number of iFIT packets that are not copied packets in order to accurately calculate the packet loss index, thereby ensuring the accuracy of the packet loss index while measuring the latency index under multiple links.

[0184] The following is combined Figures 13-16 The delay measurement method provided in the embodiments of this application will be described in detail.

[0185] Figure 13 A first flowchart illustrating the delay measurement provided in this application embodiment, applied to the ingress node, includes the following steps:

[0186] Step S131: The business flow arrives at the inbound node within the statistical period.

[0187] In this embodiment of the application, the ingress node receives packets from the service flow within the statistical period.

[0188] Step S132: Encapsulate and generate the original delayed-coloring message according to the original process.

[0189] In this embodiment of the application, the ingress node encapsulates the iFIT packet header for the received service flow packets and performs delay coloring and packet loss coloring. That is, it performs delay coloring on the first received packet, generates a delay-colored original packet (such as the first packet), and records the timestamp information of the received and forwarded packets (such as the first timestamp and the second timestamp).

[0190] Step S133: Determine whether the number of interfaces N is greater than 1. If yes, proceed to steps S134-S136; otherwise, proceed to step S137.

[0191] Step S134: Copy the original delay-colored message N-1 times, and set the Dup field of the copied message to 1.

[0192] In this embodiment of the application, the ingress node copies the original delayed-colored message to obtain N-1 delayed-colored copied messages, and records the timestamp information when the copying is completed or records the timestamp information (such as the second timestamp) of forwarding each delayed-colored copied message.

[0193] Step S135: Forward the original delay-colored packet according to the original process and record its outgoing interface.

[0194] In this embodiment of the application, the ingress node determines an egress interface (such as the third egress interface) corresponding to the service flow, and forwards the original delay-colored packet from the egress interface.

[0195] Step S136: Forward the delay-colored copy message from the other N-1 outgoing interfaces respectively.

[0196] Step S137: Forward the original delayed-colored message according to the original process.

[0197] For details of steps S131 to S137 above, please refer to the above. Figures 6-12 Related descriptions for some parts.

[0198] After the ingress node encapsulates the iFIT packet header and forwards the delay-colored packet to the intermediate node, the intermediate node processes the delay-colored packet, such as... Figure 14 The diagram illustrates an intermediate node in a load-sharing scenario. Each intermediate node has M ingress interfaces and N egress interfaces. The M ingress interfaces correspond to the M intermediate MPs in the iFIT traffic ingress direction, denoted as MPi (i=1,2,…,M-1,M), i.e., MP1, MP2,…MPM. The intermediate node receives at least one delay-colored packet from each ingress interface. The N egress interfaces correspond to the N intermediate MPs in the iFIT traffic egress direction, denoted as MPj (i=M+1,M+2,…,M+N-1,M+N), i.e., MPM+1, MPM+2,…MPM+N. These N egress interfaces are load-sharing partners.

[0199] In load-sharing scenarios, the intermediate node's processing principle for all latency-colored packets received within the same statistical period is as follows: the first latency-colored packet is always forwarded and copied (when the number of outgoing interfaces is greater than 1), the original latency-colored packet is always forwarded, and other latency-colored packets are discarded. For example... Figure 15 The second flowchart shown is applied to intermediate nodes and includes the following steps:

[0200] Step S151: The first time-delayed coloring message is received within the statistical period.

[0201] In this embodiment of the application, the intermediate node receives the service flow packets within the statistical period, performs the following processing on the first delay-colored packet (such as the first packet) received within the statistical period, and records the timestamp information of the received and forwarded packets (such as the first timestamp and the second timestamp).

[0202] Step S152: Determine whether the number of interfaces N is greater than 1. If yes, proceed to steps S153-S155; otherwise, proceed to step S156.

[0203] Step S153: Copy the first delay-colored message N-1 times and set the Dup field of the copied message to 1.

[0204] In this embodiment of the application, the intermediate node copies the delay-colored message to obtain N-1 delay-colored copied messages, and records the timestamp information when the copying is completed or records the timestamp information (such as the second timestamp) of forwarding each delay-colored copied message.

[0205] Step S154: Forward the first delay-colored message according to the original process and record its outgoing interface.

[0206] In this embodiment of the application, the intermediate node determines an outgoing interface (such as the third outgoing interface) corresponding to the service flow, and forwards the first delay-colored message from the outgoing interface.

[0207] Step S155: Forward the delay-colored copy message from the other N-1 outgoing interfaces respectively, and then execute step S157.

[0208] Step S156: Forward the original delayed-coloring message according to the original process, and then execute step S157.

[0209] Step S157: Determine whether other delay-colored messages were received within the statistical period. If yes, proceed to step S158; otherwise, proceed to step S1511.

[0210] In this embodiment of the application, the intermediate node continues to receive packets of the service flow within the statistical period, performs the following processing on other delayed-colored packets (such as the fourth packet) received, and records the timestamp information of the received packets (such as the third or fourth timestamp).

[0211] Step S158: Determine whether the delay-colored message is the original delay-colored message. If not, proceed to step S159; if yes, proceed to step S1510.

[0212] In this embodiment, the intermediate node determines whether the message carries a replication identifier. If it carries a replication identifier, the message is determined to be a time-delay-colored replicated message, i.e., not the original time-delay-colored message; if it does not carry a replication identifier, the message is determined to be the original time-delay-colored message.

[0213] Step S159: Discard the delay-colored message and return to step S157.

[0214] Step S1510: Forward the original delayed-colored message according to the original process, and return to step S157.

[0215] In this embodiment of the application, the intermediate node determines an outgoing interface (such as the first outgoing interface) corresponding to the service flow, updates the timestamp information corresponding to the outgoing interface to the timestamp information for forwarding the delay-colored message (such as the fifth timestamp), and forwards the delay-colored message from the outgoing interface.

[0216] Step S1511: Determine whether the statistical period has ended. If not, i.e., the statistical period has not ended, proceed to step S157; if yes, i.e., the statistical period has ended, proceed to step S1512.

[0217] In this embodiment, while the current statistical period has not ended, the intermediate node continues to execute the judgment in step S157 and steps S158 to S1511 until the current statistical period ends, at which point the recorded timestamp information is uploaded to the analyzer. At the start of the next statistical period, the intermediate node resumes processing the service flow messages for the new statistical period, starting from step S151.

[0218] Step S1512: Determine that all time-delayed colored messages within the statistical period have been processed.

[0219] For details of steps S151 to S1512 above, please refer to the above. Figures 6-11 Related descriptions for some parts.

[0220] The following is based on Figure 16 The iFIT network model shown is used as an example to illustrate the processing mechanism of delay-colored packets. This iFIT network model includes 10 forwarding nodes, namely R1 to R10. For ease of description, Figure 16 The time-delayed coloring replication message is represented as 1, and the time-delayed coloring original message is represented as 0.

[0221] Based on the number of inbound and outbound interfaces on each forwarding node, there are four scenarios: single inbound single outbound, single inbound N outbound (N>1), M inbound single outbound (M>1), and M inbound N outbound (M>1 and N>1).

[0222] R5 is a single-input, single-output scenario. When a time-delayed colored copy message is received (such as R5), the forwarded message is also a time-delayed colored copy message; when a time-delayed original message is received, the forwarded message is also a time-delayed original message.

[0223] R2, R3, and R4 belong to the single-input N-output scenario. When a delay-colored original message is received (such as R2), the forwarded message is 1 delay-colored original message and N-1 (1) delay-colored duplicate messages; when a delay-colored duplicate message is received (such as R3 and R4), the forwarded message is N (2) delay-colored duplicate messages. That is, the message forwarded on each outgoing interface is 1 delay-colored duplicate message.

[0224] R8 and R9 belong to the M-in, single-out scenario. When the first delayed-coloring copy message is received first, followed by the second delayed-coloring original message (e.g., R8), one delayed-coloring copy message is forwarded first, followed by one delayed-coloring original message. When the first delayed-coloring copy message is received first, followed by the second delayed-coloring copy message (e.g., R9), the forwarded message is one delayed-coloring copy message, while the received second delayed-coloring copy message is discarded. When the first delayed-coloring original message is received first, followed by the second delayed-coloring copy message, the forwarded message is one delayed-coloring original message. In other words, if the received message contains one original time-delayed colored message, the forwarded message will be one time-delayed colored copy message and one original time-delayed colored message (the first received time-delayed colored message is a time-delayed colored copy message), or only one original time-delayed colored message (the first received time-delayed colored message is a time-delayed colored original message); if the received messages are all time-delayed colored copy messages, the forwarded message will be one time-delayed colored copy message.

[0225] R6 and R7 belong to the M-in, N-out scenario. When the first delayed-coloring original message is received first, followed by the second delayed-coloring copy message (e.g., R6), the forwarded message consists of one delayed-coloring original message and N-1 (one) delayed-coloring copy messages, while the received second delayed-coloring copy message is discarded; when the first delayed-coloring copy message is received first, followed by the second delayed-coloring copy message (e.g., R7), the forwarded message consists of two delayed-coloring copy messages, while the received second delayed-coloring copy message is discarded; when the first delayed-coloring copy message is received first, followed by the second delayed-coloring original message, the two delayed-coloring copy messages are forwarded first, followed by the first delayed-coloring original message. In other words, if the received message contains one original time-delay-colored message, the forwarded message will be N-1 time-delay-colored copy messages and one original time-delay-colored message (the first received time-delay-colored message is the original time-delay-colored message), or N-1 time-delay-colored copy messages and one time-delay-colored copy message + original time-delay-colored message (the first received time-delay-colored message is the copy message); if all the received messages are time-delay-colored copy messages, then the message forwarded on each outgoing interface will be one time-delay-colored copy message.

[0226] After processing and forwarding the message, the intermediate node forwards the message to the outgoing node. At the outgoing node, in order to ensure that the total number of original messages obtained after decapsulation remains unchanged, the delay-colored messages need to be filtered in the inbound direction. Delay-colored duplicate messages with the Dup field set to 1 are directly discarded and no longer decapsulated.

[0227] In addition, when measuring packet loss metrics, delay-colored copy packets with the Dup field set to 1 will not be counted in the total number of packets received in the same statistical period, in order to ensure the accuracy of packet loss metrics measurement.

[0228] The technical solution provided in this application supports latency statistics on all load-sharing links in load-sharing scenarios, with reliable timestamp information for each packet reception statistical period on each load-sharing link. Simultaneously, the R field immediately following the D field in the iFIT header is named the Dup field, serving as a latency-colored packet replication identifier. This latency-colored packet replication method solves the problem of missing iFIT timestamp information in load-sharing scenarios. Compared to technical solutions that carry timestamp information in every iFIT packet, this solution saves equipment resources, reduces packet forwarding latency, and meets the low-latency requirements of 5G services.

[0229] Corresponding to the above-described delay measurement method, this application also provides a delay measurement device applied to a forwarding node, such as... Figure 17 As shown, the above-mentioned time delay measurement device includes:

[0230] The receiving module 171 is used to receive the first message of the service flow through the first ingress interface;

[0231] Processing module 172 is used to forward the first message to obtain the second message if the forwarding node is an ingress node or an intermediate node;

[0232] The copy module 173 is used to copy the second message if the second message is a delay-colored message of the current statistical period and the service flow corresponds to multiple outgoing interfaces, so as to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1.

[0233] The sending module 174 is used to forward the second message and a first number of third messages through multiple outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first message through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second message or the third message through each outgoing interface.

[0234] In the technical solution provided in this application embodiment, after the forwarding node receives the service flow's packet, for the processed delay-colored packet, if the service flow corresponds to multiple outgoing interfaces, the delay-colored packet is copied to obtain multiple delay-colored packets. One delay-colored packet is forwarded through each outgoing interface, ensuring that delay-colored packets are forwarded on each link corresponding to each outgoing interface. Furthermore, the forwarding node can obtain timestamp information from multiple links and report it to the analyzer. The analyzer can then measure the delay metrics on multiple links based on the timestamp information, solving the problem of missing delay measurement results due to missing timestamp information on multiple links in load-sharing scenarios.

[0235] In some embodiments, the forwarding node is the ingress node, and the first packet is the original packet; the processing module 172 described above can be specifically used to: encapsulate the first packet with an iFIT header; and perform time delay coloring on the encapsulated first packet to obtain the second packet.

[0236] In some embodiments, the forwarding node is an intermediate node or an outgoing node. The receiving module 171 described above can also be used to: after receiving the first message, receive the fourth message of the service flow through the first ingress interface or the second ingress interface.

[0237] The aforementioned sending module 174 can also be used to: if the fourth message is a delay-colored message of the current statistical period, and the ingress interface of the fourth message is the second ingress interface, then send a third timestamp to the analyzer so that the analyzer can measure the delay index of the link where the forwarding node is located based on the first timestamp, the second timestamp and the third timestamp corresponding to each egress interface, where the third timestamp is the timestamp of receiving the fourth message through the second ingress interface.

[0238] In some embodiments, the sending module 174 described above can also be used to: if the fourth message is a time-delay colored message of the current statistical period, the ingress interface of the fourth message is the first ingress interface, and the fourth message does not carry a copy identifier, then update the first timestamp to the fourth timestamp, the fourth timestamp is the timestamp of receiving the fourth message through the first ingress interface, and the copy identifier indicates that the message is a copied message.

[0239] Specifically, the aforementioned sending module 174 can be used to send the updated first timestamp and the second timestamp corresponding to each outgoing interface to the analyzer.

[0240] In some embodiments, the sending module 174 can also be used to: if the fourth message is a delay-colored message of the current statistical period and the fourth message carries a replication identifier, then discard the fourth message, the replication identifier indicating that the message is a replicated message; if the fourth message is a delay-colored message of the current statistical period and the fourth message does not carry a replication identifier, then forward the fourth message through the first outgoing interface corresponding to the service flow.

[0241] In some embodiments, the sending module 174 described above can also be used for:

[0242] If the fourth message is a delay-colored message for the current statistical period and does not carry a replication identifier, then the second timestamp corresponding to the first outgoing interface will be updated to the fifth timestamp, which is the timestamp of the fourth message forwarded through the first outgoing interface.

[0243] The aforementioned sending module 174 can be specifically used to: send the first timestamp, the updated second timestamp corresponding to the first output interface, and the second timestamps corresponding to other output interfaces besides the first output interface to the analyzer.

[0244] In some embodiments, the above processing module 172 can also be used to: if the forwarding node is an outgoing node, the first message is a delay-colored message of the current statistical period, and the first message does not carry a replication identifier, then the iFIT message header carried by the first message is stripped off to obtain the fifth message, and the replication identifier indicates that the message is a replicated message.

[0245] The aforementioned sending module 174 can also be used to: if the forwarding node is an outgoing node, the first message is a delay-colored message of the current statistical period, and the first message does not carry a replication identifier, then the fifth message is forwarded through the second outgoing interface corresponding to the service flow, and the first timestamp and the sixth timestamp are sent to the analyzer so that the analyzer can measure the delay index of the link where the forwarding node is located based on the first timestamp and the sixth timestamp, where the sixth timestamp is the timestamp of forwarding the fifth message through the second outgoing interface;

[0246] The aforementioned sending module 174 can also be used to: if the forwarding node is an outgoing node, the first message is a time-delayed colored message of the current statistical period, and the first message carries a replication identifier, then discard the first message and send the first timestamp to the analyzer.

[0247] In some embodiments, the sending module 174 described above can also be used to: count the second quantity and the third quantity within the current statistical period, wherein the second quantity is the number of sixth packets received from the service flow, the third quantity is the number of sixth packets forwarded, the sixth packets do not carry a replication identifier, and the replication identifier indicates that the packet is a replicated packet; and send the second quantity and the third quantity to the analyzer so that the analyzer measures the packet loss index of the link where the forwarding node is located based on the second quantity and the third quantity.

[0248] In some embodiments, the first message and / or the second message carries an iFIT header, which includes a Dup field that carries a replication identifier, indicating that the message is a replicated message.

[0249] This application also provides a forwarding node, such as... Figure 18As shown, it includes a processor 181 and a machine-readable storage medium 182. The machine-readable storage medium 182 stores machine-executable instructions that can be executed by the processor 181. The processor 181 is prompted by the machine-executable instructions to implement any of the delay measurement methods applied to the forwarding node described above.

[0250] Machine-readable storage medium 182 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, machine-readable storage medium 182 may also be at least one storage device located remotely from the aforementioned processor.

[0251] The processor 181 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0252] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described time delay measurement methods.

[0253] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the delay measurement methods described above.

[0254] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0255] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0256] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for apparatus, forwarding nodes, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0257] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A time delay measurement method, characterized in that, Applied to forwarding nodes, the method includes: Receive the first message of the service flow through the first ingress interface; If the forwarding node is an ingress node or an intermediate node, the first message is forwarded to obtain the second message; If the second message is a delay-colored message for the current statistical period, and the service flow corresponds to multiple outgoing interfaces, then the second message is copied to obtain a first number of third messages, where the first number is the number of the multiple outgoing interfaces minus 1; The second packet and the first number of third packets are forwarded through the multiple outgoing interfaces, and a first timestamp and a second timestamp corresponding to each outgoing interface are sent to the analyzer so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first packet through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second packet or the third packet through each outgoing interface. If the forwarding node is an intermediate node or an outgoing node, after receiving the first message, the method further includes: The fourth message of the service flow is received through the first or second ingress interface; If the fourth message is a delay-colored message of the current statistical period, and the fourth message carries a replication identifier, then the fourth message is discarded. The replication identifier indicates that the message is a replicated message. If the fourth message is a delay-colored message for the current statistical period and the fourth message does not carry the replication identifier, then the fourth message is forwarded through the first outgoing interface corresponding to the service flow.

2. The method according to claim 1, characterized in that, When the forwarding node is an ingress node and the first packet is an original packet; the step of forwarding the first packet to obtain the second packet includes: Encapsulate the first message with an iFIT header containing in-stream measurement information; The encapsulated first message is time-delayed and colored to obtain the second message.

3. The method according to claim 1, characterized in that, After receiving the fourth message of the service flow through the first or second ingress interface, the method further includes: If the fourth message is a delay-colored message of the current statistical period, and the ingress interface of the fourth message is the second ingress interface, then a third timestamp is sent to the analyzer so that the analyzer can measure the delay index of the link where the forwarding node is located based on the first timestamp, the second timestamp corresponding to each egress interface, and the third timestamp. The third timestamp is the timestamp of receiving the fourth message through the second ingress interface.

4. The method according to claim 3, characterized in that, The method further includes: If the fourth message is a delay-colored message of the current statistical period, the ingress interface of the fourth message is the first ingress interface, and the fourth message does not carry a replication identifier, then the first timestamp is updated to the fourth timestamp, the fourth timestamp is the timestamp of receiving the fourth message through the first ingress interface, and the replication identifier indicates that the message is a replicated message. The step of sending the first timestamp and the second timestamp corresponding to each output interface to the analyzer includes: Send the updated first timestamp and the second timestamp corresponding to each outgoing interface to the analyzer.

5. The method according to claim 1, characterized in that, The method further includes: If the fourth message is a delay-colored message of the current statistical period and the fourth message does not carry the replication identifier, then the second timestamp corresponding to the first outgoing interface is updated to the fifth timestamp, and the fifth timestamp is the timestamp of forwarding the fourth message through the first outgoing interface; The step of sending the first timestamp and the second timestamp corresponding to each output interface to the analyzer includes: Send the first timestamp, the updated second timestamp corresponding to the first outgoing interface, and the second timestamps corresponding to other outgoing interfaces besides the first outgoing interface to the analyzer.

6. The method according to claim 1, characterized in that, The method further includes: If the forwarding node is an outgoing node, the first packet is a latency-colored packet for the current statistical period, and the first packet does not carry a replication identifier, then the iFIT packet header carried by the first packet is stripped to obtain the fifth packet. The replication identifier indicates that the packet is a replicated packet. The fifth packet is forwarded through the second outgoing interface corresponding to the service flow, and a first timestamp and a sixth timestamp are sent to the analyzer so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the sixth timestamp. The sixth timestamp is the timestamp of forwarding the fifth packet through the second outgoing interface. If the forwarding node is an outgoing node, the first message is a time-delay colored message of the current statistical period, and the first message carries the replication identifier, then the first message is discarded and the first timestamp is sent to the analyzer.

7. The method according to claim 1, characterized in that, The method further includes: The second and third quantities within the current statistical period are counted. The second quantity is the number of sixth messages received from the service flow, and the third quantity is the number of sixth messages forwarded. The sixth message does not carry a copy identifier, and the copy identifier indicates that the message is a copied message. The second quantity and the third quantity are sent to the analyzer so that the analyzer measures the packet loss metric of the link where the forwarding node is located based on the second quantity and the third quantity.

8. The method according to any one of claims 1-7, characterized in that, The first message and / or the second message carries an iFIT header, which includes a Dup field carrying a replication identifier that indicates the message is a replicated message.

9. A time delay measurement device, characterized in that, Applied to a forwarding node, the device includes: The receiving module is used to receive the first message of the service flow through the first ingress interface; The processing module is used to forward the first message to obtain the second message if the forwarding node is an ingress node or an intermediate node. The copying module is used to copy the second message if the second message is a delay-colored message of the current statistical period and the service flow corresponds to multiple outgoing interfaces, so as to obtain a first number of third messages, where the first number is the number of multiple outgoing interfaces minus 1. The sending module is configured to forward the second message and the first number of third messages through the plurality of outgoing interfaces, and send a first timestamp and a second timestamp corresponding to each outgoing interface to the analyzer, so that the analyzer can measure the latency index of the link where the forwarding node is located based on the first timestamp and the second timestamp corresponding to each outgoing interface. The first timestamp is the timestamp of receiving the first message through the first incoming interface, and the second timestamp corresponding to each outgoing interface is the timestamp of forwarding the second message or the third message through each outgoing interface. When the forwarding node is an intermediate node or an outgoing node, the receiving module is further configured to: after receiving the first message, receive the fourth message of the service flow through the first ingress interface or the second ingress interface; The sending module is further configured to: if the fourth message is a delay-colored message of the current statistical period and the fourth message carries a replication identifier, then discard the fourth message, wherein the replication identifier indicates that the message is a replicated message; if the fourth message is a delay-colored message of the current statistical period and the fourth message does not carry the replication identifier, then forward the fourth message through the first outgoing interface corresponding to the service flow.

10. The apparatus according to claim 9, characterized in that, The sending module is further configured to: after the receiving module receives the fourth message of the service flow through the first ingress interface or the second ingress interface, if the fourth message is a delay-colored message of the current statistical period and the ingress interface of the fourth message is the second ingress interface, then send a third timestamp to the analyzer so that the analyzer measures the delay index of the link where the forwarding node is located based on the first timestamp, the second timestamp corresponding to each outgress interface and the third timestamp, wherein the third timestamp is the timestamp of receiving the fourth message through the second ingress interface.

11. The apparatus according to claim 9, characterized in that, The processing module is further configured to: if the forwarding node is an outgoing node, the first message is a delay-colored message of the current statistical period, and the first message does not carry a replication identifier, then strip the iFIT message header carried by the first message to obtain a fifth message, wherein the replication identifier indicates that the message is a replicated message; The sending module is further configured to: if the forwarding node is an outgoing node, the first message is a delay-colored message of the current statistical period, and the first message does not carry a replication identifier, then forward the fifth message through the second outgoing interface corresponding to the service flow, and send a first timestamp and a sixth timestamp to the analyzer, so that the analyzer measures the delay index of the link where the forwarding node is located based on the first timestamp and the sixth timestamp, wherein the sixth timestamp is the timestamp of forwarding the fifth message through the second outgoing interface; The sending module is further configured to: if the forwarding node is an outgoing node, the first message is a time-delay colored message of the current statistical period, and the first message carries the replication identifier, then discard the first message and send the first timestamp to the analyzer.

12. The apparatus according to claim 9, characterized in that, The sending module is further configured to: The second and third quantities within the current statistical period are counted. The second quantity is the number of sixth messages received from the service flow, and the third quantity is the number of sixth messages forwarded. The sixth message does not carry a copy identifier, and the copy identifier indicates that the message is a copied message. The second quantity and the third quantity are sent to the analyzer so that the analyzer measures the packet loss metric of the link where the forwarding node is located based on the second quantity and the third quantity.

13. A forwarding node, characterized in that, The method includes a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to perform the method of any one of claims 1-8.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Active stream following detection method, network equipment and communication system

    CN113079091A

  • System and method of discovering and validating different network action hardware capabilities

    US20240195725A1