Routing information maintenance method, device, network device, and storage medium

JP2026505516APending Publication Date: 2026-02-13NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025547822
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2026-02-13

Smart Images

  • Figure 2026505516000001_ABST
    Figure 2026505516000001_ABST
Patent Text Reader

Abstract

The present invention provides a routing information maintenance method, an apparatus, a network device, and a storage medium, which relate to the field of communications technology. The routing information maintenance method is applied to a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route representing a route between the first network device and a second network device, and a forwarding entry for the shortest route including a first outbound interface of the first network device. The routing information maintenance method includes, when the first outbound interface is congested due to traffic on the shortest route, obtaining a preset routing policy corresponding to the multipath group forwarding table, and adjusting a forwarding weight value of each route in the first multipath group based on the preset routing policy, the forwarding weight value of each route representing the proportion of traffic on that route when that route is selected from multiple routes for packet forwarding. In this way, the bandwidth utilization rate of the entire network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present application relates to the field of communications technology, and in particular to a routing information maintenance method, device, network device, and storage medium. [Background technology]

[0002] Adaptive routing technology is a technology that makes dynamic routing decisions according to changes in network topology and traffic payload. Based on adaptive routing technology, network devices can actively sense link congestion and forward packets by selecting the shortest and least congested path.

[0003] A network device creates and maintains a best path table based on routing information and link congestion status. Each best path table stores the best path corresponding to one destination Internet Protocol (IP) address. The best path may be the shortest path to the destination IP address, and if the shortest path is congested, the best path is modified to a non-shortest path to the destination IP address.

[0004] After the optimal route in the best path table is modified to a non-shortest route, the network device forwards packets containing the destination IP address via the non-shortest route, the use of the shortest route is stopped, and the network bandwidth utilization rate is low. Summary of the Invention

[0005] The present embodiment provides a routing information maintenance method, device, network device, and storage medium for solving the problem of low bandwidth utilization in an S network after the shortest path in the best path table is modified, and specifically includes the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a routing information maintenance method applied to a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route representing a route between the first network device and a second network device, and a forwarding entry of the shortest route including a first outbound interface of the first network device, the routing information maintenance method comprising: If the first outbound interface is congested due to traffic on the shortest path, obtain a preset routing policy corresponding to the multipath group forwarding table; and adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy, the forwarding weight value of each path being intended to indicate the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding.

[0007] In one possible implementation, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the routing information maintenance method includes: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry whose forwarding weight value is not 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain the hardware forwarding table; N=the forwarding weight value of the software forwarding entry*the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry.

[0008] In one possible implementation, the multipath group forwarding table includes a routing type mark, and obtaining a preset routing policy corresponding to the multipath group forwarding table includes: obtaining a preset routing policy corresponding to the routing type mark; The preset routing policy includes at least one of a policy that adjusts the forwarding payload of a congested outbound interface to 0, a policy that reduces the forwarding payload of a congested outbound interface and does not increase the forwarding payload of a non-shortest path, and a policy that reduces the forwarding payload of a congested outbound interface and increases the forwarding payload of a non-shortest path.

[0009] In one possible implementation, the first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group; When the first outbound interface is congested due to traffic on the shortest path, before obtaining a preset routing policy corresponding to the multipath group forwarding table, the routing information maintenance method includes: When the interface state of the first outbound interface in the first interface state table changes to a congested state, obtaining a first bandwidth occupancy amount for the first outbound interface of the traffic on the shortest path from the second interface state table; The method further includes determining that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy satisfies a preset congestion condition.

[0010] In one possible implementation, the first interface status table further includes a bandwidth occupancy and a buffer occupancy of each outbound interface, and the routing information maintenance method includes: updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; The method further includes setting the interface state of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or when the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold.

[0011] In one possible implementation, adjusting the forwarding weight value of each path in the first multipath group based on the preset routing policy includes: adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and a respective bandwidth occupancy of each outbound interface included in the second interface state table.

[0012] In one possible implementation, multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table.

[0013] As a second aspect, an embodiment of the present application provides a routing information maintenance device applied to a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route indicating a route between the first network device and a second network device, a forwarding entry of the shortest route including a first outbound interface of the first network device, and the routing information maintenance device: an acquisition module, adapted to acquire a preset routing policy corresponding to the multipath group forwarding table when the first outbound interface is congested due to traffic on the shortest path; and an adjustment module that adjusts a forwarding weight value of each path in the first multipath group based on the preset routing policy, the forwarding weight value of each path being used to indicate the proportion of traffic on that path when selecting that path from the first multipath group for packet forwarding.

[0014] In one possible implementation, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the generating module: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry whose forwarding weight value is not 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain the hardware forwarding table; N=the forwarding weight value of the software forwarding entry*the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry.

[0015] In one possible implementation, the multipath group forwarding table includes a routing type mark, and the acquisition module specifically: The method is used to obtain a preset routing policy corresponding to the routing type mark, the preset routing policy including at least one of a policy for adjusting the forwarding payload of a congested outbound interface to 0, a policy for reducing the forwarding payload of a congested outbound interface and not increasing the forwarding payload of a non-shortest path, and a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest path.

[0016] In one possible implementation, the first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table includes an interface status of each outbound interface of the first network device, and the second interface status table includes a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group, and the routing information maintenance device further includes a determination module; The obtaining module is further used for obtaining a first bandwidth occupancy of the traffic on the shortest path for the first outbound interface from the second interface status table when the interface status of the first outbound interface in the first interface status table changes to a congested state; The determining module is used for determining that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy meets a preset congestion condition.

[0017] In one possible implementation, the first interface status table further includes a bandwidth occupancy and a buffer occupancy of each outbound interface, and the routing information maintenance device further includes an update module and a setting module; the update module is used to update, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; The setting module is used for setting the interface state of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold.

[0018] In one possible implementation, the adjustment module specifically: It is used to adjust the forwarding weight value of each path in the first multipath group according to the preset routing policy and the bandwidth occupancy of each outbound interface included in the second interface status table.

[0019] In one possible implementation, multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table.

[0020] As a third aspect, an embodiment of the present invention provides a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route indicating a route between the first network device and a second network device, a forwarding entry of the shortest route including a first outbound interface of the first network device, the first network device including: a processor; A transmitter / receiver, a machine-readable storage medium having machine-executable instructions stored thereon that are executable by the processor, the machine-executable instructions causing the processor to: If the first outbound interface is congested due to traffic on the shortest path, obtain a preset routing policy corresponding to the multipath group forwarding table; and adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy, the forwarding weight value of each path being intended to indicate the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding.

[0021] In one possible implementation, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the machine-executable instructions cause the processor to: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry having a forwarding weight value other than 0, copy N copies of information other than the forwarding weight value in the software forwarding entry to obtain N hardware forwarding entries, and distribute the N hardware forwarding entries to hardware resources to obtain the hardware forwarding table; N=the forwarding weight value of the software forwarding entry*the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry.

[0022] In one possible implementation, the multipath group forwarding table includes a routing type marking, and the machine-executable instructions cause the processor to: and obtaining a preset routing policy corresponding to the routing type mark, the preset routing policy including at least one of a policy for adjusting the forwarding payload of a congested outbound interface to 0, a policy for reducing the forwarding payload of a congested outbound interface and not increasing the forwarding payload of a non-shortest path, and a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest path.

