# US 2012/0269086 A1 · Packet loss detecting method and apparatus, and router

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0269086 A1
- Document ID: US20120269086A1
- Status: Published application
- Kind: A1
- Application number: 13/536,031
- Filed: 2012-06-28
- Published: 2012-10-25
- Earliest claimed: 2009-12-30
- Assignees: Huawei Technologies Co., Ltd.
- Inventors: Jianfei YUE; Huihua Song
- Web page: https://patentgrep.com/patent/US20120269086A1

## CPC

- H04L 43/0829: Packet loss
- H04L 1/203: {Details of error rate determination, e.g. BER, FER or WER}
- H04L 45/308: {Route determination based on user's profile, e.g. premium users}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A packet loss detecting method includes: a first router counts received packets and sent packets respectively according to a class of service value of a packet in each tunnel; the first router generates a first packet loss detection packet corresponding to the class of service value, sends the first packet loss detection packet to a second router at a peer end, and receives a first packet loss response packet returned by the second router; and the first router corresponds a class of service value, and measures a packet loss value according to a locally recorded count value and a count value carried in the first packet loss response packet. With the technical solution, packet disorder does not occur when packet loss measurement is performed for a pseudo-wire with multiple classes of service. In addition, traffic detection occupies a smaller bandwidth.

## Claims

### Claim 1

A packet loss detecting method, comprising:
counting, by a first router, received packets and sent packets respectively according to a class of service value of a packet in each tunnel;
generating, by the first router, a first packet loss detection packet corresponding to the class of service value, sending the first packet loss detection packet to a second router at a peer end, and receiving a first packet loss response packet returned by the second router; and
corresponding, by the first router, to a class of service value, and measuring a packet loss value according to a locally recorded count value and a count value carried in the first packet loss response packet.

### Claim 2 (depends on 1)

The packet loss detecting method according to claim 1, wherein, the counting, by a first router, received packets and sent packets respectively according to a class of service value of a packet in each tunnel comprises:
identifying, by the first router, a label and a class of service value in a packet, wherein the label is used to identify a tunnel to which the packet belongs; and
recording, by the first router, the number of received packets with the same label and class of service value in a first received packet counter as a first received packet count value, and recording the number of sent packets with the same label and class of service value in a first sent packet counter as a first sent packet count value.

### Claim 3 (depends on 1)

The packet loss detecting method according to claim 1, further comprising:
receiving, by the first router, a second packet loss detection packet sent by the second router;
converting, by the first router, a format of the second packet loss detection packet as a second packet loss response packet, and setting a local current first received packet count value in the second packet loss response packet;
setting, by the first router, in the second packet loss response packet, a first sent packet count value that is currently and locally recorded; and
returning, by the first router, the second packet loss response packet to the second router.

### Claim 4 (depends on 1)

The packet loss detecting method according to claim 1, wherein, the generating, by the first router, the first packet loss detection packet corresponding to the class of service value, sending the first packet loss detection packet to the second router at the peer end, and receiving the first packet loss response packet returned by the second router comprises:
generating, by the first router, at a first time point, a first packet loss detection packet that is corresponding to the class of service value, and setting a corresponding class of service value in the first packet loss detection packet;
setting, by the first router, in the first packet loss detection packet, a first sent packet count value that is currently and locally recorded;
sending, by the first router, the first packet loss detection packet to the second router at the peer end; and
receiving, by the first router, a first packet loss response packet returned by the second router.

### Claim 5 (depends on 1)

The packet loss detecting method according to claim 1, wherein, after the corresponding, by the first router, to the class of service value, and measuring the packet loss value according to the locally recorded count value and the count value carried in the first packet loss response packet, further comprising:
adding, by the first router, a packet loss value obtained by measuring each class of service value that is corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 6 (depends on 2)

The packet loss detecting method according to claim 2, further comprising:
receiving, by the first router, a second packet loss detection packet sent by the second router;
converting, by the first router, a format of the second packet loss detection packet as a second packet loss response packet, and setting a local current first received packet count value in the second packet loss response packet;
setting, by the first router, in the second packet loss response packet, a first sent packet count value that is currently and locally recorded; and
returning, by the first router, the second packet loss response packet to the second router.

### Claim 7 (depends on 2)

The packet loss detecting method according to claim 2, wherein, the generating, by the first router, the first packet loss detection packet corresponding to the class of service value, sending the first packet loss detection packet to the second router at the peer end, and receiving the first packet loss response packet returned by the second router comprises:
generating, by the first router, at a first time point, a first packet loss detection packet that is corresponding to the class of service value, and setting a corresponding class of service value in the first packet loss detection packet;
setting, by the first router, in the first packet loss detection packet, a first sent packet count value that is currently and locally recorded;
sending, by the first router, the first packet loss detection packet to the second router at the peer end; and
receiving, by the first router, a first packet loss response packet returned by the second router.

### Claim 8 (depends on 3)

The packet loss detecting method according to claim 3, wherein, the generating, by the first router, the first packet loss detection packet corresponding to the class of service value, sending the first packet loss detection packet to the second router at the peer end, and receiving the first packet loss response packet returned by the second router comprises:
generating, by the first router, at a first time point, a first packet loss detection packet that is corresponding to the class of service value, and setting a corresponding class of service value in the first packet loss detection packet;
setting, by the first router, in the first packet loss detection packet, a first sent packet count value that is currently and locally recorded;
sending, by the first router, the first packet loss detection packet to the second router at the peer end; and
receiving, by the first router, a first packet loss response packet returned by the second router.

### Claim 9 (depends on 2)

The packet loss detecting method according to claim 2, wherein, after the corresponding, by the first router, to the class of service value, and measuring the packet loss value according to the locally recorded count value and the count value carried in the first packet loss response packet, further comprising:
adding, by the first router, a packet loss value obtained by measuring each class of service value that is corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 10 (depends on 3)

The packet loss detecting method according to claim 3, wherein, after the corresponding, by the first router, to the class of service value, and measuring the packet loss value according to the locally recorded count value and the count value carried in the first packet loss response packet, further comprising:
adding, by the first router, a packet loss value obtained by measuring each class of service value that is corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 11 (depends on 4)

The packet loss detecting method according to claim 4, wherein, after the corresponding, by the first router, to the class of service value, and measuring the packet loss value according to the locally recorded count value and the count value carried in the first packet loss response packet, further comprising:
adding, by the first router, a packet loss value obtained by measuring each class of service value that is corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 12

A packet loss detecting apparatus, comprising:
a counting module, configured to count received packets and sent packets respectively according to a class of service value of a packet in each tunnel;
a packet loss detecting module, configured to generate a first packet loss detection packet that is corresponding to the class of service value; send the first packet loss detection packet to a second router at a peer end; and receive a first packet loss response packet returned by the second router; and
a packet loss measuring module, configured to correspond a class of service value, and measure a packet loss value according to a locally recorded count value and a count value carried in the first packet loss response packet

### Claim 13 (depends on 12)

The packet loss detecting apparatus according to claim 12, wherein the counting module comprises:
an identifying unit, configured to identify a label and a class of service value in a packet, wherein the label is used to identify a tunnel to which the packet belongs; and
a counting unit, configured to record the number of received packets with the same label and class of service value in a first received packet counter as a first received packet count value, and record the number of sent packets with the same label and class of service value in a first sent packet counter as a first sent packet count value.

### Claim 14 (depends on 12)

The packet loss detecting apparatus according to claim 12, further comprising a packet loss responding module, wherein the packet loss responding module comprises:
a detection packet receiving unit, configured to receive a second packet loss detection packet sent by the second router;
a first count value setting unit, configured to convert a format of the second packet loss detection packet as a second packet loss response packet, and set a local current first received packet count value in the second packet loss response packet;
a second count value setting unit, configured to set, in the second packet loss response packet, a first sent packet count value that is currently and locally recorded; and
a first sending unit, configured to return the second packet loss response packet to the second router.

### Claim 15 (depends on 13)

The packet loss detecting apparatus according to claim 13, further comprising a packet loss responding module, wherein the packet loss responding module comprises:
a detection packet receiving unit, configured to receive a second packet loss detection packet sent by the second router;
a first count value setting unit, configured to convert a format of the second packet loss detection packet as a second packet loss response packet, and set a local current first received packet count value in the second packet loss response packet;
a second count value setting unit, configured to set, in the second packet loss response packet, a first sent packet count value that is currently and locally recorded; and
a first sending unit, configured to return the second packet loss response packet to the second router.

### Claim 16 (depends on 12)

The packet loss detecting apparatus according to claim 12, wherein the packet loss detecting module comprises:
a detection packet generating unit, configured to generate, at a first time point, a first packet loss detection packet that is corresponding to a class of service value, and set a corresponding class of service value in the first packet loss detection packet that is generated by the detection packet generating unit;
a third count value setting unit, configured to set, in the first packet loss detection packet that is generated by the detection packet generating unit, a first sent packet count value that is currently and locally recorded;
a second sending unit, configured to send the first packet loss detection packet generated by the detection packet generating unit to the second router at the peer end; and
a response packet receiving unit, configured to receive a first packet loss response packet returned by the second router.

### Claim 17 (depends on 13)

The packet loss detecting apparatus according to claim 13, wherein the packet loss detecting module comprises:
a detection packet generating unit, configured to generate, at a first time point, a first packet loss detection packet that is corresponding to a class of service value, and set a corresponding class of service value in the first packet loss detection packet that is generated by the detection packet generating unit;
a third count value setting unit, configured to set, in the first packet loss detection packet that is generated by the detection packet generating unit, a first sent packet count value that is currently and locally recorded;
a second sending unit, configured to send the first packet loss detection packet generated by the detection packet generating unit to the second router at the peer end; and
a response packet receiving unit, configured to receive a first packet loss response packet returned by the second router.

### Claim 18 (depends on 14)

The packet loss detecting apparatus according to claim 14, wherein the packet loss detecting module comprises:
a detection packet generating unit, configured to generate, at a first time point, a first packet loss detection packet that is corresponding to a class of service value, and set a corresponding class of service value in the first packet loss detection packet that is generated by the detection packet generating unit;
a third count value setting unit, configured to set, in the first packet loss detection packet that is generated by the detection packet generating unit, a first sent packet count value that is currently and locally recorded;
a second sending unit, configured to send the first packet loss detection packet generated by the detection packet generating unit to the second router at the peer end; and
a response packet receiving unit, configured to receive a first packet loss response packet returned by the second router.

### Claim 19 (depends on 12)

The packet loss detecting apparatus according to claim 12, further comprising:
a packet loss value summing module, configured to add a packet loss value obtained by measuring each class of service value corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 20 (depends on 13)

The packet loss detecting apparatus according to claim 13, further comprising:
a packet loss value summing module, configured to add a packet loss value obtained by measuring each class of service value corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 21 (depends on 14)

The packet loss detecting apparatus according to claim 14, further comprising:
a packet loss value summing module, configured to add a packet loss value obtained by measuring each class of service value corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 22 (depends on 16)

The packet loss detecting apparatus according to claim 16, further comprising:
a packet loss value summing module, configured to add a packet loss value obtained by measuring each class of service value corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 23 (depends on 19)

The packet loss detecting apparatus according to claim 19, further comprising:
a packet loss value summing module, configured to add a packet loss value obtained by measuring each class of service value corresponding to each tunnel to obtain a total packet loss value of the tunnel.

### Claim 24

A router, comprising: a packet loss detecting apparatus comprises:
a counting module, configured to count received packets and sent packets respectively according to a class of service value of a packet in each tunnel;
a packet loss detecting module, configured to generate a first packet loss detection packet that is corresponding to the class of service value; send the first packet loss detection packet to a second router at a peer end; and receive a first packet loss response packet returned by the second router; and
a packet loss measuring module, configured to correspond a class of service value, and measure a packet loss value according to a locally recorded count value and a count value carried in the first packet loss response packet;
wherein the router is interconnected with another router that is the same as the router through a tunnel.
