Flow Detection Method and Electronic Device
By implementing the flow detection method in the network device, using the flow detection information in the G-BIER service message, the problem of lack of a method to measure the network quality of the G-BIER service message in the prior art is solved, and the detection of packet loss rate and delay and effective evaluation of network quality is realized.
Patent Information
- Application Number
- CN202180001399.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-28
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-05-28
AI Technical Summary
The prior art lacks implementable measurement methods to detect the true packet loss rate and delay of G-BIER service packets when transmitted in IPv6 networks, for characterizing network quality.
By implementing the flow detection method in the network device, the flow detection information in the flow detection option carried by the G-BIER service message, including the flow number, message sequence number, reception timestamp and send timestamp, is used to detect and data reporting, so that the analyzer can detect network quality.
It realizes the detection of the true packet loss rate and delay of G-BIER service packets when transmitted in IPv6 network, can effectively characterize network quality and provide reliable network performance evaluation methods.
Smart Images

Figure CN115699685B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technologies, and particularly to a method for in-flow detection of Generalized BIER (G-BIER) service packets applied to Internet Protocol Version 6 (IPv6) multicast and an electronic device. Background Art
[0002] Bit Index Explicit Replication (BIER) is a new type of multicast technology. Compared with traditional multicast technologies, BIER multicast technology encapsulates the set of destination nodes of multicast packets in the form of a bit string in the packet header for transmission, so that intermediate network nodes do not need to establish a multicast tree and save the multicast flow state for each multicast flow, and only need to perform replication and forwarding according to the set of destination nodes in the packet header.
[0003] Combining the technical advantages of IPv6 and BIER, G-BIER based on the IPv6 data plane can deploy IP multicast services on the IPv6 network (at this time, the multicast service packets can be called G-BIER service packets). At present, the service processes of the G-BIER data plane and the G-BIER control plane have been determined, but there is still a lack of an implementable measurement method for data such as the actual packet loss rate and delay of G-BIER service packets when transmitted in the IPv6 network, which are used to characterize the network quality. Summary of the Invention
[0004] Embodiments of this application provide a method for in-flow detection and an electronic device to implement in-flow detection of G-BIER service packets based on G-BIER service packets for data such as the actual packet loss rate and delay of G-BIER service packets when transmitted in the IPv6 network, which are used to characterize the network quality.
[0005] As an embodiment, the embodiments of this application are implemented through the following technical solutions:
[0006] A method for in-flow detection of G-BIER service packets based on IPv6 multicast, which is applied to a network device, and the method includes:
[0007] The network device serves as the ingress node bit forwarding router BFIR of the G-BIER domain,
[0008] When receiving an original multicast service packet to be subjected to in-flow detection, forward the G-BIER service packet in the G-BIER domain;
[0009] Report the detection data associated with the in-flow detection information to a specified analyzer so that the analyzer can detect the network quality based on the reported detection data;
[0010] Wherein, the G-BIER service packet carries an IPv6 extension header and an IPv6 payload field;
[0011] The IPv6 payload field contains the original multicast service packet;
[0012] In the IPv6 extension header, the Destination Option Header (DOH) at least includes: a G-BIER option and an in-flow detection option; the G-BIER option is used to indicate packet forwarding in the G-BIER domain, and the in-flow detection option carries an in-flow detection flag and the in-flow detection information; the in-flow detection flag is used to indicate performing in-flow detection; the in-flow detection information at least includes: a flow ID (Flow ID), a packet sequence number (Sequence Number), a packet reception timestamp, and a packet transmission timestamp; the Flow ID and Sequence Number are custom-set by the BFIR and are prohibited from being changed in the G-BIER domain after being set; the Flow ID is determined based on packet characteristics, and different packets with different packet characteristics have different Flow IDs; the Sequence Number is used to represent the packet forwarding order of packets with the same packet characteristics; the packet reception timestamp is used to indicate the timestamp when the packet is received; the packet transmission timestamp is used to indicate the timestamp when the packet is sent;
[0013] Report the detection data associated with the in-flow detection information to a specified analyzer so that the analyzer can detect the network quality based on the reported detection data.
[0014] As an embodiment, the method further includes:
[0015] As the egress node bit forwarding router (BFER) of the G-BIER domain, the network device records the in-flow detection information carried in the in-flow detection option in the G-BIER service packet when receiving the G-BIER service packet, restores the G-BIER service packet to the original multicast service packet and forwards it to the multicast receiver, and reports the timestamp when the G-BIER service packet is received and the detection data related to the recorded in-flow detection information to the analyzer.
[0016] As an embodiment, the in-flow detection information further includes:
[0017] TF, which is used to indicate the timestamp format;
[0018] Wherein, the packet reception timestamp and the packet transmission timestamp comply with the timestamp format indicated by the TF.
[0019] As an embodiment, the method further includes:
[0020] When the network device is an intermediate BFR device between the BFIR and the egress node forwarding router BFER in the G-BIER domain, if it supports G-BIER flow detection, when receiving a G-BIER service packet, it updates the flow detection information in the flow detection option carried by the G-BIER service packet and forwards the updated G-BIER service packet in the G-BIER domain, and reports the detection data related to the flow detection information in the flow detection option carried by the updated G-BIER service packet to the analyzer.
[0021] As an embodiment, the updating the flow detection information in the flow detection option carried by the G-BIER service packet includes:
[0022] Updating the packet reception timestamp in the flow detection information in the flow detection option carried by the G-BIER service packet to the timestamp when the G-BIER service packet is received; updating the packet transmission timestamp in the flow detection information in the flow detection option carried by the G-BIER service packet to the timestamp when the updated G-BIER service packet is sent; or,
[0023] Adding the timestamp when the G-BIER service packet is received to the packet reception timestamp in the flow detection information in the flow detection option carried by the G-BIER service packet, and adding the timestamp when the updated G-BIER service packet is sent to the packet transmission timestamp in the flow detection information in the flow detection option carried by the G-BIER service packet.
[0024] As an embodiment, the flow detection information further includes: at least one TLV, and each TLV carries at least one path detection parameter; the path detection parameter at least includes: when the flow detection is used to detect network transmission delay, the path detection parameter at least includes: a delay parameter; when the flow detection is used for packet loss statistics, the path detection parameter at least includes: the number of lost packets;
[0025] The updating the flow detection information in the flow detection option carried by the G-BIER service packet includes:
[0026] Update the packet reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp when the G-BIER service packet is received; update the packet transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp when the updated G-BIER service packet is sent, and fill at least one path detection parameter in at least one TLV; or,
[0027] Add the timestamp when the G-BIER service packet is received to the packet reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet, add the timestamp when the updated G-BIER service packet is sent to the packet transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet, and fill at least one path detection parameter in at least one TLV.
[0028] As an embodiment, the in-flow detection flag occupies 8 bits;
[0029] The Bit0 bit of the in-flow detection flag is the delay detection flag, and the Bit1 bit of the in-flow detection flag is the packet loss detection flag; the Bit0 bit is the lowest bit of the in-flow detection flag, and the Bit1 bit is the bit adjacent to the Bit0 bit in the in-flow detection flag.
[0030] As an embodiment, when the in-flow detection is end-to-end detection, the G-BIER option in the DOH is before the in-flow detection option;
[0031] When the in-flow detection is hop-by-hop detection, the G-BIER option in the DOH is after the in-flow detection option.
[0032] As an embodiment, the method further includes:
[0033] As an intermediate device between the BFIR and the egress node forwarding router BFER in the G-BIER domain, if the network device does not support G-BIER in-flow detection, when receiving a G-BIER service packet, directly forward it in the G-BIER domain according to the destination IP address of the G-BIER service packet.
[0034] This embodiment also provides an electronic device, which includes: a processor and a machine-readable storage medium;
[0035] The machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0036] The processor is used to execute the machine-executable instructions to implement the above method steps.
[0037] As can be seen from the above technical solutions of the present application, in the present application, BFIR in the G-BIER domain and the intermediate BFR between BFIR and BFER will transmit the current in-flow detection information for network quality detection along with the G-BIER service message, which realizes the in-flow detection based on the G-BIER service message. At the same time, BFIR in the G-BIER domain, the intermediate BFR between BFIR and BFER, and BFER in the G-BIER domain will also report the current detection data for network quality detection to the analyzer. Finally, the analyzer can detect the network quality according to the detection data reported by BFIR, BFER, and the intermediate BFR between BFIR and BFER in the G-BIER domain, which realizes that the in-flow detection based on the G-BIER service message can detect data such as the true packet loss rate and delay when the G-BIER service message is transmitted in the IPv6 network, which are used to characterize the network quality. Description of the Drawings
[0038] Figure 1 It is the first method flow chart provided by the embodiment of the present application;
[0039] Figure 2 It is the structural diagram of DOH provided by the embodiment of the present application;
[0040] Figure 3 It is the structural diagram of the G-BIER option provided by the embodiment of the present application;
[0041] Figure 4 It is the structural diagram of the in-flow detection option provided by the embodiment of the present application;
[0042] Figure 5 It is the schematic diagram of the in-flow detection mark provided by the embodiment of the present application;
[0043] Figure 6 It is the structural diagram of the in-flow detection option provided by the embodiment of the present application;
[0044] Figure 7 It is the structural diagram of the G-BIER service message provided by the embodiment of the present application;
[0045] Figure 8 It is the second method flow chart provided by the embodiment of the present application;
[0046] Figure 9 It is the third method flow chart provided by the embodiment of the present application;
[0047] Figure 10 It is the schematic diagram of the network architecture of the embodiment provided by the present application;
[0048] Figure 11 It is the structural diagram of the device provided by the present application;
[0049] Figure 12 It is the hardware structure diagram of the device provided for this application. Detailed implementation manners
[0050] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0051] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms "a", "the", and "said" used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0052] To enable those skilled in the art to better understand the technical solutions provided by the embodiments of this application and to make the above objects, features, and advantages of the embodiments of this application more obvious and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0053] See Figure 1 , Figure 1 It is the first method flow chart provided for the embodiments of this application. This method is applied to network devices, and the network devices here can be routers, switches, etc., and this embodiment does not specifically limit.
[0054] As Figure 1 shown, this method may include the following steps:
[0055] Step 101, when the network device acts as a BFIR and receives the original multicast service packet to be subject to in-flow detection, forward the G-BIER service packet in the G-BIER domain.
[0056] Here, a router that supports G-BIER capabilities can be referred to as a Bit-Forwarding Router (BFR), and the domain composed of BFRs is simply called the G-BIER domain. Among them, the BFRs in the G-BIER domain include the Bit-Forwarding Ingress Router (BFIR), the Bit-Forwarding Egress Router (BFER), and intermediate BFR devices between the BFIR and the BFER. The original multicast service packet enters the G-BIER domain from the BFIR. As described in step 101, once the BFIR receives the original multicast service packet, it will identify whether the original multicast service packet needs to perform in-flow detection based on the pre-configured in-flow detection method. When it is identified that the original multicast service packet needs to perform in-flow detection, it is considered that the original multicast service packet is an original multicast service packet to be executed for in-flow detection, and then the G-BIER service packet will be forwarded in the G-BIER domain. Here, the G-BIER service packet carries an IPv6 extension header and an IPv6 payload field. Among them, the IPv6 payload field may contain the above-mentioned original multicast service packet.
[0057] As for the IPv6 extension header, according to the IPv6 protocol, the IPv6 extension header may include at least one Destination Option Header (DOH). Optionally, as an embodiment, this embodiment may add at least a G-BIER option and an in-flow detection option to one of the DOHs in the IPv6 extension header, that is, the DOH in the final IPv6 extension header includes at least: a G-BIER option and an in-flow detection option. Optionally, when the in-flow detection is end-to-end detection, the G-BIER option in the DOH is before the in-flow detection option; when the in-flow detection is hop-by-hop detection, the G-BIER option in the DOH is after the in-flow detection option. Figure 2 The structure of the G-BIER option and the in-flow detection option in the DOH when the in-flow detection is end-to-end detection.
[0058] Optionally, in this embodiment, the G-BIER option is used to indicate packet forwarding in the G-BIER domain. Figure 3 The structure of the G-BIER option is exemplified. The G-BIER option here is consistent with the structure of the existing defined G-BIER option, and this embodiment does not specifically limit it.
[0059] Optionally, in this embodiment, the on-the-fly detection option carries an on-the-fly detection flag (Flag) and on-the-fly detection information. It should be noted that for the on-the-fly detection option, it also complies with the option format. In addition to carrying the above on-the-fly detection flag and on-the-fly detection information, it also includes: option type (Optinon Type), option length (Optinon Length). Among them, the option type is used to indicate the on-the-fly detection type, and the value can be applied to the IETF. The option length can be the number of bytes in the on-the-fly detection option other than the option type and option length. Figure 4 The structure of the on-the-fly detection option is illustrated by way of example.
[0060] As an embodiment, the above on-the-fly detection flag is used to indicate that the BFR in the G-BIER domain performs on-the-fly detection. Optionally, in this embodiment, the on-the-fly detection flag may occupy 8 bits. Among them, Bit0 of the on-the-fly detection flag is the delay detection flag. For example, when Bit0 is set, it means that delay detection is required. Here, Bit0 is the lowest bit of the on-the-fly detection flag. Specifically, as Figure 5 shown. Generally, in the same service characteristic within a service cycle, usually only one bit of Bit0 of the on-the-fly detection flag in a service packet is set to indicate that delay detection is required. Bit1 of the on-the-fly detection flag (the bit adjacent to Bit0 in the on-the-fly detection flag) is the packet loss detection flag. For example, when Bit1 is set, it means that packet loss measurement is required. In this embodiment, the remaining bits of the on-the-fly detection flag can be temporarily reserved for subsequent extended use.
[0061] As an embodiment, in this embodiment, the above on-the-fly detection information at least includes:
[0062] Flow ID: Determined according to packet characteristics such as the packet five-tuple, etc. The Flow IDs of different packets with different packet characteristics are different. Preferably, the Flow ID may occupy 24 bits. It should be emphasized that the Flow ID in the on-the-fly detection information in this embodiment is different from the Flow ID carried when the multicast source sends the original multicast service packet. In this embodiment, the Flow ID in the on-the-fly detection information is custom-set by the network device serving as the BFIR and is prohibited from being changed in the G-BIER domain after being set.
[0063] Message Sequence Number: It is used to indicate the forwarding order of messages with the same message characteristics. For messages with different Sequence Numbers under the same Flow ID, it is convenient to count the packet loss rate, which will be described with examples later and will not be elaborated here for the time being. Optionally, the Sequence Number can occupy 32 bits. It should be emphasized that the Sequence Number in the flow detection information in this embodiment is different from the Sequence Number carried by the multicast source when sending the original multicast service message. In this embodiment, the Sequence Number in the flow detection information is custom-set by the network device acting as the BFIR and is prohibited from being changed in the G-BIER domain after being set.
[0064] Message Receive Timestamp (Timestamp Received): It is used to indicate the timestamp of the received message. Optionally, the message receive timestamp can occupy 64 bits.
[0065] Message Send Timestamp (Timestamp Sent): It is used to indicate the timestamp of the sent message. Optionally, the message send timestamp can occupy 64 bits.
[0066] In this embodiment, preferably, for the convenience of defining the format of the timestamps in the message receive timestamp and the message send timestamp, the flow detection information may further include: Timestamp Format (TF: Time Format): It is used to indicate the timestamp format, such as the format defined by the Network Time Protocol (NTP) or the Precision Time Protocol (PTP). It should be noted that the above message receive timestamp and message send timestamp comply with the timestamp format indicated by the TF. Based on the above description, Figure 6 The specific structure of the flow detection options is illustrated by an example.
[0067] Through the above step 101, when the network device acts as the BFIR in the G-BIER domain and receives the original multicast service message to be subject to flow detection, it will convert the original multicast service message into a G-BIER service message and forward the G-BIER service message in the G-BIER domain. Based on the above description, taking the end-to-end detection of flow detection as an example, Figure 7 The structure of the final G-BIER service message is illustrated by an example.
[0068] Step 102, the network device, as the BFIR, reports the detection data associated with the above flow detection information to the specified analyzer so that the analyzer can detect the network quality based on the reported detection data.
[0069] It should be noted that there is no fixed chronological order between forwarding the G-BIER service message in the G-BIER domain in step 101 above and this step 102. They can be executed simultaneously, or step 102 can be executed after forwarding the G-BIER service message in the G-BIER domain in step 101 above. This embodiment does not specifically limit this.
[0070] In this step 102, as an embodiment, the detection data associated with the above-mentioned in-flow detection information can directly be the above-mentioned in-flow detection information. As another embodiment, the detection data associated with the above-mentioned in-flow detection information can also be determined based on the above-mentioned in-flow detection information. For example, it can be the difference between the message sending timestamp and the message receiving timestamp in the above-mentioned in-flow detection information, etc. This embodiment does not specifically limit the form of the above-mentioned detection data. Ultimately, as long as it is ensured that the analyzer can detect the network quality based on the reported detection data.
[0071] So far, the Figure 1 shown process is completed.
[0072] Through the Figure 1 shown process, when the network device acts as the BFIR in the G-BIER domain and receives the original multicast service message to be subjected to in-flow detection, it will convert the original multicast service message into a G-BIER service message, forward the G-BIER service message carrying the in-flow detection information in the G-BIER domain to implement the in-flow detection of the G-BIER service message, and at the same time report the detection data associated with the in-flow detection information carried in the G-BIER service message to the specified analyzer so that the analyzer can detect the network quality based on the reported detection data. This realizes detecting the true packet loss rate, delay, etc. of the G-BIER service message when it is transmitted in the IPv6 network, which are data used to characterize the network quality, based on the in-flow detection of the G-BIER service message.
[0073] Figure 1 The above is the description of the embodiment from the perspective of the network device acting as the BFIR. The following is the description of the embodiment with the network device as the intermediate BFR between the BFIR and the BFER:
[0074] Refer to Figure 8 , Figure 8 which is the second method flowchart provided by the embodiment of the present application. As Figure 8 shown, this process may include:
[0075] Step 801: As an intermediate BFR device between BFIR and BFER in the G-BIER domain, if the network device supports in-flow detection for G-BIER, when receiving a G-BIER service packet, it updates the in-flow detection information in the in-flow detection option carried in the G-BIER service packet and forwards the updated G-BIER service packet in the G-BIER domain.
[0076] If the in-flow detection information is as described above, then as an embodiment, in this step 801, the above-mentioned update of the in-flow detection information in the in-flow detection option carried in the G-BIER service packet may include: updating the packet reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp when the G-BIER service packet is received; updating the packet transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp when the updated G-BIER service packet is sent.
[0077] To ensure the accuracy of in-flow detection, as another embodiment, in this step 801, the above-mentioned update of the in-flow detection information in the in-flow detection option carried in the G-BIER service packet may also include: adding the timestamp when the G-BIER service packet is received to the packet reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet, and adding the timestamp when the updated G-BIER service packet is sent to the packet transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet.
[0078] Optionally, in this embodiment, the above-mentioned in-flow detection information further includes: at least one TLV (denoted as the TLVs field). Each TLV carries extended other in-flow detection information such as path detection parameters. For example, when in-flow detection is used to detect network transmission delay, at least one TLV can carry path detection parameters such as delay parameters; when in-flow detection is used for packet loss statistics, at least one TLV can carry path detection parameters such as the number of lost packets. Based on this, the above-mentioned update of the in-flow detection information in the in-flow detection option carried in the G-BIER service packet further includes: filling at least one currently detected path detection parameter in the TLVs field.
[0079] Through this step 801, the network device is finally implemented as an intermediate BFR device between the BFIR and BFER in the G-BIER domain. When supporting the G-BIER in-flow detection, if a G-BIER service packet is received, the G-BIER service packet will carry the current real-time network quality information, such as updating the in-flow detection information in the in-flow detection option carried by the G-BIER service packet and continuing to forward it in the G-BIER domain (the forwarding method is similar to the existing BIER packet forwarding and will not be elaborated here), so as to implement the in-flow detection of the G-BIER service packet in the G-BIER domain. It should be noted that when the network device is an intermediate BFR device between the BFIR and BFER in the G-BIER domain and does not support the G-BIER in-flow detection, when a G-BIER service packet is received, it will be directly forwarded in the G-BIER domain according to the destination IP address of the G-BIER service packet.
[0080] Step 802, the network device, as an intermediate BFR device between the BFIR and BFER in the G-BIER domain, reports the detection data related to the in-flow detection information in the in-flow detection option carried by the updated G-BIER service packet to the above analyzer.
[0081] It should be noted that there is no fixed time sequence between forwarding the G-BIER service packet in the G-BIER domain in the above step 801 and this step 802. They can be executed simultaneously, or step 802 can be executed after forwarding the G-BIER service packet in the G-BIER domain in the above step 801, etc. This embodiment does not specifically limit it.
[0082] In this step 802, as an embodiment, the detection data related to the in-flow detection information in the in-flow detection option carried by the updated G-BIER service packet can be directly the in-flow detection information in the in-flow detection option carried by the updated G-BIER service packet, or can be determined according to the above in-flow detection information, such as the difference between the packet sending timestamp and the packet receiving timestamp in the above in-flow detection information, etc. This embodiment does not specifically limit the form of the above detection data. Finally, as long as it is ensured that the analyzer detects the network quality according to the reported detection data.
[0083] So far, the Figure 8 shown process is completed.
[0084] Through Figure 8When the network device functions as an intermediate BFR device between the BFIR and BFER in the G-BIER domain and supports G-BIER in-flow detection, if the G-BIER service packet received carries current real-time network quality information, for example, the packet reception timestamp, packet transmission timestamp, etc. in the in-flow detection information within the in-flow detection option carried in the G-BIER service packet will be updated, and the packet will continue to be forwarded in the G-BIER domain to implement in-flow detection of the G-BIER service packet in the G-BIER domain. At the same time, the detection data associated with the in-flow detection information carried in the G-BIER service packet is reported to the specified analyzer, so that the analyzer can detect the network quality based on the reported detection data. This realizes the detection of the true packet loss rate, latency, etc. of the G-BIER service packet when it is transmitted in the IPv6 network, which are data used to characterize the network quality, based on the in-flow detection of the G-BIER service packet.
[0085] The following describes an embodiment taking the network device as the BFER as an example:
[0086] See Figure 9 , Figure 9 which is the third method flowchart provided by the embodiment of the present application. As Figure 9 shown, this process may include:
[0087] Step 901, the network device, as the BFER in the G-BIER domain, records the in-flow detection information carried in the in-flow detection option in the G-BIER service packet when receiving the G-BIER service packet, and restores the G-BIER service packet to the original multicast service packet and forwards it to the multicast receiver.
[0088] Here, restoring the G-BIER service packet to the original multicast service packet may be to strip off the outer IPv6 header (IPv6 basic header) and IPv6 extension header of the G-BIER service packet, and restore the original multicast service packet in the IPv6 payload field.
[0089] Step 902, the network device, as the BFER in the G-BIER domain, reports the timestamp of the received G-BIER service packet and the detection data related to the recorded in-flow detection information to the above-mentioned analyzer.
[0090] It should be noted that there is no fixed time sequence between forwarding the original multicast service packet to the multicast receiver in the above step 901 and this step 902. They can be executed simultaneously, or step 902 can be executed after forwarding the original multicast service packet to the multicast receiver in the above step 801. The present embodiment does not specifically limit this.
[0091] In this step 902, as an example, the detection data related to the recorded in-flow detection information can be directly the recorded in-flow detection information, or can be determined based on the in-flow detection information, such as the difference between the packet sending timestamp and the packet receiving timestamp in the in-flow detection information. This embodiment does not specifically limit the form of the above detection data. Ultimately, as long as it is ensured that the analyzer detects the network quality based on the reported detection data.
[0092] So far, the Figure 9 shown process is completed.
[0093] Through Figure 9 the shown process, when the network device is a BFER in the G-BIER domain, it will report the timestamp of receiving the G-BIER service packet and the detection data related to the recorded in-flow detection information to the analyzer so that the analyzer can detect the network quality. This realizes that the in-flow detection based on the G-BIER service packet can detect the true packet loss rate, delay, etc. of the G-BIER service packet when it is transmitted in the IPv6 network, which are data used to characterize the network quality.
[0094] Next, a specific embodiment will be described in combination with Figure 1 , Figure 8 , Figure 9 the shown process:
[0095] Refer to Figure 10 , Figure 10 which is the network architecture schematic diagram of the embodiment provided by this application. In this embodiment, the analyzer and all BFRs in the G-BIER domain that support G-BIER in-flow detection maintain time synchronization through the time synchronization protocol.
[0096] As Figure 10 shown, the multicast source sends an original multicast service packet (denoted as packet m1). The structure of the original multicast service packet here is similar to the existing multicast packet and will not be elaborated.
[0097] Device A, as the BFIR in the G-BIER domain, after receiving message m1, parses the message characteristics of message m1 such as the source address and destination address. Based on the parsed message characteristics and according to the pre-configured in-flow detection and identification method, it is identified that message m1 needs to undergo in-flow detection. Then, an IPv6 extension header is added to the outer layer of message m1, and an IPv6 outer header (also known as the IPv6 base header) is further encapsulated outside the IPv6 extension header. Message m1 serves as the IPv6 payload. Among them, the DOH in the IPv6 extension header includes the G-BIER option and the in-flow detection option. The G-BIER option and the in-flow detection option are as described above and will not be elaborated here. If the in-flow detection in this embodiment is end-to-end in-flow detection, then the G-BIER option in the DOH is before the in-flow detection option. The destination address in the IPv6 outer header is the address of the next hop, i.e., device B. Here, taking message m1 as the IPv6 payload, adding an IPv6 extension header to the outer layer of message m1 and further encapsulating an IPv6 outer header (also known as the IPv6 base header) outside the IPv6 extension header, the finally formed message is denoted as message m2.
[0098] Device A sends message m2 to the next hop, i.e., device B, and at the same time reports the in-flow detection information carried by message m2 to the analyzer.
[0099] Device B supports G-BIER in-flow detection. When it receives message m2 and finds that message m2 carries the in-flow detection option, it parses the IPv6 outer header and the IPv6 extension header, counts the number of messages, and updates the message reception timestamp in the in-flow detection information in the in-flow detection option carried by message m2 to the timestamp when message m2 is received; updates the message transmission timestamp in the in-flow detection information in the in-flow detection option carried by message m2 to the timestamp when the message is sent, and fills at least one path detection parameter in the TLVs field according to the detection requirements; or, adds the timestamp when message m2 is received to the message reception timestamp in the in-flow detection information in the in-flow detection option carried by the G-BIER service message, adds the timestamp when the G-BIER service message is sent to the message transmission timestamp in the in-flow detection information in the in-flow detection option carried by the G-BIER service message, and fills at least one path detection parameter in the TLVs field according to the detection requirements. Here, the path parameter can be network parameters such as delay and packet loss. After that, the destination address in the IPv6 outer header can be replaced with the address of the next hop, i.e., device D. For the convenience of description, the message finally processed by device B is denoted as message m3.
[0100] Device B sends message m3 to the next hop, i.e., device D, and at the same time reports the in-flow detection information carried by message m3 to the analyzer.
[0101] Device C does not support G-BIER. As an ordinary IPv6 router, after receiving packet m3, it looks up the route according to the destination address in the IPv6 outer header and forwards packet m3.
[0102] As a BFER, when device D receives packet m3 and finds that packet m3 carries a flow monitoring option, it parses the IPv6 outer header and IPv6 extension headers, counts the number of packets, and records the G-BIER option and the flow monitoring option in the DOH of the IPv6 extension header, and strips the IPv6 outer header and IPv6 extension headers to recover the above-mentioned packet m1.
[0103] Device D sends packet m1 to the multicast receiver, and at the same time reports the timestamp when device D receives packet m3 and the recorded flow monitoring information to the analyzer.
[0104] After the analyzer receives the data reported by device A, device B, and device D, for the traffic flow with the same Flow ID, it calculates the time consumed by the traffic flow passing through each network device, and determines where there is packet loss on which link. If multiple groups of packet loss and multiple groups of delay data are continuously tested, the network delay jitter can be determined.
[0105] Optionally, as an embodiment, the delay can be calculated by the following calculation method:
[0106] The delay calculation for packets with the same Sequence Number of the same Flow ID during transmission in the above G-BIER domain is shown in Table 1:
[0107]
[0108] Table 1
[0109] In Table 1, Timstamp_Sent(A) represents the timestamp when device A sends a packet, Timestamp_Received(A) represents the timestamp when device A receives a packet, and so on for the others, and will not be explained one by one.
[0110] Optionally, as an embodiment, the packet loss statistics can be calculated by the following calculation method:
[0111] For packets with different Sequence Numbers of the same Flow ID, the statistics are as follows: Suppose the packet statistics reported by device A are Statis(A), the packet statistics reported by device B are Statis(B), and the packet statistics reported by device D are Statis(D), then the number of lost packets is shown in Table 2:
[0112]
[0113] Table 2
[0114] The packet loss rate can be calculated according to the following formula:
[0115] Packet loss rate = Number of lost packets / Total number of packets under the same Flow ID and different Sequence Numbers.
[0116] So far, the description of the embodiment is completed. It should be noted that in this embodiment, the method for the BFR in the G-BIER domain to report detection data to the analyzer can be implemented based on existing telemetry technologies such as gRPC, or can be implemented based on Netconf or other network protocols. This embodiment does not specifically limit.
[0117] The method provided in the embodiments of the present application has been described above. Next, the device provided in the embodiments of the present application will be described:
[0118] See Figure 11 , Figure 11 , which is the device structure diagram provided in the embodiments of the present application. This device can be based on the in-flow detection method of G-BIER service packets for IPv6 multicast. This device is applied to network devices and can include:
[0119] A packet forwarding unit, which is used to, when the above network device is used as a BFIR, forward G-BIER service packets in the G-BIER domain when receiving the original multicast service packets to be subjected to in-flow detection; wherein, the G-BIER service packet carries an IPv6 payload field, and the IPv6 payload field contains the original multicast service packet; the G-BIER service packet also carries an IPv6 extension header, and at least the following are included in the DOH in the IPv6 extension header: a G-BIER option and an in-flow detection option; the G-BIER option is used to indicate packet forwarding in the G-BIER domain, and the in-flow detection option carries an in-flow detection flag and in-flow detection information; the in-flow detection flag is used to indicate that the node bit forwarding router BFR in the G-BIER domain performs in-flow detection; the in-flow detection information at least includes: a flow ID (Flow ID), a packet sequence number (Sequence Number), a packet reception timestamp, and a packet transmission timestamp; the Flow ID and the Sequence Number are custom-set by the BFIR and are prohibited from being changed in the G-BIER domain after being set; the Flow ID is determined according to the packet characteristics, and different packets with different packet characteristics have different Flow IDs; the Sequence Number is used to represent the packet forwarding order of packets with the same packet characteristics; the packet reception timestamp is used to indicate the timestamp for receiving the packet; the packet transmission timestamp is used to indicate the timestamp for sending the packet;
[0120] A detection data reporting unit, configured to report detection data associated with the in-flow detection information to a specified analyzer, so that the analyzer detects network quality based on the reported detection data.
[0121] Optionally, as an embodiment, a packet forwarding unit is further configured to, when the above network device serves as a BFER in the G-BIER domain, record the in-flow detection information carried in the in-flow detection option in the G-BIER service packet when receiving the G-BIER service packet, and restore the G-BIER service packet to the original multicast service packet and forward it to the multicast receiver.
[0122] The detection data reporting unit is further configured to report the timestamp of receiving the G-BIER service packet and the detection data related to the recorded in-flow detection information to the above analyzer.
[0123] Optionally, the in-flow detection information further includes:
[0124] TF, used to indicate the timestamp format;
[0125] Wherein, the packet reception timestamp and the packet transmission timestamp comply with the timestamp format indicated by the TF.
[0126] Optionally, a packet forwarding unit is further configured to, when the network device serves as an intermediate BFR device between the BFIR and BFER in the G-BIER domain, if it supports G-BIER in-flow detection, when receiving a G-BIER service packet, update the in-flow detection information in the in-flow detection option carried in the G-BIER service packet and forward the updated G-BIER service packet in the G-BIER domain.
[0127] The detection data reporting unit is further configured to report the detection data related to the in-flow detection information in the in-flow detection option carried in the updated G-BIER service packet to the analyzer.
[0128] Optionally, the packet forwarding unit updating the in-flow detection information in the in-flow detection option carried in the G-BIER service packet includes:
[0129] Updating the packet reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp of receiving the G-BIER service packet; updating the packet transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service packet to the timestamp of sending the updated G-BIER service packet; or,
[0130] Add the timestamp of receiving the G-BIER service message to the message reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message, and add the timestamp of sending the updated G-BIER service message to the message transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message.
[0131] Optionally, the in-flow detection information further includes: at least one TLV, and each TLV carries at least one path detection parameter; the path detection parameter at least includes: when the in-flow detection is used to detect the network transmission delay, the path detection parameter at least includes: a delay parameter; when the in-flow detection is used for packet loss statistics, the path detection parameter at least includes: the number of lost packets.
[0132] Based on this, the message forwarding unit updates the in-flow detection information in the in-flow detection option carried in the G-BIER service message, including:
[0133] Update the message reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message to the timestamp of receiving the G-BIER service message; update the message transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message to the timestamp of sending the updated G-BIER service message, and fill at least one path detection parameter in at least one TLV; or,
[0134] Add the timestamp of receiving the G-BIER service message to the message reception timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message, add the timestamp of sending the updated G-BIER service message to the message transmission timestamp in the in-flow detection information in the in-flow detection option carried in the G-BIER service message, and fill at least one path detection parameter in at least one TLV.
[0135] Optionally, the in-flow detection flag occupies 8 bits; the Bit0 bit of the in-flow detection flag is the delay detection flag, and the Bit1 bit of the in-flow detection flag is the packet loss detection flag; the Bit0 bit is the lowest bit of the in-flow detection flag, and the Bit1 bit is the bit adjacent to the Bit0 bit in the in-flow detection flag.
[0136] Optionally, when the in-flow detection is end-to-end detection, the G-BIER option in the DOH is before the in-flow detection option; when the in-flow detection is hop-by-hop detection, the G-BIER option in the DOH is after the in-flow detection option.
[0137] Optionally, when the network device is an intermediate device between the BFIR and BFER in the G-BIER domain and does not support G-BIER flow detection, the packet forwarding unit directly forwards the received G-BIER service packet in the G-BIER domain according to the destination IP address of the G-BIER service packet.
[0138] Thus, the structure description of the Figure 11 shown device is completed.
[0139] The embodiments of this application also provide Figure 11 the hardware structure of the shown device. Refer to Figure 12 , Figure 12 which is the structural diagram of the electronic device provided by the embodiments of this application. As Figure 12 shown, the hardware structure may include: a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above examples of this application.
[0140] Based on the same inventive concept as the above method, the embodiments of this application also provide a machine-readable storage medium, on which several computer instructions are stored, and when the computer instructions are executed by a processor, the method disclosed in the above examples of this application can be implemented.
[0141] Exemplarily, the above machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of storage disk (such as an optical disk, DVD, etc.), or a similar storage medium, or a combination thereof.
[0142] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any several of these devices.
[0143] For convenience of description, when describing the above devices, they are described as various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0144] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0145] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0146] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0148] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for in-flow detection of G-BIER service packets based on IPv6 multicast, characterized in that, this method is applied to a network device, and this method includes: The network device acts as a forwarding router BFIR at the ingress node of the G-BIER domain, when receiving an original multicast service packet to be subjected to in-flow detection, forwarding the G-BIER service packet in the G-BIER domain; reporting detection data associated with the in-flow detection information to a specified analyzer so that the analyzer detects the network quality based on the reported detection data; wherein, the G-BIER service packet carries an IPv6 extension header and an IPv6 payload field; the IPv6 payload field contains the original multicast service packet; the Destination Option Header DOH in the IPv6 extension header at least includes: a G-BIER option and an in-flow detection option; the G-BIER option is used to indicate packet forwarding in the G-BIER domain, and the in-flow detection option carries an in-flow detection flag and the in-flow detection information; the in-flow detection flag is used to indicate performing in-flow detection; the in-flow detection information at least includes: a flow ID Flow ID, a packet sequence number Sequence Number, a packet reception timestamp, and a packet transmission timestamp; the Flow ID and the Sequence Number are custom-set by the BFIR and are prohibited from being changed in the G-BIER domain after being set; the Flow ID is determined according to the packet characteristics, and different packets with different packet characteristics have different Flow IDs; the Sequence Number is used to represent the packet forwarding order of packets with the same packet characteristics; the packet reception timestamp is used to indicate the timestamp of receiving the packet; the packet transmission timestamp is used to indicate the timestamp of sending the packet.
2. The method according to claim 1, characterized in that, this method further includes: The network device acts as a forwarding router BFER at the egress node of the G-BIER domain, records the in-flow detection information carried in the in-flow detection option in the G-BIER service packet when receiving the G-BIER service packet, restores the G-BIER service packet to the original multicast service packet and forwards it to the multicast receiver, and reports the timestamp of receiving the G-BIER service packet and the detection data related to the recorded in-flow detection information to the analyzer.
3. The method according to claim 1, characterized in that, the in-flow detection information further includes: TF, used to indicate the timestamp format; wherein, the packet reception timestamp and the packet transmission timestamp comply with the timestamp format indicated by the TF.
4. The method according to claim 1, characterized in that, this method further includes: As an intermediate BFR device between the BFIR and the egress node forwarding router BFER in the G-BIER domain, if the network device supports G-BIER per-flow detection, when receiving a G-BIER service message, it updates the per-flow detection information in the per-flow detection option carried in the G-BIER service message and forwards the updated G-BIER service message in the G-BIER domain, and reports the detection data related to the per-flow detection information in the per-flow detection option carried in the updated G-BIER service message to the analyzer.
5. The method according to claim 4, wherein, the updating of the per-flow detection information in the per-flow detection option carried in the G-BIER service message includes: updating the message reception timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message to the timestamp when the G-BIER service message is received; updating the message transmission timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message to the timestamp when the updated G-BIER service message is sent; or, adding the timestamp when the G-BIER service message is received to the message reception timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message, and adding the timestamp when the updated G-BIER service message is sent to the message transmission timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message.
6. The method according to claim 4, wherein, the per-flow detection information further includes: at least one TLV, and each TLV carries at least one path detection parameter; the path detection parameter at least includes: when the per-flow detection is used to detect network transmission delay, the path detection parameter at least includes: a delay parameter; when the per-flow detection is used for packet loss statistics, the path detection parameter at least includes: the number of lost packets; the updating of the per-flow detection information in the per-flow detection option carried in the G-BIER service message includes: updating the message reception timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message to the timestamp when the G-BIER service message is received; updating the message transmission timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message to the timestamp when the updated G-BIER service message is sent, and filling at least one path detection parameter in at least one TLV; or, adding the timestamp when the G-BIER service message is received to the message reception timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message, adding the timestamp when the updated G-BIER service message is sent to the message transmission timestamp in the per-flow detection information in the per-flow detection option carried in the G-BIER service message, and filling at least one path detection parameter in at least one TLV.
7. The method according to claim 1, wherein, the in-flow detection label occupies 8 bits; Bit0 of the in-flow detection label is a delay detection label, and Bit1 of the in-flow detection label is a packet loss detection label; Bit0 is the lowest bit of the in-flow detection label, and Bit1 is the bit adjacent to Bit0 in the in-flow detection label.
8. The method according to claim 1, wherein, when the in-flow detection is end-to-end detection, the G-BIER option in the DOH is before the in-flow detection option; when the in-flow detection is hop-by-hop detection, the G-BIER option in the DOH is after the in-flow detection option.
9. The method according to claim 1, wherein, the method further comprises: as an intermediate device between the BFIR and the egress node-bit forwarding router BFER in the G-BIER domain, if the network device does not support G-BIER in-flow detection, when receiving a G-BIER service packet, forward it in the G-BIER domain according to the destination IP address of the G-BIER service packet.
10. An electronic device, wherein, the electronic device comprises: a processor and a machine-readable storage medium; the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions to implement the method steps of any one of claims 1-9.
Citation Information
Patent Citations
Method, apparatus and system for detecting performance of multicast channel
CN104067559A
Path detection
US20200028770A1