Patent ID: 11876706
Assignee: JUNIPER NETWORKS, INC.
Field: Digital communication (Electrical engineering)
Classification: CPC H | IPC H

Claim 0:
1. A computer-implemented method for avoiding loops in a communications network, the computer-implemented method comprising:
a) receiving, by a first data forwarding device, a data packet to be forwarded over a label-switched path (LSP);
b) determining a next hop of the data packet received;
c) determining whether or not the next hop is reachable;
d) responsive to determining that the next hop is not reachable,
1) determining (i) a backup next hop and (ii) a forwarding label associated with the backup next hop, and
2) adding to the data packet, (1) the forwarding label and (2) a further label indicating that a backup detour is being made, to generate an updated data packet, and
3) 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;
e) receiving, by a second data forwarding device on the LSP, an instance of the data packet, wherein the instance of the data packet includes an incoming label;
f) determining a further next hop of the instance of the data packet received using the incoming label;
g) determining whether or not the further next hop is reachable;
h) responsive to determining that the further next hop is not reachable,
1) determining whether or not the instance of the data packet received includes the further label indicating that a backup detour was made, and
2) responsive to the determination that the instance of the data packet received includes the further label indicating that a backup detour was made, dropping the instance of the data packet, and

otherwise, responsive to determining that the further next hop is reachable,
1) popping the incoming label of the instance of the data packet,
2) removing the further label indicating that a backup detour was made if the further label indicating that a backup detour was made is at the top a label stack associated with the instance of the data packet,
3) adding an outgoing label if the next hop includes an outgoing label, and
4) forwarding the instance of the data packet using the further next hop.