WO2017032133A1 - 一种丢包率检测方法及装置 - Google Patents

一种丢包率检测方法及装置 Download PDF

Info

Publication number
WO2017032133A1
WO2017032133A1 PCT/CN2016/085150 CN2016085150W WO2017032133A1 WO 2017032133 A1 WO2017032133 A1 WO 2017032133A1 CN 2016085150 W CN2016085150 W CN 2016085150W WO 2017032133 A1 WO2017032133 A1 WO 2017032133A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
loss rate
test
packet loss
packet
Prior art date
Application number
PCT/CN2016/085150
Other languages
English (en)
French (fr)
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 WO2017032133A1 publication Critical patent/WO2017032133A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • 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

Definitions

  • the present application relates to, but is not limited to, the field of network communication technologies, and in particular, to a packet loss rate detection method and apparatus.
  • Ethernet Link Test Benchmark RFC 2544 (Benchmarking Methodology for Network Interconnect Devices) provides a benchmark for testing network devices. It specifies a series of test procedures and methods so that network devices at both ends can be under the same benchmark. , to reach a consensus on the implementation and results of the test.
  • RFC2544 is used for the packet loss rate test, only the packet loss rate of the entire link from the sender to the reflector and back to the sender is obtained, and the unidirectional link from the sender to the reflector is lost. The packet rate is not detected. In the related art, there is a problem that the packet loss rate detection is not accurate enough.
  • a packet loss rate detecting method comprising:
  • the first node sends a preset number of test packets to the second node, where the test message is used to return the test report to the first node when the second node receives the test packet
  • the second node calculates, by the second node, the first node to the second node by using a third quantity value of the received test packet and a first quantity value carried in the test packet. a first packet loss rate of the link; the first quantity value is used to represent a preset number of test messages sent by the first node; and the third quantity value is used to represent the second node received The number of test messages.
  • the first node When the first node does not receive the test packet returned by the second node within a first preset time period, the first node acquires the received test returned by the second node a second quantity value of the packet, and calculating, according to the first quantity value and the second quantity value, a second packet loss rate of the loopback link between the first node and the second node.
  • the first node calculates the second packet loss rate and the first node sent by the received second node The difference between the packet loss ratios, and the difference is used as the third packet loss rate of the second node to the first node unidirectional link.
  • the method further includes: before the first node sends a preset number of test packets to the second node, when the first node receives the configuration information sent by the network management node, the first The node determines the number of test messages to be sent based on the configuration information.
  • the first node calculates, by the first node, a difference between the second packet loss rate and the received first packet loss rate sent by the second node, and using the difference as the second node to the first node After the third packet loss rate of the unidirectional link of the node, the first node sends the first packet loss rate, the second packet loss rate, and the third packet loss rate to the network management node.
  • the first node blocks other messages during the sending of the test message.
  • a packet loss rate detecting method comprising:
  • the second node Upon receiving the test packet sent by the first node, the second node returns the received test packet to the first node.
  • the second node acquires the third quantity value of the received test packet, and the first quantity value carried by the test packet
  • the first quantity value is used to represent a preset number of test messages sent by the first node
  • the third quantity value is used to represent the number of test messages received by the second node.
  • the second node calculates a first packet loss rate of the unidirectional link from the first node to the second node based on the third quantity value and the first quantity value.
  • the method further includes: calculating, by the second node, the first node to the second node unidirectional link based on the third quantity value and the first quantity value After the packet loss rate, the second node sends the calculated first packet loss rate to the first node.
  • a packet loss rate detecting device comprising:
  • a sending module configured to send a preset number of test packets to the second node, where the test message is used to be the first one of the sending module when the second node receives the test packet
  • the test packet Returning, by the node, the test packet, and using, by the second node, the first node to calculate the first quantity based on the third quantity value of the received test message and the first quantity value carried in the test message a first packet loss rate of the unidirectional link of the second node; the first quantity value is used to represent the first node a preset number of test packets sent; the third quantity value is used to represent the number of test messages received by the second node;
  • a first calculating module configured to: when the first node does not receive the test packet returned by the second node in the first preset time period, acquire the first received by the first node Calculating a second quantity value of the test packet returned by the two nodes, and calculating, according to the first quantity value and the second quantity value, a loopback link between the first node and the second node Second packet loss rate;
  • the first calculating module is further configured to calculate a difference between the second packet loss rate and the received first packet loss rate sent by the second node, and use the difference as the second node to The third packet loss rate of the unidirectional link of the first node.
  • the packet loss rate detecting apparatus further includes a determining module, configured to: when the sending module sends a preset number of test messages to the second node, when the first node receives the configuration sent by the network management node Determining, according to the configuration information, the number of test packets to be sent by the sending module;
  • the sending module is further configured to calculate, by the first calculating module, a difference between the second packet loss rate and the received first packet loss rate sent by the second node, and use the difference as Sending, by the second node, the third packet loss rate of the unidirectional link of the first node to the first packet loss rate, the second packet loss rate, and the third packet loss rate
  • the network management node is further configured to calculate, by the first calculating module, a difference between the second packet loss rate and the received first packet loss rate sent by the second node, and use the difference as Sending, by the second node, the third packet loss rate of the unidirectional link of the first node to the first packet loss rate, the second packet loss rate, and the third packet loss rate The network management node.
  • the device further includes:
  • the masking module is configured to block other messages during the sending of the test message by the sending module.
  • a packet loss rate detecting device comprising:
  • Obtaining a module configured to acquire a third quantity value of the test packet received by the second node, and the test packet is carried when the test packet is not received in the second preset time period a first quantity value, wherein the first quantity value is used to represent a preset number of test messages sent by the first node; the third quantity value is used to represent a test received by the second node The number of messages;
  • a second calculating module configured to calculate based on the third quantity value and the first quantity value a first packet loss rate of the unidirectional link from the first node to the second node.
  • the returning module is further configured to calculate, at the second calculating module, the first one of the first node to the second node unidirectional link based on the third quantity value and the first quantity value After the packet loss rate, the first packet loss rate calculated by the second calculating module is sent to the first node.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the packet loss rate detection method.
  • the number of preset sending packets is added to the test packet for packet loss detection, so that the reflective end sends the test packet of the preset number of packets to the transmitting end, and then returns and returns a first packet loss rate of the unidirectional link from the transmitting end to the transmitting end, and the second packet loss rate of the transmitting end to the transmitting end loopback link calculated by the local end and the received
  • the first packet loss rate can obtain the third packet loss rate of the unidirectional link from the reflector end to the sender end, and only the loopback link between the sender end and the transmitter end can be obtained compared to the related technology.
  • the packet loss rate, the present invention can improve the accuracy of packet loss detection.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for detecting a packet loss rate according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a fourth embodiment of a packet loss rate detecting method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of functional modules of a first embodiment of a packet loss rate detecting apparatus according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of functional modules of a fourth embodiment of a packet loss rate detecting apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method for detecting a packet loss rate.
  • the packet loss rate detecting method includes steps S10-S30:
  • the first node sends a preset number of test packets to the second node, where the test message is used to return the test to the first node when the second node receives the test packet. a packet, and the second node calculates the first node to the second node by using a third quantity value of the received test packet and a first quantity value carried in the test packet a first packet loss rate of the link; the first quantity value is used to represent a preset number of test messages sent by the first node; and the third quantity value is used to represent that the second node receives The number of test messages.
  • the packet loss rate detection method proposed in this embodiment can be applied to packet loss detection of a unidirectional link between two nodes in a network.
  • the original sending end of the test packet is the first node
  • the reflective end of the test packet is the second node.
  • the embodiment of the present invention can detect the second node based on the related Ethernet link test reference RFC 2544.
  • the packet loss rate of the unidirectional link to the first node is used to improve the accuracy of packet loss detection.
  • test configuration before the S10, test configuration needs to be performed on the first node, and the test configuration includes a Flow_id (test flow ID), a source MAC, a target MAC, a source IP, a target IP, and a DSCP (Differentiated Services Code). Point, differential service code point) priority, outer VLAN (including 802.1P priority), inner VLAN (including 802.1P priority), source UDP (User Data Protocol) port, target UDP port, Access service mode (including L2 layer and L3 layer), test rate/test bandwidth, packet length, test packet length, and packet port.
  • An ACL (Access Control List) rule for the first node to create a packet termination based on the foregoing configuration information is as shown in Table 1.
  • the first node further determines, according to the foregoing configuration information, the number of test packets to be sent (preset number) before sending the test packet, and first calculates the sending test packet based on formula (1).
  • IPG Interpacket Gap, frame gap
  • IPG (BW*(12+PL))/TS-PL...Formula (1);
  • the BW indicates the bandwidth of the packet to be sent, 12 is the preamble, PL is the packet length, and TS is the test rate/test bandwidth.
  • the TN indicates the number of test packets to be sent, and ST indicates the test packet length.
  • the embodiment uses the LM (Loss Measurement) packet as shown in Table 2 as the test packet, where the OPCODE field and the Flow_id field are used to fill in the agreed value to represent the report.
  • the text is an LM message, and the TotalNumber field is used to fill in a first quantity value (ie, TN) that represents the preset number.
  • the first node When the test packet is sent, the first node records the number of sent packets, and when the number of sent packets is equal to the first quantity, the first node stops sending the test to the second node. a message to ensure that the preset number of test messages are sent to the second node. At the same time, when receiving the test packet returned by the second node, the first node accumulates the number of the test packets received.
  • test configuration is also required to be performed on the second node, so that the second node creates an ACL rule for packet loopback according to the configuration information: a reflection ACL rule, and according to the The reflected ACL rule returns the test packet sent by the first node
  • the test configuration includes Flow_id (test flow ID), source MAC, target MAC, source IP, target IP, DSCP priority, outer VLAN (including 802.1P priority), inner VLAN (including 802.1) P-priority), source UDP port, target UDP port, access service mode (including L2 layer and L3 layer), and flow matching rules for reflection conditions.
  • the ACL rule for creating a packet loopback by the second node based on the foregoing configuration information is as shown in Table 3.
  • the second node when the second node (reflector) receives the packet, it identifies, according to the reflected ACL rule, whether the received packet is a test packet sent by the original node, and receives the first packet.
  • the second node returns the received test packet to the first node based on the reflected ACL rule, where the second node receives the first
  • the test packet sent by the node is received, the number of the test packet is received; when the test packet is not received within the second preset time period, the second node acquires the received test packet.
  • the third quantity value of the text that is, the number of the test packets received by the second node, and the first quantity value carried by the test packet, where the first quantity value is the
  • the first node sends a preset number of test messages; the second node calculates the unidirectional chain from the first node to the second node based on the third quantity value, the first quantity value, and formula (3)
  • the first packet loss rate of the road :
  • the LR_A represents the first packet loss rate
  • T represents a first quantity value of the test message sent by the first node
  • R represents a third quantity value of the test message received by the second node.
  • the first node when the first node does not receive the test packet returned by the second node in the first preset time period, the first node acquires the received test packet returned by the second node. a second quantity value, and based on the first quantity value and the second quantity value, calculating a second packet loss rate of the loopback link between the first node and the second node.
  • the first node After the sending of the preset number of test packets is completed, and the test packet returned by the second node is not received within the first preset time period, the first node identifies the current second node.
  • the test packet has been returned, and the received second number of values of the test message returned by the second node is obtained, that is, the number of the test packets received by the first node is accumulated.
  • the first The preset time period may be set according to actual needs.
  • the first preset time period is preferably 1 second; after the second quantity value is obtained, the first node is The second quantity value and the first quantity value are substituted into the formula (4) to calculate a second packet loss rate of the loopback link between the first node and the second node:
  • the LR indicates the second packet loss rate
  • T indicates a first quantity value of the first node sending the test packet
  • Rt indicates that the second node receives the test packet returned by the first node. The second quantity value.
  • the first node calculates a difference between the second packet loss rate and the received first packet loss rate sent by the second node, and uses the difference as the second node to the The third packet loss rate of the unidirectional link of the first node.
  • the second node performs calculation of the first packet loss rate of the unidirectional link from the first node to the second node based on the test packet received by the second node, and after the calculation is completed, calculates the packet loss rate.
  • the first packet loss rate is sent to the first node.
  • the loopback link between the first node and the second node is a unidirectional link from the first node to the second node, and the second node is located
  • the unidirectional link configuration of the first node, when receiving the first packet loss rate of the unidirectional link from the first node to the second node sent by the second node, the first node is The difference between the second packet loss rate and the first packet loss rate may be used as a third packet loss rate of the second node to the first node unidirectional link.
  • the packet loss rate detection method in this embodiment adds a preset number of sent packets to the test packet for detecting the packet loss rate, so that the reflector sends the test packet with the preset number of packets at the transmitting end. Calculating and returning a first packet loss rate of the unidirectional link from the sending end to the transmitting end, and sending, by the sending end, a second packet loss from the sending end to the transmitting end loopback link calculated by the local end Rate and the received first packet loss rate, the third packet loss rate of the unidirectional link from the reflector to the sender is obtained, and only the sender and the transmitter are obtained compared to the related technology.
  • the packet loss rate of the loopback link between the embodiments of the present invention can improve the accuracy of packet loss detection.
  • a second embodiment of the method for detecting a packet loss rate according to the embodiment of the present invention is provided.
  • the method before the step S10, the method further includes:
  • the first node When the first node receives the configuration information sent by the network management node, the first node is based on The configuration information determines the number of test messages to be sent.
  • the method further includes:
  • the first node sends the first packet loss rate, the second packet loss rate, and the third packet loss rate to the network management node.
  • this embodiment the user can perform test configuration of the second node based on the network management node, and perform test configuration of the first node. After the test configuration of the second node is completed, and the test configuration of the first node is performed, the process of detecting the packet loss rate by the second node and the first node may be specifically implemented by referring to the foregoing embodiment. I won't go into details here.
  • the first packet loss rate and the second packet loss rate are The packet rate and the third packet loss rate are sent to the network management node for the network management node to display, and reflect the overall packet loss situation of the link and the packet loss situation of the uplink/downlink of the link.
  • a third embodiment of the method for detecting a packet loss rate in the embodiment of the present invention is provided.
  • the first node is blocked during the sending of the test packet.
  • Other messages are included in the first node.
  • the first node when the first node performs the packet loss rate detection, in addition to the test packet, the received other messages are in the normal process.
  • the forwarding is performed, and the first node needs to identify whether each of the received packets is the test packet when the number of the test packets is received.
  • Statistics are performed, which makes the statistics of the number of test packets received less efficient.
  • the first node during the sending of the test packet, blocks other packets, so as to count the number of test packets received, and improve the statistical efficiency.
  • the second node blocks other messages during the receiving of the test message.
  • the embodiment of the present invention further provides a packet loss rate detecting method.
  • a packet loss rate detecting method includes Steps S110-S130:
  • the second node receives the test.
  • the test message is returned to the first node.
  • the packet loss rate detection method proposed in this embodiment can be applied to the unidirectional link packet loss rate detection between two nodes in the network.
  • the embodiment of the present invention is capable of detecting the first node, where the original end of the test packet is the first node, and the original sending end of the test packet is the first node, and the related Ethernet link test reference RFC 2544 is used.
  • the packet loss rate of the unidirectional link to the second node may be calculated, and the packet loss rate of the unidirectional link from the second node to the first node may be calculated to improve the accuracy of packet loss detection. .
  • test configuration before the S110, test configuration needs to be performed at the second node, and the test configuration includes a Flow_id (test flow ID), a source MAC, a target MAC, a source IP, a target IP, a DSCP priority, and an outer VLAN. (including 802.1P priority), inner VLAN (including 802.1P priority), source UDP port, target UDP port, access service mode (including L2 layer and L3 layer), and flow matching rules for reflection conditions.
  • the ACL rule for creating a packet loopback by the second node based on the foregoing configuration information is as shown in Table 3.
  • the second node when the second node (reflector) receives the packet, it identifies, according to the reflected ACL rule, whether the received packet is a test packet sent by the original node, and receives the first packet.
  • the second node returns the received test packet to the first node based on the reflected ACL rule.
  • the second node accumulates the number of the test packets received when receiving the test packet sent by the first node.
  • the second node acquires the third quantity value of the received test packet, and the first carried by the test packet a quantity value, wherein the first quantity value is used to represent a preset number of test messages sent by the first node; and the third quantity value is used to represent a test message received by the second node. Quantity.
  • the second node when the test packet sent by the first node is not received in the second preset time period, the second node identifies that the test packet of the current first node has been sent, and obtains the received The third quantity value of the test packet, that is, the number of the test packets received by the second node, and the first quantity value carried by the test packet, where the first quantity value is the The first node sends the preset number of the test message.
  • the second preset time period may be set according to actual needs.
  • the second preset time period is preferably 1 second.
  • the first node before the sending of the test packet, the first node first determines the number of test packets to be sent, and adds a first quantity value indicating a preset number of test packets to be sent to In the test packet, the first node records the number of sent packets when the test packet is sent, and when the number of sent packets is equal to the first quantity, the first node stops For the second node to send the test packet, reference may be made to the first embodiment, and details are not described herein again.
  • the second node calculates, according to the third quantity value and the first quantity value, a first packet loss rate of the unidirectional link from the first node to the second node.
  • the second node when the second node obtains the third quantity value of the test packet, and the first node sends the first quantity value of the test packet, the second node is based on the third quantity value and the The first quantity value is used to calculate a first packet loss rate of the unidirectional link from the first node to the second node. And calculating the first packet loss rate of the first node to the second node unidirectional link by substituting the third quantity value and the first quantity value into formula (3):
  • the LR_A represents the first packet loss rate
  • T represents a first quantity value of the test message sent by the first node
  • R represents a third quantity value of the test message received by the second node.
  • the packet loss rate detection method in this embodiment adds a preset number of sent packets to the test packet for detecting the packet loss rate, so that the reflector sends the test packet with the preset number of packets at the transmitting end.
  • the packet loss rate of the unidirectional link from the sender to the reflector is calculated based on the number of received packets and the number of preset packets carried by the test packet, thereby improving the accuracy of the packet loss detection. degree.
  • a fifth embodiment of the method for detecting a packet loss rate according to the embodiment of the present invention is provided.
  • the method further includes:
  • the second node sends the calculated first packet loss rate to the first node.
  • the second node sends the calculated first packet loss rate to the first node, where the first node calculates the second node based on the first packet loss rate.
  • the second packet loss rate of the unidirectional link of the first node is not limited to the first packet loss rate.
  • the first node When the first node receives the test packet returned by the second node, the first node receives the number of the test packets; when the first node sends a preset number of test packets, Waiting for a first preset time period to ensure that the second node returns the received test message to the first node, and the first node acquires the received return of the second node a second quantity value of the test packet, that is, the number of the test packets received by the first node; after the second quantity value is obtained, the first node uses the second quantity value And the first quantity The value is substituted into the formula (4) to calculate a second packet loss rate of the loopback link between the first node and the second node:
  • the LR indicates the second packet loss rate
  • T indicates a first quantity value of the first node sending the test packet
  • Rt indicates that the second node receives the test packet returned by the first node. The second quantity value.
  • the loopback link between the first node and the second node is a unidirectional link from the first node to the second node, and the second node is located
  • the unidirectional link configuration of the first node, after calculating the second packet loss rate of the loopback link between the first node and the second node, the first node may The difference between the second packet loss rate and the first packet loss rate is used as the third packet loss rate of the second node to the first node unidirectional link.
  • the embodiment of the present invention further provides a packet loss rate detecting apparatus.
  • the packet loss rate detecting apparatus includes:
  • the sending module 10 is configured to send a preset number of test messages to the second node, where the test message is used to send to the sending module when the second node receives the test message Returning the test packet by the node, and using the second node to calculate the first node to the location based on the third quantity value of the received test packet and the first quantity value carried in the test packet a first packet loss rate of the second node unidirectional link; the first quantity value is used to represent a preset number of test messages sent by the first node; and the third quantity value is used to represent the The number of test messages received by the second node.
  • the packet loss rate detecting apparatus proposed in this embodiment can be applied to the packet loss rate detection of the unidirectional link between two nodes in the network.
  • the original sending end of the test packet is the first node
  • the reflective end of the test packet is the second node.
  • the embodiment of the present invention can detect the second node based on the related Ethernet link test reference RFC 2544.
  • the packet loss rate of the unidirectional link to the first node is used to improve the accuracy of packet loss detection.
  • test configuration is also required at the first node, and the test configuration includes a Flow_id (test flow ID), a source MAC, a target MAC, a source IP, a target IP, and a DSCP (Differentiated Services Code Point, differential service code point) priority, outer VLAN (including 802.1P priority), inner VLAN (including 802.1P priority), source UDP (User Data Protocol) port, target UDP port, access service mode (including L2 layer and L3 layer), test rate/test bandwidth, packet length, test packet length, and packet sending port.
  • An ACL Access Control List
  • Table 1 An ACL (Access Control List) rule for the first node to create a packet termination based on the foregoing configuration information is as shown in Table 1.
  • the first node further determines, according to the foregoing configuration information, the number of test packets to be sent (preset number) before sending the test packet, and first calculates the sending test packet based on formula (1).
  • IPG Interpacket Gap, frame gap
  • IPG (BW*(12+PL))/TS-PL...Formula (1);
  • the BW indicates the bandwidth of the packet to be sent
  • 12 is the preamble (fixed value)
  • PL is the packet length
  • TS is the test rate/test bandwidth.
  • the TN indicates the number of test packets to be sent, and ST indicates the test packet length.
  • the embodiment uses the LM (Loss Measurement) packet as shown in Table 2 as the test packet, where the OPCODE field and the Flow_id field are used to fill in the agreed value to represent the report.
  • the text is an LM message, and the TotalNumber field is used to fill in a first quantity value (ie, TN) that represents the preset number.
  • the sending module 10 When the test packet is sent, the sending module 10 records the number of sent packets, and when the number of sent packets is equal to the first quantity, stops sending the test packet to the second node to ensure Sending the preset number of test messages to the second node. At the same time, the first node accumulates the number of the test packets received when receiving the test packet returned by the second node.
  • a test configuration is also required to be performed on the second node, so that the second node creates an ACL rule for packet loopback according to the configuration information: a reflection ACL rule, and according to the The reflected ACL rule returns the test packet sent by the first node (the sending module 10) to the first node, and the test configuration includes a Flow_id (test flow ID), a source MAC, a target MAC, a source IP, Target IP, DSCP priority, outer VLAN (including 802.1P priority), inner VLAN (including 802.1P priority), source UDP port, target UDP port, access service mode (including L2 layer and L3 layer) The flow matching rule of the reflection condition.
  • the ACL rule for creating a packet loopback by the second node based on the foregoing configuration information is as shown in Table 3.
  • the second node when the second node (reflector) receives the packet, it identifies, according to the reflected ACL rule, whether the received packet is a test packet sent by the original node, and receives the first packet.
  • the second node returns the received test packet to the first node based on the reflected ACL rule, where the second node receives the first
  • the test packet sent by the node is received, the number of the test packet is received; when the test packet is not received within the second preset time period, the second node acquires the received test packet.
  • the third quantity value of the text that is, the number of the test packets received by the second node, and the first quantity value carried by the test packet, where the first quantity value is the
  • the first node sends a preset number of test messages; the second node calculates the unidirectional chain from the first node to the second node based on the third quantity value, the first quantity value, and formula (3)
  • the first packet loss rate of the road :
  • the LR_A represents the first packet loss rate
  • T represents a first quantity value of the test message sent by the first node
  • R represents a third quantity value of the test message received by the second node.
  • the first calculating module 20 is configured to: when the first node does not receive the test packet returned by the second node in the first preset time period, acquire the Testing a second quantity value of the packet, and calculating, according to the first quantity value and the second quantity value, a second packet loss rate of the loopback link between the first node and the second node; And calculating a difference between the second packet loss rate and the received first packet loss rate, and using the difference as the third node of the second node to the first node unidirectional link Package rate.
  • the first The calculation module 20 identifies that the test packet of the current second node has been returned, and obtains the received second quantity value of the second node return test packet, that is, the first node accumulates the received test report.
  • the number of the texts, wherein the first preset time period may be set according to actual needs, for example, in the embodiment, the first preset time period is preferably 1 second; After the value, the first calculating module 20 substitutes the second quantity value and the first quantity value into formula (4) to calculate a second loopback link between the first node and the second node.
  • Packet loss rate Packet loss rate
  • the LR indicates the second packet loss rate
  • T indicates a first quantity value of the first node sending the test packet
  • Rt indicates that the second node receives the test packet returned by the first node. of The second quantity value.
  • the second node performs calculation of the first packet loss rate of the unidirectional link from the first node to the second node based on the test packet received by the second node, and after the calculation is completed, calculates the packet loss rate.
  • the first packet loss rate is sent to the first node.
  • the loopback link between the first node and the second node is a unidirectional link from the first node to the second node, and the second node is located
  • the unidirectional link of the first node is configured to: when receiving the first packet loss rate of the first node to the second node unidirectional link sent by the second node, the first computing module 20, the difference between the second packet loss rate and the first packet loss rate is used as a third packet loss rate of the second node to the first node unidirectional link.
  • the packet loss rate detecting apparatus of the present embodiment adds the preset number of sending packets to the test packet for detecting the packet loss rate, so that the transmitting end completes the sending of the test packet with the preset number of packets at the transmitting end. Calculating and returning a first packet loss rate of the unidirectional link from the sending end to the transmitting end, and sending, by the sending end, a second packet loss from the sending end to the transmitting end loopback link calculated by the local end Rate and the received first packet loss rate, the third packet loss rate of the unidirectional link from the reflector to the sender is obtained, and only the sender and the transmitter are obtained compared to the related technology.
  • the packet loss rate of the loopback link between the embodiments of the present invention can improve the accuracy of packet loss detection.
  • the packet loss rate detecting apparatus further includes a determining module, where When a node receives the configuration information sent by the network management node, determining, according to the configuration information, the number of test packets to be sent by the sending module;
  • the sending module is further configured to send the first packet loss rate, the second packet loss rate, and the third packet loss rate to the network management node.
  • the difference between this embodiment and the first embodiment is that, in this embodiment, the user can perform test configuration of the second node based on the network management node, and perform test configuration of the first node. After the test configuration of the second node is completed, and the test configuration of the first node is performed, the process of detecting the packet loss rate by the second node and the first node may be performed by referring to the foregoing embodiment, where No longer.
  • the sending module 10 calculates the second in the first calculating module 20 After the third packet loss rate of the unidirectional link of the first node, the first packet loss rate, the second packet loss rate, and the third packet loss rate are sent to the network management node.
  • the network management node displays the overall packet loss of the link and the packet loss on the link/downlink.
  • the packet loss rate detecting apparatus further includes a shielding module, which is configured to be The sending module 10 blocks other messages during the sending of the test message.
  • the first node when the first node performs the packet loss rate detection, in addition to the test packet, the received other messages are in the normal process.
  • the forwarding is performed, and the first node needs to identify whether each of the received packets is the test packet when the number of the test packets is received.
  • Statistics are performed, which makes the statistics of the number of test packets received less efficient.
  • the masking module blocks other packets during the sending of the test packet by the sending module 10, so as to count the number of test packets received, and improve the statistical efficiency.
  • the second node blocks other messages during the receiving of the test message.
  • the embodiment of the present invention further provides a packet loss rate detecting apparatus.
  • a packet loss rate detecting apparatus includes :
  • the returning module 110 is configured to return the received test packet to the first node when receiving the test packet sent by the first node.
  • the packet loss rate detecting apparatus proposed in this embodiment can be applied to unidirectional link packet loss rate detection between two nodes in a network.
  • the embodiment of the present invention is capable of detecting the first node, where the original end of the test packet is the first node, and the original sending end of the test packet is the first node, and the related Ethernet link test reference RFC 2544 is used.
  • the packet loss rate of the unidirectional link to the second node may be calculated, and the packet loss rate of the unidirectional link from the second node to the first node may be calculated to improve the accuracy of packet loss detection. .
  • the test configuration before the packet loss rate detection is performed, the test configuration is also required at the second node, and the test configuration includes a Flow_id (test flow ID), a source MAC, a target MAC, a source IP, a target IP, a DSCP priority, and an external Layer VLAN (including 802.1P priority), inner VLAN (including 802.1P) Priority), source UDP port, destination UDP port, access service mode (including L2 layer and L3 layer), and flow matching rules for reflection conditions.
  • the ACL rule for creating a packet loopback by the second node based on the foregoing configuration information is as shown in Table 3.
  • the returning module 110 identifies, according to the reflected ACL rule, whether the received packet is a test packet sent by the original node as the original node. Upon receiving the test packet sent by the first node, the returning module 110 returns the received test packet to the first node based on the reflected ACL rule. The second node accumulates the number of the test packets received when receiving the test packet sent by the first node.
  • the obtaining module 120 is configured to acquire, when the test packet is not received in the second preset time period, the third quantity value of the test packet received by the second node, and the test packet a first quantity value carried, wherein the first quantity value is used to represent a preset number of test messages sent by the first node; the third quantity value is used to represent the second node received The number of test messages.
  • the obtaining module 120 identifies that the test packet of the current first node has been sent, and obtains and receives the test packet.
  • the third quantity of the test packet that is received that is, the number of the test packets received by the second node, and the first quantity that is carried by the test packet, the first quantity
  • the value is a preset number of the test packets sent by the first node.
  • the second preset time period may be set according to actual needs. For example, in the embodiment, the second preset time period is preferably 1 second.
  • the first node before the sending of the test packet, the first node first determines the number of test packets to be sent, and adds a first quantity value indicating a preset number of test packets to be sent to the test. In the message, the first node records the number of sent packets when the test packet is sent, and when the number of sent packets is equal to the first quantity, the first node stops to the second node.
  • the test packet refer to the first embodiment, and details are not described herein again.
  • the second calculating module 130 is configured to calculate a first packet loss rate of the unidirectional link from the first node to the second node based on the third quantity value and the first quantity value.
  • the second calculation module 130 acquires a third quantity value of the test message received by the acquiring module 120, and when the first node sends the first quantity value of the test message, Determining, by the third quantity value and the first quantity value, a first packet loss rate of the unidirectional link from the first node to the second node.
  • the second calculating module 130 calculates the first packet loss rate of the unidirectional link from the first node to the second node by substituting the third quantity value and the first quantity value into formula (3):
  • the LR_A represents the first packet loss rate
  • T represents a first quantity value of the test message sent by the first node
  • R represents a third quantity value of the test message received by the second node.
  • the packet loss rate detecting apparatus of the present embodiment adds the preset number of sending packets to the test packet for detecting the packet loss rate, so that the transmitting end completes the sending of the test packet with the preset number of packets at the transmitting end.
  • the packet loss rate of the unidirectional link from the sender to the reflector is calculated based on the number of received packets and the number of preset packets carried by the test packet, thereby improving the accuracy of the packet loss detection. degree.
  • a fifth embodiment of the packet loss rate detecting apparatus in the embodiment of the present invention is provided.
  • the returning module 110 is further configured to calculate the second calculating module 130.
  • the first packet loss rate is sent to the first node.
  • the returning module 110 sends the first packet loss rate calculated by the second calculating module 130 to the first node, where the first node is based on the first packet loss rate. Calculating a second packet loss rate of the unidirectional link from the second node to the first node.
  • the first node When the first node receives the test packet returned by the second node, the first node receives the number of the test packets; when the first node sends a preset number of test packets, Waiting for a first preset time period to ensure that the second node returns the received test message to the first node, and the first node acquires the received return of the second node a second quantity value of the test packet, that is, the number of the test packets received by the first node; after the second quantity value is obtained, the first node uses the second quantity value And calculating, by using the first quantity value into formula (4), a second packet loss rate of the loopback link between the first node and the second node:
  • the LR indicates the second packet loss rate
  • T indicates a first quantity value of the first node sending the test packet
  • Rt indicates that the second node receives the test packet returned by the first node. The second quantity value.
  • the loopback link between the first node and the second node is a unidirectional link from the first node to the second node, and a unidirectional link from the second node to the first node, where the first node and the second node are calculated After the second packet loss rate of the loopback link, the first node may use the difference between the second packet loss rate and the first packet loss rate as the second node to the first The third packet loss rate of the unidirectional link of the node.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the packet loss rate detection method.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the number of preset sending packets is added to the test packet for packet loss detection, so that the reflective end sends the test packet of the preset number of packets to the transmitting end, and then returns and returns a first packet loss rate of the unidirectional link from the transmitting end to the transmitting end, and the second packet loss rate of the transmitting end to the transmitting end loopback link calculated by the local end and the received
  • the first packet loss rate can obtain the third packet loss rate of the unidirectional link from the reflector end to the sender end, and only the loopback link between the sender end and the transmitter end can be obtained compared to the related technology.
  • the packet loss rate, the present invention can improve the accuracy of packet loss detection.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种丢包率检测方法和装置,该方法包括:第一节点发送预设数量的测试报文至第二节点;其中,测试报文用于当第二节点接收到测试报文时向第一节点返回该测试报文,并用于第二节点基于接收到的测试报文的第三数量值以及测试报文中携带的第一数量值计算第一节点到第二节点单向链路的第一丢包率;第一数量值用于表征第一节点发送的测试报文的预设数量;在第一预设时间段内未接收到第二节点返回的测试报文时,第一节点获取接收到的测试报文的第二数量值,并基于第一数量值以及第二数量值,计算第一节点与第二节点之间环回链路的第二丢包率;在接收到第二节点发送的第一丢包率时,第一节点将第二丢包率与第一丢包率的差值作为第二节点到第一节点单向链路的第三丢包率。

