| CPC H04L 45/18 (2013.01) [H04L 12/4633 (2013.01); H04L 45/20 (2013.01); H04L 45/22 (2013.01); H04L 45/507 (2013.01); H04L 69/22 (2013.01)] | 18 Claims |

|
1. A system, the system comprising a data forwarding device including:
a) at least one communications interface;
b) at least one processor; and
c) at least one storage device storing processor-executable instructions which, when executed by the at least one processor, cause the at least one processor to perform a method for avoiding loops in a communications network, the method including:
1) receiving, by the data forwarding device, a data packet to be forwarded over a label-switched path (LSP);
2) determining, by the data forwarding device, a next hop of the data packet received;
3) determining, by the data forwarding device, whether or not the next hop is reachable; and
4) responsive to determining that the next hop is not reachable,
A) determining, by the data forwarding device (i) a backup next hop associated with the next hop that is not reachable and (ii) a forwarding label associated with the backup next hop, and
B) adding to the data packet, (1) the forwarding label and (2) a loop prevention label indicating that a backup detour is being made, to generate an updated data packet, wherein the loop prevention label is one of (A) a special purpose label, or (B) an extended special purpose label, and
C) forwarding, by the data forwarding device, the updated data packet to the backup next hop, and
otherwise, responsive to determining that the next hop is reachable, forwarding the data packet using a forwarding label associated with the next hop.
|