[0023] In one possible implementation, the first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group; The machine-executable instructions may include instructions to the processor: When the interface state of the first outbound interface in the first interface state table changes to a congested state, obtaining a first bandwidth occupancy amount for the first outbound interface of the traffic on the shortest path from the second interface state table; If the first bandwidth occupancy satisfies a preset congestion condition, determining that the first outbound interface is congested due to traffic on the shortest path.

[0024] In one possible implementation, the first interface status table further includes a respective bandwidth occupancy and a buffer occupancy for each outbound interface, and the machine-executable instructions cause the processor to: updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; If the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold, the interface state of the outbound interface is set to a congested state.

[0025] In one possible embodiment, the machine-executable instructions may direct the processor to: The method further includes adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and a bandwidth occupancy of each outbound interface included in the second interface status table.

[0026] In one possible implementation, multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table.

[0027] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium having stored thereon machine-executable instructions that, when called and executed by a processor, cause the processor to implement the routing information maintenance method described in the first aspect.

[0028] In a fifth aspect, the present invention provides a computer program product for causing the processor to implement the routing information maintenance method according to the first aspect.

[0029] According to the above technical solution, when the first outbound interface is congested due to traffic on the shortest path, a preset routing policy corresponding to the multipath group forwarding table is obtained, and the first network device adjusts the forwarding weight value of each path in the first multipath group based on the preset routing policy corresponding to the multipath group forwarding table. As can be seen from this, in this embodiment, when the first outbound interface is congested due to traffic on the shortest path, the device does not directly stop using the shortest path on which the first outbound interface is located, but instead adjusts the forwarding weight value of each path in the first multipath group. The forwarding weight value of each path indicates the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding. Therefore, after adjusting the forwarding weight value of each path, the forwarding payload of each path changes and the payload of the shortest path can be reduced, thereby alleviating the congestion of the first outbound interface, fully utilizing the resources of each path, and improving the bandwidth utilization rate of the entire network. [Brief explanation of the drawings]

[0030] The drawings described herein are for the purpose of understanding the present application and constitute a part of the present application, and the exemplary embodiments and descriptions thereof are for the purpose of explaining the present application and are not intended to limit the present application. [Figure 1] FIG. 1 is a schematic diagram of the configuration of a networking system provided in an embodiment of the present invention. [Figure 2] FIG. 2 is a flowchart of a routing information maintenance method provided in an embodiment of the present application. [Figure 3a] FIG. 3a is an exemplary schematic diagram of a first software forwarding table provided in an embodiment of the present application. [Figure 3b] FIG. 3b is an exemplary schematic diagram of a first hardware forwarding table provided in an embodiment of the present application. [Figure 4a]FIG. 4a is an exemplary schematic diagram of a second software forwarding table provided in an embodiment of the present application. [Figure 4b] FIG. 4b is an exemplary schematic diagram of a second hardware forwarding table provided in an embodiment of the present application. [Figure 5a] FIG. 5a is an exemplary schematic diagram of a third software forwarding table provided in an embodiment of the present application. [Figure 5b] FIG. 5b is an exemplary schematic diagram of a third hardware forwarding table provided in an embodiment of the present application. [Figure 6] FIG. 6 is a schematic diagram of another networking system configuration provided in an embodiment of the present invention. [Figure 7a] FIG. 7a is an exemplary schematic diagram of a fourth software forwarding table provided in an embodiment of the present application. [Figure 7b] FIG. 7b is an exemplary schematic diagram of a fourth hardware forwarding table provided in an embodiment of the present application. [Figure 8] FIG. 8 is a schematic diagram of a networking system according to another embodiment of the present invention. [Figure 9a] FIG. 9a is an exemplary schematic diagram of a fifth software forwarding table provided in an embodiment of the present application. [Figure 9b] FIG. 9b is an exemplary schematic diagram of a fifth hardware forwarding table provided in an embodiment of the present application. [Figure 10] FIG. 10 is a schematic diagram of the configuration of a routing information maintenance device provided in an embodiment of the present invention. [Figure 11] FIG. 11 is a schematic diagram of the configuration of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0031] In order to clarify the objectives, technical solutions and advantages of the embodiments of the present application, the embodiments of the present application will be described in more detail below by way of examples with reference to the drawings. It is clear that the described embodiments are only some of the embodiments of the present invention, and are not all of the embodiments. All other embodiments that can be obtained by those skilled in the art based on the embodiments of the present application are also included in the scope of protection of the present application.

[0032] As shown in FIG. 1, FIG. 1 exemplarily illustrates a networking system applied to an embodiment of the present application, and the networking system includes a source device, a destination device, an ingress device, a transit device 1, a transit device 2, and a transit device 3. In FIG. 1, S represents a source device, and D1 and D2 represent destination devices. After the ingress device receives a packet transmitted from the source device, the transit device can forward the packet to the destination device. The source device and the destination device may be devices such as a server or a virtual machine.

[0033] Ingress devices and transit devices can calculate shortest routes and loop-free non-shortest routes between destination IP addresses or destination subnets based on the shortest path first algorithm. Taking an ingress device as an example, the ingress device can calculate shortest routes and loop-free non-shortest routes between D1 and D1. The routes from outbound interface 1 to D1 and from outbound interface 2 to D1 are shortest routes, while the routes from outbound interface 3 to D1 and from outbound interface 4 to D1 are loop-free non-shortest routes.

[0034] A loop-free non-shortest path means that the non-shortest path does not have any loops, and all of the non-shortest paths described in the subsequent examples of this application do not have any loops.

[0035] To improve network bandwidth utilization, an embodiment of the present application provides a routing information maintenance method. The routing information maintenance method is applicable to Internet Protocol version 4 (IPv4), Internet Protocol version 6 (IPv6), or Internet Protocol version 6 Segment Routing (SRv6) networks, and is particularly applicable to local area networks, data center networks, and wide area networks. The routing information maintenance method may be performed by a first network device, which may be, for example, the ingress device or transit device in FIG. 1 .

[0036] The first network device includes a multipath group forwarding table, the multipath group forwarding table includes a forwarding entry for each path in the first multipath group, the first multipath group corresponding to the multipath group forwarding table includes a shortest path and a non-shortest path, and the forwarding entry for the shortest path includes a first outbound interface of the first network device.

[0037] Each route is intended to indicate a route between a first network device and a second network device, and each route is intended to indicate a route to reach the same destination IP address or the same destination subnetwork, where the destination IP address is the IP address of the second network device, and the destination subnetwork is the subnetwork in which the IP address of the second network device is located.

[0038] The multipath group forwarding table is for directing packet forwarding, and each forwarding entry in the multipath group forwarding table includes a next hop, an outbound interface, and a forwarding weight value for the path corresponding to the forwarding entry.

[0039] In addition, the multipath group forwarding table in this embodiment is located in one overall forwarding table, and the overall forwarding table may include multiple multipath group forwarding tables, in other words, each multipath group forwarding table may be one entry in the overall forwarding table.

[0040] As shown in FIG. 2, the routing information maintenance method provided in the embodiment of the present application includes the following steps:

[0041] S201, when a first outbound interface is congested due to traffic on the shortest path, obtain a corresponding preset routing policy in a multipath group forwarding table.

[0042] The first outbound interface is the outbound interface included in the forwarding entry of the shortest path in the multipath group forwarding table, and it is understood that the first outbound interface may be located on other paths, i.e., multiple paths may share the first outbound interface forwarding traffic.