Description

一种丢包率检测方法及装置 技术领域
本申请涉及但不限于网络通信技术领域,尤其涉及一种丢包率检测方法及装置。
背景技术
目前,以太网链路测试基准RFC2544(Benchmarking Methodology for Network Interconnect Devices)提供了一个对网络设备测试的基准,它规定了一系列的测试过程和方法,使得两端网络设备间可以在同一个基准下,对测试的实施和结果达成共识。但是,当采用RFC2544进行丢包率测试时,仅可获取到从发送端到反射端再环回到发送端这样整条链路的丢包率,而发送端到反射端单向链路的丢包率却无法检测得到。相关技术中,存在丢包率检测不够精确的问题。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
一种丢包率检测方法,所述方法包括:
第一节点发送预设数量的测试报文至第二节点,;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
当所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,所述第一节点获取接收到的所述第二节点返回的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率。
所述第一节点计算所述第二丢包率与接收到的第二节点发送的所述第一 丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
可选地,所述方法还包括:在所述第一节点发送预设数量的测试报文至第二节点之前,当所述第一节点接收到网管节点发送的配置信息时,所述第一节点基于所述配置信息确定待发送测试报文的数量。
在所述第一节点计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率之后,所述第一节点将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
可选地,所述第一节点在发送所述测试报文期间,屏蔽其它报文。
一种丢包率检测方法,所述方法包括:
在接收到第一节点发送的测试报文时,第二节点将接收的所述测试报文返回至所述第一节点。
在第二预设时间段内未接收到所述测试报文时,所述第二节点获取接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
所述第二节点基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。
可选地,所述方法还包括:在所述第二节点基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率之后,所述第二节点将计算的所述第一丢包率发送至所述第一节点。
一种丢包率检测装置,所述丢包率检测装置包括:
发送模块,设置为发送预设数量的测试报文至第二节点;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述发送模块所在的第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发 送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
第一计算模块,设置为当所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,获取所述第一节点接收到的所述第二节点返回的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率;
第一计算模块,还设置为计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
可选地,所述丢包率检测装置还包括确定模块,设置为在所述发送模块发送预设数量的测试报文至第二节点之前,当所述第一节点接收到网管节点发送的配置信息时,基于所述配置信息确定所述发送模块待发送测试报文的数量;
所述发送模块,还设置为在所述第一计算模块计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率之后,将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
可选地,所述装置还包括:
屏蔽模块,设置为在所述发送模块发送所述测试报文期间,屏蔽其它报文。
一种丢包率检测装置,所述装置包括:
返回模块,设置为当接收到第一节点发送的测试报文时,将接收的所述测试报文返回至所述第一节点;
获取模块,设置为在第二预设时间段内未接收到所述测试报文时,获取所述第二节点接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
第二计算模块,设置为基于所述第三数量值以及所述第一数量值,计算 所述第一节点到所述第二节点单向链路的第一丢包率。
可选地,所述返回模块还设置为在第二计算模块基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率之后,将所述第二计算模块计算的所述第一丢包率发送至所述第一节点。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的丢包率检测方法。
本发明实施例通过在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,计算并返回所述发送端到所述反射端单向链路的第一丢包率,发送端根据本端计算的所述发送端到所述发射端环回链路的第二丢包率以及接收的所述第一丢包率,即可获取到所述反射端到所述发送端单向链路的第三丢包率,相较于相关技术仅可获取到发送端与发射端之间环回链路的丢包率,本发明能够提高丢包率检测的精确度。
附图概述
图1为本发明实施例丢包率检测方法第一实施例的流程示意图;
图2为本发明实施例丢包率检测方法第四实施例的流程示意图;
图3为本发明实施例丢包率检测装置第一实施例的功能模块示意图;
图4为本发明实施例丢包率检测装置第四实施例的功能模块示意图。
本发明的实施方式
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
本发明实施例提供一种丢包率检测方法,参照图1,在本发明实施例丢包率检测方法的第一实施例中,所述丢包率检测方法包括步骤S10-S30:
S10,第一节点发送预设数量的测试报文至第二节点;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
本实施例提出的丢包率检测方法,可以应用于网络中两节点间单向链路的丢包率检测。以测试报文的原发送端为第一节点,测试报文的反射端为第二节点为例,在相关以太网链路测试基准RFC2544的基础上,本发明实施例能够检测所述第二节点到所述第一节点单向链路的丢包率,以达到提高丢包率检测精确度的目的。
本实施例中,在所述S10之前,还需要在所述第一节点进行测试配置,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP(Differentiated Services Code Point,差分服务代码点)优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P优先级)、源UDP(User Data Protocol,用户数据报协议)端口、目标UDP端口、接入业务模式(包括L2层和L3层)、测试速率/测试带宽、报文长度、测试发包时长和发包端口。以供所述第一节点基于前述配置信息创建报文终结的ACL(Access Control List,访问控制列表)规则,如表1所示。
Figure PCTCN2016085150-appb-000001
表1
可选地,所述第一节点(发生器)在发送测试报文之前,还根据前述配置信息确定待发送测试报文的数量(预设数量),首先基于公式(1)计算发送测试报文的IPG(Interpacket Gap,帧间隙):
IPG=(BW*(12+PL))/TS-PL……公式(1);
其中,BW表示发包端口带宽,12为前导码,PL表示报文长度,TS表示测试速率/测试带宽。
在计算出IPG之后,基于公式(2)计算待发送测试报文的数量,即所述预设数量:
TN=TS*ST/(PL+IPG)……公式(2);
其中,所述TN表示待发送测试报文的数量,ST表示测试发包时长。
可选地,本实施例采用如表2所示的LM(Loss Measurement,丢包测量)报文作为所述测试报文,其中,所述OPCODE字段和Flow_id字段用于填写约定值以表征该报文为LM报文,所述TotalNumber字段用于填写表征所述预设数量的第一数量值(即TN)。
Figure PCTCN2016085150-appb-000002
表2
在发送测试报文时,所述第一节点记录发送的报文数,当发送的报文数等于所述第一数量值时,所述第一节点停止向所述第二节点发送所述测试报文,以确保向所述第二节点发送所述预设数量的测试报文。同时,在接收到所述第二节点返回的所述测试报文时,所述第一节点累计接收到的所述测试报文的数量。
需要说明的是,在本实施例中,还需要在所述第二节点进行测试配置,以供所述第二节点根据配置信息创建报文环回的ACL规则:反射ACL规则,并根据所述反射ACL规则将其接收的由所述第一节点发送的测试报文返回 至所述第一节点,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P优先级)、源UDP端口、目标UDP端口、接入业务模式(包括L2层和L3层)以及反射条件的流匹配规则。以供所述第二节点基于前述配置信息创建报文环回的ACL规则,如表3所示。
Figure PCTCN2016085150-appb-000003
表3
本实施例中,所述第二节点(反射器)在接收到报文时,基于所述反射ACL规则识别接收的报文是否为原端为第一节点发送的测试报文,在接收到第一节点发送的测试报文时,所述第二节点基于所述反射ACL规则将接收的所述测试报文返回至所述第一节点,其中,所述第二节点在接收到所述第一节点发送的测试报文时,累计接收到所述测试报文的数量;在第二预设时间段内未接收到所述测试报文时,所述第二节点获取接收到的所述测试报文的第三数量值,即所述第二节点累计的接收到所述测试报文的数量,以及获取所述测试报文携带的第一数量值,其中,所述第一数量值为所述第一节点发送测试报文的预设数量;所述第二节点基于所述第三数量值、第一数量值以及公式(3),计算所述第一节点到所述第二节点单向链路的第一丢包率:
LR_A=(T-R)*100/T……公式(3);
其中,所述LR_A表示所述第一丢包率,T表示所述第一节点发送测试报文的第一数量值,R表示所述第二节点接收到的测试报文的第三数量值。
S20,当第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,所述第一节点获取接收到的第二节点返回的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率。
在完成所述预设数量的测试报文的发送,且在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,所述第一节点识别当前第二节点的测试报文已返回完毕,并获取接收到的所述第二节点返回测试报文的第二数量值,即所述第一节点累计的接收到所述测试报文的数量,其中,所述第一 预设时间段可根据实际需要进行设置,例如,在本实施例中,所述第一预设时间段优选为1秒;在获取到所述第二数量值之后,所述第一节点将所述第二数量值以及所述第一数量值代入公式(4)计算所述第一节点与所述第二节点之间环回链路的第二丢包率:
LR=(T-Rt)*100/T……公式(4);
其中,所述LR表示所述第二丢包率,T表示所述第一节点发送测试报文的第一数量值,Rt表示所述第一节点接收到的所述第二节点返回测试报文的第二数量值。
S30,所述第一节点计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
本实施例中,所述第二节点基于其接收的测试报文进行所述第一节点到所述第二节点单向链路的第一丢包率的计算,在计算完成后,将其计算的所述第一丢包率发送至所述第一节点。
容易理解的是,由于所述第一节点与所述第二节点之间的环回链路由所述第一节点到所述第二节点的单向链路,以及所述第二节点到所述第一节点的单向链路构成,在接收到所述第二节点发送的所述第一节点到所述第二节点单向链路的第一丢包率时,所述第一节点即可将所述第二丢包率与所述第一丢包率的差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
本实施例提出的丢包率检测方法,在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,计算并返回所述发送端到所述反射端单向链路的第一丢包率,发送端根据本端计算的所述发送端到所述发射端环回链路的第二丢包率以及接收的所述第一丢包率,即可获取到所述反射端到所述发送端单向链路的第三丢包率,相较于相关技术仅可获取到发送端与发射端之间环回链路的丢包率,本发明实施例能够提高丢包率检测的精确度。
可选地,基于第一实施例,提出本发明实施例丢包率检测方法的第二实施例,在本实施例中,上述步骤S10之前,还包括:
当所述第一节点接收到网管节点发送的配置信息时,所述第一节点基于 所述配置信息确定待发送测试报文的数量。
上述步骤S30之后,还包括:
所述第一节点将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
需要说明的是,本实施例与第一实施例的区别在于,在本实施例中,用户可基于网管节点进行所述第二节点的测试配置,以及进行所述第一节点的测试配置。在完成所述第二节点的测试配置,以及进行所述第一节点的测试配置之后,所述第二节点以及所述第一节点进行丢包率检测的过程具体可参照前述实施例施行,此处不再赘述。
本实施例中,所述第一节点在计算出所述第二节点到所述第一节点单向链路的第三丢包率之后,将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点,供所述网管节点显示,反映链路的整体丢包情况和链路上/下行各自的丢包情况。
可选地,基于第一或第二实施例,提出本发明实施例丢包率检测方法的第三实施例,在本实施例中,所述第一节点在发送所述测试报文期间,屏蔽其它报文。
需要说明的是,在第一或第二实施例中,所述第一节点在进行丢包率检测时,除了所述测试报文之外,对于接收到的其它报文,均会按正常流程进行转发,导致所述第一节点在统计接收到测试报文的数量时,需要识别其接收的每一个报文是否为所述测试报文,在接收的报文为所述测试报文时,才进行统计,导致统计接收到测试报文数量的效率较低。有鉴于此,本实施例中,所述第一节点在发送所述测试报文期间,屏蔽其它报文,以便于统计接收到测试报文的数量,提升统计效率。基于相同的原因,可选地,在本实施例中,所述第二节点在接收所述测试报文期间,屏蔽其它报文。
本发明实施例还提出了一种丢包率检测方法,参照图2,提供了本发明实施例丢包率检测方法的第四实施例,在本实施例中,所述丢包率检测方法包括步骤S110-S130:
S110,在接收到第一节点发送的测试报文时,第二节点将接收的所述测 试报文返回至所述第一节点。
本实施例提出的丢包率检测方法,可以应用于网络中两节点间的单向链路丢包率检测。以测试报文的反射端为第二节点,测试报文的原发送端为第一节点为例,在相关以太网链路测试基准RFC2544的基础上,本发明实施例能够检测所述第一节点到所述第二节点单向链路的丢包率,进而可计算出所述第二节点到所述第一节点单向链路的丢包率,以达到提高丢包率检测精确度的目的。
本实施例中,在所述S110之前,还需要在第二节点进行测试配置,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P优先级)、源UDP端口、目标UDP端口、接入业务模式(包括L2层和L3层)以及反射条件的流匹配规则。以供所述第二节点基于前述配置信息创建报文环回的ACL规则,如表3所示。
本实施例中,所述第二节点(反射器)在接收到报文时,基于所述反射ACL规则识别接收的报文是否为原端为第一节点发送的测试报文,在接收到第一节点发送的测试报文时,所述第二节点基于所述反射ACL规则将接收的所述测试报文返回至所述第一节点。其中,所述第二节点在接收到所述第一节点发送的测试报文时,累计接收到的所述测试报文的数量。
S120,在第二预设时间段内未接收到所述测试报文时,所述第二节点获取接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
本实施例中,在第二预设时间段内未接收到第一节点发送的测试报文时,所述第二节点识别当前第一节点的测试报文已发送完毕,获取接收到的所述测试报文的第三数量值,即所述第二节点累计的接收到所述测试报文的数量;以及获取所述测试报文携带的第一数量值,所述第一数量值为所述第一节点发送所述测试报文的预设数量。其中,所述第二预设时间段可根据实际需要进行设置,例如,在本实施例中,所述第二预设时间段优选为1秒。
需要说明的是,所述第一节点在进行测试报文的发送前,首先确定待发送测试报文的数量,并将表征待发送测试报文预设数量的第一数量值添加至 所述测试报文中;所述第一节点在发送测试报文时,记录发送的报文数,当发送的报文数等于所述第一数量值时,所述第一节点停止向所述第二节点发送所述测试报文,可参照第一实施例,此处不再赘述。
S130,所述第二节点基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。
本实施例中,所述第二节点在获取到接收测试报文的第三数量值,以及所述第一节点发送测试报文的第一数量值时,基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。将所述第三数量值,以及所述第一数量值代入公式(3)计算所述第一节点到所述第二节点单向链路的第一丢包率:
LR_A=(T-R)*100/T……公式(3);
其中,所述LR_A表示所述第一丢包率,T表示所述第一节点发送测试报文的第一数量值,R表示所述第二节点接收到的测试报文的第三数量值。
本实施例提出的丢包率检测方法,在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,基于统计的接收报文数以及所述测试报文携带的预设发送报文数计算所述发送端到所述反射端单向链路的丢包率,提高了丢包率检测的精确度。
可选地,基于第四实施例,提出本发明实施例丢包率检测方法的第五实施例,在本实施例中,上述步骤S130之后,还包括:
所述第二节点将计算的所述第一丢包率发送至所述第一节点。
本实施例中,所述第二节点将计算的所述第一丢包率发送至所述第一节点,以供所述第一节点基于所述第一丢包率计算所述第二节点到所述第一节点单向链路的第二丢包率。
所述第一节点在接到所述第二节点返回的所述测试报文时,累计接收到所述测试报文的数量;所述第一节点在发送完成预设数量的测试报文时,等待第一预设时间段,以确保所述第二节点将接收的所述测试报文均返回至所述第一节点,所述第一节点获取接收到的所述第二节点返回的所述测试报文的第二数量值,即所述第一节点累计的接收到所述测试报文的数量;在获取到所述第二数量值之后,所述第一节点将所述第二数量值以及所述第一数量 值代入公式(4)计算所述第一节点与所述第二节点之间环回链路的第二丢包率:
LR=(T-Rt)*100/T……公式(4);
其中,所述LR表示所述第二丢包率,T表示所述第一节点发送测试报文的第一数量值,Rt表示所述第一节点接收到的所述第二节点返回测试报文的第二数量值。
容易理解的是,由于所述第一节点与所述第二节点之间的环回链路由所述第一节点到所述第二节点的单向链路,以及所述第二节点到所述第一节点的单向链路构成,在计算出所述第一节点与所述第二节点之间环回链路的第二丢包率之后,所述第一节点即可将所述第二丢包率与所述第一丢包率的差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
本发明实施例还提供一种丢包率检测装置,参照图3,在本发明实施例丢包率检测装置的第一实施例中,所述丢包率检测装置包括:
发送模块10,设置为发送预设数量的测试报文至第二节点;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述发送模块所在的第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
本实施例提出的丢包率检测装置,可以应用于网络中两节点间单向链路的丢包率检测。以测试报文的原发送端为第一节点,测试报文的反射端为第二节点为例,在相关以太网链路测试基准RFC2544的基础上,本发明实施例能够检测所述第二节点到所述第一节点单向链路的丢包率,以达到提高丢包率检测精确度的目的。
本实施例中,在进行丢包率检测之前,还需要在所述第一节点进行测试配置,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP(Differentiated Services Code Point,差分服务代码点)优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P优先级)、源 UDP(User Data Protocol,用户数据报协议)端口、目标UDP端口、接入业务模式(包括L2层和L3层)、测试速率/测试带宽、报文长度、测试发包时长和发包端口。以供所述第一节点基于前述配置信息创建报文终结的ACL(Access Control List,访问控制列表)规则,如表1所示。
可选地,所述第一节点(发生器)在发送测试报文之前,还根据前述配置信息确定待发送测试报文的数量(预设数量),首先基于公式(1)计算发送测试报文的IPG(Interpacket Gap,帧间隙):
IPG=(BW*(12+PL))/TS-PL……公式(1);
其中,BW表示发包端口带宽,12为前导码(固定值),PL表示报文长度,TS表示测试速率/测试带宽。
在计算出IPG之后,基于公式(2)计算待发送测试报文的数量,即所述预设数量:
TN=TS*ST/(PL+IPG)……公式(2);
其中,所述TN表示待发送测试报文的数量,ST表示测试发包时长。
可选地,本实施例采用如表2所示的LM(Loss Measurement,丢包测量)报文作为所述测试报文,其中,所述OPCODE字段和Flow_id字段用于填写约定值以表征该报文为LM报文,所述TotalNumber字段用于填写表征所述预设数量的第一数量值(即TN)。
在发送测试报文时,所述发送模块10记录发送的报文数,当发送的报文数等于所述第一数量值时,停止向所述第二节点发送所述测试报文,以确保向所述第二节点发送所述预设数量的测试报文。同时,所述第一节点在接收到所述第二节点返回的所述测试报文时,累计接收到的所述测试报文的数量。
需要说明的是,在本实施例中,还需要在所述第二节点进行测试配置,以供所述第二节点根据配置信息创建报文环回的ACL规则:反射ACL规则,并根据所述反射ACL规则将其接收的由所述第一节点(发送模块10)发送的测试报文返回至所述第一节点,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P优先级)、源UDP端口、目标UDP端口、接入业务模式(包括L2层和L3层)以及反射条件的流匹配规则。以供所述第二节点基于前述配置信息创建报文环回的ACL规则,如表3所示。
本实施例中,所述第二节点(反射器)在接收到报文时,基于所述反射ACL规则识别接收的报文是否为原端为第一节点发送的测试报文,在接收到第一节点发送的测试报文时,所述第二节点基于所述反射ACL规则将接收的所述测试报文返回至所述第一节点,其中,所述第二节点在接收到所述第一节点发送的测试报文时,累计接收到所述测试报文的数量;在第二预设时间段内未接收到所述测试报文时,所述第二节点获取接收到的所述测试报文的第三数量值,即所述第二节点累计的接收到所述测试报文的数量,以及获取所述测试报文携带的第一数量值,其中,所述第一数量值为所述第一节点发送测试报文的预设数量;所述第二节点基于所述第三数量值、第一数量值以及公式(3),计算所述第一节点到所述第二节点单向链路的第一丢包率:
LR_A=(T-R)*100/T……公式(3);
其中,所述LR_A表示所述第一丢包率,T表示所述第一节点发送测试报文的第一数量值,R表示所述第二节点接收到的测试报文的第三数量值。
第一计算模块20,设置为当所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,获取所述第一节点接收到的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率;以及计算所述第二丢包率与接收到的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
在发送模块10完成所述预设数量的测试报文的发送,且所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,第一计算模块20识别当前第二节点的测试报文已返回完毕,并获取接收到的所述第二节点返回测试报文的第二数量值,即所述第一节点累计的接收到所述测试报文的数量,其中,所述第一预设时间段可根据实际需要进行设置,例如,在本实施例中,所述第一预设时间段优选为1秒;在获取到所述第二数量值之后,所述第一计算模块20将所述第二数量值以及所述第一数量值代入公式(4)计算所述第一节点与所述第二节点之间环回链路的第二丢包率:
LR=(T-Rt)*100/T……公式(4);
其中,所述LR表示所述第二丢包率,T表示所述第一节点发送测试报文的第一数量值,Rt表示所述第一节点接收到的所述第二节点返回测试报文的 第二数量值。
本实施例中,所述第二节点基于其接收的测试报文进行所述第一节点到所述第二节点单向链路的第一丢包率的计算,在计算完成后,将其计算的所述第一丢包率发送至所述第一节点。
容易理解的是,由于所述第一节点与所述第二节点之间的环回链路由所述第一节点到所述第二节点的单向链路,以及所述第二节点到所述第一节点的单向链路构成,在接收到所述第二节点发送的所述第一节点到所述第二节点单向链路的第一丢包率时,所述第一计算模块20即可将所述第二丢包率与所述第一丢包率的差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
本实施例提出的丢包率检测装置,在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,计算并返回所述发送端到所述反射端单向链路的第一丢包率,发送端根据本端计算的所述发送端到所述发射端环回链路的第二丢包率以及接收的所述第一丢包率,即可获取到所述反射端到所述发送端单向链路的第三丢包率,相较于相关技术仅可获取到发送端与发射端之间环回链路的丢包率,本发明实施例能够提高丢包率检测的精确度。
可选地,基于第一实施例,提出本发明实施例丢包率检测装置的第二实施例,在本实施例中,所述丢包率检测装置还包括确定模块,用于当所述第一节点接收到网管节点发送的配置信息时,基于所述配置信息确定所述发送模块待发送测试报文的数量;
所述发送模块还设置为将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
需要说明的是,本实施例与第一实施例的区别在于,在本实施例中,用户可基于网管节点进行所述第二节点的测试配置,以及进行所述第一节点的测试配置。在完成所述第二节点的测试配置,以及进行所述第一节点的测试配置之后,所述第二节点以及所述第一节点进行丢包率检测的过程可参照前述实施例施行,此处不再赘述。
本实施例中,所述发送模块10在所述第一计算模块20计算出所述第二 节点到所述第一节点单向链路的第三丢包率之后,将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点,供所述网管节点显示,反映链路的整体丢包情况和链路上/下行各自的丢包情况。
可选地,基于第一或第二实施例,提出本发明实施例丢包率检测装置的第三实施例,在本实施例中,所述丢包率检测装置还包括屏蔽模块,设置为在所述发送模块10发送所述测试报文期间,屏蔽其它报文。
需要说明的是,在第一或第二实施例中,所述第一节点在进行丢包率检测时,除了所述测试报文之外,对于接收到的其它报文,均会按正常流程进行转发,导致所述第一节点在统计接收到测试报文的数量时,需要识别其接收的每一个报文是否为所述测试报文,在接收的报文为所述测试报文时,才进行统计,导致统计接收到测试报文数量的效率较低。有鉴于此,本实施例中,屏蔽模块在所述发送模块10发送所述测试报文期间,屏蔽其它报文,以便于统计接收到测试报文的数量,提升统计效率。基于相同的原因,可选地,在本实施例中,所述第二节点在接收所述测试报文期间,屏蔽其它报文。
本发明实施例还提出了一种丢包率检测装置,参照图4,提供了本发明实施例丢包率检测方法的第四实施例,在本实施例中,所述丢包率检测装置包括:
返回模块110,设置为当接收到第一节点发送的测试报文时,将接收的所述测试报文返回至所述第一节点。
本实施例提出的丢包率检测装置,可以应用于网络中两节点间的单向链路丢包率检测。以测试报文的反射端为第二节点,测试报文的原发送端为第一节点为例,在相关以太网链路测试基准RFC2544的基础上,本发明实施例能够检测所述第一节点到所述第二节点单向链路的丢包率,进而可计算出所述第二节点到所述第一节点单向链路的丢包率,以达到提高丢包率检测精确度的目的。
本实施例中,在进行丢包率检测之前,还需要在第二节点进行测试配置,测试配置包括Flow_id(测试流ID)、源MAC、目标MAC、源IP、目标IP、DSCP优先级、外层VLAN(包括802.1P优先级)、内层VLAN(包括802.1P 优先级)、源UDP端口、目标UDP端口、接入业务模式(包括L2层和L3层)以及反射条件的流匹配规则。以供所述第二节点基于前述配置信息创建报文环回的ACL规则,如表3所示。
本实施例中,返回模块110在所述第二节点(反射器)接收到报文时,基于所述反射ACL规则识别接收的报文是否为原端为第一节点发送的测试报文,在接收到第一节点发送的测试报文时,所述返回模块110基于所述反射ACL规则将接收的所述测试报文返回至所述第一节点。其中,所述第二节点在接收到所述第一节点发送的测试报文时,累计接收到的所述测试报文的数量。
获取模块120,设置为在第二预设时间段内未接收到所述测试报文时,获取所述第二节点接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量。
本实施例中,当所述第二节点在第二预设时间段内未接收到第一节点发送的测试报文时,获取模块120识别当前第一节点的测试报文已发送完毕,获取接收到的所述测试报文的第三数量值,即所述第二节点累计的接收到所述测试报文的数量;以及获取所述测试报文携带的第一数量值,所述第一数量值为所述第一节点发送所述测试报文的预设数量。其中,所述第二预设时间段可根据实际需要进行设置,例如,在本实施例中,所述第二预设时间段优选为1秒。
需要说明的是,所述第一节点在进行测试报文的发送前,首先确定待发送测试报文的数量,并将表征待发送测试报文预设数量的第一数量值添加至所述测试报文中;所述第一节点在发送测试报文时,记录发送的报文数,当发送的报文数等于所述第一数量值时,所述第一节点停止向所述第二节点发送所述测试报文,可参照第一实施例,此处不再赘述。
第二计算模块130,设置为基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。
本实施例中,第二计算模块130在所述获取模块120获取到接收测试报文的第三数量值,以及所述第一节点发送测试报文的第一数量值时,基于所 述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。第二计算模块130将所述第三数量值,以及所述第一数量值代入公式(3)计算所述第一节点到所述第二节点单向链路的第一丢包率:
LR_A=(T-R)*100/T……公式(3);
其中,所述LR_A表示所述第一丢包率,T表示所述第一节点发送测试报文的第一数量值,R表示所述第二节点接收到的测试报文的第三数量值。
本实施例提出的丢包率检测装置,在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,基于统计的接收报文数以及所述测试报文携带的预设发送报文数计算所述发送端到所述反射端单向链路的丢包率,提高了丢包率检测的精确度。
可选地,基于第四实施例,提出本发明实施例丢包率检测装置的第五实施例,在本实施例中,所述返回模块110还设置为将所述第二计算模块130计算的所述第一丢包率发送至所述第一节点。
本实施例中,所述返回模块110将所述第二计算模块130计算的所述第一丢包率发送至所述第一节点,以供所述第一节点基于所述第一丢包率计算所述第二节点到所述第一节点单向链路的第二丢包率。
所述第一节点在接到所述第二节点返回的所述测试报文时,累计接收到所述测试报文的数量;所述第一节点在发送完成预设数量的测试报文时,等待第一预设时间段,以确保所述第二节点将接收的所述测试报文均返回至所述第一节点,所述第一节点获取接收到的所述第二节点返回的所述测试报文的第二数量值,即所述第一节点累计的接收到所述测试报文的数量;在获取到所述第二数量值之后,所述第一节点将所述第二数量值以及所述第一数量值代入公式(4)计算所述第一节点与所述第二节点之间环回链路的第二丢包率:
LR=(T-Rt)*100/T……公式(4);
其中,所述LR表示所述第二丢包率,T表示所述第一节点发送测试报文的第一数量值,Rt表示所述第一节点接收到的所述第二节点返回测试报文的第二数量值。
容易理解的是,由于所述第一节点与所述第二节点之间的环回链路由所 述第一节点到所述第二节点的单向链路,以及所述第二节点到所述第一节点的单向链路构成,在计算出所述第一节点与所述第二节点之间环回链路的第二丢包率之后,所述第一节点即可将所述第二丢包率与所述第一丢包率的差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的丢包率检测方法。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例通过在用于丢包率检测的测试报文中添加预设发送报文数,以供反射端在发送端完成预设报文数的测试报文的发送时,计算并返回所述发送端到所述反射端单向链路的第一丢包率,发送端根据本端计算的所述发送端到所述发射端环回链路的第二丢包率以及接收的所述第一丢包率,即可获取到所述反射端到所述发送端单向链路的第三丢包率,相较于相关技术仅可获取到发送端与发射端之间环回链路的丢包率,本发明能够提高丢包率检测的精确度。

