CN106375158B - A kind of method for detecting packet loss, the network equipment and system - Google Patents

A kind of method for detecting packet loss, the network equipment and system Download PDF

Info

Publication number
CN106375158B
CN106375158B CN201610933234.0A CN201610933234A CN106375158B CN 106375158 B CN106375158 B CN 106375158B CN 201610933234 A CN201610933234 A CN 201610933234A CN 106375158 B CN106375158 B CN 106375158B
Authority
CN
China
Prior art keywords
count value
network equipment
contract
packet
project
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610933234.0A
Other languages
Chinese (zh)
Other versions
CN106375158A (en
Inventor
马远亮
辛方
张晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610933234.0A priority Critical patent/CN106375158B/en
Publication of CN106375158A publication Critical patent/CN106375158A/en
Application granted granted Critical
Publication of CN106375158B publication Critical patent/CN106375158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • H04L43/0841Round trip packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

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

The present invention relates to field of communication technology more particularly to a kind of method for detecting packet loss and the network equipment.In a kind of method for detecting packet loss, first network equipment sends the first detection messages to second network equipment, and records first and give out a contract for a project count value, starts timer;After the timer expiry, second network equipment of Xiang Suoshu sends multiple data messages;The second detection messages are sent to second network equipment, and records second and gives out a contract for a project count value;Response message is received from second network equipment, obtains the first packet receiving count value and the second packet receiving count value from the response message;Packet loss statistics is carried out according to the described first give out a contract for a project count value, the described second give out a contract for a project count value, the first packet receiving count value and the second packet receiving count value.By scheme provided by the present application, help to improve the accuracy of packet loss detection in the case where the message that the first network equipment is sent to second network equipment occurs out-of-order.

Description

A kind of method for detecting packet loss, the network equipment and system
Technical field
The present invention relates to the communications field more particularly to a kind of method for detecting packet loss, the network equipment and system.
Background technique
It Y.1731 is the operation management maintainance (Operation based on ethernet network that ITU-T is organized to set up Administration and Maintenance, OAM) agreement, mainly provide performance monitoring and fault management capability. Y.1731 performance monitoring mainly includes three packet loss detection, time delay detection and shaking detection functions.Packet loss detection includes single-ended Packet loss detection and both-end packet loss detection two ways, the testing result of each way may include distal frame loss detection result again With proximal frame loss detection result.
Y.1731 transmitting terminal records the quantity forwarded of data message when sending detection messages in agreement, and receiving end is receiving The received quantity that data message is recorded when the detection messages carries out packet loss according to the quantity forwarded of data message and received quantity Statistics.And when occurring out-of-order in detection messages and the transmit process of data message, it is inaccurate to may result in packet loss detection result Really.Such as transmitting terminal first sends datagram and retransmits detection messages, and the detection messages are first reached than the data message Receiving end.When receiving end receives detection messages, packet loss statistics is carried out.And the data message not yet reaches receiving end, thus leads Cause packet loss detection result inaccuracy.
Summary of the invention
In view of this, this application provides a kind of method for detecting packet loss, the network equipment and packet loss detection systems, for solving The technical problem of inaccuracy is detected in existing method for detecting packet loss.
In a first aspect, a kind of method for detecting packet loss is provided, this method comprises:
First network equipment sends the first detection messages to second network equipment, and records first and give out a contract for a project count value.It is described First give out a contract for a project count value be the first network equipment send sent when first detection messages include detection mark The quantity of data message.
First network equipment starts first timer.After first timer time-out, the first network equipment to Second network equipment sends multiple data messages.Each data message in the multiple data message includes the detection Mark.The duration of the first timer is for described in guaranteeing that first detection messages first reach than the multiple data message Second network equipment.
First network equipment sends the second detection messages to second network equipment.And it records second and gives out a contract for a project count value.It is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include the detection mark The quantity of the data message of will.
First network equipment receives response message from second network equipment, obtains the first packet receiving from the response message Count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives the first detection report The quantity of the received data message including detection mark when literary, the second packet receiving count value is second network Equipment receives the quantity of the received data message including detection mark when second detection messages;
First network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving meter Numerical value and the second packet receiving count value carry out packet loss statistics to the multiple data message.
In the method for detecting packet loss of above-mentioned offer, by the way that first timer, delay is arranged in the first network equipment The multiple data message is sent, so that even if the message that the first network equipment is sent to second network equipment occurs Random ordering, first detection messages also can first reach second network equipment earlier than the multiple data message.In the second net Network equipment starts after carrying out counting messages, and datagram literary talent can reach second network equipment, and subsequent data message all can It is included in packet loss statistics, helps to improve the accuracy of packet loss detection.
Optionally, the first network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, described It includes according to as follows that first packet receiving count value and the second packet receiving count value, which carry out packet loss statistics to the multiple data message, Formula carries out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, first detection messages include described first giving out a contract for a project count value, and second detection messages include institute Second is stated to give out a contract for a project count value.As a result, second network equipment can based on described first give out a contract for a project count value, described second give out a contract for a project The the first packet receiving count value and the second packet receiving count value of count value and local record carry out packet loss statistics.Optionally, the reception Response message includes receiving the first response message and receiving the second response message, correspondingly, described that the is obtained from response message One packet receiving count value and the second packet receiving count value include: that the first packet receiving count value is obtained from first response message, The second packet receiving count value is obtained from second response message.
Optionally, the first network equipment starts in the first timer to the first timer time-out period, And after sending second detection messages, it does not include the datagram for detecting mark that second network equipment of Xiang Suoshu, which is sent, Text.Can be transmitted does not include the data message for detecting mark, can not influence normal data transmission, ensure detection accurately And reduce detection influence.
Optionally, second detection messages are also used to indicate that second network equipment is receiving the second detection report Wen Shi starts second timer, records the second packet receiving count value after the second timer time-out.Second timing The duration of device be used for guarantee it is all reached after second detection messages second network equipment include the detection The quantity of the data message of mark is counted into the second packet receiving count value.By in the second timing of second network equipment setting Device so that even if the message that is sent to second network equipment of the first network equipment occur it is out-of-order, it is all described the The quantity that the data message including the detection mark of second network equipment is reached after two detection messages can all be counted Enter the second packet receiving count value, thus more accurate packet loss detection result is provided.
Second aspect provides a kind of method for detecting packet loss.This method comprises:
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value.It is described It includes detection mark that first packet receiving count value receives received when first detection messages for second network equipment The quantity of data message.
Second network equipment receives the second detection messages from the first network equipment, and starts timer, described fixed When device time-out after, record the second packet receiving count value.Second net described in when the second packet receiving count value is the timer expiry The quantity of the received data message including the detection mark of network equipment.The duration of the timer for guarantee it is all Second network equipment is reached after second detection messages includes the quantity quilt of the data message of the detection mark It is included in the second packet receiving count value.
Second network equipment sends response message to the first network equipment, and the response message includes first receipts Packet count value and the second packet receiving count value.
The response message is for enabling the first network equipment according to the first packet receiving count value, described second Packet receiving count value, first give out a contract for a project count value and second give out a contract for a project count value carry out packet loss statistics.Described first gives out a contract for a project count value as institute State the quantity that first network equipment sends the data message including detection mark sent when first detection messages.It is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include detection mark The quantity of data message.
In the method for detecting packet loss of above-mentioned offer, by the way that timer is arranged in second network equipment, so that even if Message that the first network equipment is sent to second network equipment occur it is out-of-order, it is all second detection messages it The quantity for reaching the data message including the detection mark of second network equipment afterwards can all be counted into the second packet receiving meter Thus numerical value provides more accurate packet loss detection result.
Optionally, second network equipment is after receiving first detection messages from the first network equipment to described Before timer expiry, also receiving not includes the data message for detecting mark.Can receive not includes the detection mark Data message, the transmission of normal data can not be influenced, ensureing that detection is accurate and reduces detection influences.
The third aspect provides a kind of method for detecting packet loss.This method comprises:
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value.It is described It includes detection mark that first packet receiving count value receives received when first detection messages for second network equipment The quantity of data message.First detection messages include first giving out a contract for a project count value.Described first count value of giving out a contract for a project is described the One network equipment sends the quantity of the data message including the detection mark sent when first detection messages.
Second network equipment receives the second detection messages from first network equipment.Second detection messages include the second hair Packet count value.Described second give out a contract for a project count value be the first network equipment send the packet sent when second detection messages Include the quantity of the data message of detection mark.
Second network equipment starts timer, after the timer expiry, records the second packet receiving count value.Described second Received second network equipment described in when packet receiving count value is the timer expiry includes the data message for detecting mark Quantity.The duration of the timer is used to guarantee all to reach second network equipment after second detection messages The quantity of data message including the detection mark is counted into the second packet receiving count value.
Second network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving meter Numerical value and the second packet receiving count value carry out packet loss statistics.
In above-mentioned method for detecting packet loss, by the way that timer is arranged in second network equipment, so that even if first net Random ordering occurs for the message that network equipment is sent to second network equipment, all to reach second after second detection messages The quantity of the data message including the detection mark of the network equipment can all be counted into the second packet receiving count value.Thus Two network equipments can calculate more accurate packet loss detection result.
Optionally, second network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, described first It includes carrying out packet loss statistics according to following formula that packet receiving count value and the second packet receiving count value, which carry out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, second network equipment is after receiving first detection messages from first network equipment to the timing Before device time-out, also receiving not includes the data message for detecting mark.Can receive not includes the number for detecting mark According to message, normal data transmission can not be influenced, ensureing that detection is accurate and reduces detection influences.
Fourth aspect provides a kind of first network equipment.The first network equipment includes transmission unit, receiving unit With packet loss statistic unit.
The transmission unit, for sending the first detection messages to second network equipment, record first is given out a contract for a project count value, and Start first timer, after the first timer time-out, second network equipment of Xiang Suoshu sends multiple data messages;To institute It states second network equipment and sends the second detection messages and record second and give out a contract for a project count value.Described first gives out a contract for a project count value as the hair The quantity for the data message including detection mark for sending unit to send when sending first detection messages.The multiple data Each data message in message includes the detection mark.Described second gives out a contract for a project count value as described in transmission unit transmission What is sent when the second detection messages includes the quantity of the data message of the detection mark.The duration of the first timer is used Second network equipment is first reached than the multiple data message in guarantee first detection messages.
The receiving unit obtains the from the response message for receiving response message from second network equipment One packet receiving count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives described first The quantity of the received data message including detection mark when detection messages, the second packet receiving count value is described the Two network equipments receive the quantity of the received data message including detection mark when second detection messages.
The packet loss statistic unit, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, described One packet receiving count value and the second packet receiving count value carry out packet loss statistics to the multiple data message.
Optionally, it includes carrying out packet loss statistics according to following formula that the packet loss statistic unit, which carries out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, first detection messages include described first giving out a contract for a project count value.Second detection messages include institute Second is stated to give out a contract for a project count value.
Optionally, it includes receiving the first response message and reception the second response report that the receiving unit, which receives response message, Text, it is correspondingly, described the first packet receiving count value to be obtained from response message and the second packet receiving count value includes: from first sound It answers and obtains the first packet receiving count value in message, the second packet receiving count value is obtained from second response message.
Optionally, the transmission unit starts in the first timer to the first timer time-out period, and After sending second detection messages, it does not include the data message for detecting mark that second network equipment of Xiang Suoshu, which is sent,.
Optionally, second detection messages are also used to indicate that second network equipment is receiving the second detection report Wen Shi starts second timer, records the second packet receiving count value after the second timer time-out.Second timing The duration of device be used for guarantee it is all reached after second detection messages second network equipment include the detection The quantity of the data message of mark is counted into the second packet receiving count value.
The above scheme of fourth aspect and the scheme of first aspect technical effect having the same.
5th aspect provides a kind of second network equipment.Second network equipment includes receiving unit and sends single Member.
The receiving unit for receiving the first detection messages from first network equipment, and records the first packet receiving count value. It includes detection mark that the first packet receiving count value receives received when first detection messages for the receiving unit The quantity of data message.
The receiving unit is also used to receive the second detection messages from the first network equipment, and starts timer, After the timer expiry, the second packet receiving count value is recorded.Described in when the second packet receiving count value is the timer expiry Received receiving unit includes the quantity for detecting the data message of mark.The duration of the timer is all in institute for guaranteeing The quantity for stating the data message including the detection mark for reaching the receiving unit after the second detection messages is counted into institute State the second packet receiving count value.
The transmission unit, for sending response message to the first network equipment, the response message includes described First packet receiving count value and the second packet receiving count value.
The response message is for enabling the first network equipment according to the first packet receiving count value, described second Packet receiving count value, first give out a contract for a project count value and second give out a contract for a project count value carry out packet loss statistics, described first gives out a contract for a project count value as institute The quantity that first network equipment sends the data message including detection mark sent when first detection messages is stated, it is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include detection mark The quantity of data message.
Optionally, the receiving unit is after receiving first detection messages from the first network equipment to described Before timer expiry, also receiving not includes the data message for detecting mark.
The scheme technical effect having the same of the above scheme and second aspect of 5th aspect.
6th aspect provides a kind of second network equipment.Second network equipment includes receiving unit and packet loss system Count unit.
The receiving unit for receiving the first detection messages from first network equipment, and records the first packet receiving count value. It includes detection mark that the first packet receiving count value receives received when first detection messages for the receiving unit The quantity of data message.First detection messages include first giving out a contract for a project count value.Described first count value of giving out a contract for a project is described the One network equipment sends the quantity of the data message including the detection mark sent when first detection messages.
The receiving unit is also used to receive the second detection messages from the first network equipment, and starts timer;? After the timer expiry, the second packet receiving count value is recorded.Described in when the second packet receiving count value is the timer expiry Received receiving unit includes the quantity for detecting the data message of mark.The duration of the timer is all in institute for guaranteeing The quantity for stating the data message including the detection mark for reaching the receiving unit after the second detection messages is counted into institute State the second packet receiving count value.Second detection messages include second giving out a contract for a project count value.Described second count value of giving out a contract for a project is described First network equipment sends the quantity of the data message including detection mark sent when second detection messages.
The packet loss statistic unit, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, described One packet receiving count value and the second packet receiving count value carry out packet loss statistics.
Optionally, it includes carrying out packet loss statistics according to following formula that the packet loss statistic unit, which carries out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, the receiving unit is after receiving first detection messages from the first network equipment to described Before timer expiry, also receiving not includes the data message for detecting mark.
The scheme technical effect having the same of the above scheme and the third aspect of 6th aspect.
7th aspect, provides a kind of first network equipment.The first network equipment include processor, network interface and Memory.
The memory is used to call the program of the memory storage for storing batch processing instruction, the processor Instruction execution operates as follows:
It triggers network interface and sends the first detection messages to second network equipment, and record first and give out a contract for a project count value, it is described First give out a contract for a project count value be the first network equipment send sent when first detection messages include detection mark The quantity of data message.
Start first timer, after the first timer time-out, triggers network interface to second network equipment Multiple data messages are sent, each data message in the multiple data message indicates comprising the detection, and described first is fixed When device duration for guaranteeing that first detection messages first reach second network equipment than the multiple data message.
It triggers network interface and sends the second detection messages to second network equipment, and record second and give out a contract for a project count value, Described second give out a contract for a project count value be the first network equipment send sent when second detection messages include the inspection The quantity of the data message of mark will.
It triggers network interface and receives response message from second network equipment, obtain the first packet receiving from the response message Count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives the first detection report The quantity of the received data message including detection mark when literary, the second packet receiving count value is second network Equipment receives the quantity of the received data message including detection mark when second detection messages.
According to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving count value and described Two packet receiving count values carry out packet loss statistics to the multiple data message.
Optionally, the packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, first detection messages include described first giving out a contract for a project count value.Second detection messages include institute Second is stated to give out a contract for a project count value.
Optionally, the reception response message includes receiving the first response message and receiving the second response message, correspondingly, It is described from obtaining the first packet receiving count value in response message and the second packet receiving count value includes obtaining from first response message The first packet receiving count value is taken, the second packet receiving count value is obtained from second response message.
Optionally, start in the first timer to the first timer time-out period, and send described second After detection messages, the program instruction that processor also calls memory to store, triggering network interface is sent out to second network equipment Sending does not include the data message for detecting mark.
Optionally, second detection messages are also used to indicate that second network equipment is receiving the second detection report Wen Shi starts second timer, records the second packet receiving count value after the second timer time-out.Second timing The duration of device be used for guarantee it is all reached after second detection messages second network equipment include the detection The quantity of the data message of mark is counted into the second packet receiving count value.
The scheme technical effect having the same of the above scheme and first aspect of 7th aspect.
Eighth aspect provides a kind of second network equipment.Second network equipment include processor, network interface and Memory.
The memory is used to call the program of the memory storage for storing batch processing instruction, the processor Instruction execution operates as follows:
It triggers network interface and receives the first detection messages from first network equipment, and record the first packet receiving count value, it is described First packet receiving count value is that second network equipment receives the received data including detection mark when first detection messages The quantity of message.
It triggers network interface and receives the second detection messages from the first network equipment, and start timer, described fixed When device time-out after, record the second packet receiving count value, the second packet receiving count value be the timer expiry when the second network set The quantity of the standby received data message including the detection mark, the duration of the timer are all described for guaranteeing It is described that being counted into including the quantity for detecting the data message indicated for second network equipment is reached after second detection messages Second packet receiving count value.
It triggers network interface and sends response message to the first network equipment, the response message includes first receipts Packet count value and the second packet receiving count value.
The response message is for enabling the first network equipment according to the first packet receiving count value, described second Packet receiving count value, first give out a contract for a project count value and second give out a contract for a project count value carry out packet loss statistics, described first gives out a contract for a project count value as institute The quantity that first network equipment sends the data message including detection mark sent when first detection messages is stated, it is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include detection mark The quantity of data message.
Optionally, after receiving first detection messages from the first network equipment to the timer expiry it Before, the program instruction that processor also calls memory to store, it does not include the data for detecting mark that triggering network interface, which receives, Message.
The above scheme of eighth aspect and the scheme of second aspect technical effect having the same.
9th aspect provides a kind of second network equipment.Second network equipment include processor, network interface and Memory.
The memory is used to call the program of the memory storage for storing batch processing instruction, the processor Instruction execution operates as follows:
It triggers network interface and receives the first detection messages from first network equipment, and record the first packet receiving count value, it is described First packet receiving count value is that second network equipment receives the received data including detection mark when first detection messages The quantity of message.First detection messages include first giving out a contract for a project count value, and the described first count value of giving out a contract for a project is first net Network equipment sends the quantity of the data message including the detection mark sent when first detection messages.
It triggers network interface and receives the second detection messages from the first network equipment, and start timer, described fixed When device time-out after, record the second packet receiving count value, the second packet receiving count value be the timer expiry when the second network set The quantity of the standby received data message including the detection mark, the duration of the timer are all described for guaranteeing It is described that being counted into including the quantity for detecting the data message indicated for second network equipment is reached after second detection messages Second packet receiving count value.Second detection messages include second giving out a contract for a project count value, and the described second count value of giving out a contract for a project is described the One network equipment sends the quantity of the data message including detection mark sent when second detection messages.
According to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving count value and described Two packet receiving count values carry out packet loss statistics.
Optionally, the packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |
Optionally, after receiving first detection messages from the first network equipment to the timer expiry it Before, the program instruction that processor also calls memory to store, it does not include the data for detecting mark that triggering network interface, which receives, Message.
The scheme technical effect having the same of the above scheme and the third aspect of 9th aspect.
Tenth aspect, provides a kind of packet loss detection system.The packet loss detection system includes what the fourth aspect provided Second network equipment that first network equipment and the 5th aspect or the 6th aspect provide.
On the one hand tenth, provides a kind of packet loss detection system.The packet loss detection system includes that the 7th aspect provides First network equipment and the eighth aspect or it is described 9th aspect provide second network equipment.
The packet loss detection system that above tenth aspect and the tenth one side provide, by being arranged in the first network equipment First timer, delay send the multiple data message.So that even if the first network equipment is set to second network Random ordering occurs for the message that preparation is sent, and first detection messages also can first reach second net earlier than the multiple data message Network equipment.After second network equipment starts to carry out counting messages, datagram literary talent can reach second network equipment, subsequent Data message can all be included in packet loss statistics in, help to improve the accuracy of packet loss detection.By being set in second network Standby setting timer, can make the message sent even if the first network equipment to second network equipment occur disorderly Sequence, the number of all data messages including the detection mark that second network equipment is reached after second detection messages Amount can all be counted into the second packet receiving count value, thus provide more accurate packet loss detection result.
Detailed description of the invention
Fig. 1 is a kind of possible application scenarios schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of addition detection mark in data message provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of addition detection mark in data message provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 5 is a kind of flow diagram of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 6 is a kind of flow diagram of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of first network equipment provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of second network equipment provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of second network equipment provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of first network equipment provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of second network equipment provided in an embodiment of the present invention;
Figure 12 is a kind of structural schematic diagram of second network equipment provided in an embodiment of the present invention;
Figure 13 is a kind of schematic diagram of packet loss detection system provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described,
The application scenarios of description of the embodiment of the present invention are the technical solutions in order to more clearly illustrate the embodiment of the present invention, The restriction for technical solution provided in an embodiment of the present invention is not constituted, those of ordinary skill in the art are it is found that with network The differentiation of framework and the appearance of new business scene, technical solution provided in an embodiment of the present invention is for similar technical problem, together Sample is applicable in.
Fig. 1 is a kind of possible application scenarios schematic diagram provided in an embodiment of the present invention.First network is set under the scene It is standby to be communicated by one or more communication links with second network equipment.First network equipment and second network equipment can be with It is all kinds of network equipments with communication function, such as host, interchanger, router etc..First network equipment and the second network Equipment can carry out packet loss detection in one or more of communication links.The communication link, which can be, all kinds of can be used for ether Link of Network Communication, such as the twisted pair, cable, optical fiber or the wireless connection that can be physical layer etc., are also possible to logical layer Pseudo-wire or the tunnel connection in face etc..
A packet loss detection process is also shown in Fig. 1.Wherein detection messages and response message can for example be lost respectively Packet statistical message (Loss Measurement Message, LMM) and packet loss statistics response (Loss Measurement Reply, LMR).Or the detection messages and the response message are all connectivity detection message (Continuity Check Message, CCM).Data message indicates that detection messages are indicated with letter Y with letter d in Fig. 1.
Y.1731 the sending instant and the time of reception of first network equipment and second network equipment in detection messages in agreement The count value for recording the data message sent and received respectively carries out packet loss statistics according to the count value.The packet loss statistics Need to guarantee the transmission sequence of data message and detection messages, otherwise statistical result will be inaccurate.Such as shown in Fig. 1, when first When second detection messages that the network equipment is sent reach second network equipment earlier than latter two data message, it will obtain mistake Packet loss statistical value 2.And latter two actually described data message is only later than second detection messages there is no losing Reach second network equipment.
To solve the above problems, the embodiment of the present invention provides a kind of method for detecting packet loss.In the data for packet loss detection Addition detection mark in message.The calculating of number of dropped packets is carried out based on the detection mark.First network equipment and the second network are set It is standby upper all with give out a contract for a project counter and packet receiving counter.The counter of giving out a contract for a project is able to record the data message including detection mark Count value of giving out a contract for a project.The packet receiving counter is able to record the packet receiving count value of the data message including detection mark.Fig. 2 and figure 3 provide a kind of schematic diagram of addition detection mark in data message respectively.
Fig. 2 shows a kind of in such a way that addition label indicates adding the detection.Assuming that first network equipment with Second network equipment is communicated on the communication link by 802.1Q agreement.As shown in Fig. 2, the initial message lattice of 802.1Q Dmac field indicates message destination address in formula, and SMAC field indicates message source address.TAG field is for identifying virtual LAN (Virtual Local Area Network, VLAN) relevant information, including TPID field, Priority field, CFI field and VLAN id field.The TPID field indicates that this message is VLAN message using hexadecimal number 0x8100.The Priority Field indicates message priority.In a standard format whether the CFI field be used to indicate MAC Address in different transmission mediums It is packaged, length is 1 bit.Value is that 0 expression MAC Address is packaged in a standard format, and value is 1 expression with non-standard Format encapsulation.The VLAN id field includes 12 bit values, indicates which VLAN the message belongs to, wherein 0 and 4095 be agreement Retention.The type field indicates that the affiliated Ethernet protocol type of the message, the Data field are the data that message carries. Data message can be used the Data field and carry data, and detection messages can be used the Data field and carry based on counting Numerical value.
The initial message format of 802.1Q is extended in Fig. 2, i.e., after the TAG field of the initial message format Before the type field, 0TAG field is added.The 0TAG field includes Priority field, CFI field and VLAN ID word Section.The Priority field indicates message priority.The VLAN id field is set to full 0.The CFI field is marked as the detection Will can be 0 or 1, such as use 1 to indicate as the detection.It optionally, may include connecting in the initial message format of 802.1Q Continuous multiple TAG fields are with nested for VLAN.Include the case where continuous multiple TAG fields in the initial message format of 802.1Q Under, after the last one TAG field and before the type field, add the 0TAG field.It is added in data message as a result, Detection mark.Optionally, detection mark can also be similarly added in detection messages.
Fig. 3 shows a kind of mode that the detection mark is added by way of adding control word field.Assuming that the One network equipment converts (Multi-Protocol Label Switching, MPLS) Layer 2 virtual private network in multiprotocol label It is used on the communication link under (Layer2Virtual Private Network, L2VPN) scene with second network equipment Mpls protocol is communicated.Initial message format as shown in figure 3, include public network DMAC, public network SMAC, public network VLAN, 0X8847, LSP label, VPN label, private network DMAC, private network SMAC, private network VLAN and PDU field.The public network dmac field indicates message Public network destination address.The public network SMAC field indicates message public network source address.The public network VLAN field indicates that message belongs to Which public network VLAN.The 0X8847 field indicates that the message protocol type is mpls protocol.The LSP label field indicates report Text belongs to which label switched path (Label Switch Path, LSP).The VPN label field indicates which message belongs to Virtual Private Network (Virtual Private Network, VPN).The private network dmac field indicates message private network destination address. The private network SMAC field indicates message private network destination address.The private network VLAN field indicates which private network message belongs to VLAN.The PDU field is message data.Data message can be used the PDU field and carry data, and detection messages can be used The PDU field carries the count value for statistics.
Initial message format is extended in Fig. 3, i.e., it is after the VPN field of the initial message format and described Before private network dmac field, addition control word field indicates as the detection.The control word field for example may include 4 words Section.Such as the detection mark can be represented with 16 system number 0X00000001.The addition detection mark in data message as a result, Will.Optionally, detection mark can also be similarly added in detection messages.
Fig. 4 shows a kind of flow diagram of method for detecting packet loss provided in an embodiment of the present invention.This can be applied to Application scenarios shown in FIG. 1.This method comprises the following steps:
S401, first network equipment send the first detection messages to second network equipment, and record first and give out a contract for a project count value.
Described first give out a contract for a project count value be first network equipment send sent when first detection messages include inspection The quantity of the data message of mark will.
Optionally, first detection messages include described first giving out a contract for a project count value.
S402, first network equipment start timer, and after the timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the multiple data message indicates that the duration of the timer is used for comprising the detection Guarantee that first detection messages first reach second network equipment than the multiple data message.The duration of the timer, can To be set as much larger than delivery time of the data message on the communication link.By the way that the timer is arranged, delay is sent The multiple data message, so that even if the message that the first network equipment is sent to second network equipment occurs disorderly Sequence, first detection messages also can first reach second network equipment earlier than the multiple data message.The timer when Whether length is enough, can be determined by multiple network test.In network test, first network equipment is first sent out to second network equipment Detection messages are sent, and start the timer with certain time length.First network equipment is after the timer expiry, to Two network equipments send datagram.Second network equipment judges whether first to receive the detection messages, then receives the data Message.If first receiving the detection messages, the duration of the timer is met the requirements.If first receiving the datagram Text, then the duration of the timer is insufficient.The Networked E-Journals can be it is multiple, the duration to ensure the timer is enough.
S403, first network equipment send the second detection messages to second network equipment, and record second and give out a contract for a project count value.
Described second gives out a contract for a project, and sent when count value sends second detection messages for first network equipment includes institute State the quantity of the data message of detection mark.
Optionally, second detection messages include described second giving out a contract for a project count value.
Optionally, first network equipment timer described in S402 starts to during the timer expiry, Yi Jifa After sending second detection messages, sending to second network equipment does not include the data message for detecting mark.It is described not wrap Include it is described detection mark data message can be do not include it is any detection mark data message, be also possible to include with it is described Detection indicates the data message of different marks.The method that mark is added in data message, as previously mentioned, can will wherein mark Will field is set to different values to distinguish with aforementioned detection mark.Described does not include the data message of the detection mark, Such as the general data message for being not added with the detection mark that can be given for communication links, normal number is not thus influenced According to transmission, ensureing that detection is accurate and reduces detection influences.First network equipment can also send continuous sequence of message, the company Continuous sequence of message may include not including the data message of the detection mark and detecting the data message indicated including described.
S404, second network equipment receive first detection messages from first network equipment, and record the first packet receiving meter Numerical value, it includes the inspection that the first packet receiving count value is received when being second network equipment reception first detection messages The quantity of the data message of mark will.
Optionally, first detection messages include described first giving out a contract for a project count value.
S405, second network equipment receive second detection messages from first network equipment, and record the second packet receiving meter Numerical value, it includes the inspection that the second packet receiving count value is received when being second network equipment reception second detection messages The quantity of the data message of mark will.
Second network equipment before receiving second detection messages, can receive after receiving first detection messages Multiple data messages, each data message in the multiple data message include the detection dress mark.Due to the multiple Data message reaches second network equipment, and the first packet receiving count value will increase the second packet receiving count value.
Optionally, second detection messages include described second giving out a contract for a project count value.
Optionally, second network equipment can start timer, described fixed when receiving second detection messages When device time-out after, re-record the second packet receiving count value.After timer starting and before time-out, second network equipment can be with Continue to receive from first network equipment includes the data message for detecting mark.The duration of the timer is for guaranteeing own The quantity that the data message including the detection mark of second network equipment is reached after second detection messages is counted Enter the second packet receiving count value.Optionally, second network equipment can start institute according to the instruction of second detection messages State timer.
By the way that the timer is arranged, second network equipment can be when receiving second detection messages, after continued access Packet receiving includes the data message of the detection mark.So that even if what the first network equipment was sent to second network equipment Out-of-order, all numbers including the detection mark that second network equipment is reached after second detection messages occur for message The second packet receiving count value can be all counted into according to the quantity of message.By the way that second timer is arranged in second network equipment, make Even if obtaining the message that the first network equipment is sent to second network equipment occurs random ordering, all in second detection The quantity that the data message including the detection mark of second network equipment is reached after message can all be counted into described second Packet receiving count value.Thus more accurate packet loss detection result is provided.Whether the duration of the timer is enough, can be by multiple Network test determines.In network test, first network equipment first sends multiple data messages and an association to second network equipment Message is discussed, and starts the timer with certain time length.Second network equipment continues waiting for after the timer expiry, It detects whether that the data message including the detection mark can also be received.If the data including the detection mark can also be received Message, then the duration of the timer is insufficient.The Networked E-Journals can be it is multiple, with ensure the timer when it is considerable It is enough.
Optionally, when first detection messages include described first giving out a contract for a project count value and second detection messages Including described second give out a contract for a project count value when, second network equipment can according to described first give out a contract for a project count value, described second give out a contract for a project The the first packet receiving count value and the second packet receiving count value of count value and local record carry out packet loss statistics.
Optionally, second network equipment is after receiving first detection messages from first network equipment, to for after It is continuous to receive from first network equipment including that receive and not wrap before the timer expiry for detecting the data message indicated Include the data message of the detection mark.It does not include the meaning of the data message of the detection mark as previously mentioned, herein no longer It repeats.Receive simultaneously do not include the detection mark data message, such as the normal data message that communication links are sent can Not influence normal data transmission.Ensureing that detection is accurate and reduces detection influences.The received company of can be of second network equipment Continuous sequence of message, the continuous sequence of message may include do not include it is described detection mark data message and include described in Detect the data message of mark.
S406, second network equipment send response message to first network equipment, and the response message includes described first Packet receiving count value and the second packet receiving count value.
Second network equipment, which sends response message to first network equipment, can be one response message of transmission or transmission Two response messages.When sending a response message, the first packet receiving count value and institute are carried in a response message State the second packet receiving count value.When sending two response messages, the first packet receiving count value is carried in a response message, The second packet receiving count value is carried in another response message.
Optionally, the response message further includes that the described first count value and described second of giving out a contract for a project is given out a contract for a project count value.It is sending out When sending a response message, the described first count value and described second of giving out a contract for a project also is carried in a response message and is given out a contract for a project counting Value.When sending two response messages, described first is carried in a response message and is given out a contract for a project count value, in another response message It is middle to carry described second and give out a contract for a project count value.
S407, first network equipment receive the response message from second network equipment, obtain institute from the response message State the first packet receiving count value and the second packet receiving count value.
The reception response message, which can be, to be received a response message or receives two response messages.When reception one When response message, the first packet receiving count value and the second packet receiving count value are obtained from a response message.Work as reception When two response messages, the first packet receiving count value is obtained from a response message, is obtained from another response message The second packet receiving count value.
Optionally, first network equipment can obtain described first from a response message and give out a contract for a project count value and described Two give out a contract for a project count value, or obtain from two response messages the described first count value and described second of giving out a contract for a project respectively and give out a contract for a project counting Value.
S408, first network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, it is described first receive Packet count value and the second packet receiving count value carry out packet loss statistics.
For example, first network equipment can be given out a contract for a project according to described the first of local record count value and it is described second hair Packet count value, and the first packet receiving count value obtained from the response message and the second packet receiving count value are lost Packet statistics.
For example, first network equipment gets described first from the response message and gives out a contract for a project count value, described first Packet receiving count value, described second give out a contract for a project count value and the second packet receiving count value when, carry out packet loss statistics.
When first network equipment and second network equipment carry out packet loss statistics in above method process, such as can be according to such as Lower formula calculates:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Taking absolute value in above formula can guarantee that the second count value of giving out a contract for a project is positive with the first count value difference of giving out a contract for a project, and Guarantee that the second packet receiving count value and the difference of the first packet receiving count value are positive.
Each step does not have strict sequence in above method process.First network equipment is received from second network equipment In the case where two response messages, first network equipment, which receives second response message, to send the multiple data message Before, or before sending second detection messages.
In the above method for detecting packet loss, first network equipment can be by being arranged timer, so that the first detection report Text reaches second network equipment earlier than all data messages including the detection mark.It is marked thus without having including the detection The data message of will reaches second network equipment earlier than first detection messages and is counted by leakage, helps to improve packet loss detection Accuracy.
In the above method for detecting packet loss, second network equipment can be by being arranged timer, so that all described second Second network equipment is reached after detection messages includes that the data message for detecting mark is all included into statistics, helps to mention The accuracy of high packet loss detection.
Above-described method for detecting packet loss is postponed described in transmission by the way that first timer is arranged in first network equipment Multiple data messages.So that even if out-of-order, institute occurs for the message that the first network equipment is sent to second network equipment Stating the first detection messages also can first reach second network equipment earlier than the multiple data message.Thus after statistics starts, data Message can just reach second network equipment, and subsequent data message can be all included in packet loss statistics, help to improve packet loss detection Accuracy.
Fig. 5 shows a flow diagram using method for detecting packet loss shown in Fig. 4.First inspection described in the process It observes and predicts text and second detection messages is the first LMM message and the 2nd LMM message.First network equipment receives two response reports Wen Shike is two LMR message.Y.1731 LMM message includes TxFCf field in agreement, LMR message include TxFCf field, RxFCf and TxFCb field.When first network equipment receives a response message, a RxFCfc field is added in LMR message, For transmitting packet receiving count value.Optionally, it when first network equipment receives a response message, can also be added in LMR message One TxFCfc field, for transmitting count value of giving out a contract for a project.The example flow includes the following steps:
S501, first network equipment send the first LMM message to second network equipment, and record first and give out a contract for a project count value TxFCf[tp]
Described first gives out a contract for a project count value TxFCf[tp]For first network equipment send the first LMM message when (assuming that The tp moment) what is sent includes the quantity for detecting the data message of mark.
Optionally, first network equipment is by the TxFCf[tp]The TxFCf field of the first LMM message is set.
S502, first network equipment start timer, and after the timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the multiple data message includes the detection mark.The duration of the timer is used Second network equipment is first reached than the multiple data message in guarantee the first LMM message.
S503, first network equipment send the 2nd LMM message to second network equipment, and record second and give out a contract for a project count value TxFCf[tc]
Described second gives out a contract for a project count value TxFCf[tc]For first network equipment send the 2nd LMM message when (assuming that The tc moment) what is sent includes the quantity of the data message for detecting mark.
Optionally, first network equipment is by the TxFCf[tc]The TxFCf field of the 2nd LMM message is set.
S504, second network equipment receive the first LMM message from first network equipment, and record the first packet receiving and count Value RxFCf[tp]
The first packet receiving count value RxFCf[tp]For second network equipment receive the first LMM message when it is received The quantity of data message including the detection mark.
Optionally, the first LMM message includes described first giving out a contract for a project count value TxFCf[tp]
S505, second network equipment receive the 2nd LMM message from first network equipment, and record the second packet receiving count value RxFCf[tc]
The second packet receiving count value RxFCf[tc]For second network equipment receive the 2nd LMM message when it is received The quantity of data message including the detection mark.
Second network equipment before receiving the 2nd LMM message, can receive more after receiving the first LMM message A data message, each data message in the multiple data message include the detection dress mark.Due to the multiple number Second network equipment, the first packet receiving count value RxFCf are reached according to message[tp]It will increase the second packet receiving count value RxFCf[tc]
Optionally, the 2nd LMM message includes described second giving out a contract for a project count value TxFCf[tc]
Optionally, second network equipment can start timer, described fixed when receiving the 2nd LMM message When device time-out after, re-record the second packet receiving count value RxFCf[tc].After timer starting and before time-out, the second network It includes the data message for detecting mark that equipment, which can continue to receive from first network equipment,.The duration of the timer is used for Guarantee that all data messages including the detection mark that second network equipment is reached after the 2nd LMM message are counted Enter the second packet receiving count value RxFCf[tc]
Optionally, second network equipment can be according to the TxFCf in the first LMM[tp], in the 2nd LMM TxFCf[tc]And the RxFCf of local record[tc]And RxFCf[tp]Carry out packet loss statistics.Packet loss statistics uses following formula:
Packet loss statistical value=| TxFCf[tc]- TxFCf[tp]|-| RxFCf[tc]- RxFCf[tp]|
S506, second network equipment send LMR message to first network equipment, and the LMR message includes first receipts Packet count value RxFCf[tp]With the second packet receiving count value RxFCf[tc]
When sending a response message, second network equipment can be by the first packet receiving count value RxFCf[tp]Setting exists The RxFCf of one LMR message, by the second packet receiving count value RxFCf[tc]The extension of one LMR message is set RxFCfc field.When sending two response messages, second network equipment can be by the first packet receiving count value RxFCf[tp]If The RxFCf field in first LMR message is set, by the second packet receiving count value RxFCf[tc]It is arranged in second LMR message RxFCf field.
Optionally, the LMR message further includes described first giving out a contract for a project count value TxFCf[tp]Give out a contract for a project counting with described second Value TxFCf[tc].When sending a response message, second network equipment can give out a contract for a project described first count value TxFCf[tp]If The TxFCf field in a LMR message is set, described second is given out a contract for a project count value TxFCf[tc]It is arranged in a LMR message Extension TxFCfc field.When sending two response messages, second network equipment can give out a contract for a project described first count value TxFCf[tp]The TxFCf field of first LMR message is set, described second is given out a contract for a project count value TxFCf[tc]It is arranged second The TxFCf field of a LMR message.
S507, first network equipment receive the LMR message from second network equipment, described in the LMR Receive message First packet receiving count value RxFCf[tp]With the second packet receiving count value RxFCf[tc]
When receiving a LMR message, from the first packet receiving count value and second packet receiving described in a LMR Receive message Count value.When receiving two LMR messages, the first packet receiving count value is obtained from a response message, from another sound It answers and obtains the second packet receiving count value in message.
Optionally, first network equipment can obtain described first from a LMR message and give out a contract for a project count value and described Two give out a contract for a project count value, or obtain from two LMR messages the described first count value and described second of giving out a contract for a project respectively and give out a contract for a project counting Value.
S508, first network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, it is described first receive Packet count value and the second packet receiving count value carry out packet loss statistics.
Packet loss statistics uses following formula:
Packet loss statistical value=| TxFCf[tc]- TxFCf[tp]|-| RxFCf[tc]- RxFCf[tp]|
For example, first network equipment can be according to the TxFCf of local record[tc]And TxFCf[tp]And response message In RxFCf[tc]And RxFCf[tp]Carry out packet loss statistics.
For example, the TxFCf that first network equipment can according to response in message[tp]、RxFCf[tp]、TxFCf[tc]With RxFCf[tc]Carry out packet loss statistics.
Fig. 6 shows a flow diagram using method for detecting packet loss shown in Fig. 4.First inspection described in the process Observing and predicting text and second detection messages is all the first CMM message and the 2nd CMM message.First network equipment receives two responses It can be two CMM messages when message.Y.1731 CMM message includes TxFCf field, RxFCb and TxFCb field in agreement.The When one network equipment receives a response message, using the reserved field in CMM message as RxFCbc field or addition one RxFCbc field, for transmitting packet receiving count value.Optionally, when first network equipment receives a response message, in CMM message A TxFCbc field can also be added, for transmitting count value of giving out a contract for a project.The example flow includes the following steps:
S601, first network equipment send the first CMM message to second network equipment, and record first and give out a contract for a project count value TxFCf[tp]
Described first gives out a contract for a project count value TxFCf[tp]For first network equipment send the first CMM message when (assuming that The tp moment) what is sent includes the quantity for detecting the data message of mark.
Optionally, first network equipment is by the TxFCf[tp]The TxFCf field of the first CMM message is set.
S602, first network equipment start timer, and after the timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the multiple data message includes the detection mark.The duration of the timer is used Second network equipment is first reached than the multiple data message in guarantee the first CMM message.
S603, first network equipment send the 2nd CMM message to second network equipment, and record second and give out a contract for a project count value TxFCf[tc]
Described second gives out a contract for a project count value TxFCf[tc]For first network equipment send the 2nd CMM message when (assuming that The tc moment) what is sent includes the quantity of the data message for detecting mark.
Optionally, first network equipment is by the TxFCf[tc]The TxFCf field of the 2nd CMM message is set.
S604, second network equipment receive the first CMM message from first network equipment, and record the first packet receiving and count Value RxFCb[tp]
The first packet receiving count value RxFCb[tp]For second network equipment receive the first CMM message when it is received The quantity of data message including the detection mark.
Optionally, the first CMM message includes described first giving out a contract for a project count value TxFCf[tp]
S605, second network equipment receive the 2nd CMM message from first network equipment, and record the second packet receiving count value RxFCb[tc]
The second packet receiving count value RxFCb[tc]For second network equipment receive the 2nd CMM message when it is received The quantity of data message including the detection mark.
Second network equipment before receiving the 2nd CMM message, can receive more after receiving the first CMM message A data message, each data message in the multiple data message include the detection dress mark.Due to the multiple number Second network equipment, the first packet receiving count value RxFCb are reached according to message[tp]It will increase the second packet receiving count value RxFCb[tc]
Optionally, the 2nd CMM message includes described second giving out a contract for a project count value TxFCf[tc]
Optionally, second network equipment can start timer, described fixed when receiving the 2nd CMM message When device time-out after, re-record the second packet receiving count value RxFCb[tc].After timer starting and before time-out, the second network It includes the data message for detecting mark that equipment, which can continue to receive from first network equipment,.The duration of the timer is used for Guarantee that all data messages including the detection mark that second network equipment is reached after the 2nd CMM message are counted Enter the second packet receiving count value RxFCb[tc]
Optionally, second network equipment can be according to the TxFCf in the first CMM[tp], in the 2nd CMM TxFCf[tc]And the RxFCb of local record[tc]And RxFCb[tp]Carry out packet loss statistics.Wherein to avoid field name conflict, by institute State TxFCf[tp]It is denoted as TxFCb[tp], by the TxFCf[tc]It is denoted as TxFCb[tc].The field name conflict refers to be reported using CMM In text transmission, other count values may be sent to first network equipment using TxFCf field in second network equipment.It is described Packet loss statistics uses following formula:
Packet loss statistical value=| TxFCb[tc]- TxFCb[tp]|-| RxFCb[tc]- RxFCb[tp]|
S606, second network equipment send the CMM message as response message to first network equipment, described as response The CMM message of message includes the first packet receiving count value RxFCb[tp]With the second packet receiving count value RxFCb[tc]
When sending a response message, second network equipment can be by the first packet receiving count value RxFCb[tp]Setting exists RxFCb field, by the second packet receiving count value RxFCb[tc]The RxFCbc field of the extension of one response message is set.It sends When two response messages, second network equipment can be by the first packet receiving count value RxFCb[tp]Setting is reported in first CMM The RxFCb field of text, by the second packet receiving count value RxFCb[tc]The RxFCb field of second CMM message is set.
Optionally, the CMM message as response message further includes described first giving out a contract for a project count value TxFCf[tp]And institute Second is stated to give out a contract for a project count value TxFCf[tc].Wherein to avoid field name conflict, by TxFCf[tp]It is denoted as TxFCb[tp], TxFCf[tc] It is denoted as TxFCb[tc].The field name conflict refers to using in the transmission of CMM message, may use in second network equipment TxFCf field to first network equipment sends other count values.Thus when sending a response message, second network equipment By the TxFCb[tp]The TxFCb field of the CMM message is set, by the TxFCb[tc]The CMM message is set TxFCbc field.When sending two CMM messages as response message, second network equipment can give out a contract for a project described first meter Numerical value TxFCb[tp]The TxFCb field of first CMM message is set, described second is given out a contract for a project count value TxFCb[tc]Setting exists The TxFCb field of second LMR message.
S607, first network equipment receive the CMM message as response message from second network equipment, from described CMM Receive message the first packet receiving count value RxFCb[tp]With the second packet receiving count value RxFCb[tc]
When receiving a CMM message, from the first packet receiving count value and second packet receiving described in a CMM Receive message Count value.When receiving two CMM messages, the first packet receiving count value is obtained from a CMM message, from another CMM The second packet receiving count value is obtained in message.
Optionally, first network equipment can obtain described first from a CMM message and give out a contract for a project count value and described Two give out a contract for a project count value, or obtain from two CMM messages the described first count value and described second of giving out a contract for a project respectively and give out a contract for a project counting Value.
S608, first network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, it is described first receive Packet count value and the second packet receiving count value carry out packet loss statistics.
Packet loss statistics uses following formula:
Packet loss statistical value=| TxFCb[tc]- TxFCb[tp]|-| RxFCb[tc]- RxFCb[tp]|
For example, first network equipment can give out a contract for a project count value (TxFCf according to described the first of local record[tp]'s Value is equal to TxFCb[tp]Value) and described second give out a contract for a project count value (TxFCf[tc]Value be equal to TxFCb[tc]Value) and it is described As the RxFCb in the CMM message of response message[tc]And RxFCb[tp]Carry out packet loss statistics.
For example, first network equipment can be according to the TxFCb in the CMM message as response message[tp]、 RxFCb[tp]、TxFCb[tc]And RxFCb[tc]Carry out packet loss statistics.
Fig. 7 is a kind of structural schematic diagram of first network equipment 700 provided in an embodiment of the present invention.First network equipment 700 can be used for executing method performed by first network equipment in the corresponding embodiment of fig. 4 to fig. 6.First network equipment 700 is wrapped Include transmission unit 701, receiving unit 702 and packet loss statistic unit 703.
Transmission unit 701 is given out a contract for a project count value for sending the first detection messages to second network equipment and recording first, is opened Dynamic first timer, after the first timer time-out, second network equipment of Xiang Suoshu sends multiple data messages, Xiang Suoshu Count value that second network equipment sends the second detection messages and record second is given out a contract for a project.Described first gives out a contract for a project count value as transmission unit What is sent when 701 transmission first detection messages includes the quantity of the data message of detection mark.The multiple datagram Each data message in text includes the detection mark.Described second count value of giving out a contract for a project is that transmission unit 701 sends described the What is sent when two detection messages includes the quantity of the data message of the detection mark.The duration of the first timer is used for Guarantee that first detection messages first reach second network equipment than the multiple data message.
Receiving unit 702 obtains first from the response message for receiving response message from second network equipment Packet receiving count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives first inspection The quantity of the received data message including detection mark when text is observed and predicted, the second packet receiving count value is described second The network equipment receives the quantity of the received data message including detection mark when second detection messages.
Packet loss statistic unit 703, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, described One packet receiving count value and the second packet receiving count value carry out packet loss statistics to the multiple data message.
Optionally, it includes carrying out packet loss statistics according to following formula that packet loss statistic unit 703, which carries out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, first detection messages include described first giving out a contract for a project count value.Second detection messages include institute Second is stated to give out a contract for a project count value.
Optionally, it includes receiving the first response message and reception the second response report that the receiving unit, which receives response message, Text, it is correspondingly, described the first packet receiving count value to be obtained from response message and the second packet receiving count value includes from first sound It answers and obtains the first packet receiving count value in message, the second packet receiving count value is obtained from second response message.
Optionally, transmission unit 701 starts in the first timer to the first timer time-out period, Yi Jifa After sending second detection messages, it does not include the data message for detecting mark that second network equipment of Xiang Suoshu, which is sent,.
Optionally, second detection messages are also used to indicate that second network equipment is receiving the second detection report Wen Shi starts second timer, records the second packet receiving count value after the second timer time-out.Second timing The duration of device be used for guarantee it is all reached after second detection messages second network equipment include the detection The data message of mark is counted into the second packet receiving count value.
Fig. 8 is a kind of structural schematic diagram of second network equipment 800 provided in an embodiment of the present invention.Second network equipment 800 can be used for executing method performed by second network equipment in the corresponding embodiment of fig. 4 to fig. 6.Second network equipment 800 packet Include receiving unit 801 and transmission unit 802.
Receiving unit 801 for receiving the first detection messages from first network equipment, and records the first packet receiving count value. The first packet receiving count value is that receiving unit 801 receives the received number including detection mark when first detection messages According to the quantity of message.
Receiving unit 801 is also used to receive the second detection messages from the first network equipment, and starts timer, After the timer expiry, the second packet receiving count value is recorded.The second packet receiving count value receives when being the timer expiry Received unit 801 includes the quantity for detecting the data message of mark.The duration of the timer is all in institute for guaranteeing Stating receiving unit 801 is reached after the second detection messages includes that the data message of the detection mark is counted into described second and receives Packet count value.
Transmission unit 802, for sending response message to the first network equipment, the response message includes described the One packet receiving count value and the second packet receiving count value.
The response message is for enabling the first network equipment according to the first packet receiving count value, described second Packet receiving count value, first give out a contract for a project count value and second give out a contract for a project count value carry out packet loss statistics, described first gives out a contract for a project count value as institute The quantity that first network equipment sends the data message including detection mark sent when first detection messages is stated, it is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include detection mark The quantity of data message.
Optionally, receiving unit 801 is after receiving first detection messages from the first network equipment to described Before timer expiry, also receiving not includes the data message for detecting mark.
Optionally, receiving unit 801 are also used to after receiving the first detection messages from the first network equipment, from The first network equipment receives multiple data messages.Each data message in the multiple data message includes the detection Mark.
Fig. 9 is a kind of structural schematic diagram of second network equipment 900 provided in an embodiment of the present invention.Second network equipment 900 can be used for executing method performed by second network equipment in the corresponding embodiment of fig. 4 to fig. 6.Second network equipment 900 packet Include receiving unit 901 and packet loss statistic unit 902.
Receiving unit 901 for receiving the first detection messages from first network equipment, and records the first packet receiving count value. The first packet receiving count value is that receiving unit 901 receives the received number including detection mark when first detection messages According to the quantity of message.First detection messages include first giving out a contract for a project count value.Described first give out a contract for a project count value be described first The network equipment sends the quantity of the data message including the detection mark sent when first detection messages.
Receiving unit 901 is also used to receive the second detection messages from the first network equipment, and starts timer, After the timer expiry, the second packet receiving count value is recorded.The second packet receiving count value receives when being the timer expiry Received unit 901 includes the quantity for detecting the data message of mark.The duration of the timer is all in institute for guaranteeing Stating receiving unit 901 is reached after the second detection messages includes that the data message of the detection mark is counted into described second and receives Packet count value.Second detection messages include second giving out a contract for a project count value.Described second gives out a contract for a project count value as the first network Equipment sends the quantity of the data message including detection mark sent when second detection messages.
Packet loss statistic unit 902, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, described One packet receiving count value and the second packet receiving count value carry out packet loss statistics.
Optionally, it includes carrying out packet loss statistics according to following formula that packet loss statistic unit 902, which carries out packet loss statistics:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, receiving unit 901 is after receiving first detection messages from the first network equipment to described Before timer expiry, also receiving not includes the data message for detecting mark.
Optionally, receiving unit 901 are also used to after receiving the first detection messages from the first network equipment, from The first network equipment receives multiple data messages.Each data message in the multiple data message includes the detection Mark.
Figure 10 is a kind of structural schematic diagram of first network equipment 1000 provided in an embodiment of the present invention.First network equipment 1000 may, for example, be host, interchanger, router etc..First network equipment 1000 can execute fig. 4 to fig. 6 illustrated embodiment In first network equipment performed by step.First network equipment 1000 can be the first network in embodiment illustrated in fig. 7 Equipment 700.First network equipment 1000 includes processor 1001, network interface 1002 and memory 1003.
The memory 1003 is for storing batch processing instruction, and the processor 1001 is for calling the memory The program instruction of 1003 storages performs the following operations:
It triggers network interface 1002 and sends the first detection messages to second network equipment, and record first and give out a contract for a project count value, Described first give out a contract for a project count value be the first network equipment send sent when first detection messages include detection mark The quantity of the data message of will.
Start first timer, after the first timer time-out, triggers network interface 1002 to second network Equipment sends multiple data messages, and each data message in the multiple data message includes detection mark, and described the The duration of one timer is for guaranteeing that first detection messages first reach second network than the multiple data message and set It is standby.
It triggers network interface 1002 and sends the second detection messages to second network equipment, and record second and give out a contract for a project counting Value, the described second count value of giving out a contract for a project is that the first network equipment sends that sent when second detection messages includes described Detect the quantity of the data message of mark.
It triggers network interface 1002 and receives response message from second network equipment, obtain first from the response message Packet receiving count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives first inspection The quantity of the received data message including detection mark when text is observed and predicted, the second packet receiving count value is described second The network equipment receives the quantity of the received data message including detection mark when second detection messages.
According to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving count value and described Two packet receiving count values carry out packet loss statistics to the multiple data message.
Optionally, the packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |.
Optionally, first detection messages include described first giving out a contract for a project count value.Second detection messages include institute Second is stated to give out a contract for a project count value.
Optionally, the reception response message includes receiving the first response message and receiving the second response message, correspondingly, It is described from obtaining the first packet receiving count value in response message and the second packet receiving count value includes: to obtain from first response message The first packet receiving count value is taken, the second packet receiving count value is obtained from second response message.
Optionally, start in the first timer to the first timer time-out period, and send described second After detection messages, the program instruction that processor 1001 also calls memory 1003 to store, triggering network interface 1002 is to described the It does not include the data message for detecting mark that two network equipments, which are sent,.
Optionally, second detection messages are also used to indicate that second network equipment is receiving the second detection report Wen Shi starts second timer, records the second packet receiving count value after the second timer time-out.Second timing The duration of device be used for guarantee it is all reached after second detection messages second network equipment include the detection The data message of mark is counted into the second packet receiving count value.
When first network equipment 1000 is the first network equipment 700 in embodiment illustrated in fig. 7, the realization of processor 1001 is lost The function of packet statistic unit 703, it is real that processor 1001 reads the program instruction triggering network interface 1002 that memory 1003 stores The function of existing transmission unit 701 and receiving unit 702.
Figure 11 is a kind of structural schematic diagram of second network equipment 1100 provided in an embodiment of the present invention.Second network equipment 1100 may, for example, be host, interchanger, router etc..Second network equipment 1100 can execute fig. 4 to fig. 6 illustrated embodiment In second network equipment performed by step.Second network equipment 1100 can be the second network in embodiment illustrated in fig. 8 Equipment 800.Second network equipment 1100 includes processor 1101, network interface 1102 and memory 1103.
The memory 1103 is for storing batch processing instruction, and the processor 1101 is for calling the memory The program instruction of 1103 storages performs the following operations:
It triggers network interface 1102 and receives the first detection messages from first network equipment, and record the first packet receiving count value, It includes detection mark that the first packet receiving count value receives received when first detection messages for second network equipment 1100 The quantity of the data message of will.
It triggers network interface 1102 and receives the second detection messages from the first network equipment, and start timer, in institute After stating timer expiry, the second packet receiving count value, the second net when the second packet receiving count value is the timer expiry are recorded The quantity of the received data message including the detection mark of network equipment 1100, the duration of the timer is for guaranteeing institute There is the data message including the detection mark for reaching second network equipment 1100 after second detection messages to be counted Enter the second packet receiving count value.
It triggers network interface 1102 and sends response message to the first network equipment, the response message includes described the One packet receiving count value and the second packet receiving count value.
The response message is for enabling the first network equipment according to the first packet receiving count value, described second Packet receiving count value, first give out a contract for a project count value and second give out a contract for a project count value carry out packet loss statistics, described first gives out a contract for a project count value as institute The quantity that first network equipment sends the data message including detection mark sent when first detection messages is stated, it is described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include detection mark The quantity of data message.
Optionally, after receiving first detection messages from the first network equipment to the timer expiry it Before, the program instruction that processor 1101 also calls memory 1103 to store, the triggering reception of network interface 1102 does not include the inspection The data message of mark will.
When second network equipment 1100 is second network equipment 800 in embodiment illustrated in fig. 8, the reading of processor 1101 is deposited The program instruction triggering network interface 1102 that reservoir 1103 stores realizes the function of receiving unit 801 and transmission unit 802.
Figure 12 is a kind of structural schematic diagram of second network equipment 1200 provided in an embodiment of the present invention.Second network equipment 1200 may, for example, be host, interchanger, router etc..Second network equipment 1200 can execute fig. 4 to fig. 6 illustrated embodiment In second network equipment performed by step.Second network equipment 1200 can be the second network in embodiment illustrated in fig. 9 Equipment 900.Second network equipment 1200 includes processor 1201, network interface 1202 and memory 1203.
The memory 1203 is for storing batch processing instruction, and the processor 1201 is for calling the memory The program instruction of 1203 storages performs the following operations:
It triggers network interface 1202 and receives the first detection messages from first network equipment, and record the first packet receiving count value, It includes detection mark that the first packet receiving count value receives received when first detection messages for second network equipment 1100 The quantity of the data message of will.First detection messages include first giving out a contract for a project count value, and described first gives out a contract for a project count value as institute State the quantity that first network equipment sends the data message including the detection mark sent when first detection messages.
It triggers network interface 1202 and receives the second detection messages from the first network equipment, and start timer, in institute After stating timer expiry, the second packet receiving count value, the second net when the second packet receiving count value is the timer expiry are recorded The quantity of the received data message including the detection mark of network equipment 1200, the duration of the timer is for guaranteeing institute There is the data message including the detection mark for reaching second network equipment 1200 after second detection messages to be counted Enter the second packet receiving count value.Second detection messages include second giving out a contract for a project count value, and the described second count value of giving out a contract for a project is The first network equipment sends the quantity of the data message including detection mark sent when second detection messages.
According to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving count value and described Two packet receiving count values carry out packet loss statistics.
Optionally, the packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| the second packet receiving count value-the first is received Packet count value |
Optionally, after receiving first detection messages from the first network equipment to the timer expiry it Before, the program instruction that processor 1201 also calls memory 1203 to store, the triggering reception of network interface 1202 does not include the inspection The data message of mark will.
When second network equipment 1200 is second network equipment 900 in embodiment illustrated in fig. 9, the realization of processor 1201 is lost The function of packet statistic unit 902, it is real that processor 1201 reads the program instruction triggering network interface 1202 that memory 1203 stores The function of existing receiving unit 901.
The above processor 1001,1101 and 1201 includes but is not limited to central processing unit (English: Central Processing Unit, referred to as: CPU), network processing unit (English: Network Processor, referred to as: NP), it is dedicated integrated Circuit (English: Application-Specific Integrated Circuit, referred to as: ASIC) or programmable logic device One or more of part (English: Programmable Logic Device, abbreviation: PLD).Above-mentioned PLD can be complexity can Programmed logic device (English: Complex Programmable Logic Device, abbreviation: CPLD), field programmable logic Gate array (English: Field-Programmable Gate Array, abbreviation: FPGA), Universal Array Logic (English: Generic Array Logic, abbreviation: GAL) or any combination thereof.
Network interface 1002,1102 and 1202 can be wireline interface, such as Fiber Distributed Data Interface (English: Fiber Distributed Data Interface, referred to as: FDDI), Ethernet (English: Ethernet) interface.Network connects Mouth 1002,1102 and 1202 is also possible to wireless interface, such as wireless lan interfaces.
Memory 1003,1103 and 1203 can be including but not limited to content adressable memory (English: Content- Addressable Memory, referred to as: CAM), such as three-state content addressing memory (English: Ternary CAM, referred to as: TCAM), random access memory (English: Random-Access Memory, abbreviation: RAM).Memory 1003,1103 and 1203 can also be integrated in respectively in processor 1001,1101 and 1201.If memory 1003,1103 and 1203 be respectively with Processor 1001,1101 and 1201 mutually independent devices, then memory 1003,1103 and 1203 respectively with processor 1001, 1101 are connected with 1201, such as can pass through bus communication.
Network interface 1002,1102 and 1202 can pass through bus communication with processor 1001,1101 and 1201 respectively, It can be direct-connected.
Figure 13 is a kind of structural schematic diagram of packet loss detection system provided in an embodiment of the present invention.The packet loss detection system Including first network equipment and second network equipment.The first network equipment and second network equipment can pass through one Or multiple communication links are communicated.The first network equipment and second network equipment, which may be respectively used in, executes Fig. 4 extremely The step of first network equipment and second network equipment execute in the corresponding embodiment of Fig. 6.The first network equipment can be real The function of first network equipment 700 in existing Fig. 7 can be first network equipment 1000 in Figure 10.Second network equipment can To realize the function of second network equipment 900 in second network equipment 800 in Fig. 8 or Fig. 9, can be set for the second network in Figure 11 Second network equipment 1200 in standby 1100 or Figure 12.For example:
The first network equipment can be used for sending the first detection messages to second network equipment and record first Give out a contract for a project count value, start first timer, after the first timer time-out, second network equipment of Xiang Suoshu sends multiple numbers According to message, count value that second network equipment of Xiang Suoshu sends the second detection messages and record second is given out a contract for a project.Described first gives out a contract for a project meter Numerical value is that the first network equipment sends the data message including detection mark sent when first detection messages Quantity.Each data message in the multiple data message includes the detection mark.Described second gives out a contract for a project count value as institute State the quantity that first network equipment sends the data message including the detection mark sent when second detection messages. The duration of the first timer is for guaranteeing that first detection messages first reach described second than the multiple data message The network equipment.
Second network equipment can be used for receiving first detection messages from the first network equipment, and remember Record the first packet receiving count value.When the first packet receiving count value is second network equipment reception first detection messages The quantity of the received data message including the detection mark.
Second network equipment can be also used to receive second detection messages from the first network equipment, and Record the second packet receiving count value.When the second packet receiving count value is that second network equipment receives second detection messages The quantity of the received data message including the detection mark.
Second network equipment can be also used to send the first response message to the first network equipment.Described One response message includes the first packet receiving count value.The first packet receiving count value is that second network equipment receives described first The quantity of the received data message including detection mark when detection messages.
Second network equipment can be also used to send the second response message to the first network equipment.Described Two response messages include the second packet receiving count value.The second packet receiving count value is that second network equipment receives described second The quantity of the received data message including detection mark when detection messages.
The first network equipment, can be also used to according to described first give out a contract for a project count value, described second give out a contract for a project count value, The first packet receiving count value and the second packet receiving count value carry out packet loss statistics.
Packet loss detection system described above, by the way that first timer is arranged in the first network equipment, delay sends institute State multiple data messages.So that even if random ordering occurs for the message that the first network equipment is sent to second network equipment, First detection messages also can first reach second network equipment earlier than the multiple data message.In second network equipment Start after carrying out counting messages, datagram literary talent can reach second network equipment, and subsequent data message, which can be all included in, to be lost In packet statistics, the accuracy of packet loss detection is helped to improve.By the way that timer is arranged in second network equipment, can make Even if random ordering occurs for the message that the first network equipment is sent to second network equipment, all in the second detection report The quantity that the data message including the detection mark of second network equipment is reached after text can all be counted into described second and receive Thus packet count value provides more accurate packet loss detection result.
Those of ordinary skill in the art may be aware that flow forwarding side described in conjunction with the examples disclosed in this document Method and equipment can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually with hard Part or software mode execute, the specific application and design constraint depending on technical solution.The ordinary skill of this field Personnel can use different methods to achieve the described function each specific application, but it is this realize it is not considered that It is beyond the scope of this invention.

Claims (23)

1. a kind of method for detecting packet loss characterized by comprising
First network equipment sends the first detection messages to second network equipment, and records first and give out a contract for a project count value, and described first Count value of giving out a contract for a project is that the first network equipment sends the data including detection mark sent when first detection messages The quantity of message;
The first network equipment starts first timer, after the first timer time-out, the first network equipment to Second network equipment sends multiple data messages, and each data message in the multiple data message includes the detection Mark, the duration of the first timer is for described in guaranteeing that first detection messages first reach than the multiple data message Second network equipment;
The first network equipment sends the second detection messages to second network equipment, and records second and give out a contract for a project count value, Described second give out a contract for a project count value be the first network equipment send sent when second detection messages include the inspection The quantity of the data message of mark will;
The first network equipment receives response message from second network equipment, obtains the first packet receiving from the response message Count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives the first detection report The quantity of the received data message including detection mark when literary, the second packet receiving count value is second network Equipment receives the quantity of the received data message including detection mark when second detection messages;
The first network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving meter Numerical value and the second packet receiving count value carry out packet loss statistics to the multiple data message.
2. method for detecting packet loss according to claim 1, which is characterized in that the first network equipment is according to described first Give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving count value and the second packet receiving count value to described more A data message carries out packet loss statistics
Packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| second packet receiving count value the-the first packet receiving meter Numerical value |.
3. method for detecting packet loss according to claim 1 or 2, which is characterized in that first detection messages include described First gives out a contract for a project count value, and second detection messages include described second giving out a contract for a project count value.
4. method for detecting packet loss according to claim 1 or 2, the reception response message includes receiving the first response message With receive the second response message, it is correspondingly, described that the first packet receiving count value and the second packet receiving count value are obtained from response message Include:
The first packet receiving count value is obtained from first response message, and described is obtained from second response message Two packet receiving count values.
5. method for detecting packet loss according to claim 1 or 2, which is characterized in that the first network equipment is described One timer starts to the first timer time-out period, and transmission second detection messages, the second net of Xiang Suoshu It does not include the data message for detecting mark that network equipment, which is sent,.
6. method for detecting packet loss according to claim 1 or 2, which is characterized in that second detection messages are also used to refer to Show that second network equipment when receiving second detection messages, starts second timer, it is super in the second timer When after record the second packet receiving count value, the duration of the second timer is all in second detection messages for guaranteeing The quantity for reaching the data message including the detection mark of second network equipment later is counted into second packet receiving Count value.
7. a kind of method for detecting packet loss characterized by comprising
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value, and described first Packet receiving count value is that second network equipment receives the received data including detection mark when first detection messages The quantity of message;
Second network equipment receives the second detection messages from the first network equipment, and starts timer, described fixed When device time-out after, record the second packet receiving count value, the second packet receiving count value be the timer expiry when described in the second net The quantity of the received data message including the detection mark of network equipment, the duration of the timer for guarantee it is all Second network equipment is reached after second detection messages includes that the data message for detecting mark is counted into institute State the second packet receiving count value;
Second network equipment sends response message to the first network equipment, and the response message includes first receipts Packet count value and the second packet receiving count value;
The response message is for enabling the first network equipment according to the first packet receiving count value, second packet receiving Count value, first give out a contract for a project count value and the second count value of giving out a contract for a project carries out packet loss statistics, and the described first count value of giving out a contract for a project is described the One network equipment sends the quantity of the data message including the detection mark sent when first detection messages, described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include the detection mark The quantity of the data message of will.
8. method for detecting packet loss according to claim 7, which is characterized in that second network equipment is from described first The network equipment arrives before the timer expiry after receiving first detection messages, and also receiving does not include the detection mark Data message.
9. a kind of method for detecting packet loss characterized by comprising
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value, and described first Packet receiving count value is that second network equipment receives the received data including detection mark when first detection messages The quantity of message, first detection messages include first giving out a contract for a project count value, and the described first count value of giving out a contract for a project is first net Network equipment sends the quantity of the data message including the detection mark sent when first detection messages;
Second network equipment receives the second detection messages from the first network equipment, and second detection messages include the Two give out a contract for a project count value, and the described second count value of giving out a contract for a project is that the first network equipment has been sent when sending second detection messages Include it is described detection mark data message quantity;
Second network equipment starts timer, after the timer expiry, the second packet receiving count value of record, and described second The received datagram including the detection mark of second network equipment described in when packet receiving count value is the timer expiry The quantity of text, the duration of the timer all reach second network after second detection messages and set for guaranteeing The quantity of the standby data message including the detection mark is counted into the second packet receiving count value;
Second network equipment according to described first give out a contract for a project count value, described second give out a contract for a project count value, the first packet receiving meter Numerical value and the second packet receiving count value carry out packet loss statistics.
10. method for detecting packet loss according to claim 9, which is characterized in that second network equipment is according to described One give out a contract for a project count value, the described second give out a contract for a project count value, the first packet receiving count value and the second packet receiving count value is lost Packet counts
Packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| second packet receiving count value the-the first packet receiving meter Numerical value |.
11. method for detecting packet loss according to claim 9 or 10, which is characterized in that second network equipment is from institute It states after first network equipment receives first detection messages and arrives before the timer expiry, also receiving does not include the inspection The data message of mark will.
12. a kind of first network equipment, which is characterized in that the first network equipment includes transmission unit, receiving unit and loses Packet statistic unit, wherein
The transmission unit, for sending the first detection messages to second network equipment, record first is given out a contract for a project count value, and is started First timer, after the first timer time-out, second network equipment of Xiang Suoshu sends multiple data messages;To described Count value that two network equipments send the second detection messages and record second is given out a contract for a project, described first gives out a contract for a project count value as the transmission list Member sends the quantity of the data message including detection mark sent when first detection messages, the multiple data message In each data message include detection mark, the described second count value of giving out a contract for a project is that the transmission unit sends described second What is sent when detection messages includes the quantity of the data message of the detection mark, and the duration of the first timer is for protecting It demonstrate,proves first detection messages and first reaches second network equipment than the multiple data message;
The receiving unit obtains first from the response message and receives for receiving response message from second network equipment Packet count value and the second packet receiving count value, the first packet receiving count value are that second network equipment receives first detection The quantity of the received data message including detection mark when message, the second packet receiving count value is second net Network equipment receives the quantity of the received data message including detection mark when second detection messages;
The packet loss statistic unit, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, it is described first receive Packet count value and the second packet receiving count value carry out packet loss statistics to the multiple data message.
13. first network equipment according to claim 12, which is characterized in that the packet loss statistic unit carries out packet loss system Meter includes:
Packet loss statistics is carried out according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| second packet receiving count value the-the first packet receiving meter Numerical value |.
14. first network equipment according to claim 12 or 13, which is characterized in that first detection messages include institute It states first to give out a contract for a project count value, second detection messages include described second giving out a contract for a project count value.
15. first network equipment according to claim 12 or 13, which is characterized in that the receiving unit receives response report Text includes receiving the first response message and receiving the second response message, correspondingly, described that the first packet receiving is obtained from response message Count value and the second packet receiving count value include:
The first packet receiving count value is obtained from first response message, and described is obtained from second response message Two packet receiving count values.
16. first network equipment according to claim 12 or 13, which is characterized in that the transmission unit is described first Timer starts to the first timer time-out period, and transmission second detection messages, the second network of Xiang Suoshu It does not include the data message for detecting mark that equipment, which is sent,.
17. first network equipment according to claim 12 or 13, which is characterized in that second detection messages are also used to Indicate that second network equipment when receiving second detection messages, starts second timer, in the second timer The second packet receiving count value is recorded after time-out, the duration of the second timer is all in the second detection report for guaranteeing The quantity that the data message including the detection mark of second network equipment is reached after text is counted into described second and receives Packet count value.
18. a kind of second network equipment, which is characterized in that second network equipment includes receiving unit and transmission unit, In,
The receiving unit for receiving the first detection messages from first network equipment, and records the first packet receiving count value, described First packet receiving count value is that the receiving unit receives the received data including detection mark when first detection messages The quantity of message;
The receiving unit is also used to receive the second detection messages from the first network equipment, and starts timer;Described After timer expiry, the second packet receiving count value, the second packet receiving count value reception when being the timer expiry are recorded Unit is received include detection mark data message quantity, the duration of the timer is all described for guaranteeing The receiving unit is reached after two detection messages includes that the quantity of the data message of the detection mark is counted into described the Two packet receiving count values;
The transmission unit, for sending response message to the first network equipment, the response message includes described first Packet receiving count value and the second packet receiving count value;
The response message is for enabling the first network equipment according to the first packet receiving count value, second packet receiving Count value, first give out a contract for a project count value and the second count value of giving out a contract for a project carries out packet loss statistics, and the described first count value of giving out a contract for a project is described the One network equipment sends the quantity of the data message including the detection mark sent when first detection messages, described Second give out a contract for a project count value be the first network equipment send sent when second detection messages include the detection mark The quantity of the data message of will.
19. second network equipment according to claim 18, which is characterized in that the receiving unit is from first net Network equipment arrives before the timer expiry after receiving first detection messages, and also receiving does not include the detection mark Data message.
20. a kind of second network equipment, which is characterized in that second network equipment includes that receiving unit and packet loss statistics are single Member, wherein
The receiving unit for receiving the first detection messages from first network equipment, and records the first packet receiving count value, described First packet receiving count value is that the receiving unit receives the received data including detection mark when first detection messages The quantity of message, first detection messages include first giving out a contract for a project count value, and the described first count value of giving out a contract for a project is first net Network equipment sends the quantity of the data message including the detection mark sent when first detection messages;
The receiving unit is also used to receive the second detection messages from the first network equipment, and starts timer;Described After timer expiry, the second packet receiving count value, the second packet receiving count value reception when being the timer expiry are recorded Unit is received include detection mark data message quantity, the duration of the timer is all described for guaranteeing The quantity that the data message including the detection mark of second network equipment is reached after two detection messages is counted into institute State the second packet receiving count value, second detection messages include second giving out a contract for a project count value, and the described second count value of giving out a contract for a project is described First network equipment sends the quantity of the data message including detection mark sent when second detection messages;
The packet loss statistic unit, for according to described first give out a contract for a project count value, described second give out a contract for a project count value, it is described first receive Packet count value and the second packet receiving count value carry out packet loss statistics.
21. second network equipment according to claim 20, which is characterized in that the packet loss statistic unit carries out packet loss system Meter includes carrying out packet loss statistics according to following formula:
Packet loss statistical value=| the second count value-the first of giving out a contract for a project is given out a contract for a project count value |-| second packet receiving count value the-the first packet receiving meter Numerical value |.
22. second network equipment according to claim 20 or 21, which is characterized in that the receiving unit is from described One network equipment arrives before the timer expiry after receiving first detection messages, and also receiving does not include the detection mark The data message of will.
23. a kind of packet loss detection system, which is characterized in that including the first net described in claim 12-17 any claim Second network equipment described in network equipment and claim 18-22 any claim.
CN201610933234.0A 2016-10-25 2016-10-25 A kind of method for detecting packet loss, the network equipment and system Active CN106375158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610933234.0A CN106375158B (en) 2016-10-25 2016-10-25 A kind of method for detecting packet loss, the network equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610933234.0A CN106375158B (en) 2016-10-25 2016-10-25 A kind of method for detecting packet loss, the network equipment and system

Publications (2)

Publication Number Publication Date
CN106375158A CN106375158A (en) 2017-02-01
CN106375158B true CN106375158B (en) 2019-09-13

Family

ID=57896380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610933234.0A Active CN106375158B (en) 2016-10-25 2016-10-25 A kind of method for detecting packet loss, the network equipment and system

Country Status (1)

Country Link
CN (1) CN106375158B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106972982B (en) * 2017-03-17 2020-04-28 南京务本信息科技有限责任公司 Network message matching and receiving unit based on FPGA
CN107896198B (en) * 2017-11-28 2020-09-08 杭州迪普科技股份有限公司 Flow classification-based discarded message information display method and device
CN110138629A (en) * 2018-02-02 2019-08-16 中兴通讯股份有限公司 Detection method and device, storage medium and the processor of packet loss of link
CN110876158B (en) * 2018-08-29 2023-07-14 阿里巴巴集团控股有限公司 LoRa network condition monitoring method, device, system, equipment and storage medium
CN114073049B (en) * 2019-09-21 2023-11-17 华为技术有限公司 Method and network node for reliability measurement
CN113328901B (en) * 2020-02-28 2023-04-28 华为技术有限公司 Message out-of-order detection method, device and system
CN112039724B (en) * 2020-08-17 2021-09-28 鹏城实验室 Network packet loss detection method, device, storage medium and network system
CN114301811A (en) * 2020-09-23 2022-04-08 中国移动通信有限公司研究院 Information processing method and device and tunnel endpoint network element
CN114567574B (en) * 2022-03-01 2023-11-10 烽火通信科技股份有限公司 Method and device for realizing LM flow-free test based on time sequence control
CN115277496A (en) * 2022-07-27 2022-11-01 中国电信股份有限公司 Packet loss detection method and device, electronic equipment and storage medium
CN116225198B (en) * 2023-04-25 2023-07-14 北京博上网络科技有限公司 CPU load control method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707509A (en) * 2009-11-19 2010-05-12 中兴通讯股份有限公司 Method, system and device for detecting packet loss rate by using OAM
CN101729197A (en) * 2008-10-14 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss rate
CN101729304A (en) * 2008-10-21 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss
CN102118277A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Method and device for packet loss detection, and a router
CN105765911A (en) * 2014-09-30 2016-07-13 华为技术有限公司 Device and method for measuring network packet loss
CN105991357A (en) * 2015-02-06 2016-10-05 中兴通讯股份有限公司 Packet loss determination processing and determining methods and packet loss determination processing and determining devices

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010028654A (en) * 2008-07-23 2010-02-04 Fujitsu Ltd Communication apparatus and oam frame transmission method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729197A (en) * 2008-10-14 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss rate
CN101729304A (en) * 2008-10-21 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss
CN101707509A (en) * 2009-11-19 2010-05-12 中兴通讯股份有限公司 Method, system and device for detecting packet loss rate by using OAM
CN102118277A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Method and device for packet loss detection, and a router
CN105765911A (en) * 2014-09-30 2016-07-13 华为技术有限公司 Device and method for measuring network packet loss
CN105991357A (en) * 2015-02-06 2016-10-05 中兴通讯股份有限公司 Packet loss determination processing and determining methods and packet loss determination processing and determining devices

Also Published As

Publication number Publication date
CN106375158A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106375158B (en) A kind of method for detecting packet loss, the network equipment and system
CN113079091B (en) Active stream following detection method, network equipment and communication system
US8774045B2 (en) Packet loss detecting method and apparatus, and router
US8125914B2 (en) Scaled Ethernet OAM for mesh and hub-and-spoke networks
US8243608B2 (en) Metro Ethernet connectivity fault management acceleration
WO2018210213A1 (en) Method and device for implementing ioam packaging and storage medium
EP3082293B1 (en) Switching device and packet loss method therefor
CN108259291A (en) VXLAN message processing methods, equipment and system
CN105991338B (en) Network O&M management method and device
JP2004328752A (en) Inserting address for performing oam functions
WO2016184245A1 (en) Tunnel packet loss detecting method, apparatus and network communication device
WO2016177120A1 (en) Measurement method and system for packet loss of link packet, target node and initiating-end node
US20150036510A1 (en) Method and device for measuring ethernet performance
CN107579869B (en) Network performance detection method and network equipment
KR102364803B1 (en) Communication method, communication device and storage medium
WO2017000802A1 (en) Service fault location method and device
JP6332544B1 (en) Network management apparatus, network system, method, and program
CN105812198B (en) Method and device for monitoring end-to-end of bridge network
CN104580002B (en) The big balanced retransmission method of current load and device
US20140092725A1 (en) Method and first network node for managing an ethernet network
JP2017188814A (en) Network device
JP6601531B2 (en) Network management apparatus, network system, method, and program
CN104506369B (en) A kind of detection method and equipment of packet loss position
CN113328901B (en) Message out-of-order detection method, device and system
CN110166311A (en) Measure method, equipment and the network system of network performance

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant