IP Library Granted Patent US 12701075
Granted Patent B2
US 12701075 · App. 17/890,710 · Granted Aug 4, 2026

Packet sending method, device, and system

Inventors: Yaqun Xiao (Beijing, CN); Huizhi Wen (Beijing, CN); Chuang Chen (Beijing, CN); Rui Gu (Beijing, CN); Jun Qiu (Shenzhen, CN); Zhibo Hu (Beijing, CN); Ting Liao (Nanjing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04L45/22H04L45/02H04L45/12H04L45/247H04L45/26H04L45/28H04L45/74H04L45/741
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12701075
App. No.
17/890,710
Granted
Aug 4, 2026
Kind
B2
Abstract

Embodiments of this application disclose a packet sending method, a device, and a system, so that a specified network device does not use a backup forwarding path to forward a packet, thereby reducing, to some extent, a technical problem such as network resource waste or network congestion caused by a loop problem. The method includes: A first network device obtains a first packet destined for a destination device; the first network device adds a first indication identifier to the first packet to generate a second packet, where the first indication identifier is used to indicate a second network device to avoid using a backup forwarding path from the second network device to the destination device to send the second packet to the destination device; and the first network device sends the second packet to the second network device by using a first forwarding path.

Claims (74)

1 . A method for sending packets, comprising:

obtaining, by a first network device, a first packet destined for a destination device;

adding, by the first network device, a first indication identifier to the first packet to generate a second packet, wherein the first indication identifier is used to indicate a second network device to avoid using a backup forwarding path from the second network device to the destination device to send the second packet to the destination device, wherein the backup forwarding path passes through the first network device, and wherein the adding, by the first network device, the first indication identifier to the first packet to generate the second packet comprises:

adding, by the first network device, a segment routing header (SRH) to the first packet to generate the second packet, wherein the first indication identifier is carried in the SRH; and

sending, by the first network device, the second packet to the second network device by using a first forwarding path.

2 . The method according to claim 1 , wherein the first forwarding path is a backup forwarding path from the first network device to the destination device, and before sending the second packet to the second network device using the first forwarding path, the method further comprises:

determining, by the first network device, that a second forwarding path to the destination device is unreachable, wherein the second forwarding path is a primary forwarding path from the first network device to the destination device.

3 . The method according to claim 2 , wherein the first packet comprises an Internet protocol (IP) address of the destination device, the first forwarding path is corresponding to a summary route from the first network device to the destination device, the second forwarding path is corresponding to a specific route from the first network device to the destination device, and wherein the determining, by the first network device, that the second forwarding path to the destination device is unreachable comprises:

failing, by the first network device, to obtain the specific route to the destination device through matching based on the IP address of the destination device; or

obtaining, by the first network device, the specific route to the destination device through matching based on the IP address of the destination device, and determining that the second forwarding path corresponding to the specific route is unreachable.

4 . The method according to claim 1 , wherein the first indication identifier is carried in a flags field, a tag field, or a type length value (TLV) of the SRH.

5 . The method according to claim 1 , wherein the SRH comprises a segment identifier list, and the segment identifier list comprises the first indication identifier.

6 . The method according to claim 5 , wherein the segment identifier list comprises a segment identifier of the second network device; and a locator part of the segment identifier of the second network device comprises the first indication identifier, or a function part of the segment identifier of the second network device comprises the first indication identifier.

7 . The method according to claim 2 , wherein the first packet comprises a label of the destination device, the first forwarding path is a forwarding path corresponding to backup forwarding information in a label forwarding entry corresponding to the label of the destination device, and the determining, by the first network device, that a second forwarding path to the destination device is unreachable comprises:

obtaining, by the first network device, the label forwarding entry through matching based on the label of the destination device, and

determining that the second forwarding path corresponding to primary forwarding information in the label forwarding entry is unreachable.

8 . The method according to claim 1 , wherein before the sending, by the first network device, the second packet to the second network device using the first forwarding path, the method further comprises:

receiving, by the first network device, a third packet from the second network device, wherein the third packet comprises an identifier of the second network device and a second indication identifier that is used to identify that the second network device supports a capability of avoiding using a backup path to forward a packet; and

generating, by the first network device, based on the second indication identifier, a forwarding entry corresponding to the first forwarding path having an identifier of the destination device and forwarding information corresponding to the first forwarding path, the forwarding information comprises a label stack or a segment identifier list, the label stack or the segment identifier list comprises the identifier of the second network device, and the identifier of the second network device comprises a segment identifier of the second network device or a label of the second network device.

9 . The method according to claim 8 , wherein the third packet comprises an endpoint segment identifier type length value (End SID TLV) field, and the End SID TLV comprises the second indication identifier.

10 . The method according to claim 8 , wherein the third packet comprises a prefix segment identifier type length value (prefix SID TLV) field, and the prefix SID TLV field comprises the second indication identifier.

11 . The method according to claim 1 , wherein the first packet is from a third network device, the third network device belongs to a first network domain, and the destination device belongs to a second network domain.

12 . The method according to claim 1 , wherein a first network domain is an area of a backbone network, a second network domain is an area of an access network, the first network device is a network device connected to the access network and the backbone network, and the first forwarding path is a forwarding path in the backbone network.

13 . A method for sending packets, comprising:

receiving, by a second network device, a first packet destined for a destination device, wherein the first packet is from a first network device, and the first packet comprises a first indication identifier, wherein a segment routing header (SRH) is added to the first packet, and wherein the first indication identifier is carried in the SRH;

determining, by the second network device, that a primary forwarding path from the second network device to the destination device is unreachable; and

in response to determining that the primary forwarding path is unreachable, avoiding, by the second network device based on an indication of the first indication identifier, using a backup forwarding path to send the first packet to the destination device, wherein the backup forwarding path is a path from the second network device to the destination device, and wherein the backup forwarding path passes through the first network device.

14 . The method according to claim 13 , wherein the first packet comprises an Internet protocol (IP) address of the destination device, the primary forwarding path is corresponding to a summary route from the second network device to the destination device, the backup forwarding path is associated with the summary route, and wherein the determining, by the second network device, that the primary forwarding path from the second network device to the destination device is unreachable comprises:

obtaining, by the second network device, the summary route through matching based on the IP address of the destination device, and

determining that the primary forwarding path of the summary route is unreachable.

15 . The method according to claim 13 , wherein the first packet comprises an IP address of the destination device, the primary forwarding path is corresponding to a specific route from the second network device to the destination device, the backup forwarding path is a forwarding path corresponding to a summary route from the second network device to the destination device, and wherein the determining, by the second network device, that the primary forwarding path from the second network device to the destination device is unreachable comprises:

failing, by the second network device, to obtain the specific route through matching based on the IP address of the destination device; or

obtaining, by the second network device, the specific route through matching based on the IP address of the destination device, and determining that the forwarding path corresponding to the specific route is unreachable.

16 . The method according to claim 13 , wherein the first packet is a segment routing over Internet version 6 (SRv6) packet, and a segment routing header (SRH) of the SRv6 packet comprises the first indication identifier.

17 . A network device operating as a first network device, comprising:

a memory comprising instructions;

a processor coupled to the memory, wherein when the instructions are executed by the processor, the instructions cause the network device to:

obtain a first packet destined for a destination device,

add a first indication identifier to the first packet to generate a second packet, wherein the first indication identifier is used to indicate a second network device to avoid using a backup forwarding path from the second network device to the destination device to send the second packet to the destination device, wherein the backup forwarding path passes through the first network device, and wherein, to add the first indication identifier to the first packet to generate the second packet, the instructions, when executed by the processor, cause the network device to:

add a segment routing header (SRH) to the first packet to generate the second packet, wherein the first indication identifier is carried in the SRH, and

send the second packet to the second network device by using a first forwarding path, wherein the first network device and the second network device are part of a network system having a plurality of network devices.

18 . The network device according to claim 17 , wherein the first forwarding path is a backup forwarding path from the first network device to the destination device; and

the instructions further cause the network device to: prior to the sending the second packet to the second network device by using the first forwarding path, determine that a second forwarding path to the destination device is unreachable, wherein the second forwarding path is a primary forwarding path from the first network device to the destination device.

19 . The network device according to claim 18 , wherein the first packet comprises an Internet protocol (IP) address of the destination device, the first forwarding path is a forwarding path corresponding to a summary route from the first network device to the destination device, the second forwarding path is a forwarding path corresponding to a specific route from the first network device to the destination device, and the instructions further cause the network device to:

fail to obtain the specific route to the destination device through matching based on the IP address of the destination device; or

obtain the specific route to the destination device through matching based on the IP address of the destination device, and determines that the second forwarding path corresponding to the specific route is unreachable.

20 . The network device according to claim 18 , wherein the first packet comprises a label of the destination device, the first forwarding path is a forwarding path corresponding to backup forwarding information in a label forwarding entry corresponding to the label of the destination device, and to determine that a second forwarding path to the destination device is unreachable, the instructions further cause the network device to:

obtain the label forwarding entry through matching based on the label of the destination device, and

determine that the second forwarding path corresponding to primary forwarding information in the label forwarding entry is unreachable.

21 . The network device according to claim 17 , wherein the first indication identifier is carried in a flags field, a tag field, or a type length value (TLV) of the SRH.

22 . The network device according to claim 17 , wherein the SRH comprises a segment identifier list, and the segment identifier list comprises the first indication identifier.

23 . The network device according to claim 22 , wherein the segment identifier list comprises a segment identifier of the second network device; and a locator part of the segment identifier of the second network device comprises the first indication identifier, or a function part of the segment identifier of the second network device comprises the first indication identifier.

24 . The network device according to claim 17 , wherein to send the second packet to the second network device using the first forwarding path, the instructions further cause the network device to:

receive a third packet from the second network device, wherein the third packet comprises an identifier of the second network device and a second indication identifier that is used to identify that the second network device supports a capability of avoiding using a backup path to forward a packet; and

generate based on the second indication identifier, a forwarding entry corresponding to the first forwarding path having an identifier of the destination device and forwarding information corresponding to the first forwarding path, the forwarding information comprises a label stack or a segment identifier list, the label stack or the segment identifier list comprises the identifier of the second network device, and the identifier of the second network device comprises a segment identifier of the second network device or a label of the second network device.

25 . The network device according to claim 24 , wherein the third packet comprises an endpoint segment identifier type length value (End SID TLV) field, and the End SID TLV comprises the second indication identifier.

26 . A network device operating as a second network device, comprising:

a memory comprising instructions;

a processor coupled to the memory, wherein when the instructions is executed by the processor, the instructions cause the network device to:

receive a first packet destined for a destination device, wherein the first packet is from a first network device, and the first packet comprises a first indication identifier, wherein a segment routing header (SRH) is added to the first packet, and wherein the first indication identifier is carried in the SRH;

determine that a primary forwarding path from a second network device to the destination device is unreachable, wherein the first network device and the second network device are part of a network system having a plurality of network devices; and

in response to determining that the primary forwarding path is unreachable, avoid, based on the first indication identifier, using a backup forwarding path to send the first packet to the destination device, wherein the backup forwarding path is a path from the second network device to the destination device, and wherein the backup forwarding path passes through the first network device.

27 . The network device according to claim 26 , wherein the first packet comprises an Internet protocol (IP) address of the destination device, the primary forwarding path is a primary forwarding path corresponding to a summary route from the second network device to the destination device, the backup forwarding path is a backup forwarding path of the summary route, and the instructions further cause the network device to:

obtain the summary route through matching based on the IP address of the destination device, and

determine that the primary forwarding path of the summary route is unreachable.

28 . The network device according to claim 26 , wherein the first packet comprises an IP address of the destination device, the primary forwarding path is a forwarding path corresponding to a specific route from the second network device to the destination device, the backup forwarding path is a forwarding path corresponding to a summary route from the second network device to the destination device, and the instructions further cause the network device to:

fail to obtain the specific route through matching based on the IP address of the destination device; or

obtain the specific route through matching based on the IP address of the destination device, and determine that the forwarding path corresponding to the specific route is unreachable.

29 . The network device according to claim 26 , wherein the first packet is a segment routing over Internet version 6 (SRv6) packet, and a segment routing header (SRH) of the SRv6 packet comprises the first indication identifier.

30 . The network device according to claim 29 , wherein the instructions further cause the network device to:

prior to the determining that the primary forwarding path to the destination device is unreachable, determine that a destination address of the SRv6 packet is an IP address of the second network device,

obtain an identifier of the destination device from a segment identifier list of the SRv6 packet,

modify the destination address of the SRv6 packet to the identifier of the destination device, and

determine, based on the destination address of the SRv6 packet, that the primary forwarding path to the destination device is unreachable.