Method for refreshing ftnEcmp entry and network device
Patent Information
- Application Number
- CN202311254648.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-26
AI Technical Summary
[0018] As can be seen from the above embodiments, when the initial weight ratio of the aggregation interface changes, the number of FtnEcmp entries issued by the aggregation interface corresponding to the last digit of the weight ratio can be adjusted to avoid the technical problems of slow traffic convergence and high packet loss caused by a large number of equivalence table refreshes.
Smart Images

Figure CN117459442B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of communication technology, and in particular to a method for refreshing FtnEcmp entries and a network device. Background Technology
[0002] like Figure 1 In the organizational structure of one SRv6 policy shown, each SRv6 policy supports multiple seglists, and each seglist supports multiple equivalent exits.
[0003] When traffic enters the device and matches the srv6 policy, the hardware forwarding process is as follows: based on its destination IP, the FTN table is looked up. When an equivalent address exists, the equivalent base address EcmpBasePoint is retrieved from the FTN to look up the ecmpnum table to determine how many ftnecmp entries there are. Then, based on the packet hash value, the number of ftnecmp entries is moduloed and offset, and EcmpBasePoint is added to query each ftnecmp entry. The outlif is obtained from this, and multiple outlif entries are searched to obtain the relevant egress information and sidlist address for forwarding.
[0004] When the outbound bandwidth is different and UCMP (Unequal Cost Multipath Load Balancing) forwarding is configured, when issuing FTNECMP equivalence tables, it is necessary to calculate the corresponding weight and issue the corresponding number of equivalence tables to achieve the effect of forwarding the corresponding proportion of traffic according to the interface bandwidth weight ratio. Summary of the Invention
[0005] This disclosure provides a method for refreshing FtnEcmp entries and a network device. This method can effectively save the number of times the equivalence table is refreshed when the interface bandwidth changes, which is beneficial for rapid convergence and reduces packet loss.
[0006] According to a first aspect of the embodiments of this specification, a method for refreshing FtnEcmp entries is provided, the method comprising:
[0007] The initial weight ratio is obtained based on the weight of each aggregation port, and the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio is obtained.
[0008] When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change.
[0009] When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value, carry the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0010] The step of obtaining the initial weight ratio based on the weight of each aggregation port includes:
[0011] Obtain the bandwidth value of each aggregation port, and perform a simple ratio on each bandwidth value to obtain the initial weight ratio.
[0012] The process of obtaining the initial equal-cost route count (ECMPNUM) corresponding to the initial weight ratio includes:
[0013] Sum the terms in the initial weight ratio and use the sum as the initial equal-cost route quantity ECMPNUM value.
[0014] Specifically, when issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, selecting the number of FtnEcmp entries corresponding to the reduction value, carrying the aggregation port information corresponding to the last ratio of the changed initial weight ratio, includes:
[0015] When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value to carry the outlif information of the aggregation port corresponding to the last ratio.
[0016] The step of controlling the total number of FtnEcmp entries sent to each aggregation port based on the first ECMPNUM value includes:
[0017] Based on the first ECMPNUM value, issue the number of FtnEcmp entries corresponding to the first ECMPNUM value.
[0018] As can be seen from the above embodiments, when the initial weight ratio of the aggregation interface changes, the number of FtnEcmp entries issued by the aggregation interface corresponding to the last digit of the weight ratio can be adjusted to avoid the technical problems of slow traffic convergence and high packet loss caused by a large number of equivalence table refreshes.
[0019] According to a second aspect of the embodiments of this specification, a network device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the following method:
[0020] The initial weight ratio is obtained based on the weight of each aggregation port, and the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio is obtained.
[0021] When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change.
[0022] When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value, carry the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0023] According to a third aspect of the embodiments of this specification, a routing device is provided, the routing device comprising:
[0024] The acquisition module is used to obtain the initial weight ratio based on the weight of each aggregation port, and to obtain the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio;
[0025] The first processing module is used to determine the target ratio item that has changed in the initial weight ratio when the initial weight ratio changes, and to obtain the reduction value of the target ratio item; and to obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change.
[0026] The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio, carrying the aggregation port information of the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0027] The step of obtaining the initial weight ratio based on the weight of each aggregation port includes:
[0028] Obtain the bandwidth value of each aggregation port, and perform a simple ratio on each bandwidth value to obtain the initial weight ratio.
[0029] The acquisition module is used to sum the ratios in the initial weight ratio and use the summation result as the initial equal cost route number ECMPNUM value.
[0030] The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio item, and carry the outlif information of the aggregation port corresponding to the last ratio item.
[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0033] Figure 1 This specification illustrates an SRV6 system framework diagram based on an exemplary embodiment.
[0034] Figure 2 This is a flowchart illustrating a method for refreshing FtnEcmp entries according to an exemplary embodiment of this specification. Detailed Implementation
[0035] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0036] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0037] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0038] In the current implementation, every time the SRv6 policy interface changes (including interface fluctuations, bandwidth changes, etc.), all FTnecmp equivalent table entries are refreshed. When the device's SRv6 policy specification is large, each SRv6 policy will issue dozens of equivalent table entries. In the case of ECMP, a maximum of 128 entries will be issued, and in the case of UCMP, a maximum of 255 entries will be issued. This results in excessive time spent issuing entries, affecting traffic switching efficiency.
[0039] To address the aforementioned technical problems, this disclosure provides a method for refreshing FtnEcmp entries, such as... Figure 2 As shown, the method includes:
[0040] S201 obtains the initial weight ratio based on the weight of each aggregation port, and obtains the initial equal-cost route quantity ECMPNUM value corresponding to the initial weight ratio;
[0041] S202 When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route quantity ECMPNUM value corresponding to the weight ratio after the change;
[0042] When S203 issues FtnEcmp entries to the aggregation port corresponding to the target ratio, it selects the number of FtnEcmp entries corresponding to the reduction value, carrying the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and controls the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0043] In this embodiment, the bandwidth values of each aggregation port can be obtained. For example, there are aggregation ports 1, 2, 3, and 4. The bandwidth of aggregation port 1 is 2*100G + 10*10G, which is a total of 300G bandwidth. The bandwidth of aggregation port 2 is 32*10G, which is a total of 320G bandwidth. The bandwidth of aggregation port 3 is 3*100G, which is a total of 300G bandwidth. The bandwidth of aggregation port 4 is 3*100G, which is a total of 300G bandwidth. The initial weight ratio is obtained by performing the simplest ratio of each bandwidth value, which is 15:16:15:15.
[0044] In step S202, when the initial weight ratio changes, for example, the bandwidth of aggregation port 3 decreases by 100G, the changed initial weight ratio becomes 15:16:10:15. At this point, the target ratio term is determined to be the third term, which changes from 15 to 10, a reduction of 5. The number of first equivalent routes (ECMPNUM) corresponding to the changed weight ratio is 15+16+10+15=56.
[0045] When issuing FtnEcmp entries, 15 and 16 FtnEcmp entries are issued for aggregation port 1 and aggregation port 2, respectively. When issuing FtnEcmp entries for aggregation port 3, since the reduction value of the ratio of aggregation port 3 is 5 (from 15 before the change to 10 after the change), 10 ftnecmp entries carrying aggregation port 3 information are issued for aggregation port 3. At the same time, 5 ftnecmp entries carrying the last aggregation port (aggregation port 4) information are issued for aggregation port 3. Among them, the aggregation port 3 information includes the outlif information of aggregation port 3, and the aggregation port 4 information includes the outlif information of aggregation port 4.
[0046] When issuing FTNEMP entries for aggregation port 4, 15 tables need to be issued. However, since 5 FTNEMP entries have already been issued for aggregation port 4 when issuing FTNEMP entries for aggregation port 3, and due to the ECMPNUM limit of 56, the final FTNEMP entries issued for aggregation port 4 can be understood as consisting of two parts, namely 5+10. This is equivalent to issuing 5 FTNEMP entries for aggregation port 4 when issuing FTNEMP entries for aggregation port 3. It can also be understood as achieving the effect of refreshing the original 56 tables (15+16+10+15) by changing the order of the tables forward. This avoids the technical problem in existing technologies where interfaces with unchanged bandwidth also need to refresh FTNEMP entries when bandwidth changes. Therefore, in scenarios with a large number of SRV6 policies, this significantly reduces table refresh time, which is beneficial for rapid traffic convergence and reduces packet loss.
[0047] This disclosure also provides a network device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the following method:
[0048] The initial weight ratio is obtained based on the weight of each aggregation port, and the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio is obtained.
[0049] When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change.
[0050] When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value, carry the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0051] This disclosure also provides a routing device, the routing device comprising:
[0052] The acquisition module is used to obtain the initial weight ratio based on the weight of each aggregation port, and to obtain the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio;
[0053] The first processing module is used to determine the target ratio item that has changed in the initial weight ratio when the initial weight ratio changes, and to obtain the reduction value of the target ratio item; and to obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change.
[0054] The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio, carrying the aggregation port information of the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
[0055] The step of obtaining the initial weight ratio based on the weight of each aggregation port includes:
[0056] Obtain the bandwidth value of each aggregation port, and perform a simple ratio on each bandwidth value to obtain the initial weight ratio.
[0057] The acquisition module is used to sum the ratios in the initial weight ratio and use the summation result as the initial equal-cost route quantity ECMPNUM value.
[0058] The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio item, and carry the outlif information of the aggregation port corresponding to the last ratio item.
[0059] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0060] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0061] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0062] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.
[0063] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.
[0064] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A method for refreshing FtnEcmp entries, characterized in that, The method includes: The initial weight ratio is obtained based on the weight of each aggregation port, and the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio is obtained. When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change. When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value, carry the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
2. The method according to claim 1, characterized in that, The step of obtaining the initial weight ratio based on the weight of each aggregation port includes: Obtain the bandwidth value of each aggregation port, and perform a simple ratio on each bandwidth value to obtain the initial weight ratio.
3. The method according to claim 1, characterized in that, Obtain the initial equal-cost route count (ECMPNUM) value corresponding to the initial weight ratio, including: Sum the terms in the initial weight ratio and use the sum as the initial equal-cost route quantity ECMPNUM value.
4. The method according to claim 1, characterized in that, When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, the process of selecting the number of FtnEcmp entries corresponding to the reduction value, carrying the aggregation port information corresponding to the last ratio of the changed initial weight ratio, includes: When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value to carry the outlif information of the aggregation port corresponding to the last ratio.
5. The method according to claim 1, characterized in that, The control of the total number of FtnEcmp entries issued to each aggregation port based on the first ECMPNUM value includes: Based on the first ECMPNUM value, issue the number of FtnEcmp entries corresponding to the first ECMPNUM value.
6. A network device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the following method: The initial weight ratio is obtained based on the weight of each aggregation port, and the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio is obtained. When the initial weight ratio changes, determine the target ratio item that has changed in the initial weight ratio and obtain the reduction value of the target ratio item; and obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change. When issuing FtnEcmp entries to the aggregation port corresponding to the target ratio, select the number of FtnEcmp entries corresponding to the reduction value, carry the aggregation port information corresponding to the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
7. A routing device, characterized in that, The routing device includes: The acquisition module is used to obtain the initial weight ratio based on the weight of each aggregation port, and to obtain the initial equal cost route number ECMPNUM value corresponding to the initial weight ratio; The first processing module is used to determine the target ratio item that has changed in the initial weight ratio when the initial weight ratio changes, and to obtain the reduction value of the target ratio item; and to obtain the first equivalent route number ECMPNUM value corresponding to the weight ratio after the change. The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio, carrying the aggregation port information of the last ratio of the changed initial weight ratio, and control the total number of FtnEcmp entries issued to each aggregation port according to the first ECMPNUM value.
8. The routing device according to claim 7, characterized in that, The step of obtaining the initial weight ratio based on the weight of each aggregation port includes: Obtain the bandwidth value of each aggregation port, and perform a simple ratio on each bandwidth value to obtain the initial weight ratio.
9. The routing device according to claim 7, characterized in that, The acquisition module is used to sum the ratios in the initial weight ratio and use the summation result as the initial equal cost route number ECMPNUM value.
10. The routing device according to claim 7, characterized in that, The second processing module is used to select the number of FtnEcmp entries corresponding to the reduction value when issuing FtnEcmp entries to the aggregation port of the corresponding target ratio item, and carry the outlif information of the aggregation port corresponding to the last ratio item.
Citation Information
Patent Citations
Method and device for load sharing
CN103236986A
Equivalent routing table item establishment method and device
CN108259334A