CN111654449B - Physical link flow balancing method and device - Google Patents
Physical link flow balancing method and device Download PDFInfo
- Publication number
- CN111654449B CN111654449B CN202010476468.3A CN202010476468A CN111654449B CN 111654449 B CN111654449 B CN 111654449B CN 202010476468 A CN202010476468 A CN 202010476468A CN 111654449 B CN111654449 B CN 111654449B
- Authority
- CN
- China
- Prior art keywords
- forwarding
- physical link
- forwarding chip
- distributed frame
- frame device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 12
- 230000002776 aggregation Effects 0.000 description 9
- 238000004220 aggregation Methods 0.000 description 9
- 230000007246 mechanism Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000004590 computer program Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000003860 storage Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- COCAUCFPFHUGAA-MGNBDDOMSA-N n-[3-[(1s,7s)-5-amino-4-thia-6-azabicyclo[5.1.0]oct-5-en-7-yl]-4-fluorophenyl]-5-chloropyridine-2-carboxamide Chemical compound C=1C=C(F)C([C@@]23N=C(SCC[C@@H]2C3)N)=CC=1NC(=O)C1=CC=C(Cl)C=N1 COCAUCFPFHUGAA-MGNBDDOMSA-N 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/123—Evaluation of link metrics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
- H04L45/245—Link aggregation, e.g. trunking
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention relates to the field of load balancing technologies, and in particular, to a method and an apparatus for balancing physical link traffic. The method is applied to a distributed frame device, the distributed frame device comprises a first forwarding chip serving as an in-forwarding chip of a target unicast traffic and a plurality of second forwarding chips serving as an out-forwarding chip of the target unicast traffic, and a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logic link for forwarding the target unicast traffic, and the method comprises the following steps: each second forwarding chip of the distributed frame device obtains load parameters of physical links which are aggregated to form the logic link; each second forwarding chip of the distributed frame equipment sends the obtained load parameters of the physical links to the first forwarding chip of the distributed frame equipment; the first forwarding chip of the distributed frame device balances the flow of the target unicast flow in each physical link based on the load parameters of each physical link sent by each second forwarding chip.
Description
Technical Field
The present invention relates to the field of load balancing technologies, and in particular, to a method and an apparatus for balancing physical link traffic.
Background
Link aggregation is a common technology in network communication, and multiple physical links are bound together to form a logical link through the link aggregation technology, so that the purpose of increasing the link bandwidth is achieved, and meanwhile, the multiple physical links bound together can effectively improve the reliability of the link through mutual dynamic backup. However, when the link aggregation technology is applied, a way needs to be provided to make the traffic be dispersed on different physical links as uniformly as possible, that is, the traffic is shared as uniformly as possible between the physical links in the link aggregation, so that the maximum bandwidth performance can be ensured.
The distributed frame type equipment is a hardware architecture form which is frequently used by the current high-end network equipment, and consists of a plurality of board cards, wherein each board card is provided with a set of independent cpu, memory, an operating system, a network forwarding chip and the like, and an integral service is provided for the outside through a certain communication and protocol architecture.
Whereas the link aggregation of distributed frame devices requires that physical links on different boards can be link aggregated together, i.e. that physical links on different network forwarding chips can form one logical link.
Currently, common flow equalization schemes include: HASH mechanisms and dynamic load balancing (Dynamic load balancing, DLB) mechanisms.
The principle of the HASH mechanism is: selecting a specific characteristic value of the flow, calculating a HASH value by using a specified algorithm, and selecting a physical link of the current flow by using the HASH value, wherein when the characteristic value of the flow in the network is not discrete enough and has certain polarity preference, the calculated HASH value is caused to have certain polarity preference, and finally the condition of non-uniformity of the selected physical link is caused.
The principle of the DLB mechanism is as follows: and sensing the load condition of each port of the current forwarding chip at the traffic inlet forwarding chip, and forwarding the traffic to one physical link with the lightest current load. However, in a distributed frame device architecture, the different physical links of the link aggregation are distributed among different line cards. Because each line card has independent forwarding chips, the forwarding chips where the ingress forwarding chip and the egress physical link are located are not the same, and the link load condition cannot be perceived. That is, DLB mechanisms cannot be applied in distributed frame devices.
Disclosure of Invention
The embodiment of the application provides a method and a device for balancing the flow of a physical link, which are used for solving the problem that distributed frame equipment in the prior art cannot effectively balance the flow of each physical link in a logic link.
The specific technical scheme provided by the embodiment of the application is as follows:
in a first aspect, the present application provides a physical link traffic balancing method, applied to a distributed frame device, where the distributed frame device includes a first forwarding chip serving as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips serving as egress forwarding chips of the target unicast traffic, where a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logical link for forwarding the target unicast traffic, and the method includes:
each second forwarding chip of the distributed frame device obtains load parameters of physical links which are aggregated to form the logic link;
each second forwarding chip of the distributed frame equipment sends the obtained load parameters of the physical link to a first forwarding chip of the distributed frame equipment;
and the first forwarding chip of the distributed frame device balances the flow of the target unicast flow in each physical link based on the load parameters of each physical link sent by each second forwarding chip.
Optionally, the step of obtaining, by each second forwarding chip of the distributed frame device, a load parameter of a physical link that is aggregated to form the logical link includes:
and each second forwarding chip of the distributed frame device acquires port bandwidth information and current used bandwidth information of an output port of a logic port corresponding to the logic link based on a preset period, and takes the port bandwidth information and the current used bandwidth information of the output port as load parameters of the output port.
Optionally, the step of acquiring, by each second forwarding chip of the distributed frame device, a load parameter of a physical link that is aggregated to form the logical link further includes:
and each second forwarding chip of the distributed frame device calculates the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current bandwidth information of the output port, and takes the bandwidth utilization rate of the output port as the load parameter of the output port.
Optionally, the step of balancing the traffic size of the target unicast traffic in each physical link by the first forwarding chip of the distributed frame device based on the load parameters of each physical link sent by each second forwarding chip includes:
the first forwarding chip of the distributed frame type equipment respectively determines the bandwidth utilization rate of each physical link based on the load parameters of the output ports sent by each second forwarding chip;
and the first forwarding chip of the distributed frame equipment adjusts the flow size of the target unicast flow in each physical link based on the determined bandwidth utilization rate of each physical link.
Optionally, the step of adjusting the traffic size of the target unicast traffic on each physical link by the first forwarding chip of the distributed frame device based on the determined bandwidth usage of each physical link includes:
the first forwarding chip of the distributed frame device adjusts the number of forwarding entries corresponding to each physical link of a local forwarding table and used for forwarding the target unicast traffic based on the determined bandwidth utilization rate of each physical link, wherein the higher the bandwidth utilization rate of the physical link is, the smaller the number of the corresponding adjusted forwarding entries is, the lower the bandwidth utilization rate of the physical link is, and the larger the number of the corresponding adjusted forwarding entries is; or,
and the first forwarding chip of the distributed frame equipment uses at least one physical link with the bandwidth utilization rate smaller than or equal to a set threshold value as a physical link for forwarding the target unicast traffic currently based on the determined bandwidth utilization rate of each physical link.
In a second aspect, the present application provides a distributed frame device comprising a first forwarding chip as an ingress forwarding chip for target unicast traffic and a number of second forwarding chips as egress forwarding chips for the target unicast traffic, a plurality of physical links of the number of second forwarding chips being aggregated into a logical link for forwarding the target unicast traffic, wherein,
each second forwarding chip of the distributed frame device is used for acquiring load parameters of physical links which are aggregated to form the logical link;
each second forwarding chip of the distributed frame device is further configured to send the obtained load parameter of the physical link to the first forwarding chip of the distributed frame device;
the first forwarding chip of the distributed frame device is configured to balance the traffic of the target unicast traffic on each physical link based on the load parameters of each physical link sent by each second forwarding chip.
Optionally, when acquiring the load parameters of the physical links that form the logical link, each second forwarding chip of the distributed frame device is specifically configured to:
and each second forwarding chip of the distributed frame device acquires port bandwidth information and current used bandwidth information of an output port of a logic port corresponding to the logic link based on a preset period, and takes the port bandwidth information and the current used bandwidth information of the output port as load parameters of the output port.
Optionally, when acquiring the load parameters of the physical links that compose the logical link, each second forwarding chip of the distributed frame device is further configured to:
and each second forwarding chip of the distributed frame device calculates the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current bandwidth information of the output port, and takes the bandwidth utilization rate of the output port as the load parameter of the output port.
Optionally, when balancing the traffic size of the target unicast traffic on each physical link based on the load parameter of each physical link sent by each second forwarding chip, the first forwarding chip of the distributed frame device is specifically configured to:
the first forwarding chip of the distributed frame type equipment respectively determines the bandwidth utilization rate of each physical link based on the load parameters of the output ports sent by each second forwarding chip;
and the first forwarding chip of the distributed frame equipment adjusts the flow size of the target unicast flow in each physical link based on the determined bandwidth utilization rate of each physical link.
Optionally, the first forwarding chip of the distributed frame device adjusts the traffic size of the target unicast traffic in each physical link based on the determined bandwidth usage of each physical link, where the first forwarding chip of the distributed frame device is specifically configured to:
the first forwarding chip of the distributed frame device adjusts the number of forwarding entries corresponding to each physical link of a local forwarding table and used for forwarding the target unicast traffic based on the determined bandwidth utilization rate of each physical link, wherein the higher the bandwidth utilization rate of the physical link is, the smaller the number of the corresponding adjusted forwarding entries is, the lower the bandwidth utilization rate of the physical link is, and the larger the number of the corresponding adjusted forwarding entries is; or,
and the first forwarding chip of the distributed frame equipment uses at least one physical link with the bandwidth utilization rate smaller than or equal to a set threshold value as a physical link for forwarding the target unicast traffic currently based on the determined bandwidth utilization rate of each physical link.
The beneficial effects of the application are as follows:
in summary, the physical link traffic balancing method provided in the present application is applied to a distributed frame device, where the distributed frame device includes a first forwarding chip serving as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips serving as egress forwarding chips of the target unicast traffic, and a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logical link for forwarding the target unicast traffic, and the method includes: each second forwarding chip of the distributed frame device obtains load parameters of physical links which are aggregated to form the logic link; each second forwarding chip of the distributed frame equipment sends the obtained load parameters of the physical link to a first forwarding chip of the distributed frame equipment; and the first forwarding chip of the distributed frame device balances the flow of the target unicast flow in each physical link based on the load parameters of each physical link sent by each second forwarding chip.
By adopting the physical link flow balancing method provided by the application, through the interaction mode among the forwarding chips of the distributed frame type equipment, each forwarding chip announces the load parameter of the physical link for forwarding the target unicast flow to the forwarding chip for forwarding the target unicast flow, so that the forwarding chip can obtain the current load information of each physical link, further dynamic adjustment is realized, the size of the target unicast flow among the physical links is balanced, and further, the flow sharing mechanism of the physical links in the aggregation link on the distributed frame type equipment is realized.
Drawings
Fig. 1 is a schematic structural diagram of a distributed frame device according to an embodiment of the present application;
fig. 2 is a flow chart of a physical link flow balancing method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a message format according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another distributed frame device according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
First, the term "and" in the embodiment of the present application is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and B may be represented: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
When the present application refers to ordinal numbers such as "first," "second," "third," or "fourth," it should be understood to be used for distinction only, unless the order is actually expressed depending on the context.
The following will describe the aspects of the present application in detail by way of specific examples, but of course the present application is not limited to the following examples.
For example, referring to fig. 1, a schematic structural diagram of a distributed frame device provided by the present application is shown, where the distributed frame device includes a forwarding core 1, a forwarding chip 2 and a forwarding chip 3, for unicast traffic with a message type being a message a, the forwarding chip 1 is used as an ingress forwarding chip of the message a, the forwarding chip 2 and the forwarding chip 3 are used as egress forwarding chips of the message a, a port 2 of the forwarding chip 1 is connected with a port 4 of the forwarding chip 3, so as to implement communication between the forwarding chip 1 and the forwarding chip 2, a port 3 of the forwarding chip 1 is connected with a port 5 of the forwarding chip, so as to implement communication between the forwarding chip 1 and the forwarding chip 3. The port 6 of the forwarding chip 2 and the port 7 of the forwarding chip 3 are aggregated to form an aggregated port for forwarding the message a (i.e. the physical link 1 corresponding to the port 6 of the forwarding chip 2 and the physical link 2 corresponding to the port 7 of the forwarding chip 3 are aggregated to form an aggregated link for forwarding the message a).
Then, as can be seen from the above, the message a may enter the distributed frame device from the port 1 of the forwarding chip 1, and be forwarded by using an aggregate link formed by aggregating the physical link 1 corresponding to the port 6 of the forwarding chip 2 and the physical link 2 corresponding to the port 7 of the forwarding chip 3, as shown in fig. 1, when the forwarding chip 1 receives one message a, it is determined that the one message a leaves the distributed frame device from the port 6 of the forwarding chip 2 (i.e., the physical link 1 corresponding to the port 6 of the forwarding chip 2) through a preset rule, and of course, may also leave the distributed frame device from the port 7 of the forwarding chip 3 (i.e., the physical link 2 corresponding to the port 7 of the forwarding chip 3) in other periods.
Of course, in this embodiment of the present application, for the forwarding chip 1, the forwarding chip 2, and the forwarding chip 3 included in the distributed frame device, for the packet a, the forwarding chip 1 is used as an ingress forwarding chip, the forwarding chip 2 and the forwarding chip 3 are used as egress forwarding chips, and for the packet B, the forwarding chip 2 may be used as an ingress forwarding chip, the forwarding chip 1 and the forwarding chip 3 may be used as egress forwarding chips, and one egress port of the forwarding chip 1 and one egress port of the forwarding chip 3 may be aggregated to form an aggregation port for forwarding the packet B. Obviously, the distributed frame device may further include other forwarding chips, and different forwarding policies may be configured for different unicast traffic, that is, different forwarding chips are used as ingress forwarding chips, and ports of other forwarding chips except for ingress forwarding chips are aggregated to form an aggregated port (aggregated link) for forwarding corresponding unicast traffic.
As an example, referring to fig. 2, a flow chart of a physical link flow balancing method provided in the present application is shown, where the physical link flow balancing method is applied to a distributed frame device, where the distributed frame device includes a first forwarding chip serving as an ingress forwarding chip of a target unicast flow and a plurality of second forwarding chips serving as egress forwarding chips of the target unicast flow, where a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logical link for forwarding the target unicast flow, and a detailed flow of the physical link flow balancing method is as follows:
step 200: and each second forwarding chip of the distributed frame device acquires the load parameters of the physical links which are aggregated to form the logical link.
In this embodiment of the present application, when each second forwarding chip of the distributed frame device obtains a load parameter of a physical link that is aggregated to form a logical link, a preferred implementation manner is that each second forwarding chip of the distributed frame device obtains port bandwidth information and currently used bandwidth information of an output port that is locally aggregated to form a logical port corresponding to the logical link based on a preset period, and takes the port bandwidth information and the currently used bandwidth information of the output port as the load parameter of the output port.
That is, in this embodiment of the present application, when each second forwarding chip of the distributed frame device obtains the load parameters of the physical links that are aggregated to form the logical link, a preferred implementation manner is that each second forwarding chip of the distributed frame device determines a target output port that is locally used for forwarding the target unicast traffic, obtains port bandwidth information and current bandwidth information of the target output port based on a preset period, that is, obtains bandwidth information and current bandwidth information of the physical link corresponding to the target output port based on the preset period, and uses the obtained bandwidth information and the current bandwidth information as the load parameters of the target output port. The port bandwidth information is information of the maximum bandwidth that can be used and configured for the port, and the currently used bandwidth information is information of the bandwidth that the port currently uses.
In this embodiment of the present application, the preset period may be set in a user-defined manner according to a user requirement and/or an actual application scenario, for example, set to 3 seconds, 5 seconds, 15 seconds, etc., which is not specifically limited herein. If the preset period is 5 seconds, each second forwarding chip takes the load parameter of the port every 5 seconds and sends the load parameter to the first forwarding chip. The first forwarding chip adjusts the load sharing condition of the target unicast traffic between the physical links every 5 seconds.
In this embodiment of the present application, when the second forwarding chips of the distributed frame device acquire the load parameters of the physical links that are aggregated to form the logical link, another preferred implementation manner is that each second forwarding chip of the distributed frame device may traverse each local port to acquire port bandwidth information and currently used bandwidth information of all ports, communicate with other forwarding chips in the distributed frame device, and encapsulate the acquired port bandwidth information and currently used bandwidth information of all ports in a packet in a specific format to notify other forwarding chips.
Obviously, the packet in the specific format carries the load parameter of the target output port corresponding to the physical link for forwarding the target unicast traffic. After receiving the message in the specific format, the first forwarding chip can extract the load parameters of the required target output port from the message.
Exemplary, referring to fig. 3, a schematic diagram of a message format provided in an embodiment of the present application is shown, where the message format includes a message header, a chip number, a number of local ports and port numbers of each port, a port bandwidth, and port load information. The chip number refers to the number of the forwarding chip in the distributed frame device, and can be used for uniquely identifying the forwarding chip, the number of the local ports refers to the number (e.g., n) of ports owned by the forwarding chip, the port number of one port is used for identifying the number of the port in the distributed frame device, and can be used for uniquely identifying the port, the port bandwidth of one port refers to the maximum bandwidth information that can be used by the port, and the load of one port refers to the bandwidth information that is currently used by the port.
Further, in the embodiment of the present application, the step of acquiring, by each second forwarding chip of the distributed frame device, a load parameter of a physical link that is aggregated to form the logical link may further include: and each second forwarding chip of the distributed frame device calculates the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current bandwidth information of the output port, and takes the bandwidth utilization rate of the output port as the load parameter of the output port.
That is, after obtaining the bandwidth information and the current bandwidth information of the output port, each second forwarding chip of the distributed frame device may directly send the bandwidth information and the current bandwidth information of each port to the first forwarding chip as load parameters of the corresponding port, so that the first forwarding chip calculates the bandwidth usage rate of the port based on the bandwidth information and the current bandwidth information of each port; or the second forwarding chip calculates the bandwidth utilization rate of each port according to the bandwidth information of each port and the current bandwidth information, and takes the bandwidth utilization rate of each port as the load parameter of the port.
Of course, in an embodiment in which the second forwarding chips send only the load parameters of the target ports for forwarding the target unicast traffic to the first forwarding chip, one preferred implementation is that each second forwarding chip carries the load parameters of the target ports in a packet in a specific format, and sends the packet to the first forwarding chip through the inter-chip content communication link.
Step 210: and each second forwarding chip of the distributed frame device sends the obtained load parameters of the physical link to the first forwarding chip of the distributed frame device.
In the embodiment of the application, if the load parameter of one physical link is the bandwidth information of the corresponding port and the bandwidth information which is used currently, the bandwidth information of the port and the bandwidth information which is used currently are sent to the first forwarding chip through the internal communication link between the forwarding chips; if the load parameter of one physical link is the bandwidth usage rate (currently used bandwidth information/bandwidth information) of the corresponding port, the bandwidth usage rate of the port is sent to the first forwarding chip through the internal communication link of the forwarding chip.
Step 220: the first forwarding chip of the distributed frame device balances the flow of the target unicast flow on each physical link based on the load parameters of each physical link sent by each second forwarding chip.
In this embodiment of the present application, when the first forwarding chip of the distributed frame device balances the traffic of the target unicast traffic on each physical link based on the load parameter of each physical link sent by each second forwarding chip, a preferred implementation manner is that the first forwarding chip of the distributed frame device determines the bandwidth usage rate of each physical link based on the load parameter of the output port sent by each second forwarding chip; the first forwarding chip of the distributed frame device adjusts the traffic size of the target unicast traffic on each physical link based on the determined bandwidth usage rate of each physical link.
That is, when the load parameter of each physical link sent by the second forwarding device is the bandwidth information of the output port corresponding to each physical link and the current bandwidth information that has been used, the first forwarding chip needs to determine the bandwidth usage rate of each port according to the received bandwidth information of each output port and the current bandwidth information that has been used. That is, the bandwidth utilization of one port is obtained by dividing the currently used bandwidth information of the one port by the bandwidth information.
Further, in this embodiment of the present application, when the first forwarding chip of the distributed frame device adjusts the traffic size of the target unicast traffic on each physical link based on the determined bandwidth usage rate of each physical link, a preferred implementation manner is that the first forwarding chip of the distributed frame device adjusts, based on the determined bandwidth usage rate of each physical link, the number of forwarding entries corresponding to each physical link of the local forwarding table and used for forwarding the target unicast traffic, where the higher the bandwidth usage rate of a physical link, the smaller the number of forwarding entries corresponding to the physical link, and the lower the bandwidth usage rate of the physical link, the larger the number of forwarding entries corresponding to the first forwarding table and used for forwarding the target unicast traffic.
For example, assuming that the logical links for forwarding the target unicast traffic include physical link 1 (corresponding Port is Port-a), physical link 2 (corresponding Port is Port-B) and physical link 3 (corresponding Port is Port-C), if the first forwarding chip determines that the load condition of physical link 1 (e.g., bandwidth usage) is 10%, the load condition of physical link 2 is 20%, and the load condition of physical link 3 is 30%, that is, the load ratio of physical link 1, physical link 2 and physical link 3 is 1:2:3, the first forwarding chip may determine and adjust the number of forwarding entries for forwarding the target unicast traffic corresponding to each physical link of the local forwarding table according to the load ratio thereof, specifically, since the load ratio of physical link 1, physical link 2 and physical link 3 is 1:2:3, determining that the least common multiple of 1,2 and 3 is 6, and then configuring the number of forwarding entries corresponding to physical link 1, physical link 2 and physical link 3 in the local forwarding table for forwarding the target unicast traffic as 6:3:2, for example, a local forwarding table of the first forwarding chip is configured with forwarding table entries 1 corresponding to 6 ports-a, forwarding table entry 2 corresponding to 3 ports-B, and forwarding table entry 3 corresponding to 2 ports-C.
From the above, for the target unicast traffic, 11 forwarding table entries for forwarding the target unicast traffic are maintained in the local forwarding table of the first forwarding chip, so when the physical link of the target unicast traffic is determined by combining with the HASH mechanism (or randomly selecting 1 forwarding table entry for matching forwarding), the characteristic value obtained after HASH is assumed to be between 0 and 255, at this time, the remainder value needs to be calculated based on 11 (the total number of forwarding table entries currently used for forwarding the target unicast traffic), the remainder value is distributed between 0 and 10, the numbers of the forwarding table entries are different (e.g., forwarding table entry 0-forwarding table entry 10), that is, the probability of selecting the physical link 1 to forward the target unicast traffic is 6/11, the probability of selecting the physical link 2 to forward the target unicast traffic is 3/11, and the probability of selecting the physical link 3 to forward the target unicast traffic is 2/11, thereby achieving the purpose of balancing and forwarding the target unicast traffic among the physical links.
Still further, in the embodiment of the present application, the first forwarding chip of the distributed frame device adjusts the target unicast traffic when the traffic of each physical link is equal to or smaller than the determined bandwidth usage of each physical link, and preferably, the first forwarding chip of the distributed frame device uses at least one physical link whose bandwidth usage is equal to or smaller than a set threshold as the physical link currently forwarding the target unicast traffic based on the determined bandwidth usage of each physical link.
For example, assuming that the logical links for forwarding the target unicast traffic include physical link 1 (corresponding Port is Port-a), physical link 2 (corresponding Port is Port-B), and physical link 3 (corresponding Port is Port-C), if the first forwarding chip determines that the load condition (e.g., bandwidth usage rate) of physical link 1 is 70%, the load condition of physical link 2 is 40%, the load condition of physical link 3 is 30%, and the preset threshold is 50%, the first forwarding chip may use physical link 2 and physical link 3 with bandwidth usage rates less than or equal to 50% as the physical links for the current forwarding target unicast traffic.
Preferably, the first forwarding chip of the distributed frame device may further use at least one physical link with the lowest bandwidth usage as the physical link of the unicast traffic of the current forwarding target based on the determined bandwidth usage of each physical link.
For example, assuming that the logical links for forwarding the target unicast traffic include physical link 1, physical links 2, … …, and physical link 5, and after each adjustment, 2 physical links with the lowest current usage rate are selected as the physical links for forwarding the target unicast traffic currently, if the first forwarding chip determines that the order of bandwidth usage rates of the physical links from high to low is: physical link 3, physical link 1, physical link 5, physical link 3 and physical link 2, then physical link 3 and physical link 2 are used as the physical links for unicast traffic of the current forwarding target.
Based on the above embodiment, referring to fig. 4, a schematic structural diagram of another distributed frame device provided in the present application is shown, where the distributed frame device includes a first forwarding chip 40 serving as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips 41 serving as egress forwarding chips of the target unicast traffic, where a plurality of physical links of the plurality of second forwarding chips 41 are aggregated to form a logical link for forwarding the target unicast traffic,
each second forwarding chip 41 of the distributed frame device is configured to obtain a load parameter of a physical link that is aggregated to form the logical link;
each second forwarding core 41 of the distributed frame device is further configured to send the obtained load parameter of the physical link to the first forwarding core of the distributed frame device;
the first forwarding chip 40 of the distributed frame device is configured to balance the traffic size of the target unicast traffic on each physical link based on the load parameter of each physical link sent by each second forwarding chip.
Optionally, when acquiring the load parameters of the physical links that aggregate to form the logical link, each second forwarding chip 41 of the distributed frame device is specifically configured to:
and acquiring the port bandwidth information and the current bandwidth information of the output port which are locally aggregated to form the logical port corresponding to the logical link based on a preset period, and taking the port bandwidth information and the current bandwidth information of the output port as the load parameters of the output port.
Optionally, when acquiring the load parameters of the physical links that aggregate to form the logical link, each second forwarding chip 41 of the distributed frame device is further configured to:
and calculating the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current used bandwidth information of the output port, and taking the bandwidth utilization rate of the output port as a load parameter of the output port.
Optionally, when balancing the traffic size of the target unicast traffic on each physical link based on the load parameter of each physical link sent by each second forwarding chip, the first forwarding chip 40 of the distributed frame device is specifically configured to:
based on the load parameters of the output ports sent by the second forwarding chips, the bandwidth utilization rate of each physical link is respectively determined;
and adjusting the flow size of the target unicast flow in each physical link based on the determined bandwidth utilization rate of each physical link.
Optionally, the first forwarding chip of the distributed frame device adjusts the traffic size of the target unicast traffic in each physical link based on the determined bandwidth usage of each physical link, where the first forwarding chip 40 of the distributed frame device is specifically configured to:
based on the determined bandwidth utilization rate of each physical link, the number of forwarding entries corresponding to each physical link of a local forwarding table and used for forwarding the target unicast traffic is adjusted, wherein the higher the bandwidth utilization rate of the physical link is, the smaller the number of the corresponding adjusted forwarding entries is, the lower the bandwidth utilization rate of the physical link is, and the larger the number of the corresponding adjusted forwarding entries is; or,
and based on the determined bandwidth utilization rate of each physical link, taking at least one physical link with the bandwidth utilization rate smaller than or equal to a set threshold value as the physical link for forwarding the target unicast traffic currently.
In summary, the physical link traffic balancing method provided in the present application is applied to a distributed frame device, where the distributed frame device includes a first forwarding chip serving as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips serving as egress forwarding chips of the target unicast traffic, and a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logical link for forwarding the target unicast traffic, and the method includes: each second forwarding chip of the distributed frame device obtains load parameters of physical links which are aggregated to form the logic link; each second forwarding chip of the distributed frame equipment sends the obtained load parameters of the physical link to a first forwarding chip of the distributed frame equipment; and the first forwarding chip of the distributed frame device balances the flow of the target unicast flow in each physical link based on the load parameters of each physical link sent by each second forwarding chip.
By adopting the physical link flow balancing method provided by the application, through the interaction mode among the forwarding chips of the distributed frame type equipment, each forwarding chip announces the load parameter of the physical link for forwarding the target unicast flow to the forwarding chip for forwarding the target unicast flow, so that the forwarding chip can obtain the current load information of each physical link, further dynamic adjustment is realized, the size of the target unicast flow among the physical links is balanced, and further, the flow sharing mechanism of the physical links in the aggregation link on the distributed frame type equipment is realized.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to encompass such modifications and variations.
Claims (10)
1. A physical link traffic balancing method, applied to a distributed frame device, the distributed frame device including a first forwarding chip serving as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips serving as egress forwarding chips of the target unicast traffic, a plurality of physical links of the plurality of second forwarding chips being aggregated to form a logical link for forwarding the target unicast traffic, the method comprising:
each second forwarding chip of the distributed frame device obtains load parameters of physical links which are aggregated to form the logic link;
each second forwarding chip of the distributed frame equipment sends the obtained load parameters of the physical link to a first forwarding chip of the distributed frame equipment;
and the first forwarding chip of the distributed frame device balances the flow of the target unicast flow in each physical link based on the load parameters of each physical link sent by each second forwarding chip.
2. The method of claim 1, wherein the step of each second forwarding chip of the distributed block device obtaining load parameters for physical links that are aggregated into the logical link comprises:
and each second forwarding chip of the distributed frame device acquires port bandwidth information and current used bandwidth information of an output port of a logic port corresponding to the logic link based on a preset period, and takes the port bandwidth information and the current used bandwidth information of the output port as load parameters of the output port.
3. The method of claim 2, wherein the step of each second forwarding chip of the distributed block device obtaining load parameters of physical links that are aggregated into the logical link further comprises:
and each second forwarding chip of the distributed frame device calculates the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current bandwidth information of the output port, and takes the bandwidth utilization rate of the output port as the load parameter of the output port.
4. The method of claim 2, wherein the step of the first forwarding chip of the distributed frame device equalizing the traffic size of the target unicast traffic on each physical link based on the load parameters of each physical link sent by each second forwarding chip comprises:
the first forwarding chip of the distributed frame type equipment respectively determines the bandwidth utilization rate of each physical link based on the load parameters of the output ports sent by each second forwarding chip;
and the first forwarding chip of the distributed frame equipment adjusts the flow size of the target unicast flow in each physical link based on the determined bandwidth utilization rate of each physical link.
5. The method of claim 4, wherein the step of the first forwarding chip of the distributed frame device adjusting the traffic size of the target unicast traffic on each physical link based on the determined bandwidth usage of each physical link comprises:
the first forwarding chip of the distributed frame device adjusts the number of forwarding entries corresponding to each physical link of a local forwarding table and used for forwarding the target unicast traffic based on the determined bandwidth utilization rate of each physical link, wherein the higher the bandwidth utilization rate of the physical link is, the smaller the number of the corresponding adjusted forwarding entries is, the lower the bandwidth utilization rate of the physical link is, and the larger the number of the corresponding adjusted forwarding entries is; or,
and the first forwarding chip of the distributed frame equipment uses at least one physical link with the bandwidth utilization rate smaller than or equal to a set threshold value as a physical link for forwarding the target unicast traffic currently based on the determined bandwidth utilization rate of each physical link.
6. A distributed frame device, characterized in that the distributed frame device comprises a first forwarding chip as an ingress forwarding chip of a target unicast traffic and a plurality of second forwarding chips as egress forwarding chips of the target unicast traffic, a plurality of physical links of the plurality of second forwarding chips are aggregated to form a logical link for forwarding the target unicast traffic,
each second forwarding chip of the distributed frame device is used for acquiring load parameters of physical links which are aggregated to form the logical link;
each second forwarding chip of the distributed frame device is further configured to send the obtained load parameter of the physical link to the first forwarding chip of the distributed frame device;
the first forwarding chip of the distributed frame device is configured to balance the traffic of the target unicast traffic on each physical link based on the load parameters of each physical link sent by each second forwarding chip.
7. The distributed frame device of claim 6, wherein each second forwarding chip of the distributed frame device is specifically configured to, when acquiring load parameters of physical links that are aggregated to form the logical link:
and each second forwarding chip of the distributed frame device acquires port bandwidth information and current used bandwidth information of an output port of a logic port corresponding to the logic link based on a preset period, and takes the port bandwidth information and the current used bandwidth information of the output port as load parameters of the output port.
8. The distributed frame device of claim 7, wherein each second forwarding chip of the distributed frame device is further configured to, when acquiring load parameters of physical links that are aggregated into the logical link:
and each second forwarding chip of the distributed frame device calculates the bandwidth utilization rate of the output port based on the acquired port bandwidth information and the current bandwidth information of the output port, and takes the bandwidth utilization rate of the output port as the load parameter of the output port.
9. The distributed frame device of claim 7, wherein when balancing the traffic size of the target unicast traffic on each physical link based on the load parameter of each physical link sent by each second forwarding chip, the first forwarding chip of the distributed frame device is specifically configured to:
the first forwarding chip of the distributed frame type equipment respectively determines the bandwidth utilization rate of each physical link based on the load parameters of the output ports sent by each second forwarding chip;
and the first forwarding chip of the distributed frame equipment adjusts the flow size of the target unicast flow in each physical link based on the determined bandwidth utilization rate of each physical link.
10. The distributed frame device of claim 9, wherein the first forwarding chip of the distributed frame device adjusts the traffic size of the target unicast traffic on each physical link based on the determined bandwidth usage of each physical link, the first forwarding chip of the distributed frame device being specifically configured to:
the first forwarding chip of the distributed frame device adjusts the number of forwarding entries corresponding to each physical link of a local forwarding table and used for forwarding the target unicast traffic based on the determined bandwidth utilization rate of each physical link, wherein the higher the bandwidth utilization rate of the physical link is, the smaller the number of the corresponding adjusted forwarding entries is, the lower the bandwidth utilization rate of the physical link is, and the larger the number of the corresponding adjusted forwarding entries is; or,
and the first forwarding chip of the distributed frame equipment uses at least one physical link with the bandwidth utilization rate smaller than or equal to a set threshold value as a physical link for forwarding the target unicast traffic currently based on the determined bandwidth utilization rate of each physical link.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010476468.3A CN111654449B (en) | 2020-05-29 | 2020-05-29 | Physical link flow balancing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010476468.3A CN111654449B (en) | 2020-05-29 | 2020-05-29 | Physical link flow balancing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111654449A CN111654449A (en) | 2020-09-11 |
CN111654449B true CN111654449B (en) | 2023-05-19 |
Family
ID=72346119
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010476468.3A Active CN111654449B (en) | 2020-05-29 | 2020-05-29 | Physical link flow balancing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111654449B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115720208B (en) * | 2021-08-23 | 2025-06-03 | 大唐移动通信设备有限公司 | Link aggregation method, device and storage medium |
CN119052175A (en) * | 2024-07-31 | 2024-11-29 | 武汉烽火技术服务有限公司 | Distributed chip backboard flow load balancing method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104811400A (en) * | 2014-01-26 | 2015-07-29 | 杭州迪普科技有限公司 | Distributed network apparatus |
CN105490958A (en) * | 2015-12-09 | 2016-04-13 | 上海斐讯数据通信技术有限公司 | Link aggregation control protocol (LACP) load balancing method and system |
CN106572025A (en) * | 2016-10-19 | 2017-04-19 | 盛科网络(苏州)有限公司 | Method for realizing network traffic load balancing and device thereof |
CN108092922A (en) * | 2017-12-19 | 2018-05-29 | 杭州迪普科技股份有限公司 | A kind of method and apparatus of interface board transmitting message |
CN108134744A (en) * | 2017-12-06 | 2018-06-08 | 新华三技术有限公司 | Load sharing method and veneer in a kind of IRF stackings |
CN108173753A (en) * | 2017-12-28 | 2018-06-15 | 迈普通信技术股份有限公司 | Message forwarding method, switching card, service card and distribution switch |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9548926B2 (en) * | 2013-01-11 | 2017-01-17 | Brocade Communications Systems, Inc. | Multicast traffic load balancing over virtual link aggregation |
-
2020
- 2020-05-29 CN CN202010476468.3A patent/CN111654449B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104811400A (en) * | 2014-01-26 | 2015-07-29 | 杭州迪普科技有限公司 | Distributed network apparatus |
CN105490958A (en) * | 2015-12-09 | 2016-04-13 | 上海斐讯数据通信技术有限公司 | Link aggregation control protocol (LACP) load balancing method and system |
CN106572025A (en) * | 2016-10-19 | 2017-04-19 | 盛科网络(苏州)有限公司 | Method for realizing network traffic load balancing and device thereof |
CN108134744A (en) * | 2017-12-06 | 2018-06-08 | 新华三技术有限公司 | Load sharing method and veneer in a kind of IRF stackings |
CN108092922A (en) * | 2017-12-19 | 2018-05-29 | 杭州迪普科技股份有限公司 | A kind of method and apparatus of interface board transmitting message |
CN108173753A (en) * | 2017-12-28 | 2018-06-15 | 迈普通信技术股份有限公司 | Message forwarding method, switching card, service card and distribution switch |
Non-Patent Citations (1)
Title |
---|
工作模式可配置的路由器共享转发引擎;陈文龙等;《计算机学报》;20130915(第09期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111654449A (en) | 2020-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109218216B (en) | Link aggregation flow distribution method, device, equipment and storage medium | |
CN101977162B (en) | Load balancing method of high-speed network | |
CN113132249A (en) | Load balancing method and equipment | |
US7457245B2 (en) | Directional and priority based flow control mechanism between nodes | |
CN110798400B (en) | Message forwarding method and device | |
US8750129B2 (en) | Credit-based network congestion management | |
CN113014508A (en) | Message processing method and device | |
CN102984077B (en) | The control method of network congestion and system | |
EP3337093B1 (en) | Optimizing information related to a route and/or a next hop for multicase traffic | |
CN111654449B (en) | Physical link flow balancing method and device | |
US20220109639A1 (en) | Path selection for packet transmission | |
CN102447636A (en) | Load sharing method and device for data center communication equipment | |
US20180270159A1 (en) | Flow control | |
CN108540400A (en) | A kind of data transfer control method, control device, terminal and readable storage medium storing program for executing | |
CN109873776A (en) | A kind of equalization methods and device of multicast message load balancing | |
CN101414974B (en) | Data flow management method based on communication terminal | |
CN115733799B (en) | Network congestion control method and related device | |
CN116684098A (en) | Block chain-based data processing method, device, equipment, medium and product | |
US20200314014A1 (en) | Advanced load balancing based on bandwidth estimation | |
US20170164385A1 (en) | Enforcing station fairness with mu-mimo deployments | |
CN104135445A (en) | Stream-based link aggregation load balancing method and device | |
CN107896196B (en) | Method and device for distributing messages | |
CN112685169A (en) | Load control method, device, server and readable storage medium | |
CN113890855A (en) | Message forwarding method, system, equipment and medium | |
CN113518098B (en) | Load balancing algorithm determining method and network equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |