CN106375158A - Packet loss detection method, network device and system - Google Patents

Packet loss detection method, network device and system Download PDF

Info

Publication number
CN106375158A
CN106375158A CN201610933234.0A CN201610933234A CN106375158A CN 106375158 A CN106375158 A CN 106375158A CN 201610933234 A CN201610933234 A CN 201610933234A CN 106375158 A CN106375158 A CN 106375158A
Authority
CN
China
Prior art keywords
count value
network equipment
contract
project
detection
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.)
Granted
Application number
CN201610933234.0A
Other languages
Chinese (zh)
Other versions
CN106375158B (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 invention relates to the technical field of communication, especially to a packet loss detection method and a network device. According to the packet loss detection method, a first network device sends a first detection message to a second network device, records a first packet sending counting value, and starting a timer; after overtime of the timer occurs, a plurality of data messages are sent to the second network device; a second detection message is sent to the second network device and a second packet sending mounting value is recorded; a response message is received from the second network device and a first packet receiving counting value and a second packet receiving counting value are obtained from the response message; and according to the first packet sending counting value, the second packet sending counting value, the first packet receiving counting value, and the second packet receiving counting value, packet loss statistics is carried out. According to the technical scheme, the accuracy of packet loss detection is improved under the circumstance that an out-of-order phenomenon occurs at a message sent by the first network device to the second network device.

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 technology
Y.1731 it is operation management maintainance (the operation based on ethernet network that itu-t organizes to set up Administration and maintenance, oam) agreement, mainly provide performance monitoring and fault management capability. Y.1731 performance monitoring mainly comprises packet loss detection, time delay detection and three functions of shaking detection.Packet loss detection includes single-ended Packet loss detection and both-end packet loss detection two ways, the testing result of each way can include distal frame loss detection result again With proximal frame loss detection result.
Y.1731 in agreement transmitting terminal record data message when sending detection messages quantity forwarded, receiving terminal receiving The received quantity of record data message during described detection messages, the quantity forwarded according to data message and received quantity carry out packet loss Statistics.And when out of order occurring in the transmit process of detection messages data message, may result in packet loss detection result and forbidden Really.For example transmitting terminal first sends datagram and retransmits detection messages, and described detection messages first reach than described data message Receiving terminal.When receiving terminal receives detection messages, carry out packet loss statistics.And described data message not yet reaches receiving terminal, thus lead Cause packet loss detection result inaccurate.
Content 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 system, for solving Inaccurate technical problem is detected in existing method for detecting packet loss.
A kind of first aspect, there is provided method for detecting packet loss, the method includes:
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.Described First give out a contract for a project count value be described first network equipment send during described first detection messages transmission include detection mark The quantity of data message.
First network equipment starts first timer.Described first timer time-out after, described first network equipment to Described second network equipment sends multiple data messages.Each data message in the plurality of data message comprises described detection Mark.The duration of described first timer is used for ensureing that described first detection messages are more described than the plurality of data message first reaches Second network equipment.
First network equipment sends 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 inclusion described detection mark that count value is transmission when described first network equipment sends described second detection messages The quantity of the data message of will.
First network equipment receives response message from described second network equipment, obtains the first packet receiving from described response message Count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first detection report The quantity of the data message of inclusion described detection mark that Wen Shiyi receives, described second packet receiving count value is described second network Equipment receives the quantity of the data message of inclusion described detection mark of reception during described 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, described first packet receiving meter Numerical value and described second packet receiving count value carry out packet loss statistics to the plurality of data message.
In the method for detecting packet loss of above-mentioned offer, by arranging first timer in described first network equipment, postpone Even if sending the plurality of data message so that the message that described first network equipment sends to described second network equipment occurs Out of order, described first detection messages also can first reach described second network equipment early than the plurality of data message.In the second net After network equipment proceeds by counting messages, datagram literary talent can reach described second network equipment, and follow-up data message all can Include in packet loss statistics, be favorably improved the accuracy of packet loss detection.
Alternatively, described 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 First packet receiving count value and described second packet receiving count value carry out packet loss statistics and include according to as follows to the plurality of 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 Bag count value |.
Alternatively, described first detection messages include described first and give out a contract for a project count value, and described second detection messages include institute State second to give out a contract for a project count value.Thus, described 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 First packet receiving count value of count value and local record and the second packet receiving count value carry out packet loss statistics.Alternatively, described reception Response message includes receiving the first response message and receives the second response message, correspondingly, described obtains the from response message One packet receiving count value and the second packet receiving count value include: obtain described first packet receiving count value from described first response message, Described second packet receiving count value is obtained from described second response message.
Alternatively, described first network equipment starts to described first timer time-out period in described first timer, And after sending described second detection messages, send the datagram not including described detection mark to described second network equipment Literary composition.The data message not including described detection mark can be transmitted, normal data transfer can not be affected, ensure detection accurately And reduce detection impact.
Alternatively, described second detection messages are additionally operable to indicate that described second network equipment is receiving described second detection report Wen Shi, starts second timer, records described second packet receiving count value after described second timer time-out.Described second timing The duration of device is used for ensureing all described detections of inclusion reaching described second network equipment after described second detection messages The quantity of the data message of mark is counted into described second packet receiving count value.By arranging the second timing in second network equipment Even if device so that message that described first network equipment sends to described second network equipment occur out of order, all described the The quantity reaching the data message of inclusion described detection mark of described second network equipment after two detection messages all can be counted Enter described second packet receiving count value, more accurately packet loss detection result is thus provided.
A kind of second aspect, there is provided method for detecting packet loss.The method includes:
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value.Described First packet receiving count value is the inclusion detection mark that described second network equipment receives reception during described first detection messages The quantity of data message.
Second network equipment receives the second detection messages from described first network equipment, and starts intervalometer, described fixed When device time-out after, record the second packet receiving count value.Described second packet receiving count value is the second net described in during described timer expiry The quantity of the data message of inclusion described detection mark of network equipment reception.The duration of described intervalometer be used for ensureing all The quantity quilt of the data message of inclusion described detection mark of described second network equipment is reached after described second detection messages Count described second packet receiving count value.
Second network equipment sends response message to described first network equipment, and described response message includes described first receipts Bag count value and described second packet receiving count value.
Described response message be used for enabling described first network equipment according to described first packet receiving count value, described second Packet receiving count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry out packet loss statistics.Described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message including detection mark of transmission during described first detection messages.Described Second give out a contract for a project count value be described first network equipment send during described second detection messages transmission include detection mark The quantity of data message.
In the method for detecting packet loss of above-mentioned offer, though by described second the network equipment arrange intervalometer so that Described first network equipment to described second the network equipment send message occur out of order, all described second detection messages it The quantity reaching the data message of inclusion described detection mark of second network equipment afterwards all can be counted into described second packet receiving meter Numerical value, thus provides more accurately packet loss detection result.
Alternatively, second network equipment after receiving described first detection messages from described first network equipment to described Before timer expiry, also receive the data message not including described detection mark.Can receive and not include described detection mark Data message, can not affect normal data transfer, ensure detection accurately and reduce detection impact.
A kind of third aspect, there is provided method for detecting packet loss.The method includes:
Second network equipment receives the first detection messages from first network equipment, and records the first packet receiving count value.Described First packet receiving count value is the inclusion detection mark that described second network equipment receives reception during described first detection messages The quantity of data message.Described first detection messages include first and give 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 of inclusion described detection mark of transmission during described first detection messages.
Second network equipment receives the second detection messages from first network equipment.Described second detection messages include second Bag count value.Described second count value of giving out a contract for a project is the bag that described first network equipment sends transmission during described second detection messages Include the quantity of the data message of detection mark.
Second network equipment starts intervalometer, after described timer expiry, records the second packet receiving count value.Described second Packet receiving count value is the data message including detection mark of second network equipment reception described in during described timer expiry Quantity.The duration of described intervalometer is used for ensureing all to reach described second network equipment after described second detection messages Quantity including the data message of described detection mark is counted into described 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, described first packet receiving meter Numerical value and described second packet receiving count value carry out packet loss statistics.
In above-mentioned method for detecting packet loss, even if by arranging intervalometer so that described first net in second network equipment There are out of order, all arrival second after described second detection messages in the message that network equipment sends to described second network equipment The quantity of the data message of inclusion described detection mark of the network equipment all can be counted into described second packet receiving count value.Thus Two network equipments can calculate more accurately packet loss detection result.
Alternatively, 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 Packet receiving count value and described second packet receiving count value carry out packet loss statistics and include carrying out packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, second network equipment from first network equipment receive described first detection messages after to described timing Before device time-out, also receive the data message not including described detection mark.The number not including described detection mark can be received According to message, normal data transfer can not be affected, ensure detection accurately and reduce detection impact.
A kind of fourth aspect, there is provided first network equipment.Described first network equipment includes transmitting element, receiving unit With packet loss statistic unit.
Described transmitting element, 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 described first timer time-out, send multiple data messages to described second network equipment;To institute State second network equipment to send 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 for described Unit is sent to send the quantity of the data message including detection mark of transmission during described first detection messages.The plurality of data Each data message in message includes described detection mark.Described second gives out a contract for a project count value described in described transmitting element transmission The quantity of the data message of the inclusion of transmission described detection mark during the second detection messages.The duration of described first timer is used First reach described second network equipment in described first detection messages of guarantee than the plurality of data message.
Described receiving unit, for receiving response message from described second network equipment, obtains the from described response message One packet receiving count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first The quantity of the data message of the inclusion of reception described detection mark during detection messages, described second packet receiving count value is described the Two network equipments receive the quantity of the data message of inclusion described detection mark of reception during described second detection messages.
Described 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 described second packet receiving count value carry out packet loss statistics to the plurality of data message.
Alternatively, described packet loss statistic unit carries out packet loss statistics and includes carrying out packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, described first detection messages include described first and give out a contract for a project count value.Described second detection messages include institute State second to give out a contract for a project count value.
Alternatively, described receiving unit receives response message and includes receiving the first response message and receive the second response report Literary composition, correspondingly, described obtains the first packet receiving count value and the second packet receiving count value includes: from described first sound from response message Answer and in message, obtain described first packet receiving count value, obtain described second packet receiving count value from described second response message.
Alternatively, described transmitting element starts to described first timer time-out period in described first timer, and After sending described second detection messages, send the data message not including described detection mark to described second network equipment.
Alternatively, described second detection messages are additionally operable to indicate that described second network equipment is receiving described second detection report Wen Shi, starts second timer, records described second packet receiving count value after described second timer time-out.Described second timing The duration of device is used for ensureing all described detections of inclusion reaching described second network equipment after described second detection messages The quantity of the data message of mark is counted into described second packet receiving count value.
The such scheme of fourth aspect and the scheme of first aspect have identical technique effect.
A kind of 5th aspect, there is provided second network equipment.Described second network equipment includes receiving unit and sends single Unit.
Described 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 the inclusion detection mark that described receiving unit receives reception during described first detection messages The quantity of data message.
Described receiving unit, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer, After described timer expiry, record the second packet receiving count value.Described second packet receiving count value is described in during described timer expiry The quantity of the data message including detection mark of receiving unit reception.The duration of described intervalometer be used for ensureing all in institute The quantity reaching the data message of inclusion described detection mark of described receiving unit after stating the second detection messages is counted into institute State the second packet receiving count value.
Described transmitting element, for sending response message to described first network equipment, described response message includes described First packet receiving count value and described second packet receiving count value.
Described response message be used for enabling described first network equipment according to described first packet receiving count value, described second Packet receiving count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry out packet loss statistics, and described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message including detection mark of transmission during described first detection messages, described Second give out a contract for a project count value be described first network equipment send during described second detection messages transmission include detection mark The quantity of data message.
Alternatively, described receiving unit after receiving described first detection messages from described first network equipment to described Before timer expiry, also receive the data message not including described detection mark.
The such scheme of the 5th aspect and the scheme of second aspect have identical technique effect.
A kind of 6th aspect, there is provided second network equipment.Described second network equipment includes receiving unit and packet loss system Meter unit.
Described 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 the inclusion detection mark that described receiving unit receives reception during described first detection messages The quantity of data message.Described first detection messages include first and give 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 of inclusion described detection mark of transmission during described first detection messages.
Described receiving unit, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer;? After described timer expiry, record the second packet receiving count value.Described second packet receiving count value is described in during described timer expiry The quantity of the data message including detection mark of receiving unit reception.The duration of described intervalometer be used for ensureing all in institute The quantity reaching the data message of inclusion described detection mark of described receiving unit after stating the second detection messages is counted into institute State the second packet receiving count value.Described second detection messages include second and give out a contract for a project count value.Described second give out a contract for a project count value be described First network equipment sends the quantity of the data message including detection mark of transmission during described second detection messages.
Described 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 described second packet receiving count value carry out packet loss statistics.
Alternatively, described packet loss statistic unit carries out packet loss statistics and includes carrying out packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, described receiving unit after receiving described first detection messages from described first network equipment to described Before timer expiry, also receive the data message not including described detection mark.
The such scheme of the 6th aspect and the scheme of the third aspect have identical technique effect.
A kind of 7th aspect, there is provided first network equipment.Described first network equipment include processor, network interface and Memorizer.
Described memorizer is used for storing batch processing instruction, and described processor is used for calling the program of described memory storage Instruction execution is following to be operated:
Triggering network interface sends the first detection messages to second network equipment, and records first and give out a contract for a project count value, described First give out a contract for a project count value be described first network equipment send during described first detection messages transmission include detection mark The quantity of data message.
Start first timer, after described first timer time-out, triggering network interface is to described second network equipment Send multiple data messages, each data message in the plurality of data message comprises described detection mark, and described first is fixed When device duration be used for ensureing that described first detection messages first reach described second network equipment than the plurality of data message.
Triggering network interface sends the second detection messages to described second network equipment, and records second and give out a contract for a project count value, The described inspection of inclusion that count value is transmission when described first network equipment sends described second detection messages that described second gives out a contract for a project The quantity of the data message of mark will.
Triggering network interface receives response message from described second network equipment, obtains the first packet receiving from described response message Count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first detection report The quantity of the data message of inclusion described detection mark that Wen Shiyi receives, described second packet receiving count value is described second network Equipment receives the quantity of the data message of inclusion described detection mark of reception during described 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, described first packet receiving count value and described Two packet receiving count values carry out packet loss statistics to the plurality of data message.
Alternatively, carry out described packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, described first detection messages include described first and give out a contract for a project count value.Described second detection messages include institute State second to give out a contract for a project count value.
Alternatively, described reception response message includes receiving the first response message and receives the second response message, correspondingly, Described obtain the first packet receiving count value from response message and the second packet receiving count value includes obtaining from described first response message Take described first packet receiving count value, obtain described second packet receiving count value from described second response message.
Alternatively, start to described first timer time-out period in described first timer, and send described second After detection messages, processor also calls the programmed instruction of memory storage, and triggering network interface is sent out to described second network equipment Send the data message not including described detection mark.
Alternatively, described second detection messages are additionally operable to indicate that described second network equipment is receiving described second detection report Wen Shi, starts second timer, records described second packet receiving count value after described second timer time-out.Described second timing The duration of device is used for ensureing all described detections of inclusion reaching described second network equipment after described second detection messages The quantity of the data message of mark is counted into described second packet receiving count value.
The such scheme of the 7th aspect and the scheme of first aspect have identical technique effect.
A kind of eighth aspect, there is provided second network equipment.Described second network equipment include processor, network interface and Memorizer.
Described memorizer is used for storing batch processing instruction, and described processor is used for calling the program of described memory storage Instruction execution is following to be operated:
Triggering network interface receives the first detection messages from first network equipment, and records the first packet receiving count value, described First packet receiving count value is the data including detection mark that second network equipment receives reception during described first detection messages The quantity of message.
Triggering network interface receives the second detection messages from described first network equipment, and starts intervalometer, described fixed When device time-out after, record the second packet receiving count value, described second packet receiving count value be described timer expiry when the second network set The quantity of the data message of inclusion described detection mark of standby reception, the duration of described intervalometer be used for ensureing all described Reach after second detection messages the data message of inclusion described detection mark of second network equipment quantity be counted into described Second packet receiving count value.
Triggering network interface sends response message to described first network equipment, and described response message includes described first receipts Bag count value and described second packet receiving count value.
Described response message be used for enabling described first network equipment according to described first packet receiving count value, described second Packet receiving count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry out packet loss statistics, and described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message including detection mark of transmission during described first detection messages, described Second give out a contract for a project count value be described first network equipment send during described second detection messages transmission include detection mark The quantity of data message.
Alternatively, from described first network equipment receive described first detection messages after to described timer expiry it Before, processor also calls the programmed instruction of memory storage, and triggering network interface receives the data not including described detection mark Message.
The such scheme of eighth aspect and the scheme of second aspect have identical technique effect.
A kind of 9th aspect, there is provided second network equipment.Described second network equipment include processor, network interface and Memorizer.
Described memorizer is used for storing batch processing instruction, and described processor is used for calling the program of described memory storage Instruction execution is following to be operated:
Triggering network interface receives the first detection messages from first network equipment, and records the first packet receiving count value, described First packet receiving count value is the data including detection mark that second network equipment receives reception during described first detection messages The quantity of message.Described first detection messages include first and give out a contract for a project count value, and the described first count value of giving out a contract for a project is described first net Network equipment sends the quantity of the data message of inclusion described detection mark of transmission during described first detection messages.
Triggering network interface receives the second detection messages from described first network equipment, and starts intervalometer, described fixed When device time-out after, record the second packet receiving count value, described second packet receiving count value be described timer expiry when the second network set The quantity of the data message of inclusion described detection mark of standby reception, the duration of described intervalometer be used for ensureing all described Reach after second detection messages the data message of inclusion described detection mark of second network equipment quantity be counted into described Second packet receiving count value.Described second detection messages include second and give 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 of transmission during described 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, described first packet receiving count value and described Two packet receiving count values carry out packet loss statistics.
Alternatively, carry out described packet loss statistics according to equation below:
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 Bag count value |
Alternatively, from described first network equipment receive described first detection messages after to described timer expiry it Before, processor also calls the programmed instruction of memory storage, and triggering network interface receives the data not including described detection mark Message.
The such scheme of the 9th aspect and the scheme of the third aspect have identical technique effect.
A kind of tenth aspect, there is provided packet loss detection system.This packet loss detection system includes what described fourth aspect provided Second network equipment that first network equipment and described 5th aspect or described 6th aspect provide.
A kind of 11st aspect, there is provided packet loss detection system.This packet loss detection system includes described 7th aspect to be provided First network equipment and described eighth aspect or described 9th aspect provide second network equipment.
Above tenth aspect and the packet loss detection system of the 11st aspect offer, by the setting of described first network equipment First timer, postpones to send the plurality of data message.Even if so that described first network equipment sets to described second network The message generation that preparation is sent is out of order, and described first detection messages also can first reach described second net early than the plurality of data message Network equipment.After second network equipment proceeds by counting messages, datagram literary talent can reach described second network equipment, subsequently Data message all can include packet loss statistics in, be favorably improved the accuracy of packet loss detection.By setting in described second network Standby setting intervalometer, even if so that the message that described first network equipment sends to described second network equipment occurs disorderly Sequence, the number of all data messages of inclusion described detection mark reaching second network equipment after described second detection messages Amount all can be counted into described second packet receiving count value, thus provides more accurately packet loss detection result.
Brief description
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 adding detection mark in data message provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram adding detection mark in data message provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic flow sheet of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic flow sheet of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic flow sheet of method for detecting packet loss provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of first network equipment provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation of second network equipment provided in an embodiment of the present invention;
Fig. 9 is a kind of structural representation of second network equipment provided in an embodiment of the present invention;
Figure 10 is a kind of structural representation of first network equipment provided in an embodiment of the present invention;
Figure 11 is a kind of structural representation of second network equipment provided in an embodiment of the present invention;
Figure 12 is a kind of structural representation 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
Purpose, technical scheme and advantage for making the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described,
The application scenarios of embodiment of the present invention description are the technical schemes in order to the embodiment of the present invention is more clearly described, Do not constitute the restriction for technical scheme provided in an embodiment of the present invention, those of ordinary skill in the art understand, with network The differentiation of framework and the appearance of new business scene, technical scheme provided in an embodiment of the present invention is for similar technical problem, same Sample is suitable for.
Fig. 1 is a kind of possible application scenarios schematic diagram provided in an embodiment of the present invention.Under this scene, first network sets Standby communicated with second network equipment by one or more communication links.First network equipment and second network equipment are permissible It is all kinds of network equipment with communication function, such as main frame, switch, router etc..First network equipment and the second network Equipment can carry out packet loss detection in one or more of communication links.Described communication link can be all kinds of to be used for ether The link of Network Communication, for example, can be twisted-pair feeder, cable, optical fiber or wireless connection of physical layer etc. or logical layer The pseudo-wire in face or tunnel connection etc..
A packet loss detection process is also show in Fig. 1.Wherein detection messages and response message for example can be lost respectively Bag statistical message (loss measurement message, lmm) and packet loss statistics response (loss measurement Reply, lmr).Or described detection messages and described response message are all connectivity detection message (continuity check Message, ccm).In Fig. 1, data message letter d represents, detection messages letter y represents.
Y.1731 in agreement first network equipment and second network equipment in the delivery time of detection messages and the time of reception Record the count value of the data message sending and receiving respectively, packet loss statistics is carried out according to described count value.Described packet loss statistics Need to ensure the transmission sequence of data message and detection messages, otherwise statistical result will be inaccurate.For example shown in Fig. 1, when first When second detection messages that the network equipment sends reach second network equipment early than latter two data message, it will obtain mistake Packet loss statistical value 2.And actually described latter two data message does not have and loses, simply it is later than described second detection messages Reach second network equipment.
For solving 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 Add detection mark in message.Carry out the calculating of number of dropped packets based on described detection mark.First network equipment and the second network set For upper, all there is give out a contract for a project enumerator and packet receiving enumerator.Described enumerator of giving out a contract for a project is able to record that the data message including detection mark Count value of giving out a contract for a project.Described packet receiving enumerator is able to record that the packet receiving count value of the data message including detection mark.Fig. 2 and Tu 3 provide a kind of schematic diagram adding detection mark in data message respectively.
Fig. 2 show a kind of by add label add described detection mark by way of.Assume first network equipment with Second network equipment is communicated by 802.1q agreement on described communication link.As shown in Fig. 2 802.1q initial message lattice In formula, dmac field represents message destination address, and smac field represents message source address.Tag field is used for identifying VLAN (virtual local area network, vlan) relevant information, including tpid field, priority field, cfi field and Vlan id field.Using hexadecimal number 0x8100, described tpid field represents that this message is vlan message.Described priority Field represents message priority.Described cfi field be used for represent mac address in different transmission mediums whether in a standard format 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 Form encapsulates.Described vlan id field includes 12 bit values, and representing this message belongs to which vlan, wherein 0 and 4095 is agreement Retention.Described type field represents this message affiliated Ethernet protocol type, the data that described data field carries for message. Data message can carry data using this data field, and detection messages can be carried based on statistics using this data field Numerical value.
In Fig. 2, to 802.1q, initial message format is extended, that is, after the described tag field of described initial message format Before described type field, add 0tag field.Described 0tag field includes priority field, cfi field and vlan id word Section.This priority field represents message priority.This vlan id field is set to full 0.This cfi field is as described detection mark Will can be 0 or 1, for example, be used 1 as described detection mark.Alternatively, can include in the initial message format of 802.1q even Continuous multiple tag fields are nested for vlan.Include the situation of continuously multiple tag fields in the initial message format of 802.1q Under, after last tag field and before described type field, add described 0tag field.Thus, add in data message Detection mark.Alternatively, interpolation detection that can also be same in detection messages indicates.
Fig. 3 shows a kind of mode to add described detection mark by way of adding control word field.Assume the One network equipment changes (multi-protocol label switching, mpls) Layer 2 virtual private network in multiprotocol label Use on described communication link with second network equipment under (layer2virtual private network, l2vpn) scene Mpls agreement 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.Described public network dmac field represents message Public network destination address.Described public network smac field represents message public network source address.Described public network vlan field represents that message belongs to Which public network vlan.Described 0x8847 field represents that this message protocol type is mpls agreement.Described lsp label field represents report Literary composition belongs to which label switched path (label switch path, lsp).Described vpn label field represents which message belongs to Virtual Private Network (virtual private network, vpn).Described private network dmac field represents message private network destination address. Described private network smac field represents message private network destination address.Described private network vlan field represents which private network message belongs to vlan.Described pdu field is message data.Data message can carry data using this pdu field, and detection messages can use This pdu field carries the count value for statistics.
In Fig. 3, initial message format is extended, that is, after the described vpn field of described initial message format and described Before private network dmac field, add control word field as described detection mark.Described control word field for example can include 4 words Section.For example described detection mark can be represented with 16 system number 0x00000001.Thus, data message adds detection mark Will.Alternatively, interpolation detection that can also be same in detection messages indicates.
Fig. 4 shows a kind of schematic flow sheet of method for detecting packet loss provided in an embodiment of the present invention.This can apply to Application scenarios shown in Fig. 1.The method comprises the 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 for first network equipment send described first detection messages when transmission inclusion inspection The quantity of the data message of mark will.
Alternatively, described first detection messages include described first and give out a contract for a project count value.
S402, first network equipment start intervalometer, and after described timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the plurality of data message comprises described detection mark, and the duration of described intervalometer is used for Ensure that described first detection messages first reach second network equipment than the plurality of data message.The duration of described intervalometer, can With the delivery time being set as much larger than data message on described communication link.By arranging described intervalometer, postpone to send Even if the plurality of data message is so that the message that described first network equipment sends to described second network equipment occurs disorderly Sequence, described first detection messages also can first reach second network equipment early than the plurality of data message.Described intervalometer when Long whether enough, can be determined by multiple network test.In network test, first network equipment is first sent out to second network equipment Send detection messages, and start an intervalometer with certain time length.First network equipment after described timer expiry, to Two network equipments send datagram.Second network equipment judges whether first to receive described detection messages, then receives described data Message.If first receiving described detection messages, the duration of described intervalometer meets requirement.If first receiving described datagram Literary composition, then the duration of described intervalometer is not enough.Described Networked E-Journals can be multiple, enough with the duration that guarantees described intervalometer.
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.
The described second inclusion institute giving out a contract for a project count value transmission when sending described second detection messages for first network equipment State the quantity of the data message of detection mark.
Alternatively, described second detection messages include described second and give out a contract for a project count value.
Alternatively, first network equipment intervalometer described in s402 starts to during described timer expiry, Yi Jifa After sending described second detection messages, send the data message not including described detection mark to second network equipment.Described do not wrap Include described detection mark data message can be do not include any detection mark data message or include with described The data message of the different mark of detection mark.The method adding mark in data message, as it was previously stated, wherein can will mark Will field is set to different values to make a distinction with aforementioned detection mark.The described data message not including described detection mark, The general data message being not added with described detection mark that for example can send for communication links, does not thus affect normally to count According to transmission, ensure detection accurately and reduce detection impact.First network equipment can also send continuous sequence of message, described company Continuous sequence of message can include the data message of described detection mark and the data message including described detection mark.
S404, second network equipment receive described first detection messages from first network equipment, and record the first packet receiving meter Numerical value, described first packet receiving count value is the described inspection of inclusion of reception when second network equipment receives described first detection messages The quantity of the data message of mark will.
Alternatively, described first detection messages include described first and give out a contract for a project count value.
S405, second network equipment receive described second detection messages from first network equipment, and record the second packet receiving meter Numerical value, described second packet receiving count value is the described inspection of inclusion of reception when second network equipment receives described second detection messages The quantity of the data message of mark will.
Second network equipment, after receiving described first detection messages, before receiving described second detection messages, can receive Multiple data messages, each data message in the plurality of data message includes described detection dress mark.Due to the plurality of Data message reaches second network equipment, and described first packet receiving count value can increase to described second packet receiving count value.
Alternatively, described second detection messages include described second and give out a contract for a project count value.
Alternatively, second network equipment can start intervalometer, described fixed when receiving described second detection messages When device time-out after, re-record described second packet receiving count value.After intervalometer starts and before time-out, second network equipment is permissible Continue to receive, from first network equipment, the data message including described detection mark.The duration of described intervalometer is used for ensureing own The quantity reaching the data message of inclusion described detection mark of second network equipment after described second detection messages is counted Enter described second packet receiving count value.Alternatively, second network equipment can start institute according to the instruction of described second detection messages State intervalometer.
By arranging described intervalometer, second network equipment can continue to connect when receiving described second detection messages Packet receiving includes the data message of described detection mark.So that what even if described first network equipment sent to described second network equipment There is out of order, the number of all inclusion described detection marks reaching second network equipment after described second detection messages in message Described second packet receiving count value all can be counted into according to the quantity of message.By arranging second timer in second network equipment, make Even if described first network equipment to described second the network equipment send message occur out of order, all described second detection The quantity reaching the data message of inclusion described detection mark of second network equipment after message all can be counted into described second Packet receiving count value.More accurately packet loss detection result is thus provided.Enough whether the duration of described intervalometer, can be by repeatedly Network test determines.In network test, first network equipment first sends multiple data messages and an association to second network equipment View message, and start an intervalometer with certain time length.Second network equipment continues waiting for after described timer expiry, Detect whether to receive the data message including described detection mark.If the data including described detection mark can also be received Message, then the duration of described intervalometer is not enough.Described Networked E-Journals can be multiple, with guarantee described intervalometer when considerable Enough.
Alternatively, give out a contract for a project count value, and described second detection messages when described first detection messages include described first 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 described first packet receiving count value of count value and local record and described second packet receiving count value carry out packet loss statistics.
Alternatively, second network equipment is after receiving described first detection messages from first network equipment, to being used for continuing Before the timer expiry of the continuous data message including described detection mark from the reception of first network equipment, can also receive and not wrap Include the data message of described detection mark.Do not include described detection mark data message implication as it was previously stated, here no longer Repeat.Receive simultaneously and do not include the described data message detecting mark, the normal data message that such as communication links send, can Not affect normal data transfer.Ensure detection accurately and reduce detection impact.What second network equipment received can be even Continuous sequence of message, described continuous sequence of message can include the data message of described detection mark and include described The data message of detection mark.
S406, second network equipment send response message to first network equipment, and described response message includes described first Packet receiving count value and described second packet receiving count value.
It can be to send a response message or transmission that second network equipment sends response message to first network equipment Two response messages.When sending a response message, this response message carries described first packet receiving count value and institute State the second packet receiving count value.When sending two response messages, a response message carries described first packet receiving count value, Described second packet receiving count value is carried in another response message.
Alternatively, described response message also includes the described first count value and described second of giving out a contract for a project and gives out a contract for a project count value.Sending out When sending a response message, this response message also carries the described first count value and described second of giving out a contract for a project and gives out a contract for a project counting Value.When sending two response messages, a response message carries described first and gives out a contract for a project count value, in another response message In carry described second and give out a contract for a project count value.
S407, first network equipment receive described response message from second network equipment, obtain institute from described response message State the first packet receiving count value and described second packet receiving count value.
Described reception response message can be received a response message or receive two response messages.When reception one During response message, obtain described first packet receiving count value and described second packet receiving count value from this response message.Work as reception During two response messages, obtain described first packet receiving count value from a response message, obtain from another response message Described second packet receiving count value.
Alternatively, 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 the described first count value and described second of giving out a contract for a project from two response messages 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, described first receipts Bag count value and described second packet receiving count value carry out packet loss statistics.
For example, first network equipment can be given out a contract for a project count value and described second according to described the first of local record Bag count value, and from described response message obtain described first packet receiving count value and described second packet receiving count value lost Bag statistics.
For example, first network equipment from described response message get described first give 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 described second packet receiving count value when, carry out packet loss statistics.
When in above method flow process, first network equipment and second network equipment carry out packet loss statistics, for example 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 Bag count value |.
Take absolute value in above formula can ensure that second give out a contract for a project count value with first give out a contract for a project count value difference be just, and Ensure that the second packet receiving count value is just with the difference of the first packet receiving count value.
In above method flow process, each step does not have strict sequencing.First network equipment receives from second network equipment In the case of two response messages, first network equipment receives second response message and can send the plurality of data message Before, or before sending described second detection messages.
In above method for detecting packet loss, first network equipment can be by arranging intervalometer so that described first detection is reported Literary composition reaches second network equipment early than all data messages including described detection mark.Mark including described detection thus without having The data message of will reaches second network equipment early than described first detection messages and is counted by leakage, is favorably improved packet loss detection Accuracy.
In above method for detecting packet loss, second network equipment can by arrange intervalometer so that all described second The data message reaching the inclusion described detection mark of second network equipment after detection messages is all included into statistics, contributes to carrying The accuracy of high packet loss detection.
Above-described method for detecting packet loss, by arranging first timer in first network equipment, postpones transmission described Multiple data messages.Even if so that there is out of order, institute in the message that described first network equipment sends to described second network equipment State the first detection messages and also can first reach second network equipment early than the plurality of data message.After thus statistics starts, data Message just can reach second network equipment, and follow-up data message all can be included in packet loss statistics, is favorably improved packet loss detection Accuracy.
Fig. 5 shows a schematic flow sheet of the method for detecting packet loss shown in application Fig. 4.First inspection described in this flow process Observing and predicting civilian and described second detection messages is a lmm message and the 2nd lmm message.First network equipment receives two response reports Wen Shike thinks two lmr messages.Y.1731 in agreement, lmm message includes txfcf field, lmr message include txfcf field, Rxfcf and txfcb field.When first network equipment receives a response message, add a rxfcfc field in lmr message, For transmitting packet receiving count value.Alternatively, when first network equipment receives a response message, can also add in lmr message One txfcfc field, for transmitting count value of giving out a contract for a project.This example flow comprises the steps:
S501, first network equipment send a 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](assume when sending a described lmm message for first network equipment The tp moment) transmission include detection mark data message quantity.
Alternatively, first network equipment is by described txfcf[tp]It is arranged on the txfcf field of a described lmm message.
S502, first network equipment start intervalometer, and after described timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the plurality of data message includes described detection mark.The duration of described intervalometer is used First reach second network equipment in the described lmm message of guarantee than the plurality of data 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](assume when sending described 2nd lmm message for first network equipment The tc moment) transmission inclusion described detection mark data message quantity.
Alternatively, first network equipment is by described txfcf[tc]It is arranged on the txfcf field of described 2nd lmm message.
S504, second network equipment receive a described lmm message from first network equipment, and record the first packet receiving counting Value rxfcf[tp].
Described first packet receiving count value rxfcf[tp]Receive reception during a described lmm message for second network equipment Quantity including the data message of described detection mark.
Alternatively, a described lmm message includes described first and gives 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].
Described second packet receiving count value rxfcf[tc]Receive reception during described 2nd lmm message for second network equipment Quantity including the data message of described detection mark.
Second network equipment, after receiving a described lmm message, before receiving described 2nd lmm message, can receive many Individual data message, each data message in the plurality of data message includes described detection dress mark.Due to the plurality of number Reach second network equipment, described first packet receiving count value rxfcf according to message[tp]Described second packet receiving count value can be increased to rxfcf[tc].
Alternatively, described 2nd lmm message includes described second and gives out a contract for a project count value txfcf[tc].
Alternatively, second network equipment can start intervalometer, described fixed when receiving described 2nd lmm message When device time-out after, re-record described second packet receiving count value rxfcf[tc].After intervalometer starts and before time-out, the second network Equipment can continue to receive, from first network equipment, the data message including described detection mark.The duration of described intervalometer is used for Ensure that the data message of all inclusion described detection marks reaching second network equipment after described 2nd lmm message is counted Enter described second packet receiving count value rxfcf[tc].
Alternatively, second network equipment can be according to the txfcf in a described lmm[tp], in described 2nd lmm txfcf[tc]And the rxfcf of local record[tc]And rxfcf[tp]Carry out packet loss statistics.Packet loss counts and adopts equation below:
Packet loss statistical value=| txfcf[tc]- txfcf[tp]|-| rxfcf[tc]- rxfcf[tp]|
S506, second network equipment send lmr message to first network equipment, and described lmr message includes described first receipts Bag count value rxfcf[tp]With described second packet receiving count value rxfcf[tc].
When sending a response message, second network equipment can be by described first packet receiving count value rxfcf[tp]It is arranged on The rxfcf of this lmr message, by the second packet receiving count value rxfcf[tc]It is arranged on the extension of this lmr message Rxfcfc field.When sending two response messages, second network equipment can be by described first packet receiving count value rxfcf[tp]If Put the rxfcf field in first lmr message, by described second packet receiving count value rxfcf[tc]It is arranged on second lmr message Rxfcf field.
Alternatively, described lmr message also includes described first and gives 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 be given out a contract for a project described first count value txfcf[tp]If Put the txfcf field in this lmr message, described second is given out a contract for a project count value txfcf[tc]It is arranged on this lmr message Extension txfcfc field.When sending two response messages, second network equipment can be given out a contract for a project described first count value txfcf[tp]It is arranged on the txfcf field of first lmr message, described second is given out a contract for a project count value txfcf[tc]It is arranged on second The txfcf field of individual lmr message.
S507, first network equipment receive described lmr message from second network equipment, from described in described lmr Receive message First packet receiving count value rxfcf[tp]With described second packet receiving count value rxfcf[tc].
When receiving a lmr message, from the first packet receiving count value and described second packet receiving described in this lmr Receive message Count value.When receiving two lmr messages, obtain described first packet receiving count value from a response message, from another sound Answer and in message, obtain described second packet receiving count value.
Alternatively, 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 the described first count value and described second of giving out a contract for a project from two lmr messages 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, described first receipts Bag count value and described second packet receiving count value carry out packet loss statistics.
Packet loss counts and adopts equation below:
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, first network equipment can be according to the txfcf in response message[tp]、rxfcf[tp]、txfcf[tc]With rxfcf[tc]Carry out packet loss statistics.
Fig. 6 shows a schematic flow sheet of the method for detecting packet loss shown in application Fig. 4.First inspection described in this flow process Observing and predicting civilian and described second detection messages is all a cmm message and the 2nd cmm message.First network equipment receives two responses Can be two cmm messages during message.Y.1731 in agreement, cmm message includes txfcf field, rxfcb and txfcb field.The When one network equipment receives a response message, as rxfcbc field or add one using the reserved field in cmm message Rxfcbc field, for transmitting packet receiving count value.Alternatively, 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.This example flow comprises the steps:
S601, first network equipment send a 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](assume when sending a described cmm message for first network equipment The tp moment) transmission include detection mark data message quantity.
Alternatively, first network equipment is by described txfcf[tp]It is arranged on the txfcf field of a described cmm message.
S602, first network equipment start intervalometer, and after described timer expiry, first network equipment is to the second network Equipment sends multiple data messages.
Each data message in the plurality of data message includes described detection mark.The duration of described intervalometer is used First reach second network equipment in the described cmm message of guarantee than the plurality of data 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](assume when sending described 2nd cmm message for first network equipment The tc moment) transmission inclusion described detection mark data message quantity.
Alternatively, first network equipment is by described txfcf[tc]It is arranged on the txfcf field of described 2nd cmm message.
S604, second network equipment receive a described cmm message from first network equipment, and record the first packet receiving counting Value rxfcb[tp].
Described first packet receiving count value rxfcb[tp]Receive reception during a described cmm message for second network equipment Quantity including the data message of described detection mark.
Alternatively, a described cmm message includes described first and gives 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].
Described second packet receiving count value rxfcb[tc]Receive reception during described 2nd cmm message for second network equipment Quantity including the data message of described detection mark.
Second network equipment, after receiving a described cmm message, before receiving described 2nd cmm message, can receive many Individual data message, each data message in the plurality of data message includes described detection dress mark.Due to the plurality of number Reach second network equipment, described first packet receiving count value rxfcb according to message[tp]Described second packet receiving count value can be increased to rxfcb[tc].
Alternatively, described 2nd cmm message includes described second and gives out a contract for a project count value txfcf[tc].
Alternatively, second network equipment can start intervalometer, described fixed when receiving described 2nd cmm message When device time-out after, re-record described second packet receiving count value rxfcb[tc].After intervalometer starts and before time-out, the second network Equipment can continue to receive, from first network equipment, the data message including described detection mark.The duration of described intervalometer is used for Ensure that the data message of all inclusion described detection marks reaching second network equipment after described 2nd cmm message is counted Enter described second packet receiving count value rxfcb[tc].
Alternatively, second network equipment can be according to the txfcf in a described cmm[tp], in described 2nd cmm txfcf[tc]And the rxfcb of local record[tc]And rxfcb[tp]Carry out packet loss statistics.It is wherein to avoid field name conflict, by institute State txfcf[tp]It is designated as txfcb[tp], by described txfcf[tc]It is designated as txfcb[tc].Described field name conflict refers to report using cmm In literary composition transmission, in second network equipment, other count values may be sent using txfcf field to first network equipment.Described Packet loss counts and adopts equation below:
Packet loss statistical value=| txfcb[tc]- txfcb[tp]|-| rxfcb[tc]- rxfcb[tp]|
S606, second network equipment to first network equipment send as response message cmm message, described as response The cmm message of message includes described first packet receiving count value rxfcb[tp]With described second packet receiving count value rxfcb[tc].
When sending a response message, second network equipment can be by described first packet receiving count value rxfcb[tp]It is arranged on Rxfcb field, by the second packet receiving count value rxfcb[tc]It is arranged on the rxfcbc field of the extension of this response message.Send During two response messages, second network equipment can be by described first packet receiving count value rxfcb[tp]It is arranged on first cmm report The rxfcb field of literary composition, by described second packet receiving count value rxfcb[tc]It is arranged on the rxfcb field of second cmm message.
Alternatively, the described cmm message as response message also includes described first and gives out a contract for a project count value txfcf[tp]And institute State second to give out a contract for a project count value txfcf[tc].It is wherein to avoid field name conflict, by txfcf[tp]It is designated as txfcb[tp], txfcf[tc] It is designated as txfcb[tc].During described field name conflict refers to transmit using cmm message, may use in second network equipment Txfcf field to send other count values to first network equipment.Thus when sending a response message, second network equipment By described txfcb[tp]It is arranged on the txfcb field of described cmm message, by described txfcb[tc]It is arranged on described cmm message Txfcbc field.When sending two cmm messages as response message, second network equipment can be given out a contract for a project described first meter Numerical value txfcb[tp]It is arranged on the txfcb field of first cmm message, described second is given out a contract for a project count value txfcb[tc]It is arranged on The txfcb field of second lmr message.
S607, first network equipment receive the described cmm message as response message from second network equipment, from described Cmm Receive message the first packet receiving count value rxfcb[tp]With described second packet receiving count value rxfcb[tc].
When receiving a cmm message, from the first packet receiving count value and described second packet receiving described in this cmm Receive message Count value.When receiving two cmm messages, obtain described first packet receiving count value from a cmm message, from another cmm Described second packet receiving count value is obtained in message.
Alternatively, 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 the described first count value and described second of giving out a contract for a project from two cmm messages 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, described first receipts Bag count value and described second packet receiving count value carry out packet loss statistics.
Packet loss counts and adopts equation below:
Packet loss statistical value=| txfcb[tc]- txfcb[tp]|-| rxfcb[tc]- rxfcb[tp]|
For example, first network equipment can be given 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 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 described as the txfcb in the cmm message of response message[tp]、 rxfcb[tp]、txfcb[tc]And rxfcb[tc]Carry out packet loss statistics.
Fig. 7 is a kind of structural representation of first network equipment 700 provided in an embodiment of the present invention.First network equipment 700 can be used for executing the method performed by first network equipment in the corresponding embodiment of Fig. 4 to Fig. 6.First network equipment 700 wraps Include transmitting element 701, receiving unit 702 and packet loss statistic unit 703.
Transmitting element 701, for sending the first detection messages to second network equipment and recording first and give out a contract for a project count value, opens Dynamic first timer, after described first timer time-out, sends multiple data messages to described second network equipment, to described Second network equipment sends the second detection messages and records second and give out a contract for a project count value.Described first gives out a contract for a project count value for transmitting element 701 quantity sending the data message including detection mark of transmission during described first detection messages.The plurality of datagram Each data message in literary composition includes described detection mark.Described second count value of giving out a contract for a project sends described for transmitting element 701 The quantity of the data message of the inclusion of transmission described detection mark during two detection messages.The duration of described first timer is used for Ensure that described first detection messages first reach described second network equipment than the plurality of data message.
Receiving unit 702, for receiving response message from described second network equipment, obtains first from described response message Packet receiving count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first inspection Observe and predict the quantity of the data message of inclusion described detection mark of Wen Shiyi reception, described second packet receiving count value is described second The network equipment receives the quantity of the data message of inclusion described detection mark of reception during described 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 described second packet receiving count value carry out packet loss statistics to the plurality of data message.
Alternatively, packet loss statistic unit 703 carries out packet loss statistics and includes carrying out packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, described first detection messages include described first and give out a contract for a project count value.Described second detection messages include institute State second to give out a contract for a project count value.
Alternatively, described receiving unit receives response message and includes receiving the first response message and receive the second response report Literary composition, correspondingly, described obtains the first packet receiving count value and the second packet receiving count value is included from described first sound from response message Answer and in message, obtain described first packet receiving count value, obtain described second packet receiving count value from described second response message.
Alternatively, transmitting element 701 starts to described first timer time-out period, Yi Jifa in described first timer After sending described second detection messages, send the data message not including described detection mark to described second network equipment.
Alternatively, described second detection messages are additionally operable to indicate that described second network equipment is receiving described second detection report Wen Shi, starts second timer, records described second packet receiving count value after described second timer time-out.Described second timing The duration of device is used for ensureing all described detections of inclusion reaching described second network equipment after described second detection messages The data message of mark is counted into described second packet receiving count value.
Fig. 8 is a kind of structural representation of second network equipment 800 provided in an embodiment of the present invention.Second network equipment 800 can be used for executing the method performed by second network equipment in the corresponding embodiment of Fig. 4 to Fig. 6.Second network equipment 800 wraps Include receiving unit 801 and transmitting element 802.
Receiving unit 801, for receiving the first detection messages from first network equipment, and records the first packet receiving count value. Described first packet receiving count value receives the number including detection mark of reception during described first detection messages for receiving unit 801 Quantity according to message.
Receiving unit 801, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer, After described timer expiry, record the second packet receiving count value.Described second packet receiving count value is to receive during described timer expiry The quantity of the data message including detection mark of unit 801 reception.The duration of described intervalometer be used for ensureing all in institute The data message reaching the inclusion described detection mark of receiving unit 801 after stating the second detection messages is counted into described second receipts Bag count value.
Transmitting element 802, for sending response message to described first network equipment, described response message includes described the One packet receiving count value and described second packet receiving count value.
Described response message be used for enabling described first network equipment according to described first packet receiving count value, described second Packet receiving count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry out packet loss statistics, and described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message including detection mark of transmission during described first detection messages, described Second give out a contract for a project count value be described first network equipment send during described second detection messages transmission include detection mark The quantity of data message.
Alternatively, receiving unit 801 after receiving described first detection messages from described first network equipment to described Before timer expiry, also receive the data message not including described detection mark.
Alternatively, receiving unit 801, be additionally operable to from described first network equipment receive the first detection messages after, from Described first network equipment receives multiple data messages.Each data message in the plurality of data message includes described detection Mark.
Fig. 9 is a kind of structural representation of second network equipment 900 provided in an embodiment of the present invention.Second network equipment 900 can be used for executing the method performed by second network equipment in the corresponding embodiment of Fig. 4 to Fig. 6.Second network equipment 900 wraps 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. Described first packet receiving count value receives the number including detection mark of reception during described first detection messages for receiving unit 901 Quantity according to message.Described first detection messages include first and give out a contract for a project count value.Described first gives out a contract for a project count value for described first The network equipment sends the quantity of the data message of inclusion described detection mark of transmission during described first detection messages.
Receiving unit 901, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer, After described timer expiry, record the second packet receiving count value.Described second packet receiving count value is to receive during described timer expiry The quantity of the data message including detection mark of unit 901 reception.The duration of described intervalometer be used for ensureing all in institute The data message reaching the inclusion described detection mark of receiving unit 901 after stating the second detection messages is counted into described second receipts Bag count value.Described second detection messages include second and give out a contract for a project count value.Described second gives out a contract for a project count value for described first network Equipment sends the quantity of the data message including detection mark of transmission during described 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 described second packet receiving count value carry out packet loss statistics.
Alternatively, packet loss statistic unit 902 carries out packet loss statistics and includes carrying out packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, receiving unit 901 after receiving described first detection messages from described first network equipment to described Before timer expiry, also receive the data message not including described detection mark.
Alternatively, receiving unit 901, be additionally operable to from described first network equipment receive the first detection messages after, from Described first network equipment receives multiple data messages.Each data message in the plurality of data message includes described detection Mark.
Figure 10 is a kind of structural representation of first network equipment 1000 provided in an embodiment of the present invention.First network equipment 1000 may, for example, be main frame, switch, router etc..First network equipment 1000 can execute Fig. 4 to embodiment illustrated in fig. 6 In the step performed by first network equipment.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 memorizer 1003.
Described memorizer 1003 is used for storing batch processing instruction, and described processor 1001 is used for calling described memorizer The programmed instruction execution of 1003 storages is following to be operated:
Triggering network interface 1002 sends the first detection messages to second network equipment, and records first and give out a contract for a project count value, Described first count value of giving out a contract for a project is the inclusion detection mark that described first network equipment sends transmission during described first detection messages The quantity of the data message of will.
Start first timer, after described first timer time-out, triggering network interface 1002 is to described second network Equipment sends multiple data messages, and each data message in the plurality of data message comprises described detection mark, and described the The duration of one intervalometer is used for ensureing that described first detection messages first reach described second network than the plurality of data message and set Standby.
Triggering network interface 1002 sends the second detection messages to described second network equipment, and records 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 described first network equipment sends during described second detection messages described in the inclusion of transmission The quantity of the data message of detection mark.
Triggering network interface 1002 receives response message from described second network equipment, obtains first from described response message Packet receiving count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first inspection Observe and predict the quantity of the data message of inclusion described detection mark of Wen Shiyi reception, described second packet receiving count value is described second The network equipment receives the quantity of the data message of inclusion described detection mark of reception during described 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, described first packet receiving count value and described Two packet receiving count values carry out packet loss statistics to the plurality of data message.
Alternatively, carry out described packet loss statistics according to equation below:
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 Bag count value |.
Alternatively, described first detection messages include described first and give out a contract for a project count value.Described second detection messages include institute State second to give out a contract for a project count value.
Alternatively, described reception response message includes receiving the first response message and receives the second response message, correspondingly, Described obtain the first packet receiving count value from response message and the second packet receiving count value includes: obtain from described first response message Take described first packet receiving count value, obtain described second packet receiving count value from described second response message.
Alternatively, start to described first timer time-out period in described first timer, and send described second After detection messages, processor 1001 also calls the programmed instruction of memorizer 1003 storage, and triggering network interface 1002 is to described the Two network equipments send the data message not including described detection mark.
Alternatively, described second detection messages are additionally operable to indicate that described second network equipment is receiving described second detection report Wen Shi, starts second timer, records described second packet receiving count value after described second timer time-out.Described second timing The duration of device is used for ensureing all described detections of inclusion reaching described second network equipment after described second detection messages The data message of mark is counted into described second packet receiving count value.
When first network equipment 1000 is the first network equipment 700 in embodiment illustrated in fig. 7, processor 1001 is realized losing The function of bag statistic unit 703, the programmed instruction triggering network interface 1002 that processor 1001 reads memorizer 1003 storage is real Existing transmitting element 701 and the function of receiving unit 702.
Figure 11 is a kind of structural representation of second network equipment 1100 provided in an embodiment of the present invention.Second network equipment 1100 may, for example, be main frame, switch, router etc..Second network equipment 1100 can execute Fig. 4 to embodiment illustrated in fig. 6 In the step performed by second network equipment.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 memorizer 1103.
Described memorizer 1103 is used for storing batch processing instruction, and described processor 1101 is used for calling described memorizer The programmed instruction execution of 1103 storages is following to be operated:
Triggering network interface 1102 receives the first detection messages from first network equipment, and records the first packet receiving count value, Described first packet receiving count value is the inclusion detection mark that second network equipment 1100 receives reception during described first detection messages The quantity of the data message of will.
Triggering network interface 1102 receives the second detection messages from described first network equipment, and starts intervalometer, in institute After stating timer expiry, record the second packet receiving count value, described second packet receiving count value is the second net during described timer expiry The quantity of the data message of inclusion described detection mark of network equipment 1100 reception, the duration of described intervalometer is used for ensureing institute The data message having the inclusion reaching second network equipment 1100 after described second detection messages described detection mark is counted Enter described second packet receiving count value.
Triggering network interface 1102 sends response message to described first network equipment, and described response message includes described the One packet receiving count value and described second packet receiving count value.
Described response message be used for enabling described first network equipment according to described first packet receiving count value, described second Packet receiving count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry out packet loss statistics, and described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message including detection mark of transmission during described first detection messages, described Second give out a contract for a project count value be described first network equipment send during described second detection messages transmission include detection mark The quantity of data message.
Alternatively, from described first network equipment receive described first detection messages after to described timer expiry it Before, processor 1101 also calls the programmed instruction of memorizer 1103 storage, and triggering network interface 1102 receives and do not include described inspection The data message of mark will.
When second network equipment 1100 is second network equipment 800 in embodiment illustrated in fig. 8, processor 1101 reads and deposits The programmed instruction triggering network interface 1102 of reservoir 1103 storage realizes receiving unit 801 and the function of transmitting element 802.
Figure 12 is a kind of structural representation of second network equipment 1200 provided in an embodiment of the present invention.Second network equipment 1200 may, for example, be main frame, switch, router etc..Second network equipment 1200 can execute Fig. 4 to embodiment illustrated in fig. 6 In the step performed by second network equipment.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 memorizer 1203.
Described memorizer 1203 is used for storing batch processing instruction, and described processor 1201 is used for calling described memorizer The programmed instruction execution of 1203 storages is following to be operated:
Triggering network interface 1202 receives the first detection messages from first network equipment, and records the first packet receiving count value, Described first packet receiving count value is the inclusion detection mark that second network equipment 1100 receives reception during described first detection messages The quantity of the data message of will.Described first detection messages include first and give out a contract for a project count value, and described first gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message of inclusion described detection mark of transmission during described first detection messages.
Triggering network interface 1202 receives the second detection messages from described first network equipment, and starts intervalometer, in institute After stating timer expiry, record the second packet receiving count value, described second packet receiving count value is the second net during described timer expiry The quantity of the data message of inclusion described detection mark of network equipment 1200 reception, the duration of described intervalometer is used for ensureing institute The data message having the inclusion reaching second network equipment 1200 after described second detection messages described detection mark is counted Enter described second packet receiving count value.Described second detection messages include second and give 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 of transmission during described 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, described first packet receiving count value and described Two packet receiving count values carry out packet loss statistics.
Alternatively, carry out described packet loss statistics according to equation below:
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 Bag count value |
Alternatively, from described first network equipment receive described first detection messages after to described timer expiry it Before, processor 1201 also calls the programmed instruction of memorizer 1203 storage, and triggering network interface 1202 receives and do not include described inspection The data message of mark will.
When second network equipment 1200 is second network equipment 900 in embodiment illustrated in fig. 9, processor 1201 is realized losing The function of bag statistic unit 902, the programmed instruction triggering network interface 1202 that processor 1201 reads memorizer 1203 storage is real The function of existing receiving unit 901.
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), special 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 that complexity can Programmed logic device (English: complex programmable logic device, abbreviation: cpld), field programmable logic Gate array (English: field-programmable gate array, abbreviation: fpga), GAL (English: Generic array logic, abbreviation: gal) or its combination in any.
Network interface 1002,1102 and 1202 can be wireline interface, for example Fiber Distributed Data Interface (English: Fiber distributed data interface, referred to as: fddi), Ethernet (English: ethernet) interface.Network connects Mouth 1002,1102 and 1202 can also be wave point, such as wireless lan interfaces.
Memorizer 1003,1103 and 1203 can be including but not limited to content adressable memory (English: content- Addressable memory, referred to as: cam), for example three-state content addressing memory (English: ternary cam, referred to as: Tcam), random access memory (English: random-access memory, referred to as: ram).Memorizer 1003,1103 and 1203 can also be integrated in processor 1001,1101 and 1201 respectively.If memorizer 1003,1103 and 1203 be respectively with The separate device of processor 1001,1101 and 1201, then memorizer 1003,1103 and 1203 respectively with processor 1001, 1101 are connected with 1201, for example, can pass through bus communication.
Network interface 1002,1102 and 1202 can pass through bus communication with processor 1001,1101 and 1201 respectively, Can be direct-connected.
Figure 13 is a kind of structural representation of packet loss detection system provided in an embodiment of the present invention.Described packet loss detection system Including first network equipment and second network equipment.Described first network equipment and described second network equipment can pass through one Or multiple communication link is communicated.Described first network equipment and described second network equipment may be respectively used in execution Fig. 4 extremely The step of first network equipment and the execution of second network equipment in the corresponding embodiment of Fig. 6.Described 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.Described 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 set for the second network in Figure 11 Second network equipment 1200 in standby 1100 or Figure 12.For example:
Described first network equipment, can be used for sending the first detection messages and recording first to described second network equipment Give out a contract for a project count value, start first timer, after described first timer time-out, send many numbers to described second network equipment According to message, send the second detection messages to described second network equipment and record second and give out a contract for a project count value.Described first gives out a contract for a project meter Numerical value is the data message including detection mark that described first network equipment sends transmission during described first detection messages Quantity.Each data message in the plurality of data message includes described detection mark.Described second gives out a contract for a project count value for institute State the quantity that first network equipment sends the data message of inclusion described detection mark of transmission during described second detection messages. The duration of described first timer is used for ensureing that described first detection messages first reach described second than the plurality of data message The network equipment.
Described second network equipment, can be used for receiving described first detection messages from described first network equipment, and remembers Record the first packet receiving count value.Described first packet receiving count value is that described second network equipment receives during described first detection messages The quantity of the data message of inclusion described detection mark receiving.
Described second network equipment, can be additionally operable to receive described second detection messages from described first network equipment, and Record the second packet receiving count value.When described second packet receiving count value is that described second network equipment receives described second detection messages The quantity of the data message of inclusion described detection mark of reception.
Described second network equipment, can be additionally operable to send the first response message to described first network equipment.Described One response message includes the first packet receiving count value.Described first packet receiving count value is that described second network equipment receives described first The quantity of the data message of the inclusion of reception described detection mark during detection messages.
Described second network equipment, can be additionally operable to send the second response message to described first network equipment.Described Two response messages include the second packet receiving count value.Described second packet receiving count value is that described second network equipment receives described second The quantity of the data message of the inclusion of reception described detection mark during detection messages.
Described first network equipment, can be additionally operable 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, Described first packet receiving count value and described second packet receiving count value carry out packet loss statistics.
The above packet loss detection system, by arranging first timer in described first network equipment, postpones to send institute State multiple data messages.Even if so that the message generation that described first network equipment sends to described second network equipment is out of order, Described first detection messages also can first reach described second network equipment early than the plurality of data message.In second network equipment After proceeding by counting messages, datagram literary talent can reach described second network equipment, and follow-up data message all can be included and lose In bag statistics, it is favorably improved the accuracy of packet loss detection.By arranging intervalometer in described second network equipment, so that Even if the message generation that described first network equipment sends to described second network equipment is out of order, all detection described second is reported The quantity reaching the data message of inclusion described detection mark of second network equipment after literary composition all can be counted into described second receipts Bag count value, thus provides more accurately packet loss detection result.
Those of ordinary skill in the art are it is to be appreciated that combine the flow forwarding side of the embodiments described herein description Method and equipment, being capable of being implemented in combination in electronic hardware or computer software and electronic hardware.These functions are actually with hard Part or software mode executing, the application-specific depending on technical scheme and design constraint.The ordinary skill of this area Personnel can use different methods to each specific application realize described function, but this realize it is not considered that Beyond the scope of this invention.