[0043] When the first outbound interface is congested and the first outbound interface is congested due to traffic on the shortest path, it means that the forwarding payload of the shortest path is large, and a preset routing policy corresponding to the multipath group forwarding table can be obtained to adjust the forwarding payloads of multiple paths.

[0044] S202, adjusting the forwarding weight value of each path in the first multipath group based on a preset routing policy.

[0045] The forwarding weight value of each path indicates the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding. The larger the forwarding weight value of a path, the greater the proportion of traffic on that path when packet forwarding is performed over that path, i.e., it can be understood that that path is intended to forward more packets.

[0046] According to the above method, when the first outbound interface is congested due to traffic on the shortest path, a preset routing policy corresponding to the multipath group forwarding table is obtained, and the first network device adjusts the forwarding weight value of each path in the first multipath group based on the preset routing policy corresponding to the multipath group forwarding table. As can be seen from this, in this embodiment, when the first outbound interface is congested due to traffic on the shortest path, the device does not directly stop using the shortest path on which the first outbound interface is located, but adjusts the forwarding weight value of each path in the first multipath group. The forwarding weight value of each path indicates the proportion of traffic on that path when selecting that path from the first multipath group for packet forwarding. Therefore, after adjusting the forwarding weight value of each path, the forwarding payload of each path changes and the payload of the shortest path can be reduced, thereby alleviating the congestion of the first outbound interface, fully utilizing the resources of each path, and improving the bandwidth utilization rate of the entire network.

[0047] In addition, the multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the above-mentioned multipath group forwarding table.

[0048] It is understood that if the multiple multipath groups of the first network device are all the same, the multiple multipath groups can all share the same multipath group forwarding table. In this way, there is no need to create and store a single multipath group forwarding table for each multipath group, saving storage resources. More importantly, the route update speed can be improved. When it is necessary to adjust the multipath group forwarding tables corresponding to the multiple multipath groups, the shared multipath group forwarding table can be adjusted as is, rather than adjusting each of the multiple multipath group forwarding tables individually. This improves the update speed of the multipath group forwarding table and reduces processing costs.

[0049] For example, the route from the first network device to destination device 1 includes shortest route A, non-shortest route B, and non-shortest route C, and the route from the first network device to destination device 2 includes shortest route A, non-shortest route B, and non-shortest route C. In other words, the route from the first network device to destination device 1 and the route from the first network device to destination device 2 are completely the same. In this case, the IP address of destination device 1 and the IP address of destination device 2 may share one multipath group forwarding table.

[0050] In this embodiment, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and before executing the flow of FIG. 2, the multipath forwarding table and the hardware forwarding table are generated in the first network device.

[0051] The software and hardware forwarding tables are generated by the following steps.

[0052] Step 1: Calculate the shortest path and the non-shortest path to the second network device.

[0053] The first network device calculates and obtains the shortest path and the non-shortest path between the first network device and the second network device based on a shortest path first algorithm.

[0054] Specifically, the destination IP address or destination subnet of the first network device can be obtained, and the shortest route and non-shortest route between the first network device and the destination IP address can be calculated, or the shortest route and non-shortest route between the first network device and the destination subnet can be calculated.

[0055] There is at least one shortest path between the first network device and the second network device, and there may be zero to multiple non-shortest paths. If there are no non-shortest paths but multiple shortest paths, the multiple shortest paths included in the first multipath group are equal-cost multipath routing (ECMP).

[0056] Step 2: Generate one software forwarding entry for each shortest path and each non-shortest path, and obtain a software forwarding table, where each software forwarding entry contains a forwarding weight value of one path, and the initial forwarding weight value of the non-shortest path is 0.

[0057] It is understood that the software forwarding table includes the shortest path and the non-shortest path calculated in step 1. The first network device can preferentially use the shortest path to forward packets, and when the shortest path is not congested, can forward packets without using the non-shortest path, so the initial weight value of the shortest path may be 1, and the initial weight value of the non-shortest path may be 0.

[0058] As shown in Figure 3a, Figure 3a exemplarily shows one software forwarding table shared by n destination IP addresses, and the left side of Figure 3a is n destination IP addresses and corresponding path group identifiers, which are the destination IP addresses and corresponding path group identifiers of destination side devices D1 to Dn, respectively.

[0059] For example, the D1 destination IP address is 119.1.1.2 / 32, and the Dn destination IP address is 121.1.1.2 / 32. Suppose that each route group between the first network device and each destination device in Figure 3a includes two shortest routes and two non-shortest routes.

[0060] The right side of FIG. 3a is a software forwarding table shared by the destination IP addresses of the destination side devices D1 to Dn, and as an example, the software forwarding table includes four software forwarding entries.

[0061] The first software forwarding entry includes a nexthop 1 corresponding to one shortest path and a forwarding weight value 1 for the shortest path.

[0062] The second software forwarding entry contains a next hop of 2 corresponding to another shortest path, and a forwarding weight value of 1 for that shortest path.

[0063] The third software forwarding entry contains a next hop of 1 corresponding to one non-shortest path and a forwarding weight value of 0 for that non-shortest path.

[0064] The fourth software forwarding entry contains a next hop of 2 corresponding to another non-shortest path, and a forwarding weight value of 0 for that non-shortest path.

[0065] Although not shown in FIG. 3a, each software forwarding entry in FIG. 3a further includes an outbound interface.

[0066] Step 3: For each software forwarding entry whose forwarding weight value is not 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain a hardware forwarding table.

[0067] N = forwarding weight value of the software forwarding entry * number of preset entries in the hardware forwarding table / total value of each forwarding weight value included in the software forwarding entry.

[0068] The number of preset entries may be set according to experience, for example, the number of preset entries may be 128.

[0069] It is understood that the first network device distributes the hardware forwarding entry to the hardware resource, and after the hardware forwarding table is obtained, the forwarding chip of the first network device can forward the packet according to the hardware forwarding table in the hardware resource.

[0070] Because software forwarding entries with a forwarding weight value of 0 are not currently being used for packet forwarding and are in a backup state, there is no need to distribute software forwarding entries with a forwarding weight value of 0 to hardware resources.

[0071] For example, the hardware forwarding table obtained based on the software forwarding table shown in FIG. 3a is shown in FIG. 3b. The IP addresses on the left side of FIG. 3b are the same as the IP addresses on the left side of FIG. 3a, and are not described here.

[0072] 3b shows an example in which the number of preset entries in the hardware forwarding table is 128. The third and fourth entries in FIG. 3a both have forwarding weight values ​​of 0, so they do not need to be distributed to the hardware forwarding table. The first and second software forwarding entries in FIG. 3a both have forwarding weight values ​​of 1, so they may be copied 64 times and distributed to the hardware forwarding table.

[0073] Therefore, the previous 64 hardware forwarding entries contained in the hardware forwarding table of FIG. 3b are the same, and each forwarding entry contains the next hop 1 of one shortest path.

[0074] The remaining 64 hardware forwarding entries in the hardware forwarding table are the same, and each forwarding entry includes next hop 2 of another shortest path.

[0075] Note that each hardware forwarding entry in FIG. 3b further includes an outbound interface, which is not shown in FIG. 3b.

[0076] It is understood that if the number of entries in the hardware forwarding table is low, after a packet is matched to a hardware forwarding entry but before the packet is forwarded, the hardware forwarding entry may be deleted, which may result in packet loss. In this embodiment, the number of entries in the hardware forwarding table is a fixed value, i.e., after a path weight changes, the number of entries in the hardware forwarding table does not change, thereby avoiding packet loss.