Claims (11)

  1. 一种丢包率检测方法,所述方法包括:
    第一节点发送预设数量的测试报文至第二节点;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
    当所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,所述第一节点获取接收到的所述第二节点返回的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率;
    所述第一节点计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
  2. 如权利要求1所述的丢包率检测方法,所述方法还包括:在所述第一节点发送预设数量的测试报文至第二节点之前,当所述第一节点接收到网管节点发送的配置信息时,所述第一节点基于所述配置信息确定待发送测试报文的数量;
    在所述第一节点计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率之后,所述第一节点将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
  3. 如权利要求1或2所述的丢包率检测方法,其中,所述第一节点在发送所述测试报文期间,屏蔽其它报文。
  4. 一种丢包率检测方法,所述方法包括:
    在接收到第一节点发送的测试报文时,第二节点将接收的所述测试报文 返回至所述第一节点;
    在第二预设时间段内未接收到所述测试报文时,所述第二节点获取接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
    所述第二节点基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。
  5. 如权利要求4所述的丢包率检测方法,所述方法还包括:在所述第二节点基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率之后,所述第二节点将计算的所述第一丢包率发送至所述第一节点。
  6. 一种丢包率检测装置,所述装置包括:
    发送模块,设置为发送预设数量的测试报文至第二节点;其中,所述测试报文用于当所述第二节点接收到所述测试报文时向所述发送模块所在的第一节点返回该测试报文,并用于所述第二节点基于接收到的所述测试报文的第三数量值以及所述测试报文中携带的第一数量值计算所述第一节点到所述第二节点单向链路的第一丢包率;所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
    第一计算模块,设置为当所述第一节点在第一预设时间段内未接收到所述第二节点返回的所述测试报文时,获取所述第一节点接收到的所述第二节点返回的所述测试报文的第二数量值,并基于所述第一数量值以及所述第二数量值,计算所述第一节点与所述第二节点之间环回链路的第二丢包率;
    第一计算模块,还设置为计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率。
  7. 如权利要求6所述的丢包率检测装置,所述装置还包括确定模块,设 置为在所述发送模块发送预设数量的测试报文至第二节点之前,当所述第一节点接收到网管节点发送的配置信息时,基于所述配置信息确定所述发送模块待发送测试报文的数量;
    所述发送模块,还设置为在所述第一计算模块计算所述第二丢包率与接收到的第二节点发送的所述第一丢包率的差值,并将所述差值作为所述第二节点到所述第一节点单向链路的第三丢包率之后,将所述第一丢包率、所述第二丢包率以及所述第三丢包率发送至所述网管节点。
  8. 如权利要求6或7所述的丢包率检测装置,所述装置还包括:
    屏蔽模块,设置为在所述发送模块发送所述测试报文期间,屏蔽其它报文。
  9. 一种丢包率检测装置,所述装置包括:
    返回模块,设置为当接收到第一节点发送的测试报文时,将接收的所述测试报文返回至所述第一节点;
    获取模块,设置为在第二预设时间段内未接收到所述测试报文时,获取所述第二节点接收到的所述测试报文的第三数量值,以及所述测试报文携带的第一数量值,其中,所述第一数量值用于表征所述第一节点发送的测试报文的预设数量;所述第三数量值用于表征所述第二节点接收到的测试报文的数量;
    第二计算模块,设置为基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率。
  10. 如权利要求9所述的丢包率检测装置,所述返回模块,还设置为在第二计算模块基于所述第三数量值以及所述第一数量值,计算所述第一节点到所述第二节点单向链路的第一丢包率之后,将所述第二计算模块计算的所述第一丢包率发送至所述第一节点。
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现如权利要求1至3任意一项所述的丢包率检测方法,以及如权利要求4至5任意一项所述的丢包率检测方法。
PCT/CN2016/085150 2015-08-26 2016-06-07 一种丢包率检测方法及装置 WO2017032133A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510532389.9A CN106487605B (zh) 2015-08-26 2015-08-26 丢包率检测方法及装置
CN201510532389.9 2015-08-26

Publications (1)

Publication Number Publication Date
WO2017032133A1 true WO2017032133A1 (zh) 2017-03-02

Family

ID=58099457

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/085150 WO2017032133A1 (zh) 2015-08-26 2016-06-07 一种丢包率检测方法及装置

Country Status (2)

Country Link
CN (1) CN106487605B (zh)
WO (1) WO2017032133A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756588A (zh) * 2019-03-26 2020-10-09 华为技术有限公司 通信链路检测方法及相关装置
CN113508557A (zh) * 2019-01-29 2021-10-15 意大利电信股份公司 在分组交换通信网络中启用往返分组丢失测量

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981386B (zh) * 2017-12-28 2021-11-12 北京京东尚科信息技术有限公司 网络质量的测试方法、测试服务器和测试系统
CN112602294B (zh) * 2018-08-29 2021-10-15 华为技术有限公司 一种检测带宽的方法及检测设备
CN111262749B (zh) 2018-11-30 2023-05-23 华为技术有限公司 一种检测网络可靠性的方法及设备
CN110808906A (zh) * 2019-10-16 2020-02-18 杭州迪普科技股份有限公司 静态路由的测试方法和装置
CN112073128A (zh) * 2020-08-18 2020-12-11 江苏创通电子股份有限公司 通信设备性能测试方法及装置
CN113285835B (zh) * 2021-05-26 2022-11-18 广东电网有限责任公司 一种基于业务特征的载波网络链路丢包率推理方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777126A (zh) * 2005-12-12 2006-05-24 史文勇 一种对时延、丢包进行综合测量及关联分析的系统和方法
CN101605020A (zh) * 2009-07-07 2009-12-16 中兴通讯股份有限公司 一种丢包率检测方法、系统及装置
CN102118277A (zh) * 2009-12-30 2011-07-06 华为技术有限公司 丢包检测方法和装置及路由器
CN102217236A (zh) * 2011-05-10 2011-10-12 华为技术有限公司 检测链路丢包率的方法和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777126A (zh) * 2005-12-12 2006-05-24 史文勇 一种对时延、丢包进行综合测量及关联分析的系统和方法
CN101605020A (zh) * 2009-07-07 2009-12-16 中兴通讯股份有限公司 一种丢包率检测方法、系统及装置
CN102118277A (zh) * 2009-12-30 2011-07-06 华为技术有限公司 丢包检测方法和装置及路由器
CN102217236A (zh) * 2011-05-10 2011-10-12 华为技术有限公司 检测链路丢包率的方法和设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113508557A (zh) * 2019-01-29 2021-10-15 意大利电信股份公司 在分组交换通信网络中启用往返分组丢失测量
CN111756588A (zh) * 2019-03-26 2020-10-09 华为技术有限公司 通信链路检测方法及相关装置
CN111756588B (zh) * 2019-03-26 2023-01-06 华为技术有限公司 通信链路检测方法及相关装置