Claims (23)

1. a kind of method for detecting packet loss is it is characterised in that include:
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 the data including detection mark that described first network equipment sends transmission during described first detection messages The quantity of message;
Described first network equipment starts first timer, after described first timer time-out, described first network equipment to Described second network equipment sends multiple data messages, and each data message in the plurality of data message comprises described detection Mark, the duration of described first timer is used for ensureing that described first detection messages are more described than the plurality of data message first reaches Second network equipment;
Described first network equipment sends the second detection messages to described second network equipment, and records second and give out a contract for a project count value, The described inspection of inclusion that count value is transmission when described first network equipment sends described second detection messages that described second gives out a contract for a project The quantity of the data message of mark will;
Described first network equipment receives response message from described second network equipment, obtains the first packet receiving from described response message Count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first detection report The quantity of the data message of inclusion described detection mark that Wen Shiyi receives, described second packet receiving count value is described second network Equipment receives the quantity of the data message of inclusion described detection mark of reception during described second detection messages;
Described 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 first packet receiving meter Numerical value and described second packet receiving count value carry out packet loss statistics to the plurality of data message.
2. method for detecting packet loss according to claim 1 is it is characterised in that described 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, described first packet receiving count value and described second packet receiving count value to described many Individual data message carries out packet loss statistics and includes:
Carry out packet loss statistics according to equation below:
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 and 2 it is characterised in that described first detection messages include described First gives out a contract for a project count value, and described second detection messages include described second and give out a contract for a project count value.
4. the method for detecting packet loss according to claims 1 to 3 any one, described reception response message includes receiving first Response message and reception the second response message, correspondingly, described the first packet receiving count value and second that obtains from response message is received Bag count value includes:
Obtain described first packet receiving count value from described first response message, obtain described from described second response message Two packet receiving count values.
5. the method for detecting packet loss according to Claims 1-4 any one is it is characterised in that described first network equipment Start to described first timer time-out period in described first timer, and after described second detection messages of transmission, to institute State second network equipment and send the data message not including described detection mark.
6. the method for detecting packet loss according to claim 1 to 5 any one is it is characterised in that described second detection messages It is additionally operable to indicate described second network equipment when receiving described second detection messages, start second timer, described second Record described second packet receiving count value after timer expiry, the duration of described second timer be used for ensureing all described second Reach after detection messages the data message of inclusion described detection mark of described second network equipment quantity be counted into described Second packet receiving count value.
7. a kind of method for detecting packet loss is it is characterised in that include:
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 the data including detection mark that described second network equipment receives reception during described first detection messages The quantity of message;
Described second network equipment receives the second detection messages from described first network equipment, and starts intervalometer, described fixed When device time-out after, record the second packet receiving count value, described second packet receiving count value be described timer expiry when described in the second net The quantity of the data message of inclusion described detection mark of network equipment reception, the duration of described intervalometer be used for ensureing all The data message reaching the inclusion described detection mark of described second network equipment after described second detection messages is counted into institute State the second packet receiving count value;
Described second network equipment sends response message to described first network equipment, and described response message includes described first receipts Bag count value and described second packet receiving count value;
Described response message is used for enabling described first network equipment according to described first packet receiving count value, described second packet receiving Count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry 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 of inclusion described detection mark of transmission during described first detection messages, described Second gives out a contract for a project inclusion described detection mark that count value is transmission when described first network equipment sends described second detection messages The quantity of the data message of will.
8. method for detecting packet loss according to claim 7 is it is characterised in that described second network equipment is from described first Before the network equipment arrives described timer expiry after receiving described first detection messages, also receive and do not include described detection mark Data message.
9. a kind of method for detecting packet loss is it is characterised in that include:
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 the data including detection mark that described second network equipment receives reception during described first detection messages The quantity of message, described first detection messages include first and give out a contract for a project count value, and the described first count value of giving out a contract for a project is described first net Network equipment sends the quantity of the data message of inclusion described detection mark of transmission during described first detection messages;
Described second network equipment receives the second detection messages from described first network equipment, and described 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 to send when described first network equipment sends described second detection messages Inclusion described detection mark data message quantity;
Described second network equipment starts intervalometer, after described timer expiry, record the second packet receiving count value, and described second Packet receiving count value is the datagram of the inclusion described detection mark of second network equipment reception described in during described timer expiry The quantity of literary composition, the duration of described intervalometer is used for ensureing all reaching described second network after described second detection messages and setting The quantity of the data message of standby inclusion described detection mark is counted into described second packet receiving count value;
Described 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 packet receiving meter Numerical value and described second packet receiving count value carry out packet loss statistics.
10. method for detecting packet loss according to claim 9 is it is characterised in that described 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, described first packet receiving count value and described second packet receiving count value is lost Bag statistics includes:
Carry out packet loss statistics according to equation below:
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 are it is characterised in that described second network equipment is from institute State before arriving described timer expiry after first network equipment receives described first detection messages, also receive and do not include described inspection The data message of mark will.
A kind of 12. first network equipment are it is characterised in that described first network equipment includes transmitting element, receiving unit and loses Bag statistic unit, wherein,
Described transmitting element, for sending the first detection messages to second network equipment, record first is given out a contract for a project count value, and starts First timer, after described first timer time-out, sends multiple data messages to described second network equipment;To described Two network equipments send the second detection messages and record second and give out a contract for a project count value, described first give out a contract for a project count value be described send single Unit sends the quantity of the data message including detection mark of transmission during described first detection messages, the plurality of data message In each data message include described detection mark, the described second count value of giving out a contract for a project is that described transmitting element sends described second The quantity of the data message of the inclusion of transmission described detection mark during detection messages, the duration of described first timer is used for protecting Demonstrate,prove described first detection messages and first reach described second network equipment than the plurality of data message;
Described receiving unit, for receiving response message from described second network equipment, obtains the first receipts from described response message Bag count value and the second packet receiving count value, described first packet receiving count value is that described second network equipment receives described first detection The quantity of the data message of the inclusion of reception described detection mark during message, described second packet receiving count value is described second net Network equipment receives the quantity of the data message of inclusion described detection mark of reception during described second detection messages;
Described 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 first receipts Bag count value and described second packet receiving count value carry out packet loss statistics to the plurality of data message.
13. first network equipment according to claim 12 are it is characterised in that described packet loss statistic unit carries out packet loss system Meter includes:
Carry out packet loss statistics according to equation below:
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 |.
The 14. first network equipment according to claim 12 or 13 are it is characterised in that described first detection messages include institute State first to give out a contract for a project count value, described second detection messages include described second and give out a contract for a project count value.
The 15. first network equipment according to claim 12 to 14 any one are it is characterised in that described receiving unit connects Receive response message to include receiving the first response message and receive the second response message, correspondingly, described acquisition from response message First packet receiving count value and the second packet receiving count value include:
Obtain described first packet receiving count value from described first response message, obtain described from described second response message Two packet receiving count values.
The 16. first network equipment according to claim 12 to 15 any one are it is characterised in that described transmitting element exists Described first timer starts to described first timer time-out period, and after sending described second detection messages, to described Second network equipment sends the data message not including described detection mark.
The 17. first network equipment according to claim 12 to 16 any one are it is characterised in that described second detection is reported Literary composition is additionally operable to indicate described second network equipment when receiving described second detection messages, starts second timer, described the Record described second packet receiving count value after two timer expiries, the duration of described second timer be used for ensureing all described The quantity reaching the data message of inclusion described detection mark of described second network equipment after two detection messages is counted into institute State the second packet receiving count value.
A kind of 18. second network equipments it is characterised in that described second network equipment includes receiving unit and transmitting element, its In,
Described 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 the data including detection mark that described receiving unit receives reception during described first detection messages The quantity of message;
Described receiving unit, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer;Described After timer expiry, record the second packet receiving count value, described second packet receiving count value is described reception during described timer expiry The quantity of the data message including detection mark of unit reception, the duration of described intervalometer be used for ensureing all described the The quantity reaching the data message of inclusion described detection mark of described receiving unit after two detection messages is counted into described the Two packet receiving count values;
Described transmitting element, for sending response message to described first network equipment, described response message includes described first Packet receiving count value and described second packet receiving count value;
Described response message is used for enabling described first network equipment according to described first packet receiving count value, described second packet receiving Count value, the first count value and second count value of giving out a contract for a project of giving out a contract for a project carry 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 of inclusion described detection mark of transmission during described first detection messages, described Second gives out a contract for a project inclusion described detection mark that count value is transmission when described first network equipment sends described second detection messages The quantity of the data message of will.
19. second network equipments according to claim 18 are it is characterised in that described receiving unit is from described first net Before network equipment arrives described timer expiry after receiving described first detection messages, also receive and do not include described detection mark Data message.
A kind of 20. second network equipments are it is characterised in that described second network equipment includes receiving unit and packet loss statistics is single Unit, wherein,
Described 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 the data including detection mark that described receiving unit receives reception during described first detection messages The quantity of message, described first detection messages include first and give out a contract for a project count value, and the described first count value of giving out a contract for a project is described first net Network equipment sends the quantity of the data message of inclusion described detection mark of transmission during described first detection messages;
Described receiving unit, is additionally operable to receive the second detection messages from described first network equipment, and starts intervalometer;Described After timer expiry, record the second packet receiving count value, described second packet receiving count value is described reception during described timer expiry The quantity of the data message including detection mark of unit reception, the duration of described intervalometer be used for ensureing all described the The quantity reaching the data message of inclusion described detection mark of described second network equipment after two detection messages is counted into institute State the second packet receiving count value, described second detection messages include second and give out a contract for a project count value, 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 of transmission during described second detection messages;
Described 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 first receipts Bag count value and described second packet receiving count value carry out packet loss statistics.
21. second network equipments according to claim 20 are it is characterised in that described packet loss statistic unit carries out packet loss system Meter includes carrying out packet loss statistics according to equation below:
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 equipments according to claim 20 or 21 are it is characterised in that described receiving unit is from described Before one network equipment arrives described timer expiry after receiving described first detection messages, also receive and do not include described detection mark The data message of will.
A kind of 23. packet loss detection systems are it is characterised in that include 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 true CN106375158A (en) 2017-02-01
CN106375158B 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)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106972982A (en) * 2017-03-17 2017-07-21 南京务本信息科技有限责任公司 A kind of network message matching and receiving unit based on FPGA
CN107896198A (en) * 2017-11-28 2018-04-10 杭州迪普科技股份有限公司 A kind of dropping packets method for information display and device based on flow point class
CN110138629A (en) * 2018-02-02 2019-08-16 中兴通讯股份有限公司 Detection method and device, storage medium and the processor of packet loss of link
CN110876158A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 LoRa network condition monitoring method, device, system, equipment and storage medium
CN112039724A (en) * 2020-08-17 2020-12-04 鹏城实验室 Network packet loss detection method, device, storage medium and network system
WO2021169279A1 (en) * 2020-02-28 2021-09-02 华为技术有限公司 Message disorder detection method, apparatus and system
CN114073049A (en) * 2019-09-21 2022-02-18 华为技术有限公司 Method and network node for reliability measurement
CN114301811A (en) * 2020-09-23 2022-04-08 中国移动通信有限公司研究院 Information processing method and device and tunnel endpoint network element
CN114567574A (en) * 2022-03-01 2022-05-31 烽火通信科技股份有限公司 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
CN116225198A (en) * 2023-04-25 2023-06-06 北京博上网络科技有限公司 CPU load control method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100020698A1 (en) * 2008-07-23 2010-01-28 Fujitsu Limited Communication apparatus and OAM frame transmission method
CN101707509A (en) * 2009-11-19 2010-05-12 中兴通讯股份有限公司 Method, system and device for detecting packet loss rate by using OAM
CN101729304A (en) * 2008-10-21 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss
CN101729197A (en) * 2008-10-14 2010-06-09 华为技术有限公司 Method, device and system for detecting packet loss rate
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100020698A1 (en) * 2008-07-23 2010-01-28 Fujitsu Limited Communication apparatus and OAM frame transmission method
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