[0077] In another embodiment of the present application, a first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, where the first interface status table includes a bandwidth occupancy, a buffer occupancy, and an interface status for each outbound interface of the first network device, and the second interface status table includes a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group.

[0078] The first interface status table is the aggregate status of all traffic on each outbound interface on which the adaptive routing function is enabled in the first network device. As an example, assuming that the outbound interfaces of the ingress device in Figure 1 are outbound interface 1, outbound interface 2, outbound interface 3, and outbound interface 4, the first interface status table of the ingress device is shown in Table 1.

[0079] [Table 1]

[0080] The interface state may be normal, congested or recovered, and the initial state of each outbound interface is set as the normal state.

[0081] The first network device may update the bandwidth occupancy and buffer occupancy of each outbound interface in the first interface status table at predetermined time intervals, and set the interface status of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or when the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold.

[0082] For example, the preset time may be 5 milliseconds.

[0083] The preset bandwidth threshold is a high bandwidth threshold, and the preset buffer threshold is a high buffer threshold.

[0084] The method by which the first network device determines the interface status is specifically as follows: When the bandwidth occupancy of an interface reaches a high bandwidth threshold or the buffer occupancy reaches a high buffer threshold, the interface state of the interface is set to a congested state, and when the interface changes from a normal state or a recovered state to a congested state, the first network device determines that the interface is congested.

[0085] If an interface is in a congested state, and the updated bandwidth occupancy of the interface is lower than the high bandwidth threshold and the updated buffer occupancy is lower than the high buffer threshold, the interface state of the interface is set to a recovered state.

[0086] When an interface is in a recovery state, if the updated bandwidth occupancy of the interface is lower than the low bandwidth threshold and the updated buffer occupancy is lower than the low buffer threshold, the interface state of the interface is set to a normal state.

[0087] The bandwidth high threshold, bandwidth low threshold, buffer high threshold, and buffer low threshold are statically set based on experience.

[0088] Alternatively, the high bandwidth threshold, low bandwidth threshold, high buffer threshold and low buffer threshold may be intelligently and dynamically set according to the network conditions through an artificial intelligence method.

[0089] For example, by training a deep learning model in advance, setting a threshold update period in advance, and inputting the bandwidth occupancy and buffer occupancy of each outbound interface into the deep learning model for each threshold update period, updated bandwidth high threshold, bandwidth low threshold, buffer high threshold, and buffer low threshold can be obtained as output from the deep learning model.

[0090] The first network device stores a second interface status table, which includes the bandwidth usage of each outbound interface corresponding to the multipath group forwarding table. For example, the outbound interfaces included in multipath group forwarding table 1 are outbound interface 1, outbound interface 2, outbound interface 3, and outbound interface 4, the outbound interfaces included in multipath group forwarding table 2 are outbound interface 1 and outbound interface 3, and the outbound interfaces included in multipath group forwarding table 3 are outbound interface 2 and outbound interface 4, respectively. The second interface status table stored in the first network device is shown in Table 2.

[0091] [Table 2]

[0092] In Table 2, M represents the shortest path, N represents the non-shortest path, and the number after ":" represents the bandwidth occupancy of the traffic on the path to the outbound interface.

[0093] As can be seen from Table 2, multipath group forwarding table 1 contains three shortest paths and one non-shortest path. The three shortest paths are shortest path 1, shortest path 2, and shortest path 3. The bandwidth occupancy of traffic on shortest path 1 to outbound interface 1 is a, the bandwidth occupancy of traffic on shortest path 2 to outbound interface 2 is b, the bandwidth occupancy of traffic on shortest path 3 to outbound interface 4 is d, and the bandwidth occupancy of traffic on non-shortest path to outbound interface 3 is c.

[0094] The multipath forwarding table 2 includes one shortest path and one non-shortest path. The bandwidth occupancy of the shortest path to outbound interface 3 is f, and the bandwidth occupancy of the non-shortest path to outbound interface 1 is e.

[0095] The multipath forwarding table 3 includes one shortest path and one non-shortest path. The bandwidth occupancy of the shortest path to outbound interface 4 is g, and the bandwidth occupancy of the non-shortest path to outbound interface 2 is h.

[0096] In the above S201, if the first outbound interface is congested due to traffic on the shortest path, before obtaining a preset routing policy corresponding to the multipath group forwarding table, the routing information maintenance method includes: The method further includes, when the interface state of the first outbound interface in the first interface state table is changed to a congested state, obtaining a first bandwidth occupancy for the first outbound interface of traffic on the shortest path from the second interface state table, and determining whether the first bandwidth occupancy satisfies a preset congestion condition.

[0097] The preset congestion condition may be that the first bandwidth occupancy is the largest among the bandwidth occupancies of the paths using the first outbound interface.

[0098] That is, if the bandwidth occupation amount for the first outbound interface of the shortest route on which the first outbound interface is located is the largest, it means that the first outbound interface is congested due to traffic on the shortest route.

[0099] Alternatively, the preset congestion condition may be that the second bandwidth occupancy is greater than a specified bandwidth threshold, and the specified bandwidth threshold is less than the high bandwidth threshold.

[0100] The following is an example: Suppose the maximum bandwidth of each outbound interface is 1000 kbps, the maximum buffer occupancy is 1000 bytes, the high bandwidth threshold is 800 kbps, the low bandwidth threshold is 200 kbps, the high buffer threshold is 800 bytes, and the low buffer threshold is 200 bytes.

[0101] Taking the outbound interfaces of the ingress device in FIG. 1 as outbound interface 1, outbound interface 2, outbound interface 3 and outbound interface 4 respectively as an example, the first interface status table of the ingress device is shown in Table 3.

[0102] [Table 3]

[0103] From Table 3, if the outbound interface 1 in Table 3 is set to a congested state, the ingress device determines that the outbound interface 1 has entered a congested state.

[0104] Suppose an ingress device includes multipath group forwarding table 1, multipath group forwarding table 2, and multipath group forwarding table 3, the outbound interfaces included in multipath group forwarding table 1 are outbound interface 1, outbound interface 2, outbound interface 3, and outbound interface 4, the outbound interfaces included in multipath group forwarding table 2 are outbound interface 1 and outbound interface 3, and the outbound interfaces included in multipath group forwarding table 3 are outbound interface 2 and outbound interface 4, respectively, and the second interface state table corresponding to the multipath group forwarding tables stored in the first network device is shown in Table 4.

[0105] [Table 4]

[0106] As can be seen from Table 4, for outbound interface 1, the traffic on the shortest path corresponding to multipath group forwarding table 1 occupies the largest amount of bandwidth for outbound interface 1, so it can be determined that outbound interface 1 is congested due to the traffic on the shortest path.

[0107] This method can quickly determine whether congestion will occur at the first outbound interface based on the first interface status table. If it is determined that the first outbound interface is congested, the route that causes congestion at the first outbound interface can also be determined, and the weight value of each route corresponding to the multipath forwarding table corresponding to the route can be adjusted to avoid worsening of congestion and improve bandwidth utilization.

[0108] In another embodiment of the present application, the multipath group forwarding table includes a routing type mark, and illustratively, the routing type mark may occupy one field in the software forwarding table.

[0109] In the above step S201, a preset routing policy corresponding to the multipath group forwarding table is obtained. Specifically, this is realized as follows.