Also Published As

Publication number Publication date
CN106487605B (zh) 2020-06-30
CN106487605A (zh) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017032133A1 (zh) 一种丢包率检测方法及装置
US11848757B2 (en) In-situ passive performance measurement in a network environment
US11843535B2 (en) Key performance indicators (KPI) for tracking and correcting problems for a network-under-test
JP5462954B2 (ja) パケットロス検出方法及び装置、並びにルータ
US10848372B2 (en) Scalability, fault tolerance and fault management for TWAMP with a large number of test sessions
US8085674B2 (en) Priority trace in data networks
JP4567367B2 (ja) Oam機能を可能にするアドレスの挿入
US20070223388A1 (en) Hardware implementation of network testing and performance monitoring in a network device
US11102273B2 (en) Uplink performance management
JP5753281B2 (ja) 分散ルータ/スイッチアーキテクチャにおけるインサービススループット試験
US8457004B2 (en) System and method for analyzing and testing packet flows to localize problems
US20150036510A1 (en) Method and device for measuring ethernet performance
US9432275B2 (en) Transmission monitoring method and device
US20140086091A1 (en) Method, apparatus, and system for analyzing network transmission characteristic
WO2022222544A1 (zh) 一种操作维护管理oam检测方法及装置
CN114598636A (zh) 流量调度方法、设备及系统

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: 16838393

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: 16838393

Country of ref document: EP

Kind code of ref document: A1