WO2015096636A1 - Method for measuring lost packets and network device - Google Patents

Method for measuring lost packets and network device Download PDF

Info

Publication number
WO2015096636A1
WO2015096636A1 PCT/CN2014/093824 CN2014093824W WO2015096636A1 WO 2015096636 A1 WO2015096636 A1 WO 2015096636A1 CN 2014093824 W CN2014093824 W CN 2014093824W WO 2015096636 A1 WO2015096636 A1 WO 2015096636A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
node
group
packet group
data
Prior art date
Application number
PCT/CN2014/093824
Other languages
French (fr)
Chinese (zh)
Inventor
彭敏
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015096636A1 publication Critical patent/WO2015096636A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and network device for packet loss measurement.
  • Multiprotocol Label Switching uses short, fixed-length labels to encapsulate packet packets.
  • a tag is a short identifier with a fixed length and only local significance. It is used to uniquely identify the Forwarding Equivalence Class (FEC) to which a packet belongs.
  • FEC Forwarding Equivalence Class
  • the transmitting end may send a Loss Measurement Message (LMM) with the request information to the receiving end, where the LMM includes the local sending packet count value of the sending end of the data packet, and the receiving end receives the packet.
  • LMM Loss Measurement Message
  • LMR Lost Measurement Reply
  • the LMR message includes a packet count value when the LMM is received.
  • the sender can perform packet loss measurement according to the packet count value and the packet count value.
  • multiple data packets sent by the sender may be different from the path that is passed, causing the data packet to arrive at the receiving end later than the LMM, causing an out-of-order problem, which may result in a packet loss measurement result. Inaccurate.
  • the embodiment of the invention provides a method for measuring packet loss and a network device, which is beneficial to improving the accuracy of the packet loss measurement result in a load balancing scenario.
  • a first aspect of the present invention provides a method for packet loss measurement, including:
  • the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a quantity of data packets included in the first data packet group;
  • the second node determines that the second data packet does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted;
  • the second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
  • the method further includes:
  • the second node When the second node receives the data packet of the first data packet group, counting and receiving the received data packet belonging to the first data packet group, and correspondingly, according to the statistics, the first data The number of packets of the packet group determines the number of the second packet.
  • each data packet in the first data packet group is encapsulated with a special label, and the special label includes the first data.
  • the method further includes:
  • the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or
  • the second node determines that the sequence number of the second data packet group to which the second data packet belongs is different from the sequence number of the first data packet group, determining that the second data packet does not belong to the first data packet group.
  • the method further includes:
  • the second node starts a specific duration timer
  • the second node counts the received number of the second data packets belonging to the first data packet group.
  • the two nodes determine, according to the number of the first data packet and the number of the second data packet, the number of packet loss of the first data packet group, which specifically includes:
  • the X represents the number of first data packets
  • the Y represents the number of second data packets
  • the Z represents the number of lost packets.
  • a second aspect of the present invention provides a method for packet loss measurement, including:
  • the first node determines a quantity of the first data packet included in the first data packet group
  • the first node After the data packet in the first data packet group is sent, the first node sends a second data packet to the second node, where the second data packet does not belong to the first data packet group.
  • the first node before the sending, by the first node, the first data packet in the first data packet group to the second node, the first node further includes:
  • the first node encapsulates the first data packet by using a special label, where the special label includes a sequence number of the first data packet group and the first data packet number.
  • each data packet in the first data packet group is encapsulated with the special label.
  • a third aspect of the present invention provides a second node, including:
  • a receiving unit configured to receive a first data packet sent by the first node, where the first data packet belongs to a first data packet group, and the first data packet group is sent by the first node to the second node a data packet group, the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a data packet included in the first data packet group Quantity
  • the receiving unit is further configured to receive a second data packet sent by the first node
  • a statistic unit configured to determine, when the second data packet does not belong to the first data packet group, the number of second data packets that are received by the first data packet group;
  • a calculating unit configured to determine, according to the first data packet quantity and the second data packet quantity, a number of packet loss of the first data packet group.
  • the method further includes:
  • a counting unit configured to count statistics of the received data packets belonging to the first data packet group, and correspondingly, determine the number of the second data packet according to the statistics, the number of data packets of the first data packet group .
  • each data packet in the first data packet group is encapsulated with a special label, where the special label includes the first data The serial number of the packet group and the number of the first data packet.
  • the method further includes:
  • a determining unit configured to: when it is determined that the second data packet does not encapsulate the special label, determine that the second data packet does not belong to the first data packet group, or
  • the method further includes:
  • timing unit for starting a specific duration timer a timing unit for starting a specific duration timer
  • the statistic unit is specifically configured to determine, after the timer started by the timing unit expires, the received number of the second data packets belonging to the first data packet group.
  • the calculating The unit is specifically used to:
  • the X represents the number of first data packets
  • the Y represents the number of second data packets
  • the Z represents the number of lost packets.
  • a fourth aspect of the present invention provides a first node, including:
  • a determining unit configured to determine a quantity of the first data packet included in the first data packet group
  • a sending unit configured to send, to the second node, the first data packet in the first data packet group, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where The first number of data packets is used to identify the number of data packets included in the first data packet group, where a data packet group is a data packet group sent by the first node to the second node;
  • the sending unit is further configured to: after the data packet in the first data packet group is sent, send a second data packet to the second node, where the second data packet does not belong to the first data packet group.
  • the method further includes:
  • An encapsulating unit configured to encapsulate the first data packet by using a special label, where the special label includes the first data, before the sending unit sends the first data packet in the first data packet group to the second node The serial number of the packet group and the number of the first data packet.
  • the encapsulating unit is further configured to encapsulate the special label for each data packet in the first data packet group.
  • the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes a sequence of the first data packet group. Number and the first number of data packets, the first number of data packets is used to identify the number of data packets included in the first data packet group, when the second node receives not belonging to the first data packet group And the second data packet, the second data packet that belongs to the first data packet group is counted, and the second node determines the number according to the first data packet quantity and the second data packet quantity.
  • the number of packet loss in a packet group is beneficial to improve the accuracy of packet loss measurement results in a load balancing scenario.
  • FIG. 1 is a flowchart of a method for packet loss measurement according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for packet loss measurement according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of interaction between a first node and a second node according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a format of an MPLS special label according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of state switching of a second node according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a second node according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a second node according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a second node according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a second node according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a first node according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a first node according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a second node according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a first node according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart diagram of a method for packet loss measurement according to an embodiment of the present invention. As shown in FIG. 1 , the method for packet loss measurement in this embodiment includes the following steps:
  • Step S100 The second node receives the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is sent by the first node to the second node.
  • a data packet group the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a data packet included in the first data packet group quantity.
  • Step S101 The second node receives the second data packet sent by the first node.
  • Step S102 When the second node determines that the second data packet does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted.
  • Step S103 The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
  • the executor of each step in this embodiment is a second node.
  • the second node may be a Label Switched Router (LSR) in the MPLS domain, and the second section
  • LSR Label Switched Router
  • the point can be any node other than the head node on the Label Switched Path (LSP), that is, the intermediate node or the tail node on the LSP.
  • LSP Label Switched Path
  • the second node may determine, according to the sequence number of the first data packet group, the first data packet to belong to.
  • each data packet in the first data packet group is encapsulated with a special label, where the special label includes a sequence number of the first data packet group and the first data packet number.
  • the second node may obtain the sequence number of the first data packet group and the first data packet number by parsing the special label encapsulated on the first data packet.
  • the special label may be an MPLS label, and the second node may parse the MPLS label by using a prior art method, and obtain a sequence number of the first packet group and the first data packet included in the special label. Quantity.
  • the second node when the second node receives the data packet of the first data packet group, performing counting statistics on the received data packets belonging to the first data packet group, and correspondingly, according to the statistics
  • the number of packets of the first packet group determines the number of the second packet.
  • the second node may further read the special identifier directly carried in the first data packet, and obtain the serial number of the first data packet group and the first data packet by using the special identifier. Quantity. It should be noted that the specific manner in which the second node obtains the special identifier from the first data packet is not limited herein. For example, the second node may agree with the first node and read the first data at the agreed location. The special identifier of the packet can also directly traverse the first data packet to obtain a special identifier.
  • the first node continuously sends the data packet in the first data packet group, that is, after the first node sends the first data packet in the first data packet group, the first node continuously sends the first data packet. Other packets in a packet group.
  • the second node after receiving the first data packet of the first data packet group sent by the first node, the second node continuously receives other data packets in the first data packet group.
  • the second node After the second node receives the second data packet sent by the first node, the second node needs to determine whether the second data packet belongs to the first data packet group. When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet The second packet group to which the second data packet belongs When the sequence number is different from the sequence number of the first packet group, it is determined that the second data packet does not belong to the first data packet group.
  • the second node may collect, according to the sequence number of the first data packet group, the received second data of the data packet belonging to the first data packet group. The number of packages.
  • the second node may determine, according to the first data packet quantity and the second data packet quantity, that the data packet in the first data packet group is lost on the second node. The number of packages.
  • the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes the sequence of the first data packet group.
  • Number and the first number of data packets when the second node receives the second data packet that does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted Determining, by the second node, the number of packet loss of the first data packet group according to the first data packet quantity and the second data packet quantity, because the second node only receives the When the second data packet of the data packet group is used, the packet loss detection is performed, which is advantageous for improving the accuracy of the packet loss measurement result in the load sharing scenario.
  • FIG. 2 is a schematic flowchart diagram of a method for packet loss measurement according to an embodiment of the present invention. As shown in FIG. 2, the method for packet loss measurement in this embodiment includes the following steps:
  • Step S200 The first node determines a quantity of the first data packet included in the first data packet group.
  • Step S201 the first node sends a first data packet in the first data packet group to a second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number.
  • the first number of data packets is used to identify the number of data packets included in the first data packet group, and the first data packet group is a data packet group that is sent by the first node to the second node.
  • Step S202 after the data packet in the first data packet group is sent, the first node sends a second data packet to the second node, where the second data packet does not belong to the first data packet. group.
  • the executor of each step in this embodiment is the first node.
  • the first node may be an LSR in the MPLS domain, which may be any node except the tail node on the LSP, that is, it may be determined on the LSP. Head node or intermediate node.
  • the first node may not send an LMM message to the second node to measure the packet loss. Instead, the first data packet to which the data packet belongs and the first data packet number in the data packet group can be identified directly by the first data packet sent.
  • the method before the sending, by the first node, the first data packet in the first data packet group to the second node, the method further includes:
  • the first node encapsulates the first data packet by using a special label, where the special label includes a sequence number of the first data packet group and the first data packet number. Each of the first packet group is encapsulated with the special tag.
  • the first node continuously sends the data packet in the first data packet group, that is, after the first node sends the first data packet in the first data packet group, the first node continuously sends the first data packet. Other packets in a packet group.
  • the second node after receiving the first data packet of the first data packet group sent by the first node, the second node continuously receives other data packets in the first data packet group.
  • the second node After the second node receives the second data packet sent by the first node, the second node needs to determine whether the second data packet belongs to the first data packet group. When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet When the sequence number of the second data packet group to which the two data packets belong is different from the sequence number of the first data packet group, it is determined that the second data packet does not belong to the first data packet group.
  • the first node is sending In the case of the second data packet, only step S200 and step S201 may be repeatedly performed; if the second data packet is a normal data packet, that is, the second data packet does not include the sequence number of the first data packet group and the The first number of data packets, at which time the first node can perform forwarding operations on normal data packets in the prior art.
  • the second node may determine, according to the received first data packet and the second data packet, the received The second packet number of the first packet group, and determining the number of packet loss of the first packet group according to the first packet number and the second packet number.
  • the first data packet including the sequence number and the first data packet number is sent, so that the second node can acquire the first data packet group and the first data packet group where the first data packet is located.
  • the first number of data packets, and determining the number of packet loss of the first data packet group according to the received first data packet and the second data packet, because the second node only receives the first data packet group The packet loss detection is performed only when the second data packet is used, which is beneficial to improving the accuracy of the packet loss measurement result in the load sharing scenario.
  • FIG. 3 is a schematic flowchart of interaction between a first node and a second node according to an embodiment of the present invention. As shown in FIG. 3, the interaction process includes the following steps:
  • Step S300 The first node determines a quantity of the first data packet included in the first data packet group.
  • the execution subject is the first node, and in practice, the node may be an LSR in the MPLS domain.
  • the first data packet may include a sequence number of the first data packet group to which it belongs and the first data packet number.
  • the first number of packets can be identified by:
  • the first data packet includes a transmission count x, then, optionally, the number of packets sent by the first node in each round of statistics, that is, the number of the first data packet can be expressed as 10 x +1 , and if 8 bits are used to represent x, then The first node needs to send at least 10 packets per round of statistics, and at most 10256 packets are sent.
  • the number of packets sent in the statistics of each round of the first node is the number of first packets.
  • the first node can automatically calculate the transmission count included in the first data packet sent in each round of statistics according to the traffic size and the statistical duration configured by the system.
  • the first node may count the first data packet sent in each round of statistics to record the number of first data packets sent by the first node, when the number of the first data packet reaches 10 x+ When one is available, the first node can determine that the first data packet of the round is sent.
  • the number of the first data packet is 10 x +1 , but in practice, the first data packet that the first node may send is less than 10 x+1 , that is, The first data packet sent by the first node includes a transmission count of x, but the number of first data packets actually sent is n, and the value of n is less than 10 x+1 , and if the first data packet is received, The second node determines, according to the foregoing sending count, the number of first data packets sent by the first node in the round of statistics, and calculates the number of lost packets of the first data packet group, and mistakes the 10 x+1 that is not sent by the first node.
  • the data packet is such that the total number of data packets transmitted is 1 million, and the above 1 million data packets are transmitted.
  • 10 x+1 is only a counting method agreed by the first node and the second node, and the formula is not necessarily used in actual operation, and a calculation formula known by other transceivers may also be used.
  • Step S301 The first node encapsulates the first data packet by using a special label.
  • the first node may encapsulate the first data packet by using a special label
  • the special label may include a sequence number of the first data packet group and a first data packet number.
  • the first node may encapsulate the special label for each data packet in the first data packet group.
  • Different types of special tags can have different formats. Take the MPLS label as an example: the MPLS label length is fixed, and is used to uniquely identify a Forwarding Equivalence Class (FEC) to which a packet belongs. Usually the length of the tag is 4 bytes, ie 32 bits. In the embodiment of the present invention, the 32-bit bit included in the existing MPLS type special label may be redefined.
  • FIG. 4 is a schematic diagram of the MPLS special label format provided by the embodiment of the present invention. As shown in FIG. 4, the special label may include:
  • Send count (Tx count), used to identify the first number of packets.
  • the special label value can be used to indicate whether the current label is a special label, and its length is 20 bits. In actual use, the value can be taken as an MPLS label stack code, that is, RFC3032. Among the several reserved labels specified in 4-15, one label that has not been occupied by other protocols. It should be noted that, as long as the data packets sent by the first node to the second node are encapsulated with the above special labels, their special label values are the same regardless of whether they belong to the same data packet group; the serial number is used to identify the first The first packet group to which the data packet belongs is 3 bits long.
  • the MPLS labels encapsulated in the data packets of different data packet groups may correspond to different serial numbers.
  • the first node After the first node sends a group of data packets, the first node sends the data packet.
  • the serial number is incrementally processed to distinguish different packet groups in which different data packets are located; the bottom mark can be the same as the prior art definition, indicating that the MPLS supports the hierarchical structure of the label, that is, supports the multi-layer label, and its length is 1 Bit, when the value is 1, indicates the lowest level label; the transmission count can be used to identify the first number of data packets of the first data packet group, and its length is 8 bits.
  • Step S302 The first node sends the first data packet in the first data packet group to the second node.
  • step S201 This step is the same as the description of step S201, and details are not described herein again.
  • Step S303 The first node sends a second data packet to the second node.
  • the first node may further send the second data packet to the second node, where the second data packet does not belong to the first data packet group.
  • the first node may perform two different processing on the second data packet according to actual needs. One is to terminate the special label for the second data packet in the second data packet group, but to complete the forwarding according to the determined LSP path, and the second data packet at this time is a normal data packet without the special label encapsulated.
  • the processing mode is applicable to on-demand statistics, that is, one-time statistics, that is, the system only needs to count the number of packets lost in the first packet group. In another case, if the statistical requirements of the system configuration are continuous statistics, that is, If multiple rounds of statistics are needed, the first node prepares for the next statistics after sending the first packet group.
  • the first node may perform a cyclic increment process on the sequence number included in the second data packet of the second data packet group, and repeat the foregoing steps S300-S302 to send the second data packet.
  • the first node encapsulates a special label with a sequence number of 0 for the first data packet in the first data packet group, and then the second data packet is encapsulated when the special data label is encapsulated for the data packet of the second data packet group.
  • the sequence number of the data packet in the group is incremented to 1.
  • the subsequent each data packet is similarly incremented. It should be noted that since the serial number of the special label is 3 bits, only 8 different numbers of 0-7 can be represented.
  • the first node when the serial number is incremented to 7, the first node is in the data of the subsequent data packet group.
  • the column number is reset to 0, and the above process is the cyclic increment process of the serial number.
  • the number of data packet groups sent by the first node is not limited herein.
  • the second node may repeat the above steps S300-S302 for the data packets in each data packet group. operating.
  • Step S304 The second node receives the first data packet sent by the first node.
  • Step S305 The second node receives the second data packet sent by the first node.
  • Step S306 The second node determines whether the second data packet belongs to the first data packet group.
  • the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet When the sequence number of the second data packet group to which the two data packets belong is different from the sequence number of the first data packet group, it is determined that the second data packet does not belong to the first data packet group.
  • Step S307 The second node starts a specific duration timer. After the timer expires, the second node counts the received second data packet belonging to the first data packet group.
  • the second node Since different data packets sent by the first node do not necessarily arrive at the second node in the order of transmission, the second node needs to wait for a period of time to receive the delayed data packets in the same data packet group, so as to more accurately measure the number of lost packets.
  • the second node may start a timer of a specific duration, and if the data packet in the first packet group to which the first data packet belongs is not received before the timer expires, after the timer expires, Counting the number of second packets of the received first packet group.
  • the second node first receives some data packets with sequence number 0, that is, the first data packet belonging to the first data packet group. Then, a second data packet with the sequence number 1 arrives, that is, the data packet belonging to the second data packet group, or another second data packet without the special label is encapsulated, according to the description of step S306, the second The node needs to be the same as the sequence number of the first data packet received by the node, and if the second data packet is the data packet with the sequence number 1, since the sequence number of the first data packet is 0, therefore, The two nodes can start a timer. When the timer expires, the second node counts the received second packet number belonging to the first packet group.
  • the timer is for the second node to wait for a certain period of time. If the data packet of the first data packet group is not received within the specific time, the timer is read in step S304 when the timer expires.
  • the statistical count value of the first data packet group is the second data packet number in the first data packet group received by the second node.
  • the second node receives the data packet with the same sequence number as the first data packet, for example, the second node receives the second data packet with the sequence number 1 or After the second data packet of the special label is not encapsulated, the first data packet with the sequence number 0 is received.
  • the second node counts the first data packet, that is, The statistics counter value of the first packet group is incremented by 1, and the timer can be turned off.
  • the first node still repeats the foregoing counting operation until receiving a data packet that is not in the first data packet group or There is no normal data packet encapsulating the special label. At this time, the second node starts the above timer again, and repeats the operation of step S307.
  • duration of the timer is set according to actual conditions, such as actual network congestion conditions, for example, 60 seconds or 120 seconds.
  • Step S308 The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
  • the second node may obtain the first data packet quantity included in the first data packet group from the transmission count of the first data packet, and after the operation of step S307, the second node may determine the first data packet that is received by the second node.
  • the second packet amount of the group, therefore, the corresponding packet loss number of the first packet group is:
  • Z X-Y, where X represents the number of first packets, Y represents the number of second packets, and Z represents the number of packets lost.
  • the embodiment provides a state switching diagram of the second node. As shown in FIG. 5, there are four states of the second node: an initial state, a statistical state, a waiting state, and an ending state.
  • the initial state indicates an initial state when the second node does not enable the packet loss statistics function, and when the second node receives the first packet encapsulated with the special label of the first packet group, it starts the counter. And entering the statistical state, when the second node is in the statistical state, if the second node receives the same data packet with the serial number and the first data packet, the receiving counter corresponding to the first data packet group is incremented by one; If the second received second packet sequence number is different from the sequence number of the first packet group, a timer for the first packet group is started, and a waiting state is entered, where the waiting state refers to the second node Wait a while to receive the delayed packets in the first packet group.
  • the second node When the second node is in the waiting state, if the timer has not expired, and the second node receives again After the data packet in the first packet group, it switches from the waiting state to the statistical state, and then counts the received data of the first packet group. If the timer expires, the second node enters the end state from the waiting state, and reports the statistical result in the state, that is, reports the number of data packets of the first data packet group actually received. It should be noted that the statistical state, the waiting state, and the ending state can be restored to the initial state by artificially enabling the operation of the statistical function of the node.
  • any node except the first node on the LSP can be used as the second node, and thus the node can be
  • the measurement of the number of packet loss is performed, that is, the solution of the embodiment of the present invention can not only know the number of lost packets from the first node to any node on the LSP path, but also the second reported by any two nodes. The number of packets is subtracted, and the number of packets lost between any two nodes is obtained.
  • the second node may be reported by adding a device as a public server in the network area where the LSP path between the first node and the second node is located, or by using an existing network management system. Specifically, when all the second nodes enabled with the statistics function finish the statistics of the current round, the second data packet counted by each is summarized on the public server or the network management. This feature enhancement allows the user to locate the faulty segment of a specific packet loss.
  • Step S309 the second node decapsulates the special label of the first data packet.
  • the second node can enable the statistics function to perform statistical reporting, and can also enable the deletion function to decapsulate the special label for the first data packet.
  • the second node determines the path end point of the LSP, that is, when the first data packet with the special label reaches the second node, the second The node not only performs statistical reporting, but also removes the special label of the first data packet, so that the data packet that is subsequently forwarded along the determined LSP is restored to the normal encapsulation and no special label is carried.
  • the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes the first data packet group.
  • a serial number and a first number of data packets when the second node receives the second data packet that does not belong to the first data packet group, the received second data packet that belongs to the first data packet group is counted
  • the number, the second node is determined according to the number of the first data packet and the number of the second data packet
  • the number of packet loss of the first data packet group is that the second node only performs packet loss detection when receiving the second data packet that does not belong to the first data packet group, which is beneficial to the load. Improve the accuracy of packet loss measurement results in a shared scenario.
  • FIG. 6 is a schematic structural diagram of a second node according to an embodiment of the present invention.
  • the second node 600 includes a receiving unit 610, a statistic unit 611, and a calculating unit 612.
  • the second node 600 can be the second node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG. 3.
  • the receiving unit 610 is configured to receive the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is the data packet group sent by the first node to the second node, where the first data is The packet includes a sequence number of the first packet group and a first packet number, and the first packet number is used to identify the number of data packets included in the first packet group;
  • the receiving unit 610 is further configured to receive the second data packet sent by the first node;
  • the statistics unit 611 is configured to determine, when the second data packet does not belong to the first data packet group, the number of the second data packets that belong to the first data packet group.
  • the calculating unit 612 is configured to determine the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
  • each data packet in the first data packet group is encapsulated with a special label, and the special label includes a serial number of the first data packet group and a first data packet number.
  • the statistics unit 611 is specifically configured to determine, after the timer started by the timing unit expires, the received second data packet belonging to the first data packet group.
  • calculating unit 612 is specifically configured to:
  • X represents the number of first packets
  • Y represents the number of second packets
  • Z represents the number of lost packets
  • the second node 600 may further include:
  • the counting unit 710 is configured to count statistics of the received data packets belonging to the first data packet group, and accordingly, determine the second data packet quantity according to the statistical data packet number of the first data packet group.
  • the second node 600 may further include:
  • the determining unit 810 is configured to: when determining that the second data packet does not encapsulate the special label, determine that the second data packet does not belong to the first data packet group, or determine the sequence number of the second data packet group to which the second data packet belongs When the sequence number of the first packet group is different, it is determined that the second packet does not belong to the first A packet group.
  • the second node 600 may further include:
  • the timing unit 910 is configured to start a specific duration timer, and when the timer expires, determine the number of the second data packets that belong to the first data packet group.
  • the first data packet including the first data packet group serial number and the first data packet number is sent, so that the second node 600 can acquire the first data packet group where the first data packet is located. And determining a number of packet loss of the first packet group according to the first packet number of the first packet group, and determining, according to the received first packet and the second packet, that the second node 600 only receives the packet When the second data packet belongs to the first data packet group, the packet loss detection is performed, which is beneficial to improving the accuracy of the packet loss measurement result in the load balancing scenario.
  • FIG. 10 is a schematic structural diagram of a first node according to an embodiment of the present invention.
  • the first node 1000 includes a determining unit 1010 and a transmitting unit 1020.
  • the first node 1000 may be the first node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG.
  • a determining unit 1010 configured to determine a quantity of the first data packet included in the first data packet group
  • the sending unit 1020 is configured to send, to the second node, the first data packet in the first data packet group, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used. Identifies the number of packets included in the first packet group;
  • the sending unit 1020 is further configured to send the second data packet to the second node, where the second data packet does not belong to the first data packet group.
  • the first node 1000 further includes:
  • the encapsulating unit 1110 is configured to encapsulate the first data packet by using a special label before the sending unit 1020 sends the first data packet in the first data packet group to the second node, where the special label includes the The serial number of the first packet group and the first packet number.
  • the encapsulating unit 1110 is further configured to encapsulate the special label for each data packet in the first data packet group.
  • the first node 1000 sends the first data packet including the first packet group serial number and the first data packet number, so that the second node can obtain the first data packet. a first packet number of the data packet group and the first data packet group, and determining the number of packet loss of the first data packet group according to the received first data packet and the second data packet, since the second node is only in the Receiving the second data packet that does not belong to the first data packet group,
  • the packet loss detection is beneficial to improve the accuracy of packet loss measurement results in a load balancing scenario.
  • an embodiment of the present invention further provides a schematic diagram of a second node.
  • the second node 1200 may be the second node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG.
  • the second node 1200 includes a memory 1201 and a receiver 1202, and a processor 1203 connected to the memory 1201 and the receiver 1202, respectively.
  • the memory 1201 is configured to store a set of program instructions, and the processor 1203
  • the program instructions for invoking the memory 1201 to store perform the following operations:
  • the trigger receiver 1202 receives the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is a data packet group sent by the first node to the second node, where the first data packet includes a sequence number of the first packet group and a first packet number, wherein the first packet number is used to identify the number of data packets included in the first packet group;
  • the processor 1203 determines that the second data packet does not belong to the first data packet group
  • the received second data packet number belonging to the first data packet group is counted, and according to the first data packet number and the second data packet number. Determine the number of lost packets in the first packet group.
  • each data packet in the first data packet group is encapsulated with a special label, and the special label includes a serial number of the first data packet group and a first data packet number.
  • the processor 1203 is specifically configured to determine, after the timer started by the timing unit expires, the received second data packet belonging to the first data packet group.
  • processor 1203 is specifically configured to:
  • X represents the number of first packets
  • Y represents the number of second packets
  • Z represents the number of lost packets
  • the processor 1203 may be a central processing unit (CPU), and the memory 1201 may be an internal memory of a random access memory (RAM) type, and the receiver 1202
  • the physical interface may be an Ethernet (Ethernet) interface or an Asynchronous Transfer Mode (ATM) interface.
  • the processor 1203, the transmitter 1202, and the memory 1201 may be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC).
  • ASIC Application Specific Integrated Circuit
  • FIG. 13 is a schematic structural diagram of a first node according to an embodiment of the present invention.
  • the first node 1300 may be the first node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG.
  • the first node 1300 includes a memory 1301 and a transmitter 1302, and a processor 1303 connected to the memory 1301 and the transmitter 1302, respectively.
  • the memory 1301 is configured to store a set of program instructions, and the processor 1303
  • the program instructions for invoking the memory 1301 to store perform the following operations:
  • the trigger transmitter 1302 sends the first data packet in the first data packet group to the second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify the first data packet.
  • the number of data packets included in a packet group, and the second data packet is sent to the second node, and the second data packet does not belong to the first data packet group.
  • the processor 1303 is further configured to: after the transmitter 1302 sends the first data packet in the first data packet group to the second node, encapsulate the first data packet by using a special label, where the special label The sequence number of the first packet group and the first packet number are included.
  • the processor 1303 is further configured to encapsulate the special label for each data packet in the first data packet group.
  • the processor 1303 may be a CPU
  • the memory 1301 may be a RAM type internal memory
  • the transmitter 1302 may include a common physical interface, and the physical interface may be an Ethernet interface or an ATM interface.
  • the processor 1303, the transmitter 1302, and the memory 1301 may be integrated into one or more separate circuits or hardware, such as an ASIC.
  • the foregoing storage method may be at least one of the following: a read-only memory (ROM), a RAM, a magnetic disk, or an optical disk, and the like may store the program code. Medium.