[0110] A preset routing policy corresponding to the routing type mark is obtained, and the preset routing policy includes at least one of a policy for adjusting the forwarding payload of a congested outbound interface to 0, a policy for reducing the forwarding payload of a congested outbound interface and not increasing the forwarding payload of a non-shortest path, and a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest path.

[0111] For example, a preset routing policy corresponding to routing type mark 1 adjusts the forwarding payload of a congested outbound interface to 0, i.e., does not continue to forward packets using the congested outbound interface. A preset routing policy corresponding to routing type mark 2 is a policy that reduces the forwarding payload of a congested outbound interface and does not increase the forwarding payload of a non-shortest path, and a preset routing policy j corresponding to routing type mark 3 is a policy that reduces the forwarding payload of a congested outbound interface and increases the forwarding payload of a non-shortest path. The embodiments of the present application do not limit the form of the routing type mark.

[0112] It should be noted that the preset routing policies in the present embodiment are not limited to the above three types, and may be flexibly set according to the actual scenario.

[0113] The above method allows the routing type mark to be set in the multipath group forwarding table, and the corresponding preset routing policy can be matched. In this way, the routing type mark can be used to flexibly adjust the preset routing policy used in the multipath group forwarding entry, thereby improving the overall network performance.

[0114] After determining the preset routing policy, S202 adjusts the forwarding weight value of each path in the first multipath group according to the preset routing policy, specifically, The forwarding weight value of each path in the first multipath group is adjusted based on the preset routing policy and the bandwidth occupancy of each interface included in the second interface state table.

[0115] The first network device can determine the routes whose forwarding weight values ​​need to be adjusted based on the preset routing policy.

[0116] If the preset routing policy is a policy for adjusting the forwarding payload of a congested outbound interface to 0, the forwarding weight value of the congested outbound interface is adjusted to 0, and traffic of the shortest route where the first outbound interface is located is shared by the route payload where the non-congested outbound interface is located in the first multipath group.

[0117] If the preset routing policy is a policy that reduces the forwarding payload of a congested outbound interface and does not increase the forwarding payload of a non-shortest path, the traffic of the shortest path including the first outbound interface is evenly distributed to the other shortest paths whose outbound interfaces are not congested according to each of a plurality of preset ratios, and then it is possible to calculate whether congestion will occur in the outbound interfaces of the other shortest paths. Thus, the largest preset ratio that will not congest the outbound interfaces of the other shortest paths is determined, and the forwarding weight value of each shortest path is adjusted according to the preset ratio. Here, the plurality of preset ratios are a plurality of ratios that decrease sequentially, and for example, the plurality of preset ratios may include 1 / 2, 1 / 4, and 1 / 8.

[0118] If it is determined through calculation that half of the traffic on the shortest route where the first outbound interface is located is adjusted to other shortest routes, and there is no congestion on the outbound interfaces of the other shortest routes, the forwarding weight value of each shortest route is adjusted according to the 1 / 2 ratio.

[0119] If the preset routing policy is a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest route, the traffic of the shortest route where the first outbound interface is located can be evenly distributed to the non-shortest routes whose other outbound interfaces are not congested according to each of a plurality of preset ratios, and then whether congestion will occur in the outbound interfaces of the other non-shortest routes can be calculated. Thus, the largest preset ratio that will not congest the outbound interfaces of the other non-shortest routes is determined, and the forwarding weight values ​​of each route can be adjusted according to the preset ratio.

[0120] Referring to the example in Table 4 above, if the preset routing policy is a policy to reduce the forwarding payload of a congested outbound interface and increase the forwarding payload of a non-shortest path, the forwarding weight value of each path in the multipath group corresponding to multipath group forwarding table 1 can be adjusted.

[0121] For convenience of explanation, the four routes corresponding to multipath group forwarding entry 1 in Table 4 are called route 1, route 2, route 3, and route 4, respectively. From Table 3, if it is determined that outbound interface 3 and outbound interface 4 of the non-shortest route are not congested, half of the traffic on outbound interface 1 of route 1 is evenly distributed to outbound interface 3 of route 3 and outbound interface 4 of route 4, and then it can be calculated whether congestion will occur on outbound interface 3 and outbound interface 4. If congestion does not occur, the forwarding weight values ​​corresponding to routes 1 to 4 can be re-determined according to the 1 / 2 ratio.

[0122] The calculated bandwidth occupancy of each outbound interface is shown in Table 5. That is, the 300 kbps traffic on outbound interface 1 is evenly distributed to outbound interface 3 and outbound interface 4. As a result, the adjusted bandwidth occupancy of outbound interface 3 is 550 kbps, and the bandwidth occupancy of outbound interface 4 is 450 kbps. Neither of these exceeds the high bandwidth threshold, and no congestion occurs.

[0123] [Table 5]

[0124] If there is a possibility that congestion will occur at any of the calculated outbound interfaces, outbound interface 2, outbound interface 3, and outbound interface 4, then 1 / 4 of the traffic at outbound interface 1 of route 1 is evenly distributed to outbound interface 3 of route 2, outbound interface 3 of route 3, and outbound interface 4 of route 4, and then it is calculated whether congestion will occur at outbound interface 2, outbound interface 3, and outbound interface 4. If congestion will not occur, the forwarding weight values ​​corresponding to routes 1 to 4 can be determined again according to the 1 / 4 ratio. If there is a possibility that congestion will occur at any of the calculated outbound interfaces, the calculation continues according to 1 / 8, and so on.

[0125] According to the example in Table 5, if the forwarding weight values ​​corresponding to each of the routes 1 to 4 can be determined anew according to the ratio of 1 / 2, the forwarding weight values ​​contained in the four software forwarding entries in the multipath group forwarding table 1 are adjusted from 1, 1, 0, 0 to 1 / 2, 1, 1 / 4, 1 / 4, that is, adjusted to 2, 4, 1, 1.

[0126] The following describes how to update the software and hardware forwarding tables.

[0127] In one example, if the preset routing policy is to reduce the forwarding payload of a congested outbound interface and increase the forwarding payload of a non-shortest path, the forwarding weight values ​​contained in the four software forwarding entries in Figure 3a can be adjusted from 1, 1, 0, 0 to 2, 4, 1, 1, as shown in Figure 4a, and half of the traffic on the path corresponding to the first software forwarding entry can be evenly distributed to the two non-shortest paths.

[0128] As an example, taking 1000 packets forwarded by the first network device as an example, before adjusting the forwarding weight value, the number of packets forwarded by outbound interface 1 is 1000*1 / 2=500, the number of packets forwarded by outbound interface 2 is 1000*1 / 2=500, and the number of packets forwarded by outbound interface 3 and the number of packets forwarded by outbound interface 4 are all 0. After adjusting the forwarding weight values, the number of packets forwarded by outbound interface 1 is 1000*2 / (2+4+1+1)=250, the number of packets forwarded by outbound interface 2 is 1000*4 / (2+4+1+1)=500, the number of packets forwarded by outbound interface 3 is 1000*1 / (2+4+1+1)=125, and the number of packets forwarded by outbound interface 4 is 1000*1 / (2+4+1+1)=125. That is, half of the traffic on outbound interface 1 is evenly distributed to outbound interface 3 and outbound interface 4.

[0129] After the software forwarding entries in FIG. 4a are obtained, the hardware forwarding table is updated adaptively, and the updated hardware forwarding table is shown in FIG. 4b.

[0130] The required number of copies of each software transfer entry is as follows:

