US 12,267,230 B2
Packet processing method and apparatus, network device, and storage medium
Yaqun Xiao, Beijing (CN); and Li Fan, Beijing (CN)
Assigned to HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed by HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed on Aug. 23, 2022, as Appl. No. 17/893,525.
Application 17/893,525 is a continuation of application No. PCT/CN2021/078184, filed on Feb. 26, 2021.
Claims priority of application No. 202010119485.1 (CN), filed on Feb. 26, 2020.
Prior Publication US 2022/0407802 A1, Dec. 22, 2022
Int. Cl. H04L 45/28 (2022.01); H04L 45/00 (2022.01)
CPC H04L 45/28 (2013.01) [H04L 45/22 (2013.01); H04L 45/34 (2013.01)] 26 Claims
OG exemplary drawing
 
1. A packet processing method comprising:
receiving, by a first network device, a packet, wherein the packet comprises a protection flag, the protection flag is used to indicate whether the first network device is allowed to switch the packet from a primary path to a first protection path, the first protection path is used to protect the primary path, and an ingress node on the first protection path is the first network device;
determining, by the first network device, that the primary path is faulty; and
when the protection flag indicates that the packet is not allowed to be switched from the primary path to the first protection path, discarding, by the first network device, the packet based on the determined fact that the primary path is faulty and the protection flag indicating that the packet is not allowed to be switched from the primary path to the first protection path, and
when the protection flag indicates that the packet is allowed to be switched from the primary path to the first protection path, sending, by the first network device, the packet through the first protection path based on the determined fact that the primary path is faulty and the protection flag indicating that the packet is allowed to be switched from the primary path to the first protection path, and when the protection flag indicates that the packet is allowed to be switched to a Midpoint TI-LFA path but is not allowed to be switched to a topology-independent loop-free alternate fast reroute (TI-LFA FRR) path, sending, by the first network device, the packet through the Midpoint TI-LFA path based on the determined fact that the primary path is faulty and the protection flag indicating that the packet is allowed to be switched to the Midpoint TI-LFA path but is not allowed to be switched to the TI-LFA FRR path.
 
11. A packet processing method comprising:
generating, by a second network device, a packet, wherein the packet comprises a protection flag, the protection flag is used to indicate whether a first network device is allowed to switch the packet from a primary path to a first protection path, the first protection path is used to protect the primary path, and an ingress node on the first protection path is the first network device; and
sending, by the second network device, the packet to the first network device,
wherein the protection flag occupies a first bit of the packet; and when the first bit is set, it indicates that the packet is not allowed to be switched from the primary path to the first protection path; and
when the first bit is not set, it indicates that the packet is allowed to be switched from the primary path to the first protection path; and
the protection flag occupies a second bit and a third bit of the packet; and when both the second bit and the third bit are set, it indicates that the packet is not allowed to be switched from the primary path to a Midpoint topology-independent loop-free alternate TI-LFA path and a TI-LFA fast reroute FRR path.