Cited By (15)

* 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
CN106972982A (en) * 2017-03-17 2017-07-21 南京务本信息科技有限责任公司 A kind of network message matching and receiving unit based on FPGA
CN107896198A (en) * 2017-11-28 2018-04-10 杭州迪普科技股份有限公司 A kind of dropping packets method for information display and device based on flow point class
CN110138629A (en) * 2018-02-02 2019-08-16 中兴通讯股份有限公司 Detection method and device, storage medium and the processor of packet loss of link
CN110876158A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 LoRa network condition monitoring method, device, system, equipment and storage medium
CN114073049A (en) * 2019-09-21 2022-02-18 华为技术有限公司 Method and network node for reliability measurement
CN114073049B (en) * 2019-09-21 2023-11-17 华为技术有限公司 Method and network node for reliability measurement
WO2021169279A1 (en) * 2020-02-28 2021-09-02 华为技术有限公司 Message disorder detection method, apparatus and system
CN112039724B (en) * 2020-08-17 2021-09-28 鹏城实验室 Network packet loss detection method, device, storage medium and network system
CN112039724A (en) * 2020-08-17 2020-12-04 鹏城实验室 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
CN114567574A (en) * 2022-03-01 2022-05-31 烽火通信科技股份有限公司 Method and device for realizing LM flow-free test based on time sequence control
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
CN116225198A (en) * 2023-04-25 2023-06-06 北京博上网络科技有限公司 CPU load control method and system