[0131] The number of copies of the first software forwarding entry is 2*128 / (2+4+1+1)=32, The number of copies of the second software forwarding entry is 4*128 / (2+4+1+1)=64, The number of copies of the third software forwarding entry is 1*128 / (2+4+1+1)=16, The number of copies of the fourth software forwarding entry is 1*128 / (2+4+1+1)=16.

[0132] After the copying is completed, the fields in each software forwarding table other than the forwarding weight value may be distributed to the hardware forwarding table, to obtain the hardware forwarding table shown in FIG. 4b.

[0133] In another example, if the preset routing policy is to reduce the forwarding payload of congested outbound interfaces and not increase the forwarding payload of non-shortest paths, the forwarding weight values ​​in the four software forwarding entries in Figure 3a are adjusted from 1, 1, 0, 0 to 1, 3, 0, 0, as shown in Figure 5a. In this way, half of the traffic on one shortest path can be evenly distributed to the other shortest paths.

[0134] Taking 1,000 packets forwarded by the first network device as an example, before adjusting the forwarding weight value, the number of packets forwarded by outbound interface 1 is 1,000*1 / 2=500, and the number of packets forwarded by outbound interface 2 is 1,000*1 / 2=500. After adjusting the forwarding weight value, the number of packets forwarded by outbound interface 1 is 1,000*1 / (1+3)=250, the number of packets forwarded by outbound interface 2 is 1,000*3 / (1+3)=750, the number of packets forwarded by outbound interface 3 is 0, and the number of packets forwarded by outbound interface 4 is 0. That is, half of the packets of outbound interface 1 are allocated to outbound interface 2.

[0135] After obtaining the software forwarding entries shown in FIG. 5a, the hardware forwarding table is updated adaptively, and the updated hardware forwarding table is shown in FIG. 5b.

[0136] The required number of copies of each software transfer entry is as follows:

[0137] The number of copies of the first software forwarding entry is 1*128 / (1+3+0+0)=32, The number of copies of the second software forwarding entry is 3*128 / (1+3+0+0)=96, The number of copies of the third software forwarding entry is 0*128 / (1+3+0+0)=0, The number of copies of the fourth software forwarding entry is 0*128 / (1+3+0+0)=0.

[0138] After the copying is complete, the fields in each software forwarding table except the forwarding weight value can be distributed to the hardware forwarding table, resulting in the hardware forwarding table shown in FIG. 5b.

[0139] According to the above method, when the first outbound interface is congested, the first network device can adjust the forwarding weight values ​​of the routes corresponding to each forwarding entry according to a preset routing policy corresponding to the multipath group forwarding table. That is, the first network device can share packets that originally need to be forwarded on the first outbound interface with routes corresponding to other forwarding entries, thereby reducing the payload burden on the first outbound interface. Fully utilizing other routes in the network to forward packets improves bandwidth utilization, supports large-scale networking, and meets the needs of high throughput, low latency, and low cost.

[0140] The method provided in the present embodiment may be applied to a leaf-spine topology networking system, as shown in Figure 6, which exemplarily illustrates two spine devices and two leaf devices. The two spine devices are spine device 1 and spine device 2, respectively, and the two leaf devices are leaf device 1 and leaf device 2, respectively.

[0141] Leaf device 1 is a source device, and leaf device 2 is a destination device. Leaf device 1 can send a packet to leaf device 2. Taking leaf device 1 as an example, leaf device 1 can calculate two routes, the route from outbound interface 1 to leaf device 2 and the route from outbound interface 2 to leaf device 2 being the shortest routes. That is, the software forwarding table of leaf device 1 includes these two shortest routes, and these two shortest routes form an ECMP route. This software forwarding table is specifically shown in Figure 7a.

[0142] 7a illustrates an example of a software forwarding table in leaf device 1 in the networking system illustrated in FIG. 7a. The left side of FIG. 7a shows the destination IP address of D1 and the corresponding route group identifier, where the destination IP address of D1 is the IP address of leaf device 2. For example, the destination IP address of D1 is 119.1.1.2 / 32.

[0143] The software forwarding table generated by leaf device 1 based on the route group includes two software forwarding entries, the first software forwarding entry including the next hop (nexthop) 1 of the shortest route and a forwarding weight value 1, and the second software forwarding entry including the next hop (nexthop2) of another shortest route and a forwarding weight value 1.

[0144] FIG. 7b is a hardware forwarding table corresponding to FIG. 7a. The previous 64 hardware forwarding entries included in the hardware forwarding table of FIG. 7b are the same, and each forwarding entry includes the next hop 1 of one shortest path.

[0145] The remaining 64 hardware forwarding entries in the hardware forwarding table are the same, and each forwarding entry includes next hop 2 of another shortest path.

[0146] The method provided in the present embodiment may be applied to each group in a Dragonfly topology networking system. As shown in Fig. 8, the dashed rectangular frame in Fig. 8 represents Group 1, which includes an ingress device, a transit device, and an edge device. In Fig. 8, S represents a source device, D1 represents a destination device, and the source device accesses Group 1 through an ingress device, and the destination device accesses Group 1 through an edge device.

[0147] Taking an ingress device as an example, the ingress device can calculate the shortest route and non-shortest route between the ingress device and the destination device, where the route from outbound interface 1 to the destination device and the route from outbound interface 2 to the destination device are shortest routes, and the route from outbound interface 3 to the destination device and the route from outbound interface 4 to the destination device are non-shortest routes.

[0148] 9A shows an example of a software forwarding table in an ingress device in the networking system shown in FIG. 9A. The left side of FIG. 9A shows the D1 destination IP address and the corresponding route group identifier, where the D1 destination IP address is the IP address of the destination device. For example, the D1 destination IP address is 119.1.1.2 / 32.

[0149] In the software forwarding table, the first software forwarding entry includes a nexthop 1 corresponding to one shortest path and a forwarding weight value 1 of the shortest path.

[0150] The second software forwarding entry contains a next hop of 2 corresponding to another shortest path, and a forwarding weight value of 1 for that shortest path.

[0151] The third software forwarding entry contains a next hop of 1 corresponding to one non-shortest path and a forwarding weight value of 0 for that non-shortest path.

[0152] The fourth software forwarding entry contains a next hop of 2 corresponding to another non-shortest path, and a forwarding weight value of 0 for that non-shortest path.

[0153] FIG. 9b is a hardware forwarding table corresponding to FIG. 9a. The previous 64 hardware forwarding entries included in the hardware forwarding table of FIG. 7b are the same, and each forwarding entry includes the next hop 1 of one shortest path.

[0154] The remaining 64 hardware forwarding entries in the hardware forwarding table are the same, and each forwarding entry includes next hop 2 of another shortest path.

[0155] Based on the same technical idea, an embodiment of the present application provides a routing information maintenance device applied to a first network device, the first network device includes a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table includes a shortest path and a non-shortest path, each path is for indicating a path between the first network device and a second network device, and the forwarding entry of the shortest path includes a first outbound interface of the first network device, and as shown in FIG. 10, the routing information maintenance device: an acquiring module 1001, used for acquiring a preset routing policy corresponding to a multipath group forwarding table when the first outbound interface is congested due to traffic on the shortest path; and an adjusting module 1002 for adjusting a forwarding weight value of each path in the first multipath group based on a preset routing policy, the forwarding weight value of each path being used to indicate the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding.

