A Link Configuration Method and Apparatus
By calculating the stability of the physical links between devices and configuring the link according to the threshold, the problems of wasted bandwidth and poor stability caused by random selection of links are solved, and higher bandwidth utilization and system stability are achieved.
Patent Information
- Application Number
- CN202310185229.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-18
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2043-02-18
AI Technical Summary
In the prior art, random selection of physical links is performed as keepalive links and peer-link links, resulting in waste of bandwidth resources and poor stability of M-LAG system.
By obtaining physical link information between devices, the link stability of each physical link is calculated, and according to the stability and rate threshold, the physical link with the link stability below the first stability threshold and the rate below the first rate threshold is configured as a keep-alive link, and other links are aggregated to form a data link.
Improve the stability and bandwidth utilization of data links, and reduce the waste of bandwidth resources.
Smart Images

Figure CN116192731B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technologies, and particularly relates to a link configuration method and apparatus. Background Art
[0002] In a campus SDN network, which adopts a new SDN network architecture, Leaf serves as an authentication device and is responsible for authenticating user terminals, implementing policies, and controlling traffic. At the Leaf layer, a Multi-Chassis Link Aggregation (M-LAG) system can be deployed to perform redundant backup and load balancing on user traffic.
[0003] In a campus scenario, an Ethernet aggregation link is used as the data (peer-link) link of the M-LAG system. Generally, multiple physical links are connected between M-LAG devices, and one of the links is selected as the keepalive link. The remaining links are configured as an aggregation link as the peer-link link.
[0004] When the current control component (controller) deploys the M-LAG system, a random selection method is used to randomly select a physical link as the keepalive link, and the remaining physical links are configured as an aggregation link as the peer-link link. However, the keepalive link is only used for keepalive message interaction and has low bandwidth requirements. The peer-link link performs real-time synchronization of M-LAG system information and has high requirements for timeliness, stability, and bandwidth. Randomly selecting a link results in waste of bandwidth resources and poor stability of the M-LAG system. Summary of the Invention
[0005] This application provides a link configuration method and apparatus to solve the problems of waste of bandwidth resources and poor stability of the M-LAG system existing in the prior art.
[0006] In a first aspect, this application provides a link configuration method applied to a controller. The method includes:
[0007] Obtaining link information of physical links between a first device and a second device that are managed and used for deploying a multi-chassis aggregation system;
[0008] Based on the link information, calculating the link stability of each physical link respectively;
[0009] Based on the stability of each physical link, configuring a target physical link whose link stability is lower than a first stability threshold and whose link rate is lower than a first rate threshold as the keepalive link, performing link aggregation processing on other physical links except the physical link to obtain an aggregation link, and configuring the aggregation link as the data link.
[0010] Optionally, the step of obtaining link information of a physical link between a first device and a second device that are managed and used for deploying a cross-device aggregation system includes:
[0011] Obtain each physical link connected between the first device and the second device, as well as the board information of the first device to which one end of each physical link is connected and the board information of the second device to which the other end of each physical link is connected.
[0012] Optionally, the step of respectively calculating the link stability of each physical link based on the link information includes:
[0013] For each physical link, determine the first number m of physical links on the board of the first device to which one end of the physical link is connected and the second number n of physical links on the board of the second device to which the other end of the physical link is connected;
[0014] Take the product of the first number m and the second number n as the link stability of the physical link, where the greater the link stability of a physical link, the higher the stability of the physical link.
[0015] Optionally, the step of configuring a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stabilities of the physical links includes:
[0016] Sort the link stabilities of the physical links in descending order, and add at least one physical link with a link stability lower than the first stability threshold to a scattered link set;
[0017] Obtain the link rate of at least one physical link in the scattered link set, and configure the target physical link with the lowest link rate in the scattered link set as a keep-alive link.
[0018] Optionally, the method further includes:
[0019] If the rate of the keep-alive link is greater than a second rate threshold, add a physical link with a link stability lower than a second stability threshold to the scattered link set, and configure the target physical link with the lowest link rate as a keep-alive link, where the second rate threshold is greater than the first rate threshold and the second stability threshold is greater than the first stability threshold.
[0020] In a second aspect, the present application provides a link configuration device, which is applied to a controller, and the device includes:
[0021] An acquisition unit, configured to acquire link information of a physical link between a first device and a second device that are managed and used for deploying a cross-device aggregation system;
[0022] A calculation unit, configured to calculate the link stability of each physical link respectively based on the link information;
[0023] A configuration unit, configured to configure a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stability of each physical link, perform link aggregation processing on other physical links except the physical link to obtain an aggregated link, and configure the aggregated link as a data link.
[0024] Optionally, when obtaining link information of physical links between a first device and a second device that are managed and used for deploying a cross-device aggregation system, the obtaining unit is specifically configured to:
[0025] Obtain each physical link connected between the first device and the second device, and board information of a board of the first device to which one end of each physical link is connected, and board information of a board of the second device to which the other end of each physical link is connected.
[0026] Optionally, when calculating the link stability of each physical link respectively based on the link information, the calculation unit is specifically configured to:
[0027] For each physical link, determine a first number m of physical links on a board of the first device to which one end of the physical link is connected, and a second number n of physical links on a board of the second device to which the other end of the physical link is connected;
[0028] Take the product of the first number m and the second number n as the link stability of the physical link, where the greater the link stability of a physical link, the higher the stability of the physical link.
[0029] Optionally, when configuring a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stability of each physical link, the configuration unit is specifically configured to:
[0030] Sort the link stabilities of the physical links in descending order, and add at least one physical link with a link stability lower than the first stability threshold to a scattered link set;
[0031] Obtain the link rate of at least one physical link in the scattered link set, and configure the target physical link with the lowest link rate in the scattered link set as a keep-alive link.
[0032] Optionally, the configuration unit is further configured to:
[0033] If the rate of the keep-alive link is greater than the second rate threshold, add a physical link with a link stability lower than the second stability threshold to the dispersed link set, and configure the target physical link with the lowest link rate as the keep-alive link, where the second rate threshold is greater than the first rate threshold, and the second stability threshold is greater than the first stability threshold.
[0034] In a third aspect, an embodiment of the present application provides a link configuration device, and the link configuration device includes:
[0035] A memory for storing program instructions;
[0036] A processor for calling the program instructions stored in the memory and executing the steps of the method described in any one of the above first aspects according to the obtained program instructions.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the steps of the method described in any one of the above first aspects.
[0038] In summary, the link configuration method provided by the embodiment of the present application obtains the link information of the physical links between the first device and the second device that are managed and used for deploying the cross-device aggregation system; based on the link information, calculates the link stability of each physical link respectively; based on the stability of each physical link, configures the target physical link with a link stability lower than the first stability threshold and a link rate lower than the first rate threshold as the keep-alive link, performs link aggregation processing on other physical links except the physical link to obtain an aggregated link, and configures the aggregated link as a data link.
[0039] When using the link configuration method provided by the embodiment of the present application to select the keep-alive link, the link stability and link rate of each physical link are considered, the physical link with a lower link stability and a lower link rate is configured as the keep-alive link, and other links except this link are aggregated into a data link, which improves the robustness of the data link (i.e., the stability of the M-LAG system), and improves the bandwidth utilization rate of the data link. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings in the embodiments of the present application.
[0041] Figure 1 A detailed flowchart of a link configuration method provided by an embodiment of the present application;
[0042] Figure 2 A schematic diagram of the process of a link configuration method provided by an embodiment of the present application;
[0043] Figure 3 A schematic structural diagram of a link configuration device provided by an embodiment of the present application;
[0044] Figure 4 A schematic hardware architecture diagram of a link configuration device provided by an embodiment of the present application. Specific implementation manners
[0045] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms "a", "said", and "the" used in the present application and the 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" used herein refers to any or all possible combinations of one or more of the associated listed items.
[0046] It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "when" or "while" or "in response to a determination".
[0047] Exemplarily, referring to Figure 1 As shown, it is a detailed flowchart of a link configuration method provided by an embodiment of the present application. This method is applied to a controller and includes the following steps:
[0048] Step 100: Obtain the link information of the physical link between the first device and the second device that are managed and used for deploying a cross-device aggregation system.
[0049] In an actual network deployment, if it is necessary to deploy a cross-device aggregation group (M-LAG) system, the controller needs to manage each device in the network. The controller may exist in the form of a controller cluster. For example, in a three-layer network deployment composed of Spine (core layer), Leaf (aggregation layer), and Access (access layer), the M-LAG system can be deployed in the Leaf layer to perform redundancy backup, load balancing, etc. on user traffic.
[0050] Exemplarily, it is assumed that the first device (the first Leaf) and the second device (the second Leaf) are used to deploy the M-LAG system. Both the first device and the second device include at least one board (network card), and one board includes one or more ports (such as, 1G port, 10G port, 25G port, 100G port, etc.). The administrator can pre-establish multiple physical links between the first device and the second device. One end of a physical link is a port of a board of the first device, and the other end is a port of a board of the second device.
[0051] It should be noted that in practical applications, a better physical link connection method is that the attribute / type of one port of a physical link is the same as that of another port. For example, if the bandwidth of one port of a physical link is 10G, then preferably, the bandwidth of its other port is also 10G.
[0052] In the embodiment of the present application, after the controller manages the first device and the second device, it obtains the link information of each physical link between the first device and the second device.
[0053] Specifically, when obtaining the link information of the physical links between the first device and the second device that are managed and used to deploy the cross-device aggregation system, a better implementation method is:
[0054] Obtain each physical link connected between the first device and the second device, as well as the board information of the board of the first device connected to one end of each physical link and the board information of the board of the second device connected to the other end.
[0055] For example, it is assumed that the first device includes 2 boards (board 11, board 12), and the second device also includes two boards (board 21, board 22). The number of physical links connected between the first device and the second device is 5. Then, the board information connected to one end of physical link 1 is board 11 of the first device, and the board information connected to the other end is board 21 of the second device. The board information connected to one end of physical link 2 is board 11 of the first device, and the board information connected to the other end is board 22 of the second device. The board information connected to one end of physical link 3 is board 12 of the first device, and the board information connected to the other end is board 21 of the second device; the board information connected to one end of physical link 4 and physical link 5 is board 12 of the first device, and the board information connected to the other end is board 22 of the second device.
[0056] Step 110: Based on the link information, calculate the link stability of each physical link respectively.
[0057] It should be noted that the physical link mentioned in the embodiment of the present application specifically refers to the physical link between the devices that make up the M-LAG system.
[0058] In the embodiments of the present application, a link stability is defined. The so-called link stability means that for a physical link L between a first device and a second device, there are m physical links on the board of the first device where one end of the physical link L is located, and n physical links on the board of the second device where the other end is located. Then, the link stability of the physical link L is m * n.
[0059] As can be seen from the above, in the embodiments of the present application, when calculating the link stability of each physical link based on the link information, a preferred implementation manner is:
[0060] For each physical link, determine the first number m of physical links on the board of the first device connected to one end of the physical link, and the second number n of physical links on the board of the second device connected to the other end;
[0061] Take the product of the first number m and the second number n as the link stability of the physical link. Among them, the greater the link stability of a physical link, the higher the stability of the physical link.
[0062] Taking an example where the first device includes 2 boards (board 11, board 12), the second device also includes two boards (board 21, board 22), and the number of physical links connected between the first device and the second device is 5. For physical link 1, board 11 of the first device includes 2 physical links (physical links 1 and 2), and board 21 of the second device corresponding to physical link 1 includes 2 physical links (links 1 and 3). Then, the link stability of physical link 1 is: 2 * 2 = 4; Similarly, the link stability of physical link 2 can be calculated as: 2 * 3 = 6, the link stability of physical link 3 is: 3 * 2 = 6, and the link stability of physical links 4 and 5 is: 3 * 3 = 9.
[0063] Step 120: Based on the stability of each physical link, configure the target physical link with a link stability lower than the first stability threshold and a link rate lower than the first rate threshold as a keep-alive link, perform link aggregation processing on other physical links except the physical link to obtain an aggregated link, and configure the aggregated link as a data link.
[0064] In the embodiments of the present application, when configuring the target physical link with a link stability lower than the first stability threshold and a link rate lower than the first rate threshold as a keep-alive link based on the stability of each physical link, a preferred implementation manner is:
[0065] Sort the link stability of each physical link in descending order, and add at least one physical link with a link stability lower than the first stability threshold to the scattered link set; obtain the link rate of at least one physical link in the scattered link set, and configure the target physical link with the lowest link rate in the scattered link set as the keep-alive link.
[0066] It should be noted that in the embodiments of the present application, the link rate of a physical link can be the measured physical link rate, or the port bandwidth size of the two board card ports included in the physical link (using the port bandwidth of the port with the smaller port bandwidth among the two board card ports as the link rate).
[0067] Specifically, in the implementation process, at least one physical link with the lowest link stability can be used as an alternative link for the keep-alive link. For example, if there is only one physical link with the lowest link stability, this physical link can be directly configured as the keep-alive link. If there are multiple physical links with the lowest link stability, the link rates of these multiple physical links can be further judged, and the physical link with the lowest rate among these multiple physical links can be configured as the keep-alive link.
[0068] Furthermore, if the rate of the keep-alive link is greater than the second rate threshold, add the physical links with a link stability lower than the second stability threshold to the scattered link set, and configure the target physical link with the lowest link rate as the keep-alive link, where the second rate threshold is greater than the first rate threshold, and the second stability threshold is greater than the first stability threshold.
[0069] For example, assume that the bandwidth of the physical link with the lowest selected stability is 100G (the other links are all 1G, 10G, 25G). Then, this physical link is not suitable to be configured as the keep-alive link. If this link is configured as the keep-alive link, it will cause a large waste of the bandwidth between the first device and the second device. At this time, a physical link with a stability that is not the lowest but a bandwidth that meets the preset requirements can be found from other 1G or 10G physical links as the keep-alive link.
[0070] That is to say, if the link stability of each physical link included in the scattered link set is lower than the first stability threshold, and the link rates of each physical link are all relatively large (all greater than the second rate threshold), in order to improve the bandwidth utilization rate between the first device and the second device, a physical link with a link rate that meets the preset requirements can also be selected from the physical links with a link stability higher than the first stability threshold but lower than the second stability threshold and configured as the keep-alive link (for example, the link rate is less than the first rate threshold, or the link rate is less than the third rate threshold, and the third rate threshold is greater than the first rate threshold and less than the second rate threshold).
[0071] The following describes in detail the link configuration process provided by the embodiments of the present application in combination with specific application scenarios. Exemplarily, refer to Figure 2 As shown, it is a schematic process diagram of a link configuration method provided by the embodiments of the present application. Obtain the link information of the devices of the M-LAG system to be deployed; determine whether the number of links between devices is less than 2. If it is less than 2, end. Otherwise, calculate the link stability of each link according to the connection information collected by the controller; sort the link stabilities (for example, from large to small, from small to large); respectively determine whether the link stability of each link is the lowest. If so, add this link to the set of the lowest link stability, otherwise, add it to the logical link set; sort the links included in the set of the lowest link stability by link rate, assign the link with the smallest link rate in the set of the lowest link stability as the keep-alive link (KeepAlivePorts), and add the links with non-smallest link rates in the set of the lowest link stability to the logical link set; aggregate the links in the logical link set into a logical interface link, and assign this logical interface link as the data link (IppPorts).
[0072] Exemplarily, refer to Figure 3 As shown, it is a schematic structural diagram of a link configuration device provided by the embodiments of the present application. This device is applied to a controller. The device includes:
[0073] An obtaining unit 30, configured to obtain the link information of the physical link between a first device and a second device that are managed and used to deploy a cross-device aggregation system;
[0074] A calculating unit 31, configured to calculate the link stability of each physical link respectively based on the link information;
[0075] A configuration unit 32, configured to configure a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stabilities of the physical links, perform link aggregation processing on other physical links except the physical link to obtain an aggregated link, and configure the aggregated link as a data link.
[0076] Optionally, when obtaining the link information of the physical link between a first device and a second device that are managed and used to deploy a cross-device aggregation system, the obtaining unit 30 is specifically configured to:
[0077] Obtain each physical link connected between the first device and the second device, and the board information of the first device connected to one end of each physical link and the board information of the second device connected to the other end.
[0078] Optionally, when calculating the link stability of each physical link based on the link information, the calculation unit 31 is specifically configured to:
[0079] For each physical link, determine the first number m of physical links on the board of the first device connected to one end of the physical link, and the second number n of physical links on the board of the second device connected to the other end;
[0080] Use the product of the first number m and the second number n as the link stability of the physical link, where the greater the link stability of a physical link, the higher the stability of the physical link.
[0081] Optionally, when configuring a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stabilities of the physical links, the configuration unit 32 is specifically configured to:
[0082] Sort the link stabilities of the physical links in descending order, and add at least one physical link with a link stability lower than the first stability threshold to the scattered link set;
[0083] Obtain the link rate of at least one physical link in the scattered link set, and configure the target physical link with the lowest link rate in the scattered link set as the keep-alive link.
[0084] Optionally, the configuration unit 32 is further configured to:
[0085] If the rate of the keep-alive link is greater than a second rate threshold, add a physical link with a link stability lower than a second stability threshold to the scattered link set, and configure the target physical link with the lowest link rate as the keep-alive link, where the second rate threshold is greater than the first rate threshold, and the second stability threshold is greater than the first stability threshold.
[0086] The above units may be one or more integrated circuits configured to implement the above methods. For example: one or more Application Specific Integrated Circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. For yet another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0087] Further, for the link configuration device provided in the embodiments of the present application, from a hardware perspective, the schematic diagram of the hardware architecture of the link configuration device can be seen in Figure 4 as shown, the link configuration device may include: a memory 40 and a processor 41,
[0088] The memory 40 is used to store program instructions; the processor 41 calls the program instructions stored in the memory 40 and executes the above method embodiments according to the obtained program instructions. The specific implementation manners and technical effects are similar and will not be elaborated here.
[0089] Optionally, the present application further provides a link configuration device (such as a controller), including at least one processing element (or chip) for executing the above method embodiments.
[0090] Optionally, the present application further provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions for causing the computer to execute the above method embodiments.
[0091] Here, the machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
[0092] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any several of these devices.
[0093] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0094] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or a plurality of flows and / or blocks
[0096] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more of the flows Figure 1 or a plurality of flows and / or blocks
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps for the functions specified in one block or a plurality of blocks.
[0098] The foregoing are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.
Claims
1. A link configuration method, characterized in that, applied to a controller, the method includes: Obtaining each physical link connected between a first device and a second device, as well as the board information of the first device to which one end of each physical link is connected, and the board information of the second device to which the other end of each physical link is connected; For each physical link, determining the first number m of physical links on the board of the first device to which one end of the physical link is connected, and the second number n of physical links on the board of the second device to which the other end of the physical link is connected; taking the product of the first number m and the second number n as the link stability of the physical link, wherein, the greater the link stability of a physical link, the higher the stability of the physical link; Based on the stabilities of the physical links, configuring a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link, performing link aggregation processing on other physical links except the target physical link to obtain an aggregated link, and configuring the aggregated link as a data link.
2. The method according to claim 1, characterized in that, The step of configuring a target physical link with a link stability lower than a first stability threshold and a link rate lower than a first rate threshold as a keep-alive link based on the stabilities of the physical links includes: Sorting the link stabilities of the physical links in descending order, and adding at least one physical link with a link stability lower than the first stability threshold to a scattered link set; Obtaining the link rate of at least one physical link in the scattered link set, and configuring the target physical link with the lowest link rate in the scattered link set as a keep-alive link.
3. The method according to claim 2, characterized in that, The method further includes: If the rate of the keep-alive link is greater than a second rate threshold, adding a physical link with a link stability lower than a second stability threshold to the scattered link set, and configuring the target physical link with the lowest link rate as a keep-alive link, wherein, the second rate threshold is greater than the first rate threshold, and the second stability threshold is greater than the first stability threshold.
4. A link configuration device, characterized in that, applied to a controller, the device includes: An obtaining unit, configured to obtain each physical link connected between a first device and a second device, as well as the board information of the first device to which one end of each physical link is connected, and the board information of the second device to which the other end of each physical link is connected; A calculation unit, configured to, for each physical link, determine the first number m of physical links on the board of the first device to which one end of the physical link is connected, and the second number n of physical links on the board of the second device to which the other end of the physical link is connected; taking the product of the first number m and the second number n as the link stability of the physical link, wherein, the greater the link stability of a physical link, the higher the stability of the physical link; A configuration unit, configured to configure, based on the stability of each physical link, a target physical link whose link stability is lower than a first stability threshold and whose link rate is lower than a first rate threshold as a keep-alive link, perform link aggregation processing on other physical links except the target physical link to obtain an aggregated link, and configure the aggregated link as a data link.
5. The apparatus according to claim 4, wherein, when configuring, based on the stability of each physical link, a target physical link whose link stability is lower than a first stability threshold and whose link rate is lower than a first rate threshold as a keep-alive link, the configuration unit is specifically configured to: sort the link stabilities of the physical links from largest to smallest, and add at least one physical link whose link stability is lower than the first stability threshold to a dispersed link set; obtain the link rate of at least one physical link in the dispersed link set, and configure the target physical link with the lowest link rate in the dispersed link set as the keep-alive link.
6. The apparatus according to claim 5, wherein, the configuration unit is further configured to: if the rate of the keep-alive link is greater than a second rate threshold, add a physical link whose link stability is lower than a second stability threshold to the dispersed link set, and configure the target physical link with the lowest link rate as the keep-alive link, where the second rate threshold is greater than the first rate threshold, and the second stability threshold is greater than the first stability threshold.
7. A link configuration apparatus, wherein, the link configuration apparatus includes: a memory, configured to store program instructions; a processor, configured to call the program instructions stored in the memory and execute the steps of the method according to any one of claims 1-3 according to the obtained program instructions.
8. A computer-readable storage medium, wherein, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Fault processing method, switching equipment and storage medium
CN115484218A
Systems and methods for network and I / O device drivers
US6470397B1