Also Published As

Publication number Publication date
CN106375158B (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN106375158B (en) A kind of method for detecting packet loss, the network equipment and system
US9306819B2 (en) Controller driven OAM for split architecture network
US8774045B2 (en) Packet loss detecting method and apparatus, and router
CN113079091B (en) Active stream following detection method, network equipment and communication system
US7733794B2 (en) Performance monitoring of frame transmission in data network OAM protocols
EP2903214B1 (en) Measuring method, device and system for network packet loss
CN104717150B (en) Switch and packet discarding method
CN105991338B (en) Network O&M management method and device
US20120163165A1 (en) Apparatus and method for packet transport service based on multi protocol label switching-transport profile (mpls-tp) network
JP2004328752A (en) Inserting address for performing oam functions
CN107579869B (en) Network performance detection method and network equipment
CN107360056A (en) AFDX performance test methods based on RFC2544
KR102364803B1 (en) Communication method, communication device and storage medium
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
WO2012145886A1 (en) Measurement method, apparatus and system based on labels
JP6332544B1 (en) Network management apparatus, network system, method, and program
US9331927B2 (en) Communication system, communication device, and communication method
CN104580002B (en) The big balanced retransmission method of current load and device
US20140092725A1 (en) Method and first network node for managing an ethernet network
JP6601531B2 (en) Network management apparatus, network system, method, and program
WO2021169279A1 (en) Message disorder detection method, apparatus and system
CN110166311A (en) Measure method, equipment and the network system of network performance
US9094290B2 (en) Measuring and displaying bandwidth contention
CN109981414B (en) method for acquiring packet loss number between mpls network nodes

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