[0156] Preferably, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the routing information maintenance device further includes a generating module; The generation module is calculating shortest and non-shortest paths to and from a second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain a software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value of one path, and the initial forwarding weight value of the non-shortest paths is 0; For each software forwarding entry whose forwarding weight value is not 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain a hardware forwarding table; N = forwarding weight value of the software forwarding entry * number of preset entries in the hardware forwarding table / total value of each forwarding weight value included in the software forwarding entry.

[0157] Preferably, the multipath group forwarding table includes a routing type mark, and the acquisition module 1001 specifically: The method is used to obtain a preset routing policy corresponding to the routing type mark, the preset routing policy including at least one of a policy for adjusting the forwarding payload of a congested outbound interface to 0, a policy for reducing the forwarding payload of a congested outbound interface and not increasing the forwarding payload of a non-shortest path, and a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest path.

[0158] Preferably, the first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table includes an interface status of each outbound interface of the first network device, and the second interface status table includes a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group, and the routing information maintenance device further includes a determination module; The obtaining module 1001 is further used for obtaining a first bandwidth occupancy of the first outbound interface of the traffic on the shortest path from the second interface status table when the interface status of the first outbound interface in the first interface status table changes to a congested state; The determining module is used for determining that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy meets a preset congestion condition.

[0159] Preferably, the first interface status table further includes a bandwidth occupancy and a buffer occupancy of each outbound interface, and the routing information maintenance device further includes an update module and a setting module; The update module is used for updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; The setting module is used for setting the interface state of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a preset bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a preset buffer threshold.

[0160] Preferably, the adjustment module 1002 specifically: The forwarding weight value of each path in the first multipath group is adjusted based on the preset routing policy and the bandwidth occupancy of each outbound interface included in the second interface state table.

[0161] Preferably, the multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share a multipath group forwarding table.

[0162] Based on the same technical idea, the present embodiment further provides a first network device including a multipath group forwarding table, wherein a first multipath group corresponding to the multipath group forwarding table includes a shortest path and a non-shortest path, each path is for indicating a path between the first network device and a second network device, and the forwarding entry of the shortest path includes a first outbound interface of the first network device, and as shown in FIG. 11, the first network device: a processor 1101; a transceiver 1104; a machine-readable storage medium 1102 having machine-executable instructions stored therein that are executable by the processor 1101, the machine-executable instructions causing the processor 1101 to: retrieving a preset routing policy corresponding to a multipath group forwarding table when the first outbound interface is congested due to traffic on the shortest path; and adjusting a forwarding weight value of each path in the first multipath group based on a preset routing policy, the forwarding weight value of each path indicating the proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding.

[0163] Preferably, the multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the machine executable instructions cause the processor 1101 to: calculating shortest and non-shortest paths to and from a second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain a software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value of one path, and the initial forwarding weight value of the non-shortest paths is 0; For each software forwarding entry whose forwarding weight value is not 0, copy N copies of information other than the forwarding weight value in the software forwarding entry to obtain N hardware forwarding entries, and distribute the N hardware forwarding entries to hardware resources to obtain a hardware forwarding table; N = forwarding weight value of the software forwarding entry * number of preset entries in the hardware forwarding table / total value of each forwarding weight value included in the software forwarding entry.

[0164] Preferably, the multipath group forwarding table includes a routing type marking, and the machine executable instructions cause the processor 1101 to: The method executes the following: obtaining a preset routing policy corresponding to the routing type mark, the preset routing policy including at least one of a policy for adjusting the forwarding payload of a congested outbound interface to 0, a policy for reducing the forwarding payload of a congested outbound interface and not increasing the forwarding payload of a non-shortest path, and a policy for reducing the forwarding payload of a congested outbound interface and increasing the forwarding payload of a non-shortest path.

[0165] Preferably, the first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group; The machine-executable instructions may be used to cause the processor 1101 to: When the interface state of the first outbound interface in the first interface state table changes to a congested state, obtain a first bandwidth occupancy amount for the first outbound interface of the traffic on the shortest path from the second interface state table; If the first bandwidth occupancy satisfies the preset congestion condition, determining that the first outbound interface is congested due to traffic on the shortest path.

[0166] Preferably, the first interface status table further includes a respective bandwidth occupancy and a buffer occupancy of each outbound interface, and the machine-executable instructions cause the processor 1101 to: updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; If the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold, the interface state of the outbound interface is set to a congested state.

[0167] Preferably, the machine executable instructions cause the processor 1101 to: and adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and the bandwidth occupancy of each outbound interface included in the second interface state table.

[0168] Preferably, the multiple routes between the first network device and the third network device constitute a second multipath group, and if the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share a multipath group forwarding table.

[0169] 11 may further include a communication bus 1103. The processor 1101, the machine-readable storage medium 1102, and the transceiver 1104 communicate with each other via the communication bus 1103, which may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus is divided into an address bus, a data bus, a control bus, etc.

[0170] The transceiver 1104 may be a wireless communication module, and the transceiver 1104 performs data interaction with other devices under the control of the processor 1101.

[0171] The machine-readable storage medium 1102 may include random access memory (RAM) and non-volatile memory (NVM), such as at least one magnetic disk memory, and may also be a storage device remote from the at least one processor.

[0172] The processor 1101 may be a general-purpose processor including a central processing unit (CPU), a network processor (NP), etc., or may be a general-purpose processor including a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly.

[0173] Based on the same inventive idea as the routing information maintenance method provided in the above embodiment, the present embodiment also provides a machine-readable storage medium storing machine-executable instructions executable by a processor, which cause the processor to implement the steps of the routing information maintenance method.

[0174] In a further embodiment provided herein, a computer program product is provided that includes instructions, which when executed on a computer, cause the computer to perform the steps of the routing information maintenance method in the above embodiment.

[0175] It should be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another and do not require or imply any actual relationship or order between those entities or operations. Furthermore, the terms "comprise," "include," "includes," or any other variant thereof, mean "comprise" in an inclusive sense. Thus, a process, method, article, or device comprising a set of elements does not include only those elements, but also other elements not expressly listed, or elements inherent in such process, method, article, or device. Absent further limitations, an element limited by a phrase "comprising..." does not exclude the presence of other identical elements in a process, method, article, or device that includes the recited element.

[0176] The above description is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A routing information maintenance method applied to a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route being for indicating a route between a first network device and a second network device, and a forwarding entry of the shortest route including a first outbound interface of the first network device, the routing information maintenance method comprising: If the first outbound interface is congested due to traffic on the shortest path, obtain a preset routing policy corresponding to the multipath group forwarding table; adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy, wherein the forwarding weight value of each path indicates a proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding. Routing information maintenance method.

2. The multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the routing information maintenance method includes: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry having a forwarding weight value other than 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain the hardware forwarding table; N = the forwarding weight value of the software forwarding entry * the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry, 2. The routing information maintenance method according to claim 1.

3. The multipath group forwarding table includes a routing type mark, and obtaining a preset routing policy corresponding to the multipath group forwarding table includes: obtaining a preset routing policy corresponding to the routing type mark; the preset routing policy includes at least one of a policy for adjusting a forwarding payload of a congested outbound interface to zero, a policy for reducing a forwarding payload of a congested outbound interface and not increasing a forwarding payload of a non-shortest path, and a policy for reducing a forwarding payload of a congested outbound interface and increasing a forwarding payload of a non-shortest path.

3. The routing information maintenance method according to claim 2.