Abstract

Provided are a method for measuring lost packets and a network device, comprising: receiving, by a second node, first data packets sent by a first node, the first data packets belonging to a first data packet group, the first data packet group being a data packet group sent to the second node by the first node, the first data packets containing a serial number of the first data packet group and the number of the first data packets, and the number of the first data packets being used for identifying the number of the data packets contained in the first data packet group; receiving, by the second node, second data packets sent by the first node; when determining that the second data packets do not belong to the first data packet group, counting, by the second node, the number of received second data packets belonging to the first data packet group; and according to the number of the first data packets and the number of the second data packets, determining, by the second node, the number of lost packets of the first data packet group. By means of the technical solution in the embodiment of the present invention, it is beneficial to increase the accuracy of measuring lost packets in the scenario of load sharing.

Description

一种丢包测量的方法及网络设备Method and network device for measuring packet loss
本申请要求于2013年12月24日提交中国专利局、申请号为CN 201310722868.8、发明名称为“一种丢包测量的方法及网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Dec. 24, 2013, the Chinese Patent Application No. CN 201310722868.8, entitled "A Method for Losing Packet Measurements and Network Equipment", the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种丢包测量的方法及网络设备。The present invention relates to the field of communications technologies, and in particular, to a method and network device for packet loss measurement.
背景技术Background technique
多协议标签交换(Multiprotocol Label Switching,简称MPLS)使用短而定长的标签(label)来封装报文分组。标签是一个长度固定、只具有本地意义的短标识符,用于唯一标识一个报文分组所属的转发等价类(Forwarding Equivalence Class,简称FEC)。Multiprotocol Label Switching (MPLS) uses short, fixed-length labels to encapsulate packet packets. A tag is a short identifier with a fixed length and only local significance. It is used to uniquely identify the Forwarding Equivalence Class (FEC) to which a packet belongs.
现有技术中,发送端可以向接收端发送带有请求信息的丢包检测消息(Loss Measurement Message,简称LMM),该LMM中包含了发送端发送数据包的本地发包计数值,当接收端接收到该LMM后,生成一个丢包检测回应(Loss Measurement Reply,简称LMR)消息,并将该LMR消息发送给该发送端。该LMR消息中包含有接收到该LMM时的收包计数值。该发送端可以根据发包计数值和该收包计数值进行丢包测量。然而,在负载分担的场景下,例如:发送端发送的多个数据包可能由于经由的路径不同,导致数据包晚于该LMM到达接收端,从而出现乱序问题,会导致丢包数测量结果不准确。In the prior art, the transmitting end may send a Loss Measurement Message (LMM) with the request information to the receiving end, where the LMM includes the local sending packet count value of the sending end of the data packet, and the receiving end receives the packet. After the LMM, a Lost Measurement Reply (LMR) message is generated, and the LMR message is sent to the sender. The LMR message includes a packet count value when the LMM is received. The sender can perform packet loss measurement according to the packet count value and the packet count value. However, in the scenario of load sharing, for example, multiple data packets sent by the sender may be different from the path that is passed, causing the data packet to arrive at the receiving end later than the LMM, causing an out-of-order problem, which may result in a packet loss measurement result. Inaccurate.
发明内容Summary of the invention
本发明实施例提供一种丢包测量的方法及网络设备,有利于在负载分担场景下,提高丢包测量结果的准确性。 The embodiment of the invention provides a method for measuring packet loss and a network device, which is beneficial to improving the accuracy of the packet loss measurement result in a load balancing scenario.
本发明的第一方面,提供一种丢包测量的方法,包括:A first aspect of the present invention provides a method for packet loss measurement, including:
第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量;Receiving, by the second node, the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is the data packet sent by the first node to the second node The first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a quantity of data packets included in the first data packet group;
所述第二节点接收所述第一节点发送的第二数据包;Receiving, by the second node, the second data packet sent by the first node;
当所述第二节点确定所述第二数据包不属于所述第一数据包组时,统计接收到的属于所述第一数据包组的第二数据包数量;When the second node determines that the second data packet does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted;
所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数。The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
在第一种可能的实现方式中,根据第一方面,还包括:In a first possible implementation manner, according to the first aspect, the method further includes:
当所述第二节点接收所述第一数据包组的数据包时,对接收的属于所述第一数据包组的数据包进行计数统计,相应地,根据所述统计的所述第一数据包组的数据包数量确定所述第二数据包数量。When the second node receives the data packet of the first data packet group, counting and receiving the received data packet belonging to the first data packet group, and correspondingly, according to the statistics, the first data The number of packets of the packet group determines the number of the second packet.
在第二种可能的实现方式中,结合第一方面和第一种可能的实现方式,所述第一数据包组中每个数据包封装有特殊标签,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。In a second possible implementation, in combination with the first aspect and the first possible implementation, each data packet in the first data packet group is encapsulated with a special label, and the special label includes the first data. The serial number of the packet group and the number of the first data packet.
在第三种可能的实现方式中,根据第二种可能的实现方式,还包括:In a third possible implementation manner, according to the second possible implementation manner, the method further includes:
当所述第二节点判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or
当所述第二节点判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。When the second node determines that the sequence number of the second data packet group to which the second data packet belongs is different from the sequence number of the first data packet group, determining that the second data packet does not belong to the first data packet group.
在第四种可能的实现方式中,结合第一方面、第一种可能的实现方式、第二种可能的实现方式和第三种可能的实现方式,所述当所述第二节点确定所述第二数据包不属于所述第一数据包组之后,还包括:In a fourth possible implementation, in combination with the first aspect, the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner, when the second node determines the After the second data packet does not belong to the first data packet group, the method further includes:
所述第二节点启动特定时长定时器;The second node starts a specific duration timer;
当所述定时器到期后,所述第二节点统计接收到的属于所述第一数据包组的所述第二数据包数量。 After the timer expires, the second node counts the received number of the second data packets belonging to the first data packet group.
在第五种可能的实现方式中,结合第一方面、第一种可能的实现方式、第二种可能的实现方式、第三种可能的实现方式和第四种可能的实现方式,所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数,具体包括:In a fifth possible implementation, in combination with the first aspect, the first possible implementation manner, the second possible implementation manner, the third possible implementation manner, and the fourth possible implementation manner, The two nodes determine, according to the number of the first data packet and the number of the second data packet, the number of packet loss of the first data packet group, which specifically includes:
对应所述第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
其中,所述X表示第一数据包数量,所述Y表示第二数据包数量,所述Z表示所述丢包数。The X represents the number of first data packets, the Y represents the number of second data packets, and the Z represents the number of lost packets.
本发明的第二方面,提供一种丢包测量的方法,包括:A second aspect of the present invention provides a method for packet loss measurement, including:
第一节点确定第一数据包组内所包含的第一数据包数量;The first node determines a quantity of the first data packet included in the first data packet group;
所述第一节点向第二节点发送所述第一数据包组中的第一数据包,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组;Transmitting, by the first node, a first data packet in the first data packet group to a second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where The first number of data packets is used to identify the number of data packets included in the first data packet group, and the first data packet group is a data packet group that is sent by the first node to the second node;
当所述第一数据包组中的数据包发送完毕后,所述第一节点向所述第二节点发送第二数据包,所述第二数据包不属于所述第一数据包组。After the data packet in the first data packet group is sent, the first node sends a second data packet to the second node, where the second data packet does not belong to the first data packet group.
在第一种可能的实现方式中,根据第二方面,所述第一节点向第二节点发送第一数据包组中的第一数据包之前,还包括:In a first possible implementation, before the sending, by the first node, the first data packet in the first data packet group to the second node, the first node further includes:
所述第一节点采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The first node encapsulates the first data packet by using a special label, where the special label includes a sequence number of the first data packet group and the first data packet number.
在第二种可能的实现方式中,根据第一种可能的实现方式,所述第一数据包组中的每个数据包都封装有所述特殊标签。In a second possible implementation manner, according to the first possible implementation manner, each data packet in the first data packet group is encapsulated with the special label.
本发明的第三方面,提供一种第二节点,包括:A third aspect of the present invention provides a second node, including:
接收单元,用于接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量;a receiving unit, configured to receive a first data packet sent by the first node, where the first data packet belongs to a first data packet group, and the first data packet group is sent by the first node to the second node a data packet group, the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a data packet included in the first data packet group Quantity
所述接收单元,还用于接收所述第一节点发送的第二数据包;The receiving unit is further configured to receive a second data packet sent by the first node;
统计单元,用于确定所述第二数据包不属于所述第一数据包组时,统计接收到的属于所述第一数据包组的第二数据包数量; a statistic unit, configured to determine, when the second data packet does not belong to the first data packet group, the number of second data packets that are received by the first data packet group;
计算单元,用于根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数。And a calculating unit, configured to determine, according to the first data packet quantity and the second data packet quantity, a number of packet loss of the first data packet group.
在第一种可能的实现方式中,根据第三方面,还包括:In a first possible implementation manner, according to the third aspect, the method further includes:
计数单元,用于对接收的属于所述第一数据包组的数据包进行计数统计,相应地,根据所述统计的所述第一数据包组的数据包数量确定所述第二数据包数量。a counting unit, configured to count statistics of the received data packets belonging to the first data packet group, and correspondingly, determine the number of the second data packet according to the statistics, the number of data packets of the first data packet group .
在第二种可能的实现方式中,结合第三方面和第一种可能的实现方式,所述第一数据包组中每个数据包封装有特殊标签,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。In a second possible implementation manner, in combination with the third aspect and the first possible implementation manner, each data packet in the first data packet group is encapsulated with a special label, where the special label includes the first data The serial number of the packet group and the number of the first data packet.
在第三种可能的实现方式中,根据第二种可能的实现方式,还包括:In a third possible implementation manner, according to the second possible implementation manner, the method further includes:
确定单元,用于当判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,a determining unit, configured to: when it is determined that the second data packet does not encapsulate the special label, determine that the second data packet does not belong to the first data packet group, or
当判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。When it is determined that the sequence number of the second data packet group to which the second data packet belongs is different from the sequence number of the first data packet group, determining that the second data packet does not belong to the first data packet group.
在第四种可能的实现方式中,结合第一方面、第一种可能的实现方式、第二种可能的实现方式和第三种可能的实现方式,还包括:In a fourth possible implementation, in combination with the first aspect, the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner, the method further includes:
定时单元,用于启动特定时长定时器;a timing unit for starting a specific duration timer;
所述统计单元具体用于当所述定时单元启动的所述定时器到期后,确定接收到的属于所述第一数据包组的所述第二数据包数量。The statistic unit is specifically configured to determine, after the timer started by the timing unit expires, the received number of the second data packets belonging to the first data packet group.
在第五种可能的实现方式中,结合第一方面、第一种可能的实现方式、第二种可能的实现方式、第三种可能的实现方式和第四种可能的实现方式,所述计算单元具体用于:In a fifth possible implementation, in combination with the first aspect, the first possible implementation manner, the second possible implementation manner, the third possible implementation manner, and the fourth possible implementation manner, the calculating The unit is specifically used to:
对应所述第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
其中,所述X表示第一数据包数量,所述Y表示第二数据包数量,所述Z表示所述丢包数。The X represents the number of first data packets, the Y represents the number of second data packets, and the Z represents the number of lost packets.
本发明的第四方面,提供一种第一节点,包括:A fourth aspect of the present invention provides a first node, including:
确定单元,用于确定第一数据包组内所包含的第一数据包数量;a determining unit, configured to determine a quantity of the first data packet included in the first data packet group;
发送单元,用于向第二节点发送所述第一数据包组中的第一数据包,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,所述第 一数据包组为所述第一节点向所述第二节点发送的数据包组;a sending unit, configured to send, to the second node, the first data packet in the first data packet group, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where The first number of data packets is used to identify the number of data packets included in the first data packet group, where a data packet group is a data packet group sent by the first node to the second node;
所述发送单元,还用于当所述第一数据包组中的数据包发送完毕后,向所述第二节点发送第二数据包,所述第二数据包不属于所述第一数据包组。The sending unit is further configured to: after the data packet in the first data packet group is sent, send a second data packet to the second node, where the second data packet does not belong to the first data packet group.
在第一种可能的实现方式中,根据第四方面,还包括:In a first possible implementation manner, according to the fourth aspect, the method further includes:
封装单元,用于所述发送单元向第二节点发送第一数据包组中的第一数据包之前,采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。An encapsulating unit, configured to encapsulate the first data packet by using a special label, where the special label includes the first data, before the sending unit sends the first data packet in the first data packet group to the second node The serial number of the packet group and the number of the first data packet.
在第二种可能的实现方式中,根据第一种可能的实现方式,所述封装单元,还用于对所述第一数据包组中的每个数据包封装所述特殊标签。In a second possible implementation manner, according to the first possible implementation, the encapsulating unit is further configured to encapsulate the special label for each data packet in the first data packet group.
在上述技术方案中,该第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,当所述第二节点接收到不属于所述第一数据包组的第二数据包时,统计接收到的属于所述第一数据包组的第二数据包数量,所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数,有利于在负载分担场景下,提高丢包测量结果的准确性。In the above technical solution, the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes a sequence of the first data packet group. Number and the first number of data packets, the first number of data packets is used to identify the number of data packets included in the first data packet group, when the second node receives not belonging to the first data packet group And the second data packet, the second data packet that belongs to the first data packet group is counted, and the second node determines the number according to the first data packet quantity and the second data packet quantity. The number of packet loss in a packet group is beneficial to improve the accuracy of packet loss measurement results in a load balancing scenario.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本发明实施例提供的一种丢包测量的方法的流程图示意图;1 is a flowchart of a method for packet loss measurement according to an embodiment of the present invention;
图2为本发明实施例提供的一种丢包测量的方法的流程图示意图;2 is a schematic flowchart of a method for packet loss measurement according to an embodiment of the present invention;
图3为本发明实施例提供的一种第一节点和第二节点交互流程图示意图;FIG. 3 is a schematic flowchart of interaction between a first node and a second node according to an embodiment of the present disclosure;
图4为本发明实施例提供的MPLS特殊标签格式示意图; 4 is a schematic diagram of a format of an MPLS special label according to an embodiment of the present invention;
图5为本发明实施例提供的第二节点的状态切换示意图;FIG. 5 is a schematic diagram of state switching of a second node according to an embodiment of the present invention;
图6为本发明实施例提供的一种第二节点的结构示意图;FIG. 6 is a schematic structural diagram of a second node according to an embodiment of the present disclosure;
图7为本发明实施例提供的一种第二节点的结构示意图;FIG. 7 is a schematic structural diagram of a second node according to an embodiment of the present disclosure;
图8为本发明实施例提供的一种第二节点的结构示意图;FIG. 8 is a schematic structural diagram of a second node according to an embodiment of the present disclosure;
图9为本发明实施例提供的一种第二节点的结构示意图;FIG. 9 is a schematic structural diagram of a second node according to an embodiment of the present disclosure;
图10为本发明实施例提供的一种第一节点的结构示意图;FIG. 10 is a schematic structural diagram of a first node according to an embodiment of the present disclosure;
图11为本发明实施例提供的一种第一节点的结构示意图;FIG. 11 is a schematic structural diagram of a first node according to an embodiment of the present disclosure;
图12为本发明实施例提供的一种第二节点的结构示意图;FIG. 12 is a schematic structural diagram of a second node according to an embodiment of the present disclosure;
图13为本发明实施例提供的一种第一节点的结构示意图。FIG. 13 is a schematic structural diagram of a first node according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1为本发明实施例提供的一种丢包测量的方法的流程图示意图。如图1所示,本实施例的丢包测量的方法,包括如下步骤:FIG. 1 is a schematic flowchart diagram of a method for packet loss measurement according to an embodiment of the present invention. As shown in FIG. 1 , the method for packet loss measurement in this embodiment includes the following steps:
步骤S100、第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量。Step S100: The second node receives the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is sent by the first node to the second node. a data packet group, the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a data packet included in the first data packet group quantity.
步骤S101、所述第二节点接收所述第一节点发送的第二数据包。Step S101: The second node receives the second data packet sent by the first node.
步骤S102、当所述第二节点确定所述第二数据包不属于所述第一数据包组时,统计接收到的属于所述第一数据包组的第二数据包数量。Step S102: When the second node determines that the second data packet does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted.
步骤S103、所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数。Step S103: The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
本实施例各步骤的执行主体为第二节点,在实际中,该第二节点可以是MPLS域中的标签交换路由器(Label Switched Router,LSR),该第二节 点可以是标签交换路径(Label Switched Path,简称LSP)上除头节点外的任意节点,即可以是LSP上的中间节点或尾节点。The executor of each step in this embodiment is a second node. In practice, the second node may be a Label Switched Router (LSR) in the MPLS domain, and the second section The point can be any node other than the head node on the Label Switched Path (LSP), that is, the intermediate node or the tail node on the LSP.
进一步地,由于上述第一数据包包含第一数据包组的序列号和第一数据包数量,因此,第二节点可以根据上述第一数据包组的序列号确定第一数据包所属的第一数据包组及上述第一数据包组的数量。Further, since the first data packet includes the sequence number of the first data packet group and the first data packet number, the second node may determine, according to the sequence number of the first data packet group, the first data packet to belong to. The packet group and the number of the first packet group described above.
可选地,所述第一数据包组中每个数据包封装有特殊标签,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。作为一种可行的实施方式,第二节点可以通过解析封装在第一数据包上的特殊标签,获取第一数据包组的序列号和第一数据包数量。例如:该特殊标签可以是MPLS标签,那么,第二节点可以用现有技术的方法解析该MPLS标签,并从中获取上述特殊标签包含的第一数据包组的序列号和所述第一数据包数量。Optionally, each data packet in the first data packet group is encapsulated with a special label, where the special label includes a sequence number of the first data packet group and the first data packet number. As a feasible implementation manner, the second node may obtain the sequence number of the first data packet group and the first data packet number by parsing the special label encapsulated on the first data packet. For example, the special label may be an MPLS label, and the second node may parse the MPLS label by using a prior art method, and obtain a sequence number of the first packet group and the first data packet included in the special label. Quantity.
可选地,当所述第二节点接收所述第一数据包组的数据包时,对接收的属于所述第一数据包组的数据包进行计数统计,相应地,根据所述统计的所述第一数据包组的数据包数量确定所述第二数据包数量。Optionally, when the second node receives the data packet of the first data packet group, performing counting statistics on the received data packets belonging to the first data packet group, and correspondingly, according to the statistics The number of packets of the first packet group determines the number of the second packet.
作为另一种可行的实施方式,第二节点还可以读取第一数据包中直接携带的特殊标识,通过上述特殊标识来获取所述第一数据包组的序列号和所述第一数据包数量。需要说明的是,第二节点从第一数据包中获取特殊标识的具体方式在此不做出限制,例如:第二节点可以与第一节点约定好位置,并在约定位置读取第一数据包的特殊标识,也可以直接遍历第一数据包,从中获取特殊标识。As another possible implementation manner, the second node may further read the special identifier directly carried in the first data packet, and obtain the serial number of the first data packet group and the first data packet by using the special identifier. Quantity. It should be noted that the specific manner in which the second node obtains the special identifier from the first data packet is not limited herein. For example, the second node may agree with the first node and read the first data at the agreed location. The special identifier of the packet can also directly traverse the first data packet to obtain a special identifier.
所述第一节点对所述第一数据包组中的数据包进行连续发送,即所述第一节点发送了所述第一数据包组中的第一个数据包后,连续发送所述第一数据包组中的其他数据包。相应地,所述第二节点在接收到所述第一节点发送的所述第一数据包组的第一个数据包后,会连续接收到所述第一数据包组中的其他数据包。The first node continuously sends the data packet in the first data packet group, that is, after the first node sends the first data packet in the first data packet group, the first node continuously sends the first data packet. Other packets in a packet group. Correspondingly, after receiving the first data packet of the first data packet group sent by the first node, the second node continuously receives other data packets in the first data packet group.
在该第二节点接收到第一节点发送的第二数据包后,第二节点需要确定上述第二数据包是否属于第一数据包组。当所述第二节点判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,当所述第二节点判断所述第二数据包所属的第二数据包组 的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。After the second node receives the second data packet sent by the first node, the second node needs to determine whether the second data packet belongs to the first data packet group. When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet The second packet group to which the second data packet belongs When the sequence number is different from the sequence number of the first packet group, it is determined that the second data packet does not belong to the first data packet group.
具体的,若第二数据包不属于第一数据包组,则第二节点可以根据上述第一数据包组的序列号,统计接收到的属于该第一数据包组的数据包的第二数据包数量。Specifically, if the second data packet does not belong to the first data packet group, the second node may collect, according to the sequence number of the first data packet group, the received second data of the data packet belonging to the first data packet group. The number of packages.
当确定了上述第二数据包数量后,第二节点可以根据上述第一数据包数量和第二数据包数量,确定所述第一数据包组中的数据包在所述第二节点上的丢包数。After determining the number of the second data packet, the second node may determine, according to the first data packet quantity and the second data packet quantity, that the data packet in the first data packet group is lost on the second node. The number of packages.
在上述实施例中,该第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,当所述第二节点接收到不属于所述第一数据包组的第二数据包时,统计接收到的属于所述第一数据包组的第二数据包数量,所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数,由于所述第二节点只有在接收到不属于所述第一数据包组的所述第二数据包时,才进行丢包检测,有利于在负载分担场景下,提高丢包测量结果的准确性。In the above embodiment, the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes the sequence of the first data packet group. Number and the first number of data packets, when the second node receives the second data packet that does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted Determining, by the second node, the number of packet loss of the first data packet group according to the first data packet quantity and the second data packet quantity, because the second node only receives the When the second data packet of the data packet group is used, the packet loss detection is performed, which is advantageous for improving the accuracy of the packet loss measurement result in the load sharing scenario.
图2为本发明实施例提供的一种丢包测量的方法的流程图示意图。如图2所示,本实施例的丢包测量的方法,包括如下步骤:FIG. 2 is a schematic flowchart diagram of a method for packet loss measurement according to an embodiment of the present invention. As shown in FIG. 2, the method for packet loss measurement in this embodiment includes the following steps:
步骤S200、第一节点确定第一数据包组内所包含的第一数据包数量。Step S200: The first node determines a quantity of the first data packet included in the first data packet group.
步骤S201、所述第一节点向第二节点发送所述第一数据包组中的第一数据包,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组。Step S201, the first node sends a first data packet in the first data packet group to a second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number. The first number of data packets is used to identify the number of data packets included in the first data packet group, and the first data packet group is a data packet group that is sent by the first node to the second node.
步骤S202、当所述第一数据包组中的数据包发送完毕后,所述第一节点向所述第二节点发送第二数据包,所述第二数据包不属于所述第一数据包组。Step S202, after the data packet in the first data packet group is sent, the first node sends a second data packet to the second node, where the second data packet does not belong to the first data packet. group.
本实施例中各步骤的执行主体为第一节点,在实际中,该第一节点可以是MPLS域中的LSR,它可以是LSP上除尾节点外的任意节点,即它可以是确定LSP上的头节点或中间节点。The executor of each step in this embodiment is the first node. In practice, the first node may be an LSR in the MPLS domain, which may be any node except the tail node on the LSP, that is, it may be determined on the LSP. Head node or intermediate node.
本实施例中,第一节点可以不向第二节点发送LMM消息来测量丢包 数,而是可以直接通过所发送的第一数据包来标识该数据包所属的第一数据包组以及该数据包组中的第一数据包数量。In this embodiment, the first node may not send an LMM message to the second node to measure the packet loss. Instead, the first data packet to which the data packet belongs and the first data packet number in the data packet group can be identified directly by the first data packet sent.
可选地,所述第一节点向第二节点发送第一数据包组中的第一数据包之前,还包括:Optionally, before the sending, by the first node, the first data packet in the first data packet group to the second node, the method further includes:
所述第一节点采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。所述第一数据包组中的每个数据包都封装有所述特殊标签。The first node encapsulates the first data packet by using a special label, where the special label includes a sequence number of the first data packet group and the first data packet number. Each of the first packet group is encapsulated with the special tag.
所述第一节点对所述第一数据包组中的数据包进行连续发送,即所述第一节点发送了所述第一数据包组中的第一个数据包后,连续发送所述第一数据包组中的其他数据包。相应地,所述第二节点在接收到所述第一节点发送的所述第一数据包组的第一个数据包后,会连续接收到所述第一数据包组中的其他数据包。The first node continuously sends the data packet in the first data packet group, that is, after the first node sends the first data packet in the first data packet group, the first node continuously sends the first data packet. Other packets in a packet group. Correspondingly, after receiving the first data packet of the first data packet group sent by the first node, the second node continuously receives other data packets in the first data packet group.
在该第二节点接收到第一节点发送的第二数据包后,第二节点需要确定上述第二数据包是否属于第一数据包组。当所述第二节点判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,当所述第二节点判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。After the second node receives the second data packet sent by the first node, the second node needs to determine whether the second data packet belongs to the first data packet group. When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet When the sequence number of the second data packet group to which the two data packets belong is different from the sequence number of the first data packet group, it is determined that the second data packet does not belong to the first data packet group.
具体的,若第二数据包与第一数据包的类型相同,即第二数据包包含所述第一数据包组的序列号和所述第一数据包数量,那么此时第一节点在发送第二数据包时,只需重复执行步骤S200和步骤S201即可;若第二数据包为正常数据包,即该第二数据包并未包含所述第一数据包组的序列号和所述第一数据包数量,此时第一节点可以执行现有技术中对正常数据包的转发操作。Specifically, if the second data packet is of the same type as the first data packet, that is, the second data packet includes the sequence number of the first data packet group and the first data packet number, then the first node is sending In the case of the second data packet, only step S200 and step S201 may be repeatedly performed; if the second data packet is a normal data packet, that is, the second data packet does not include the sequence number of the first data packet group and the The first number of data packets, at which time the first node can perform forwarding operations on normal data packets in the prior art.
由于第一数据包携带所述第一数据包组的序列号和所述第一数据包数量,因此,第二节点可以根据接收到的第一数据包和第二数据包,确定其接收到的第一数据包组的第二数据包数量,并根据上述第一数据包数量和第二数据包数量确定第一数据包组的丢包数。Since the first data packet carries the sequence number of the first data packet group and the first data packet number, the second node may determine, according to the received first data packet and the second data packet, the received The second packet number of the first packet group, and determining the number of packet loss of the first packet group according to the first packet number and the second packet number.
上述实施例通过发送包含序列号和第一数据包数量的第一数据包,使得第二节点可以获取第一数据包所在的第一数据包组和第一数据包组的 第一数据包数量,并根据接收的第一数据包和第二数据包,确定第一数据包组的丢包数,由于所述第二节点只有在接收到不属于所述第一数据包组的所述第二数据包时,才进行丢包检测,有利于在负载分担场景下,提高丢包测量结果的准确性。In the above embodiment, the first data packet including the sequence number and the first data packet number is sent, so that the second node can acquire the first data packet group and the first data packet group where the first data packet is located. The first number of data packets, and determining the number of packet loss of the first data packet group according to the received first data packet and the second data packet, because the second node only receives the first data packet group The packet loss detection is performed only when the second data packet is used, which is beneficial to improving the accuracy of the packet loss measurement result in the load sharing scenario.
图3为本发明实施例提供的一种第一节点和第二节点交互流程图示意图。如图3所示,该交互流程包括以下步骤:FIG. 3 is a schematic flowchart of interaction between a first node and a second node according to an embodiment of the present invention. As shown in FIG. 3, the interaction process includes the following steps:
步骤S300、第一节点确定第一数据包组内所包含的第一数据包数量。Step S300: The first node determines a quantity of the first data packet included in the first data packet group.
在上述步骤中,执行主体为第一节点,在实际中,该节点可以是MPLS域中的LSR。In the above steps, the execution subject is the first node, and in practice, the node may be an LSR in the MPLS domain.
具体的,第一数据包可以包含其所属的该第一数据包组的序列号和所述第一数据包数量。该第一数据包数量可以通过以下方式来标识:Specifically, the first data packet may include a sequence number of the first data packet group to which it belongs and the first data packet number. The first number of packets can be identified by:
第一数据包包含发送计数x,那么,可选的,第一节点在每轮统计中的发包数量,即上述第一数据包数量可以表示为10x+1,若用8比特表示x,那么第一节点每轮统计至少需要发送10个报文,至多发送10256个报文,第一节点每轮统计中的发包数量即为第一数据包数量。第一节点可以根据***配置的流量大小和统计时长,自动计算出每轮统计中发送的第一数据包包含的发送计数。例如,假设***的流量大小为1万包每秒,***配置的统计时长为30秒,也就是说,此时一轮统计需要传30万个数据包。那么,第一节点根据10x+1=300000计算出x的值,从而便可确定第一数据包包含的发送计数。此外,在实际中,第一节点在每轮统计中可以对发送的第一数据包进行计数,以记录其发送的第一数据包的个数,当第一数据包的个数到达10x+1个时,第一节点即可确定该轮统计的第一数据包发送完毕。The first data packet includes a transmission count x, then, optionally, the number of packets sent by the first node in each round of statistics, that is, the number of the first data packet can be expressed as 10 x +1 , and if 8 bits are used to represent x, then The first node needs to send at least 10 packets per round of statistics, and at most 10256 packets are sent. The number of packets sent in the statistics of each round of the first node is the number of first packets. The first node can automatically calculate the transmission count included in the first data packet sent in each round of statistics according to the traffic size and the statistical duration configured by the system. For example, suppose the system traffic size is 10,000 packets per second, and the system configuration statistics duration is 30 seconds, that is, at this time, one round of statistics needs to transmit 300,000 data packets. Then, the first node calculates the value of x according to 10 x+1 =300,000, so that the transmission count included in the first data packet can be determined. In addition, in practice, the first node may count the first data packet sent in each round of statistics to record the number of first data packets sent by the first node, when the number of the first data packet reaches 10 x+ When one is available, the first node can determine that the first data packet of the round is sent.
需要说明的是,由于每轮统计中,上述第一数据包数量为10x+1,但在实际中,第一节点有可能发送的第一数据包不足10x+1个,也就是说,虽然第一节点发送的第一数据包包含的发送计数为x,但其实际发送的第一数据包个数为n,该n值小于10x+1个,此时如果接收第一数据包的第二节点根据上述发送计数确定该轮统计中第一节点发送的第一数据包个数,并计算第一数据包组的丢包数,就会误以为第一节点没有发送的10x+1-n个为丢失的数据包,从而导致丢包数统计不准确。可选的,第一节点可以自己构造10x+1-n个无效数据包,使得其发送的第一数据包的总数为10x+1,并将上述 10x+1个第一数据包发送出去。以第一节点需要发30万个第一数据包为例,比如此时用10x+1=300000计算x的值,由于没有正整数能够满足上述等式,因此可以取一个近似的整数解,如x等于5,此时10x+1表示100万个数据包,但第一节点需要发送的第一数据包的总数只有30万个,可选的,第一节点可以自己构造70万个无效数据包,使得其发送的总数据包个数为100万个,并将上述100万个数据包发送出去。具体的,第一节点首先发送上述30万个第一数据包,并在发送第一个第一数据包时,就启动一个定时器,若定时器到达时间时,第一节点发送的第一数据包个数不到100万个,则此时第一节点可以自己构造70万个无效数据包,并将其发送出去。由于第一节点共发送了100万个数据包,因此第二节点可以根据接收到的第一数据包包含的发送计数x=5,获取第一节点发送的第一数据包组的第一数据包数量为100万个。It should be noted that, in each round of statistics, the number of the first data packet is 10 x +1 , but in practice, the first data packet that the first node may send is less than 10 x+1 , that is, The first data packet sent by the first node includes a transmission count of x, but the number of first data packets actually sent is n, and the value of n is less than 10 x+1 , and if the first data packet is received, The second node determines, according to the foregoing sending count, the number of first data packets sent by the first node in the round of statistics, and calculates the number of lost packets of the first data packet group, and mistakes the 10 x+1 that is not sent by the first node. -n are lost packets, resulting in inaccurate statistics on packet loss. Optionally, the first node may construct 10 x+1 -n invalid data packets by itself, so that the total number of first data packets sent by the first node is 10 x+1 , and the above 10 x+1 first data packets are sent. Go out. For example, if the first node needs to send 300,000 first data packets, for example, the value of x is calculated by 10 x +1 = 30000. Since no positive integer can satisfy the above equation, an approximate integer solution can be taken. If x is equal to 5, 10 x +1 represents 1 million packets, but the total number of first packets that the first node needs to send is only 300,000. Optionally, the first node can construct 700,000 invalid. The data packet is such that the total number of data packets transmitted is 1 million, and the above 1 million data packets are transmitted. Specifically, the first node first sends the foregoing 300,000 first data packets, and when the first first data packet is sent, starts a timer, and if the timer reaches the time, the first data sent by the first node If the number of packages is less than 1 million, the first node can construct 700,000 invalid data packets and send them out. Since the first node sends a total of 1 million data packets, the second node may obtain the first data packet of the first data packet group sent by the first node according to the received transmission count x=5 of the received first data packet. The number is 1 million.
此外,10x+1只是第一节点和第二节点约定的一种计数方式,实际操作中不一定使用该公式,也可以用其他收发端公知的计算公式。In addition, 10 x+1 is only a counting method agreed by the first node and the second node, and the formula is not necessarily used in actual operation, and a calculation formula known by other transceivers may also be used.
步骤S301、第一节点采用特殊标签对第一数据包进行封装。Step S301: The first node encapsulates the first data packet by using a special label.
具体的,第一节点可以用特殊标签对第一数据包进行封装,并且,该特殊标签中可以包含第一数据包组的序列号和第一数据包数量。可选的,第一节点可以为第一数据包组中的每个数据包都封装上述特殊标签。不同类型的特殊标签可以具有不同的格式,以MPLS标签为例:MPLS标签长度是固定的,用于唯一标识一个分组所属的转发等价类(Forwarding Equivalence Class,简称FEC)。通常标签的长度为4个字节,即32比特。本发明实施例中,可以对现有的MPLS类型的特殊标签所包含的32位比特进行重新定义,图4为本发明实施例提供的MPLS特殊标签格式示意图。如图4所示,该特殊标签可以包括:Specifically, the first node may encapsulate the first data packet by using a special label, and the special label may include a sequence number of the first data packet group and a first data packet number. Optionally, the first node may encapsulate the special label for each data packet in the first data packet group. Different types of special tags can have different formats. Take the MPLS label as an example: the MPLS label length is fixed, and is used to uniquely identify a Forwarding Equivalence Class (FEC) to which a packet belongs. Usually the length of the tag is 4 bytes, ie 32 bits. In the embodiment of the present invention, the 32-bit bit included in the existing MPLS type special label may be redefined. FIG. 4 is a schematic diagram of the MPLS special label format provided by the embodiment of the present invention. As shown in FIG. 4, the special label may include:
特殊标签值(Special Label),该特殊标签值可以为一保留标签;Special label value, which can be a reserved label;
序列号(Seq),用于携带该第一数据包组的序列号;a serial number (Seq) for carrying the serial number of the first data packet group;
栈底标记(S),栈底标识;Stack bottom mark (S), stack bottom mark;
发送计数(Tx count),用于标识该第一数据包数量。Send count (Tx count), used to identify the first number of packets.
其中,特殊标签值可以用于表示当前标签是否为特殊标签,它的长度为20比特,在实际使用时,该值可以取MPLS标签堆栈编码即RFC3032 中规定的4-15这几个保留标签中,尚未被其他协议占用的一个标签。需要说明的是,只要第一节点发送给第二节点的数据包被封装了上述特殊标签,无论它们是否属于同一数据包组,它们的特殊标签值都是相同的;序列号用于标识第一数据包所属的第一数据包组,它的长度为3比特,不同数据包组的数据包所封装的MPLS标签可以对应不同的序列号,第一节点发送完一组数据包后,会将这个序列号做递增处理,以便于区分不同数据包所在的不同数据包组;栈底标记可以与现有技术定义相同,表示MPLS支持标签的分层结构,即支持多层标签,它的长度为1比特,当值为1时表示是最底层标签;发送计数可以用于标识第一数据包组的第一数据包数量,它的长度为8比特。The special label value can be used to indicate whether the current label is a special label, and its length is 20 bits. In actual use, the value can be taken as an MPLS label stack code, that is, RFC3032. Among the several reserved labels specified in 4-15, one label that has not been occupied by other protocols. It should be noted that, as long as the data packets sent by the first node to the second node are encapsulated with the above special labels, their special label values are the same regardless of whether they belong to the same data packet group; the serial number is used to identify the first The first packet group to which the data packet belongs is 3 bits long. The MPLS labels encapsulated in the data packets of different data packet groups may correspond to different serial numbers. After the first node sends a group of data packets, the first node sends the data packet. The serial number is incrementally processed to distinguish different packet groups in which different data packets are located; the bottom mark can be the same as the prior art definition, indicating that the MPLS supports the hierarchical structure of the label, that is, supports the multi-layer label, and its length is 1 Bit, when the value is 1, indicates the lowest level label; the transmission count can be used to identify the first number of data packets of the first data packet group, and its length is 8 bits.
步骤S302、第一节点向第二节点发送第一数据包组中的第一数据包。Step S302: The first node sends the first data packet in the first data packet group to the second node.
该步骤与步骤S201的描述相同,在此不再赘述。This step is the same as the description of step S201, and details are not described herein again.
步骤S303、第一节点向第二节点发送第二数据包。Step S303: The first node sends a second data packet to the second node.
具体的,第一节点在发送完第一数据包组中的第一数据包后,还可以向第二节点发送第二数据包,该第二数据包并不属于该第一数据包组。Specifically, after the first node sends the first data packet in the first data packet group, the first node may further send the second data packet to the second node, where the second data packet does not belong to the first data packet group.
第一节点在发送完第一数据包组中的数据包后,可以根据实际需要,对上述第二数据包进行两种不同的处理。一种是终止为第二数据包组中的第二数据包封装特殊标签,而只是按照确定的LSP路径完成转发,此时的第二数据包即为没有封装特殊标签的正常数据包,这种处理方式适用于按需统计,即一次性统计,也就是***只需要对第一数据包组的丢包数进行统计;另一种情况是,若***配置的统计需求为连续性统计,也就是需要进行多轮统计,那么,第一节点在发完上述第一数据包组之后,就要为下一次统计做准备。可选的,第一节点可以对第二数据包组的第二数据包包含的序列号做循环递增处理,并重复上述步骤S300~S302发送第二数据包。例如,第一节点为第一数据包组中的第一数据包封装了序列号为0的特殊标签,那么在为第二数据包组的数据包封装特殊标签时,就将该第二数据包组中的数据包的序列号递增为1,当还有多个数据包组时,也对后续的每组数据包做类似递增处理即可。需要说明的是,由于特殊标签的序列号为3比特,因此只能表示0-7这8个不同数字,因此,当序列号递增至7后,第一节点在为后续数据包组内的数据包封装特殊标签时,需将序 列号重新置为0,以上过程即为序列号的循环递增过程。此外,这里并不限定第一节点发送的数据包组的个数,当发送多个不同的数据包组时,第二节点可以对每个数据包组中的数据包重复上述步骤S300~S302的操作。After transmitting the data packet in the first data packet group, the first node may perform two different processing on the second data packet according to actual needs. One is to terminate the special label for the second data packet in the second data packet group, but to complete the forwarding according to the determined LSP path, and the second data packet at this time is a normal data packet without the special label encapsulated. The processing mode is applicable to on-demand statistics, that is, one-time statistics, that is, the system only needs to count the number of packets lost in the first packet group. In another case, if the statistical requirements of the system configuration are continuous statistics, that is, If multiple rounds of statistics are needed, the first node prepares for the next statistics after sending the first packet group. Optionally, the first node may perform a cyclic increment process on the sequence number included in the second data packet of the second data packet group, and repeat the foregoing steps S300-S302 to send the second data packet. For example, the first node encapsulates a special label with a sequence number of 0 for the first data packet in the first data packet group, and then the second data packet is encapsulated when the special data label is encapsulated for the data packet of the second data packet group. The sequence number of the data packet in the group is incremented to 1. When there are more than one data packet group, the subsequent each data packet is similarly incremented. It should be noted that since the serial number of the special label is 3 bits, only 8 different numbers of 0-7 can be represented. Therefore, when the serial number is incremented to 7, the first node is in the data of the subsequent data packet group. When packaging a special label, it is necessary to order The column number is reset to 0, and the above process is the cyclic increment process of the serial number. In addition, the number of data packet groups sent by the first node is not limited herein. When multiple different data packet groups are sent, the second node may repeat the above steps S300-S302 for the data packets in each data packet group. operating.
步骤S304、第二节点接收第一节点发送的第一数据包。Step S304: The second node receives the first data packet sent by the first node.
步骤S305、第二节点接收第一节点发送的第二数据包。Step S305: The second node receives the second data packet sent by the first node.
步骤S306、第二节点判断第二数据包是否属于第一数据包组。Step S306: The second node determines whether the second data packet belongs to the first data packet group.
当所述第二节点判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,当所述第二节点判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or when the second node determines the first data packet When the sequence number of the second data packet group to which the two data packets belong is different from the sequence number of the first data packet group, it is determined that the second data packet does not belong to the first data packet group.
步骤S307、第二节点启动特定时长定时器,当定时器到期后,第二节点统计接收到的属于第一数据包组的第二数据包数量。Step S307: The second node starts a specific duration timer. After the timer expires, the second node counts the received second data packet belonging to the first data packet group.
由于第一节点发送的不同数据包不一定按照发送的顺序到达第二节点,所以第二节点需要等待一段时间以接收同一数据包组内延迟的数据包,以便更准确的测量丢包数。Since different data packets sent by the first node do not necessarily arrive at the second node in the order of transmission, the second node needs to wait for a period of time to receive the delayed data packets in the same data packet group, so as to more accurately measure the number of lost packets.
可选的,第二节点可以启动一个特定时长的定时器,若定时器到期之前,未接到第一数据包所属的第一数据包组内的数据包,则在定时器到期后,统计接收到的第一数据包组的第二数据包数量。Optionally, the second node may start a timer of a specific duration, and if the data packet in the first packet group to which the first data packet belongs is not received before the timer expires, after the timer expires, Counting the number of second packets of the received first packet group.
举例来说,假设用于标识第一数据包组的序列号从0开始计数,第二节点先接到一些序列号为0的数据包,也就是属于第一数据包组的第一数据包,接着又有一个序列号为1的第二数据包到达,也就是属于第二数据包组的数据包,或者又有一个没有封装特殊标签的第二数据包到达,根据步骤S306的描述,第二节点需要比对其接收的第二数据包与第一数据包的序列号是否相同,若第二数据包为序列号为1的数据包,由于第一数据包的序列号是0,因此,第二节点可以启动一个定时器,当定时器到期后,第二节点统计接收到的属于第一数据包组的第二数据包数量。For example, suppose that the sequence number used to identify the first packet group starts from 0, and the second node first receives some data packets with sequence number 0, that is, the first data packet belonging to the first data packet group. Then, a second data packet with the sequence number 1 arrives, that is, the data packet belonging to the second data packet group, or another second data packet without the special label is encapsulated, according to the description of step S306, the second The node needs to be the same as the sequence number of the first data packet received by the node, and if the second data packet is the data packet with the sequence number 1, since the sequence number of the first data packet is 0, therefore, The two nodes can start a timer. When the timer expires, the second node counts the received second packet number belonging to the first packet group.
具体的,定时器是为了让第二节点等待一段特定时长的时间,若在上述特定时间内没有收到第一数据包组的数据包,那么在定时器到期时,读取步骤S304中针对第一数据包组的统计计数值,即为第二节点接收到的第一数据包组中的第二数据包数量。 Specifically, the timer is for the second node to wait for a certain period of time. If the data packet of the first data packet group is not received within the specific time, the timer is read in step S304 when the timer expires. The statistical count value of the first data packet group is the second data packet number in the first data packet group received by the second node.
进一步地,若在定时器还未到期时,第二节点又收到了和第一数据包具有相同的序列号的数据包,比如第二节点在收到序列号为1的第二数据包或未封装特殊标签的第二数据包后,又收到一个序列号为0的第一数据包,此时,根据步骤S304的描述,第二节点会对该第一数据包进行计数,也就是将针对第一数据包组的统计计数值加1,同时,可以将该定时器关闭。若之后第二节点又接收到第三数据包,该第三数据包属于第一数据包组,那么第一节点仍旧重复上述计数操作,直到接到一个不是第一数据包组内的数据包或没有封装特殊标签的正常数据包,此时第二节点再启动上述定时器,并重复步骤S307的操作。Further, if the timer has not expired, the second node receives the data packet with the same sequence number as the first data packet, for example, the second node receives the second data packet with the sequence number 1 or After the second data packet of the special label is not encapsulated, the first data packet with the sequence number 0 is received. At this time, according to the description of step S304, the second node counts the first data packet, that is, The statistics counter value of the first packet group is incremented by 1, and the timer can be turned off. If the second node receives the third data packet again, and the third data packet belongs to the first data packet group, the first node still repeats the foregoing counting operation until receiving a data packet that is not in the first data packet group or There is no normal data packet encapsulating the special label. At this time, the second node starts the above timer again, and repeats the operation of step S307.
需要说明的是,上述定时器的特定时长是根据实际情况,例如实际的网络拥塞状况等设定的,例如60秒或120秒等。It should be noted that the specific duration of the timer is set according to actual conditions, such as actual network congestion conditions, for example, 60 seconds or 120 seconds.
步骤S308、第二节点根据第一数据包数量和第二数据包数量确定第一数据包组的丢包数。Step S308: The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
具体的,第二节点可以从第一数据包的发送计数中获取第一数据包组包含的第一数据包量,并且,经过步骤S307的操作,第二节点可以确定其接收的第一数据包组的第二数据包量,因此,对应的第一数据包组的丢包数即为:Specifically, the second node may obtain the first data packet quantity included in the first data packet group from the transmission count of the first data packet, and after the operation of step S307, the second node may determine the first data packet that is received by the second node. The second packet amount of the group, therefore, the corresponding packet loss number of the first packet group is:
Z=X-Y,其中,X表示第一数据包数量,Y表示第二数据包数量,Z表示丢包数。Z=X-Y, where X represents the number of first packets, Y represents the number of second packets, and Z represents the number of packets lost.
为了更清楚的说明该第二节点的几种不同工作状态,本实施例提供了第二节点的状态切换图。如图5所示,第二节点的状态有四种:初始状态、统计状态、等待状态和结束状态。In order to more clearly illustrate several different working states of the second node, the embodiment provides a state switching diagram of the second node. As shown in FIG. 5, there are four states of the second node: an initial state, a statistical state, a waiting state, and an ending state.
具体的,初始状态表示第二节点未使能丢包统计功能时的始发状态,当第二节点收到第一数据包组的封装了特殊标签的第一数据包时,它会启动计数器,并进入统计状态,当第二节点处于统计状态时,若该第二节点收到序列号与第一数据包相同的数据包,会将对应于该第一数据包组的收包计数器加1;若该第二收到的第二数据包序列号与该第一数据包组的序列号不同,会启动针对第一数据包组的定时器,进入等待状态,该等待状态是指第二节点会等待一段时间,以接收延迟的第一数据包组中的数据包。当第二节点处于等待状态时,若定时器还未到期,而第二节点又收到 了第一数据包组内的数据包,则它会从等待状态切换至统计状态,然后对接收到的该第一数据包组的数据数量计数。若定时器到期,那么,第二节点会从等待状态进入结束状态,并在该状态进行统计结果的上报,即上报实际接收的第一数据包组的数据包数量。需要说明的是,统计状态、等待状态和结束状态都可以通过人为的去使能该节点的统计功能的操作,而恢复到初始状态。Specifically, the initial state indicates an initial state when the second node does not enable the packet loss statistics function, and when the second node receives the first packet encapsulated with the special label of the first packet group, it starts the counter. And entering the statistical state, when the second node is in the statistical state, if the second node receives the same data packet with the serial number and the first data packet, the receiving counter corresponding to the first data packet group is incremented by one; If the second received second packet sequence number is different from the sequence number of the first packet group, a timer for the first packet group is started, and a waiting state is entered, where the waiting state refers to the second node Wait a while to receive the delayed packets in the first packet group. When the second node is in the waiting state, if the timer has not expired, and the second node receives again After the data packet in the first packet group, it switches from the waiting state to the statistical state, and then counts the received data of the first packet group. If the timer expires, the second node enters the end state from the waiting state, and reports the statistical result in the state, that is, reports the number of data packets of the first data packet group actually received. It should be noted that the statistical state, the waiting state, and the ending state can be restored to the initial state by artificially enabling the operation of the statistical function of the node.
可选的,在实际操作中,由于本实施例并未限定第二节点为LSP的尾节点,因此,LSP上除第一节点外的任意节点都可作为第二节点,因而该类节点都可以进行丢包数的测量,也就是说,采用本发明实施例的方案,不仅可以知道LSP路径上从第一节点到任意节点之间的丢包数,还可以通过任意两个节点上报的第二数据包数量相减,得到任意两节点间的丢包数。Optionally, in actual operation, since the second node is not the tail node of the LSP, any node except the first node on the LSP can be used as the second node, and thus the node can be The measurement of the number of packet loss is performed, that is, the solution of the embodiment of the present invention can not only know the number of lost packets from the first node to any node on the LSP path, but also the second reported by any two nodes. The number of packets is subtracted, and the number of packets lost between any two nodes is obtained.
此外,可以通过在上述第一节点到第二节点之间的LSP路径所在的网络区域增加一台设备做公共服务器,或者使用已有的网管***,来实现第二节点的统计上报。具体的,当所有使能了统计功能的第二节点在本轮统计结束后,都将各自统计的第二数据包数量汇总到公共服务器或网管上。这个功能的增强可以方便用户定位到具体丢包的故障段。In addition, the second node may be reported by adding a device as a public server in the network area where the LSP path between the first node and the second node is located, or by using an existing network management system. Specifically, when all the second nodes enabled with the statistics function finish the statistics of the current round, the second data packet counted by each is summarized on the public server or the network management. This feature enhancement allows the user to locate the faulty segment of a specific packet loss.
步骤S309、第二节点解封装第一数据包的特殊标签。Step S309, the second node decapsulates the special label of the first data packet.
可选的,第二节点除了可以使能统计功能进行统计上报,还可以使能删除功能,为第一数据包解封装该特殊标签。Optionally, the second node can enable the statistics function to perform statistical reporting, and can also enable the deletion function to decapsulate the special label for the first data packet.
具体的,若第二节点使能了删除功能,那么,该第二节点便上述确定LSP的路径终点,也就是说,当有特殊标签的第一数据包到达上述第二节点后,该第二节点不仅会进行统计上报,与此同时,它还会将第一数据包的特殊标签去除,以使得后续沿着该确定LSP转发的数据包恢复成正常封装,不再携带有特殊标签。Specifically, if the second node enables the deletion function, the second node determines the path end point of the LSP, that is, when the first data packet with the special label reaches the second node, the second The node not only performs statistical reporting, but also removes the special label of the first data packet, so that the data packet that is subsequently forwarded along the determined LSP is restored to the normal encapsulation and no special label is carried.
在本发明实施例中,该第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,当所述第二节点接收到不属于所述第一数据包组的第二数据包时,统计接收到的属于所述第一数据包组的第二数据包数量,所述第二节点根据所述第一数据包数量和所述第二数据包数量确定 所述第一数据包组的丢包数,由于所述第二节点只有在接收到不属于所述第一数据包组的所述第二数据包时,才进行丢包检测,有利于在负载分担场景下,提高丢包测量结果的准确性。In the embodiment of the present invention, the second node receives the first data packet sent by the first node, the first data packet belongs to the first data packet group, and the first data packet includes the first data packet group. a serial number and a first number of data packets, when the second node receives the second data packet that does not belong to the first data packet group, the received second data packet that belongs to the first data packet group is counted The number, the second node is determined according to the number of the first data packet and the number of the second data packet The number of packet loss of the first data packet group is that the second node only performs packet loss detection when receiving the second data packet that does not belong to the first data packet group, which is beneficial to the load. Improve the accuracy of packet loss measurement results in a shared scenario.
图6为本发明实施例提供的一种第二节点的结构示意图。如图6所示,该第二节点600包括:接收单元610、统计单元611和计算单元612。该第二节点600可以为图1或图2或图3对应的实施例中的第二节点。FIG. 6 is a schematic structural diagram of a second node according to an embodiment of the present invention. As shown in FIG. 6, the second node 600 includes a receiving unit 610, a statistic unit 611, and a calculating unit 612. The second node 600 can be the second node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG. 3.
接收单元610,用于接收第一节点发送的第一数据包,第一数据包属于第一数据包组,第一数据包组为第一节点向第二节点发送的数据包组,第一数据包包含第一数据包组的序列号和第一数据包数量,第一数据包数量用于标识第一数据包组包含的数据包的数量;The receiving unit 610 is configured to receive the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is the data packet group sent by the first node to the second node, where the first data is The packet includes a sequence number of the first packet group and a first packet number, and the first packet number is used to identify the number of data packets included in the first packet group;
接收单元610,还用于接收第一节点发送的第二数据包;The receiving unit 610 is further configured to receive the second data packet sent by the first node;
统计单元611,用于确定第二数据包不属于第一数据包组时,统计接收到的属于第一数据包组的第二数据包数量;The statistics unit 611 is configured to determine, when the second data packet does not belong to the first data packet group, the number of the second data packets that belong to the first data packet group.
计算单元612,用于根据第一数据包数量和第二数据包数量确定第一数据包组的丢包数。The calculating unit 612 is configured to determine the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
进一步地,第一数据包组中每个数据包封装有特殊标签,特殊标签包含第一数据包组的序列号和第一数据包数量。Further, each data packet in the first data packet group is encapsulated with a special label, and the special label includes a serial number of the first data packet group and a first data packet number.
更进一步地,统计单元611具体用于当定时单元启动的定时器到期后,确定接收到的属于第一数据包组的第二数据包数量。Further, the statistics unit 611 is specifically configured to determine, after the timer started by the timing unit expires, the received second data packet belonging to the first data packet group.
更进一步地,计算单元612具体用于:Further, the calculating unit 612 is specifically configured to:
对应第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
其中,X表示第一数据包数量,Y表示第二数据包数量,Z表示丢包数。Where X represents the number of first packets, Y represents the number of second packets, and Z represents the number of lost packets.
可选地,参见图7,该第二节点600还可以包括:Optionally, referring to FIG. 7, the second node 600 may further include:
计数单元710,用于对接收的属于第一数据包组的数据包进行计数统计,相应地,根据统计的第一数据包组的数据包数量确定第二数据包数量。The counting unit 710 is configured to count statistics of the received data packets belonging to the first data packet group, and accordingly, determine the second data packet quantity according to the statistical data packet number of the first data packet group.
可选地,参见图8,该第二节点600还可以包括:Optionally, referring to FIG. 8, the second node 600 may further include:
确定单元810,用于当判断第二数据包没有封装特殊标签时,确定第二数据包不属于第一数据包组,或者,当判断第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定第二数据包不属于第 一数据包组。The determining unit 810 is configured to: when determining that the second data packet does not encapsulate the special label, determine that the second data packet does not belong to the first data packet group, or determine the sequence number of the second data packet group to which the second data packet belongs When the sequence number of the first packet group is different, it is determined that the second packet does not belong to the first A packet group.
可选地,参见图9,该第二节点600还可以包括:Optionally, referring to FIG. 9, the second node 600 may further include:
定时单元910,用于启动特定时长定时器,当定时器到期后,确定接收到的属于第一数据包组的第二数据包数量。The timing unit 910 is configured to start a specific duration timer, and when the timer expires, determine the number of the second data packets that belong to the first data packet group.
在本发明实施例中,通过发送包含有所述第一数据包组序列号和第一数据包数量的第一数据包,使得第二节点600可以获取第一数据包所在的第一数据包组和第一数据包组的第一数据包数量,并根据接收的第一数据包和第二数据包,确定第一数据包组的丢包数,由于所述第二节点600只有在接收到不属于所述第一数据包组的所述第二数据包时,才进行丢包检测,有利于在负载分担场景下,提高丢包测量结果的准确性。In the embodiment of the present invention, the first data packet including the first data packet group serial number and the first data packet number is sent, so that the second node 600 can acquire the first data packet group where the first data packet is located. And determining a number of packet loss of the first packet group according to the first packet number of the first packet group, and determining, according to the received first packet and the second packet, that the second node 600 only receives the packet When the second data packet belongs to the first data packet group, the packet loss detection is performed, which is beneficial to improving the accuracy of the packet loss measurement result in the load balancing scenario.
图10为本发明实施例提供的一种第一节点的结构示意图。如图10所示,该第一节点1000包括:确定单元1010和发送单元1020。该第一节点1000可以为图1或图2或图3对应的实施例中的第一节点。FIG. 10 is a schematic structural diagram of a first node according to an embodiment of the present invention. As shown in FIG. 10, the first node 1000 includes a determining unit 1010 and a transmitting unit 1020. The first node 1000 may be the first node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG.
确定单元1010,用于确定第一数据包组内所包含的第一数据包数量;a determining unit 1010, configured to determine a quantity of the first data packet included in the first data packet group;
发送单元1020,用于向第二节点发送第一数据包组中的第一数据包,第一数据包包含第一数据包组的序列号和第一数据包数量,第一数据包数量用于标识第一数据包组包含的数据包的数量;The sending unit 1020 is configured to send, to the second node, the first data packet in the first data packet group, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used. Identifies the number of packets included in the first packet group;
发送单元1020,还用于向第二节点发送第二数据包,第二数据包不属于第一数据包组。The sending unit 1020 is further configured to send the second data packet to the second node, where the second data packet does not belong to the first data packet group.
可选地,参见图11,该第一节点1000还包括:Optionally, referring to FIG. 11, the first node 1000 further includes:
封装单元1110,用于在所述发送单元1020向第二节点发送第一数据包组中的第一数据包之前,采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The encapsulating unit 1110 is configured to encapsulate the first data packet by using a special label before the sending unit 1020 sends the first data packet in the first data packet group to the second node, where the special label includes the The serial number of the first packet group and the first packet number.
所述封装单元1110,还用于对所述第一数据包组中的每个数据包封装所述特殊标签。The encapsulating unit 1110 is further configured to encapsulate the special label for each data packet in the first data packet group.
在本发明实施例中,该第一节点1000通过发送包含有所述第一数据包组序列号和第一数据包数量的第一数据包,使得第二节点可以获取第一数据包所在的第一数据包组和第一数据包组的第一数据包数量,并根据接收的第一数据包和第二数据包,确定第一数据包组的丢包数,由于所述第二节点只有在接收到不属于所述第一数据包组的所述第二数据包时,才进 行丢包检测,有利于在负载分担场景下,提高丢包测量结果的准确性。In the embodiment of the present invention, the first node 1000 sends the first data packet including the first packet group serial number and the first data packet number, so that the second node can obtain the first data packet. a first packet number of the data packet group and the first data packet group, and determining the number of packet loss of the first data packet group according to the received first data packet and the second data packet, since the second node is only in the Receiving the second data packet that does not belong to the first data packet group, The packet loss detection is beneficial to improve the accuracy of packet loss measurement results in a load balancing scenario.
参见图12,本发明实施例还提供了一种第二节点结构示意图,该第二节点1200可以为图1或图2或图3对应的实施例中的第二节点。该第二节点1200包括:存储器1201和接收器1202,以及分别与所述存储器1201和所述接收器1202连接的处理器1203,所述存储器1201用于存储一组程序指令,所述处理器1203用于调用所述存储器1201存储的程序指令执行如下操作:Referring to FIG. 12, an embodiment of the present invention further provides a schematic diagram of a second node. The second node 1200 may be the second node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG. The second node 1200 includes a memory 1201 and a receiver 1202, and a processor 1203 connected to the memory 1201 and the receiver 1202, respectively. The memory 1201 is configured to store a set of program instructions, and the processor 1203 The program instructions for invoking the memory 1201 to store perform the following operations:
触发接收器1202接收第一节点发送的第一数据包,第一数据包属于第一数据包组,第一数据包组为第一节点向第二节点发送的数据包组,第一数据包包含第一数据包组的序列号和第一数据包数量,第一数据包数量用于标识第一数据包组包含的数据包的数量;The trigger receiver 1202 receives the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is a data packet group sent by the first node to the second node, where the first data packet includes a sequence number of the first packet group and a first packet number, wherein the first packet number is used to identify the number of data packets included in the first packet group;
接收第一节点发送的第二数据包。Receiving a second data packet sent by the first node.
当所述处理器1203确定第二数据包不属于第一数据包组时,统计接收到的属于第一数据包组的第二数据包数量,并根据第一数据包数量和第二数据包数量确定第一数据包组的丢包数。When the processor 1203 determines that the second data packet does not belong to the first data packet group, the received second data packet number belonging to the first data packet group is counted, and according to the first data packet number and the second data packet number. Determine the number of lost packets in the first packet group.
进一步地,第一数据包组中每个数据包封装有特殊标签,特殊标签包含第一数据包组的序列号和第一数据包数量。Further, each data packet in the first data packet group is encapsulated with a special label, and the special label includes a serial number of the first data packet group and a first data packet number.
更进一步地,处理器1203具体用于当定时单元启动的定时器到期后,确定接收到的属于第一数据包组的第二数据包数量。Further, the processor 1203 is specifically configured to determine, after the timer started by the timing unit expires, the received second data packet belonging to the first data packet group.
更进一步地,处理器1203具体用于:Further, the processor 1203 is specifically configured to:
对应第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
其中,X表示第一数据包数量,Y表示第二数据包数量,Z表示丢包数。Where X represents the number of first packets, Y represents the number of second packets, and Z represents the number of lost packets.
可选地,所述处理器1203可以为中央处理器(Central Processing Unit,简称CPU),所述存储器1201可以为随机访问内存(Random Access Memory,简称RAM)类型的内部存储器,所述接收器1202可以包含普通物理接口,所述物理接口可以为以太网(Ethernet)接口或异步传输模式(Asynchronous Transfer Mode,简称ATM)接口。所述处理器1203、发送器1202和存储器1201可以集成为一个或多个独立的电路或硬件,如:特定用途集成电路(Application Specific Integrated Circuit,简称ASIC)。 Optionally, the processor 1203 may be a central processing unit (CPU), and the memory 1201 may be an internal memory of a random access memory (RAM) type, and the receiver 1202 The physical interface may be an Ethernet (Ethernet) interface or an Asynchronous Transfer Mode (ATM) interface. The processor 1203, the transmitter 1202, and the memory 1201 may be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC).
图13为本发明实施例提供的一种第一节点的结构示意图。如图13所示,该第一节点1300可以为图1或图2或图3对应的实施例中的第一节点。该第一节点1300包括:存储器1301和发送器1302,以及分别与所述存储器1301和所述发送器1302连接的处理器1303,所述存储器1301用于存储一组程序指令,所述处理器1303用于调用所述存储器1301存储的程序指令执行如下操作:FIG. 13 is a schematic structural diagram of a first node according to an embodiment of the present invention. As shown in FIG. 13, the first node 1300 may be the first node in the embodiment corresponding to FIG. 1 or FIG. 2 or FIG. The first node 1300 includes a memory 1301 and a transmitter 1302, and a processor 1303 connected to the memory 1301 and the transmitter 1302, respectively. The memory 1301 is configured to store a set of program instructions, and the processor 1303 The program instructions for invoking the memory 1301 to store perform the following operations:
确定第一数据包组内所包含的第一数据包数量。Determine the number of first packets included in the first packet group.
触发发送器1302向第二节点发送第一数据包组中的第一数据包,第一数据包包含第一数据包组的序列号和第一数据包数量,第一数据包数量用于标识第一数据包组包含的数据包的数量,并向第二节点发送第二数据包,第二数据包不属于第一数据包组。The trigger transmitter 1302 sends the first data packet in the first data packet group to the second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify the first data packet. The number of data packets included in a packet group, and the second data packet is sent to the second node, and the second data packet does not belong to the first data packet group.
所述处理器1303,还用于在所述发送器1302向第二节点发送第一数据包组中的第一数据包之前,采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The processor 1303 is further configured to: after the transmitter 1302 sends the first data packet in the first data packet group to the second node, encapsulate the first data packet by using a special label, where the special label The sequence number of the first packet group and the first packet number are included.
所述处理器1303,还用于对所述第一数据包组中的每个数据包封装所述特殊标签。The processor 1303 is further configured to encapsulate the special label for each data packet in the first data packet group.
可选地,所述处理器1303可以为CPU,所述存储器1301可以为RAM类型的内部存储器,所述发送器1302可以包含普通物理接口,所述物理接口可以为Ethernet接口或ATM接口。所述处理器1303、发送器1302和存储器1301可以集成为一个或多个独立的电路或硬件,如:ASIC。Optionally, the processor 1303 may be a CPU, the memory 1301 may be a RAM type internal memory, and the transmitter 1302 may include a common physical interface, and the physical interface may be an Ethernet interface or an ATM interface. The processor 1303, the transmitter 1302, and the memory 1301 may be integrated into one or more separate circuits or hardware, such as an ASIC.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:只读存储器(Read-Only Memory,简称为ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。It can be understood by those skilled in the art that all or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing storage method may be at least one of the following: a read-only memory (ROM), a RAM, a magnetic disk, or an optical disk, and the like may store the program code. Medium.
最后应说明的是:以上实施例仅用以示例性说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明及本发明带来的有益效果进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替 换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明权利要求的范围。 Finally, it should be noted that the above embodiments are only used to exemplify the technical solutions of the present invention, and are not limited thereto; although the beneficial effects brought by the present invention and the present invention are described in detail with reference to the foregoing embodiments, the field A person of ordinary skill should understand that it is still possible to modify the technical solutions described in the foregoing embodiments, or to replace some of the technical features. The modifications and substitutions do not detract from the nature of the corresponding technical solutions.

Claims (18)

  1. 一种丢包测量的方法,其特征在于,包括:A method for packet loss measurement, comprising:
    第二节点接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量;Receiving, by the second node, the first data packet sent by the first node, where the first data packet belongs to the first data packet group, and the first data packet group is the data packet sent by the first node to the second node The first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a quantity of data packets included in the first data packet group;
    所述第二节点接收所述第一节点发送的第二数据包;Receiving, by the second node, the second data packet sent by the first node;
    当所述第二节点确定所述第二数据包不属于所述第一数据包组时,统计接收到的属于所述第一数据包组的第二数据包数量;When the second node determines that the second data packet does not belong to the first data packet group, the number of received second data packets belonging to the first data packet group is counted;
    所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数。The second node determines the number of lost packets of the first data packet group according to the first data packet number and the second data packet number.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    当所述第二节点接收所述第一数据包组的数据包时,对接收的属于所述第一数据包组的数据包进行计数统计,相应地,根据所述统计的所述第一数据包组的数据包数量确定所述第二数据包数量。When the second node receives the data packet of the first data packet group, counting and receiving the received data packet belonging to the first data packet group, and correspondingly, according to the statistics, the first data The number of packets of the packet group determines the number of the second packet.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一数据包组中每个数据包封装有特殊标签,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The method according to claim 1 or 2, wherein each data packet in the first packet group is encapsulated with a special label, the special label including a sequence number of the first packet group and the The first number of packets.
  4. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    当所述第二节点判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,When the second node determines that the second data packet does not encapsulate the special label, determining that the second data packet does not belong to the first data packet group, or
    当所述第二节点判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。When the second node determines that the sequence number of the second data packet group to which the second data packet belongs is different from the sequence number of the first data packet group, determining that the second data packet does not belong to the first data packet group.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述当所述第二节点确定所述第二数据包不属于所述第一数据包组之后,还包括:The method according to any one of claims 1 to 4, wherein, after the second node determines that the second data packet does not belong to the first data packet group, the method further includes:
    所述第二节点启动特定时长定时器;The second node starts a specific duration timer;
    当所述定时器到期后,所述第二节点统计接收到的属于所述第一数据包组的所述第二数据包数量。 After the timer expires, the second node counts the received number of the second data packets belonging to the first data packet group.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第二节点根据所述第一数据包数量和所述第二数据包数量确定所述第一数据包组的丢包数,具体包括:The method according to any one of claims 1 to 5, wherein the second node determines the packet loss of the first packet group according to the first number of data packets and the second data packet number. The number includes:
    对应所述第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
    其中,所述X表示第一数据包数量,所述Y表示第二数据包数量,所述Z表示所述丢包数。The X represents the number of first data packets, the Y represents the number of second data packets, and the Z represents the number of lost packets.
  7. 一种丢包测量的方法,其特征在于,包括:A method for packet loss measurement, comprising:
    第一节点确定第一数据包组内所包含的第一数据包数量;The first node determines a quantity of the first data packet included in the first data packet group;
    所述第一节点向第二节点发送所述第一数据包组中的第一数据包,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组;Transmitting, by the first node, a first data packet in the first data packet group to a second node, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where The first number of data packets is used to identify the number of data packets included in the first data packet group, and the first data packet group is a data packet group that is sent by the first node to the second node;
    当所述第一数据包组中的数据包发送完毕后,所述第一节点向所述第二节点发送第二数据包,所述第二数据包不属于所述第一数据包组。After the data packet in the first data packet group is sent, the first node sends a second data packet to the second node, where the second data packet does not belong to the first data packet group.
  8. 根据权利要求7所述的方法,其特征在于,所述第一节点向第二节点发送第一数据包组中的第一数据包之前,还包括:The method according to claim 7, wherein before the first node sends the first data packet in the first data packet group to the second node, the method further includes:
    所述第一节点采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The first node encapsulates the first data packet by using a special label, where the special label includes a sequence number of the first data packet group and the first data packet number.
  9. 根据权利要求8所述的方法,其特征在于,所述第一数据包组中的每个数据包都封装有所述特殊标签。The method of claim 8 wherein each of said first set of data packets is encapsulated with said special tag.
  10. 一种第二节点,其特征在于,包括:A second node, comprising:
    接收单元,用于接收第一节点发送的第一数据包,所述第一数据包属于第一数据包组,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量;a receiving unit, configured to receive a first data packet sent by the first node, where the first data packet belongs to a first data packet group, and the first data packet group is sent by the first node to the second node a data packet group, the first data packet includes a sequence number of the first data packet group and a first data packet number, where the first data packet number is used to identify a data packet included in the first data packet group Quantity
    所述接收单元,还用于接收所述第一节点发送的第二数据包;The receiving unit is further configured to receive a second data packet sent by the first node;
    统计单元,用于确定所述第二数据包不属于所述第一数据包组时,统计接收到的属于所述第一数据包组的第二数据包数量;a statistic unit, configured to determine, when the second data packet does not belong to the first data packet group, the number of second data packets that are received by the first data packet group;
    计算单元,用于根据所述第一数据包数量和所述第二数据包数量确定 所述第一数据包组的丢包数。a calculating unit, configured to determine, according to the number of the first data packet and the number of the second data packet The number of lost packets of the first packet group.
  11. 根据权利要求10所述的节点,其特征在于,还包括:The node according to claim 10, further comprising:
    计数单元,用于对接收的属于所述第一数据包组的数据包进行计数统计,相应地,根据所述统计的所述第一数据包组的数据包数量确定所述第二数据包数量。a counting unit, configured to count statistics of the received data packets belonging to the first data packet group, and correspondingly, determine the number of the second data packet according to the statistics, the number of data packets of the first data packet group .
  12. 根据权利要求10或11所述的节点,其特征在于,所述第一数据包组中每个数据包封装有特殊标签,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。The node according to claim 10 or 11, wherein each data packet in the first packet group is encapsulated with a special label, the special label including a sequence number of the first packet group and the The first number of packets.
  13. 根据权利要求12所述的节点,其特征在于,还包括:The node according to claim 12, further comprising:
    确定单元,用于当判断所述第二数据包没有封装所述特殊标签时,确定所述第二数据包不属于所述第一数据包组,或者,a determining unit, configured to: when it is determined that the second data packet does not encapsulate the special label, determine that the second data packet does not belong to the first data packet group, or
    当判断所述第二数据包所属的第二数据包组的序列号与第一数据包组的序列号不同时,确定所述第二数据包不属于所述第一数据包组。When it is determined that the sequence number of the second data packet group to which the second data packet belongs is different from the sequence number of the first data packet group, determining that the second data packet does not belong to the first data packet group.
  14. 根据权利要求10-13任一项所述的节点,其特征在于,还包括:The node according to any one of claims 10 to 13, further comprising:
    定时单元,用于启动特定时长定时器;a timing unit for starting a specific duration timer;
    所述统计单元具体用于当所述定时单元启动的所述定时器到期后,确定接收到的属于所述第一数据包组的所述第二数据包数量。The statistic unit is specifically configured to determine, after the timer started by the timing unit expires, the received number of the second data packets belonging to the first data packet group.
  15. 根据权利要求10-14任一项所述的节点,其特征在于,所述计算单元具体用于:The node according to any one of claims 10 to 14, wherein the calculating unit is specifically configured to:
    对应所述第一数据包组的丢包数为Z=X-Y;The number of lost packets corresponding to the first packet group is Z=X-Y;
    其中,所述X表示第一数据包数量,所述Y表示第二数据包数量,所述Z表示所述丢包数。The X represents the number of first data packets, the Y represents the number of second data packets, and the Z represents the number of lost packets.
  16. 一种第一节点,其特征在于,包括:A first node, comprising:
    确定单元,用于确定第一数据包组内所包含的第一数据包数量;a determining unit, configured to determine a quantity of the first data packet included in the first data packet group;
    发送单元,用于向第二节点发送所述第一数据包组中的第一数据包,所述第一数据包包含所述第一数据包组的序列号和第一数据包数量,所述第一数据包数量用于标识所述第一数据包组包含的数据包的数量,所述第一数据包组为所述第一节点向所述第二节点发送的数据包组;a sending unit, configured to send, to the second node, the first data packet in the first data packet group, where the first data packet includes a sequence number of the first data packet group and a first data packet number, where The first number of data packets is used to identify the number of data packets included in the first data packet group, and the first data packet group is a data packet group that is sent by the first node to the second node;
    所述发送单元,还用于当所述第一数据包组中的数据包发送完毕后,向所述第二节点发送第二数据包,所述第二数据包不属于所述第一数据包 组。The sending unit is further configured to: after the data packet in the first data packet group is sent, send a second data packet to the second node, where the second data packet does not belong to the first data packet group.
  17. 根据权利要求16所述的节点,其特征在于,还包括:The node according to claim 16, further comprising:
    封装单元,用于在所述发送单元向第二节点发送第一数据包组中的第一数据包之前,采用特殊标签对所述第一数据包进行封装,所述特殊标签包含所述第一数据包组的序列号和所述第一数据包数量。An encapsulating unit, configured to encapsulate the first data packet by using a special label, where the special label includes the first packet, before the sending unit sends the first data packet in the first data packet group to the second node The serial number of the packet group and the number of the first packet.
  18. 根据权利要求17所述的节点,其特征在于,The node of claim 17 wherein:
    所述封装单元,还用于对所述第一数据包组中的每个数据包封装所述特殊标签。 The encapsulating unit is further configured to encapsulate the special label for each data packet in the first data packet group.
PCT/CN2014/093824 2013-12-24 2014-12-15 Method for measuring lost packets and network device WO2015096636A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310722868.8 2013-12-24
CN201310722868.8A CN103684923B (en) 2013-12-24 2013-12-24 The method and the network equipment of a kind of packet loss measurement

Publications (1)

Publication Number Publication Date
WO2015096636A1 true WO2015096636A1 (en) 2015-07-02

Family

ID=50321302

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/093824 WO2015096636A1 (en) 2013-12-24 2014-12-15 Method for measuring lost packets and network device

Country Status (2)

Country Link
CN (1) CN103684923B (en)
WO (1) WO2015096636A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684923B (en) * 2013-12-24 2017-10-17 华为技术有限公司 The method and the network equipment of a kind of packet loss measurement
CN106656644B (en) * 2015-10-28 2020-01-10 华为技术有限公司 Packet loss statistical method and network equipment
CN108345621B (en) * 2017-01-24 2022-03-08 腾讯科技(深圳)有限公司 Data reconciliation method, system and data system
CN111371634B (en) * 2018-12-26 2022-01-18 华为技术有限公司 Communication method, device and system
CN110278058B (en) * 2019-06-05 2020-11-03 华为技术有限公司 Redundant information feedback method and communication device
WO2021051418A1 (en) * 2019-09-21 2021-03-25 Huawei Technologies Co., Ltd. Methods and network nodes for reliability measurement
CN111158300B (en) * 2019-11-20 2021-03-23 福建星云电子股份有限公司 Data acquisition and reduction method
CN112737884B (en) * 2020-12-28 2022-11-11 北京达佳互联信息技术有限公司 Method for forwarding data and detecting network performance and related device
WO2024065550A1 (en) * 2022-09-29 2024-04-04 北京小米移动软件有限公司 Packet loss handling method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699786A (en) * 2009-10-15 2010-04-28 华为技术有限公司 Method, device and system for detecting packet loss
CN101719850A (en) * 2009-11-04 2010-06-02 中兴通讯股份有限公司 Device and method for carrying out statistics on Ethernet packet loss rate as well as message switching device
CN102868576A (en) * 2012-09-26 2013-01-09 电子科技大学 Method for measuring downlink packet loss rate of access link of broadband network user
CN102904775A (en) * 2012-09-29 2013-01-30 华为技术有限公司 Method, apparatus and system for measuring network packet loss
CN103684923A (en) * 2013-12-24 2014-03-26 华为技术有限公司 Method for measuring packet loss and network device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6662223B1 (en) * 1999-07-01 2003-12-09 Cisco Technology, Inc. Protocol to coordinate network end points to measure network latency
CN102546081B (en) * 2010-12-21 2015-09-16 中兴通讯股份有限公司 Method for detecting packet loss, system and media client
CN102404166B (en) * 2011-10-27 2015-04-08 华为技术有限公司 Packet loss detecting method and system as well as transmitting equipment and receiving equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699786A (en) * 2009-10-15 2010-04-28 华为技术有限公司 Method, device and system for detecting packet loss
CN101719850A (en) * 2009-11-04 2010-06-02 中兴通讯股份有限公司 Device and method for carrying out statistics on Ethernet packet loss rate as well as message switching device
CN102868576A (en) * 2012-09-26 2013-01-09 电子科技大学 Method for measuring downlink packet loss rate of access link of broadband network user
CN102904775A (en) * 2012-09-29 2013-01-30 华为技术有限公司 Method, apparatus and system for measuring network packet loss
CN103684923A (en) * 2013-12-24 2014-03-26 华为技术有限公司 Method for measuring packet loss and network device

Also Published As

Publication number Publication date
CN103684923A (en) 2014-03-26
CN103684923B (en) 2017-10-17

Similar Documents

Publication Publication Date Title
WO2015096636A1 (en) Method for measuring lost packets and network device
US10819605B2 (en) Method, apparatus, and system for implementing delay measurement
US11228515B2 (en) Data packet detection method, device, and system
KR101492510B1 (en) Multiple delivery route packet ordering
US7668107B2 (en) Hardware implementation of network testing and performance monitoring in a network device
US7730230B1 (en) Floating frame timing circuits for network devices
CN110545241B (en) Message processing method and device
US8270314B2 (en) Synthetic frame loss ratio
US20220407791A1 (en) Network performance detection method and apparatus, and network device
US8774008B2 (en) Real-time network measurement
JP2013516807A (en) Packet loss detection method and apparatus, and router
CN109428782B (en) Network monitoring method and equipment
CN103155488A (en) Delay measurement system and delay measurement method, as well as delay measurement device and delay measurement program
US20150036510A1 (en) Method and device for measuring ethernet performance
EP3188413B1 (en) Method, apparatus, and system for implementing packet loss detection
KR101429991B1 (en) Techniques employing flits for clock gating
US9331927B2 (en) Communication system, communication device, and communication method
US20090310508A1 (en) Real-time network measurement
WO2021057756A1 (en) Delay measurement method, system and storage medium
CN111371634A (en) Communication method, device and system
EP2768187B1 (en) Method for measuring traffic performance indicator and transmission side device
CN114157595B (en) Communication system, data processing method and related equipment
CN113708985B (en) Flow detection method, device and system
CN104243226A (en) Flux counting method and device
CN101159691A (en) Originated multi-protocol label switching packet maximum length determining method and node

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14874803

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14874803

Country of ref document: EP

Kind code of ref document: A1