US 12,483,496 B2
Loop detection method and apparatus
Jianhong Qin, Dongguan (CN); and Liang Cheng, Beijing (CN)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed on Mar. 22, 2024, as Appl. No. 18/614,303.
Application 18/614,303 is a continuation of application No. PCT/CN2022/118349, filed on Sep. 13, 2022.
Claims priority of application No. 202111130398.7 (CN), filed on Sep. 26, 2021.
Prior Publication US 2024/0235986 A1, Jul. 11, 2024
Int. Cl. H04L 45/18 (2022.01); H04L 45/00 (2022.01); H04L 45/50 (2022.01); H04L 45/741 (2022.01)
CPC H04L 45/18 (2013.01) [H04L 45/22 (2013.01); H04L 45/34 (2013.01); H04L 45/50 (2013.01); H04L 45/741 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A loop detection method, comprising:
receiving, by a first node, a packet from a second node through a first interface, wherein a node segment identifier (SID) is encapsulated at an outer layer of the packet, and the node SID identifies a destination node;
determining, by the first node based on the node SID, that an outbound interface for forwarding the packet is the first interface;
determining, by the first node based on a node SID carried in an incoming label encapsulated at the outer layer in the packet, that a node SID carried in an outgoing label is the same as the node SID carried in the incoming label, wherein the outgoing label carried when the first node forwards the packet is a sum of a starting address of a segment routing global block (SRGB) and the node SID of the destination node;
determining, by the first node, that a loop exists in a forwarding path of the packet based on the outbound interface for forwarding the packet being the first interface; and
avoiding, by the first node, forwarding the packet to the second node through the first interface by:
forwarding, by the first node, the packet to the destination node through a second interface, wherein a path from the first node to the destination node through the second interface is a backup path for forwarding the packet, or
discarding, by the first node, the packet.