4. a first interface status table and a second interface status table corresponding to the multipath group forwarding table are stored in the first network device, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group; When the first outbound interface is congested due to traffic on the shortest path, before obtaining a preset routing policy corresponding to the multipath group forwarding table, the routing information maintenance method includes: When the interface state of a first outbound interface in the first interface state table changes to a congested state, obtaining a first bandwidth occupancy amount for the first outbound interface of the traffic on the shortest path from the second interface state table; determining that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy satisfies a preset congestion condition.

2. The routing information maintenance method according to claim 1.

5. The first interface status table further includes a bandwidth occupancy and a buffer occupancy of each outbound interface, and the routing information maintenance method includes: updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; If the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold, setting the interface state of the outbound interface to a congested state.

5. The routing information maintenance method according to claim 4.

6. adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy; adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and a bandwidth occupancy of each outbound interface included in the second interface state table.

5. The routing information maintenance method according to claim 4.

7. a plurality of routes between the first network device and the third network device constitute a second multipath group, and when the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table; 2. The routing information maintenance method according to claim 1.

8. A routing information maintenance device applied to a first network device, the first network device including a multipath group forwarding table, a first multipath group corresponding to the multipath group forwarding table including a shortest route and a non-shortest route, each route being for indicating a route between a first network device and a second network device, a forwarding entry of the shortest route including a first outbound interface of the first network device, the routing information maintenance device comprising: an acquisition module, adapted to acquire a preset routing policy corresponding to the multipath group forwarding table when the first outbound interface is congested due to traffic on the shortest path; and an adjustment module for adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy, the forwarding weight value of each path being used to indicate a proportion of traffic on the path when the path is selected from the first multipath group for packet forwarding. Routing information maintenance device.

9. The multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the routing information maintenance device further includes a generating module; The generation module: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry whose forwarding weight value is not 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain the hardware forwarding table; N = the forwarding weight value of the software forwarding entry * the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry, 9. The routing information maintenance device according to claim 8.

10. The multipath group forwarding table includes a routing type mark, and the acquisition module: Used to obtain a preset routing policy corresponding to the routing type mark; the preset routing policy includes at least one of a policy for adjusting a forwarding payload of a congested outbound interface to zero, a policy for reducing a forwarding payload of a congested outbound interface and not increasing a forwarding payload of a non-shortest path, and a policy for reducing a forwarding payload of a congested outbound interface and increasing a forwarding payload of a non-shortest path.

10. The routing information maintenance device according to claim 9.

11. The first network device stores a first interface status table and a second interface status table corresponding to the multipath group forwarding table, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group, and the routing information maintenance device further includes a determination module; The obtaining module is further used for obtaining a first bandwidth occupancy of the traffic on the shortest path for the first outbound interface from the second interface status table when the interface status of the first outbound interface in the first interface status table changes to a congested state; The determining module is used to determine that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy meets a preset congestion condition.

9. The routing information maintenance device according to claim 8.

12. The first interface status table further includes a bandwidth occupancy and a buffer occupancy of each outbound interface, and the routing information maintenance device further includes an update module and a setting module; The update module is used to update, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; The setting module is used to set the interface state of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a preset bandwidth threshold or the updated buffer occupancy of the outbound interface reaches a preset buffer threshold.

12. The routing information maintenance device according to claim 11.

13. The adjustment module includes: and adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and the bandwidth occupancy of each outbound interface included in the second interface status table.

12. The routing information maintenance device according to claim 11.

14. a plurality of routes between the first network device and the third network device constitute a second multipath group, and when the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table; 9. The routing information maintenance device according to claim 8.

15. A first network device including a multipath group forwarding table, wherein a first multipath group corresponding to the multipath group forwarding table includes a shortest route and a non-shortest route, each route being for indicating a route between a first network device and a second network device, and a forwarding entry of the shortest route includes a first outbound interface of the first network device, wherein the first network device: a processor; A transmitter / receiver, a machine-readable storage medium having machine-executable instructions stored thereon that are executable by the processor, the machine-executable instructions causing the processor to: If the first outbound interface is congested due to traffic on the shortest path, obtain a preset routing policy corresponding to the multipath group forwarding table; and adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy, the forwarding weight value of each path being intended to indicate a proportion of traffic on that path when that path is selected from the first multipath group for packet forwarding. First network device.

16. The multipath group forwarding table includes a software forwarding table and a hardware forwarding table, and the machine-executable instructions cause the processor to: calculating shortest and non-shortest paths to and from the second network device; generating a software forwarding entry for each of the shortest paths and each of the non-shortest paths to obtain the software forwarding table, wherein each of the software forwarding entries includes a forwarding weight value for one path, and the initial forwarding weight value for the non-shortest paths is 0; For each software forwarding entry having a forwarding weight value other than 0, N copies of information other than the forwarding weight value in the software forwarding entry are made to obtain N hardware forwarding entries, and the N hardware forwarding entries are distributed to hardware resources to obtain the hardware forwarding table; N = the forwarding weight value of the software forwarding entry * the number of preset entries in the hardware forwarding table / the total value of the forwarding weight values ​​included in the software forwarding entry, The first network device of claim 15.

17. The multipath group forwarding table includes a routing type marking, and the machine-executable instructions cause the processor to: and obtaining a preset routing policy corresponding to the routing type mark, wherein the preset routing policy includes at least one of a policy for adjusting a forwarding payload of a congested outbound interface to 0, a policy for reducing a forwarding payload of a congested outbound interface and not increasing a forwarding payload of a non-shortest path, and a policy for reducing a forwarding payload of a congested outbound interface and increasing a forwarding payload of a non-shortest path. The first network device of claim 16.

18. a first interface status table and a second interface status table corresponding to the multipath group forwarding table are stored in the first network device, the first interface status table including an interface status of each outbound interface of the first network device, and the second interface status table including a bandwidth occupancy for each outbound interface of traffic on each path in the first multipath group; The machine-executable instructions may cause the processor to: When the interface state of a first outbound interface in the first interface state table changes to a congested state, obtaining a first bandwidth occupancy amount for the first outbound interface of the traffic on the shortest path from the second interface state table; and determining that the first outbound interface is congested due to traffic on the shortest path when the first bandwidth occupancy satisfies a preset congestion condition. The first network device of claim 15.

19. The first interface status table further includes a respective bandwidth occupancy and a buffer occupancy for each outbound interface, and the machine-executable instructions cause the processor to: updating, for each outbound interface in the first interface status table at predetermined time intervals, the bandwidth occupancy and the buffer occupancy of the outbound interface; and setting the interface state of the outbound interface to a congested state when the updated bandwidth occupancy of the outbound interface reaches a predetermined bandwidth threshold or when the updated buffer occupancy of the outbound interface reaches a predetermined buffer threshold.

19. The first network device of claim 18.

20. The machine-executable instructions may cause the processor to: and further adjusting a forwarding weight value of each path in the first multipath group based on the preset routing policy and a bandwidth occupancy of each outbound interface included in the second interface state table.

19. The first network device of claim 18.

21. a plurality of routes between the first network device and the third network device constitute a second multipath group, and when the first multipath group and the second multipath group are the same, the first multipath group and the second multipath group share the multipath group forwarding table; The first network device of claim 15.

22. A machine-readable storage medium having stored thereon machine-executable instructions, which, when called and executed by a processor, cause the processor to implement steps of a routing information maintenance method according to any one of claims 1 to 7. Machine-readable storage medium.

23. A processor is caused to implement the routing information maintenance method according to any one of claims 1 to 7. Computer program products.