IP Library Granted Patent US 11,528,217
Granted Patent B2
US 11,528,217 · App. 17/100,530 · Granted Dec 13, 2022

Path switching method and related apparatus

Inventors: Dongdong Li (Nanjing, CN); Pu Cheng (Nanjing, CN); Ying Xie (Shenzhen, CN)
Assignee: Huawei Technologies Co., Ltd.
H04L45/123H04L47/125
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 11,528,217
App. No.
17/100,530
Granted
Dec 13, 2022
Kind
B2
Abstract

This application provides a path switching method and a related apparatus. In the path switching process, an ECMP table includes a first ECMP index of a first path group and a second ECMP index of a second path group; when all paths in the first path group have failed, a path group identifier corresponding to the first ECMP index may be changed from valid to invalid in the ECMP table, indicating that all paths in the first path group are unavailable. In this case, a path group identifier corresponding to the second ECMP index is valid, indicating that the second path group includes an available path, thereby completing switching between an active path and a standby path. In this process, only an identifier corresponding to the ECMP index needs to be updated, and therefore, the time consumed is relatively short, and the path switching delay can be effectively reduced.

Claims (28)

1. A path switching method, comprising:

maintaining an equal cost multipath (ECMP) table, wherein the equal cost multipath table comprises a first ECMP index of a first path group, a first path group identifier corresponding to the first ECMP index, a second ECMP index of a second path group, and a second path group identifier corresponding to the second ECMP index; the second path group is a standby path group of the first path group; and a valid path group identifier corresponding to a particular path group indicates that the particular path group comprises an available path; and an invalid path group identifier corresponding to the particular path group indicates that the path group does not comprise an available path; and

setting the first path group identifier corresponding to the first ECMP index to be invalid in the ECMP table in response to determining that all paths in the first path group have failed.

2. The path switching method according to claim 1 , wherein the method further comprises:

maintaining a first next-hop (NHP) table, wherein the first NHP table comprises each path in the first path group and a path identifier corresponding to each path in the first path group; and a valid path identifier of a particular path in the first path group indicates that the particular path is available, and an invalid path identifier of the particular path in the first path group indicates that the path is unavailable.

3. The path switching method according to claim 2 , wherein the method further comprises:

responsive to determining that the particular path in the first path group has failed, setting the path identifier corresponding to the particular path to be invalid in the first NHP table.

4. The path switching method according to claim 2 , wherein the setting the first path group identifier corresponding to the first ECMP index to be invalid in the ECMP table comprises:

setting the first path group identifier corresponding to the first ECMP index to be invalid in the ECMP table responsive to determining that all the path identifiers in the first NHP table are set to be invalid.

5. The path switching method according to claim 2 , wherein the method further comprises:

maintaining a routing and forwarding table, wherein the routing and forwarding table comprises a route prefix, the first ECMP index and the second ECMP index, wherein the first ECMP index and the second ECMP index correspond to the route prefix.

6. The path switching method according claim 2 , wherein the method further comprises:

maintaining a second NHP table, wherein the second NHP table comprises each path in the second path group and a path identifier corresponding to each path in the second path group; and a valid path identifier of a particular path in the second path group indicates that the path is available, and an invalid path identifier of the particular path indicates that the path is unavailable.

7. A network device, comprising a memory and a processor, wherein:

the memory is configured to store program codes;

the processor is configured to execute the program codes to implement a path switching method, wherein the method comprises:

maintaining an equal cost multipath (ECMP) table, wherein the ECMP table comprises a first ECMP index of a first path group, a first path group identifier corresponding to the first ECMP index, a second ECMP index of a second path group, and a second path group identifier corresponding to the second ECMP index, wherein the second path group is a standby path group of the first path group; and a valid path group identifier corresponding to a particular path group indicates that the particular path group comprises an available path, and an invalid path group identifier corresponding to the particular path group indicates that the particular path group does not comprise an available path; and

setting the first path group identifier corresponding to the first ECMP index in the ECMP table to be invalid responsive to determining that all paths in the first path group have failed.

8. The network device according to claim 7 , wherein the method further comprises:

maintaining a first next-hop (NHP) table, wherein the first NHP table comprises each path in the first path group and a path identifier corresponding to each path in the first path group; and a valid path identifier of a particular path in the first path group indicates that the particular path is available, and an invalid path identifier of the particular path in the first path group indicates that the particular path is unavailable.

9. The network device according to claim 8 , wherein the method further comprises:

responsive to detecting that the particular path in the first path group has failed, setting a path identifier corresponding to the particular path to be invalid in the first NHP table.

10. The network device according to claim 9 , wherein the method further comprises:

setting the first path group identifier corresponding to the first ECMP index to be invalid in the ECMP table responsive to determining that all the path identifiers in the first NHP table are set to be invalid.

11. The network device according to claim 8 , wherein the method further comprises:

maintaining a routing and forwarding table, wherein the routing and forwarding table comprises a route prefix, the first ECMP index and the second ECMP index, wherein the first ECMP index and the second ECMP index correspond to the route prefix.

12. The network device according to claim 8 , wherein the method further comprises:

maintaining a second NHP table, wherein the second NHP table comprises each path in the second path group and a path identifier corresponding to each path in the second path group; and a valid path identifier of a particular path in the second path group indicates that the path is available, and an invalid path identifier of the particular path indicates that the particular path is unavailable.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2022
From: LI, DONGDONG; CHENG, PU; XIE, YING
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 060860/0909 →
Priority Claims (1)
CN 201911151997.X · Nov 21, 2019 · national
Continuity (1)
Related Publication 20210160168A1 · May 27, 2021