CN111600803A - Data balance transmission method, system and storage medium based on aggregation link - Google Patents

Data balance transmission method, system and storage medium based on aggregation link Download PDF

Info

Publication number
CN111600803A
CN111600803A CN202010353845.4A CN202010353845A CN111600803A CN 111600803 A CN111600803 A CN 111600803A CN 202010353845 A CN202010353845 A CN 202010353845A CN 111600803 A CN111600803 A CN 111600803A
Authority
CN
China
Prior art keywords
flow
sublink
difference value
link
sub
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.)
Pending
Application number
CN202010353845.4A
Other languages
Chinese (zh)
Inventor
向卫东
孟庆晓
吴闽华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Genew Technologies Co Ltd
Original Assignee
Shenzhen Genew Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Genew Technologies Co Ltd filed Critical Shenzhen Genew Technologies Co Ltd
Priority to CN202010353845.4A priority Critical patent/CN111600803A/en
Publication of CN111600803A publication Critical patent/CN111600803A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/124Shortest path evaluation using a combination of metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds

Abstract

The invention discloses a data balance transmission method, a system and a storage medium based on an aggregation link, wherein the method comprises the following steps: calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver; acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value; comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value; and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value. The invention ensures that the difference value of the flow rates shared by the sub-links does not exceed the threshold value by selecting the input data, so that the data packets are evenly distributed to the sub-links by the aggregation link as far as possible.

Description

Data balance transmission method, system and storage medium based on aggregation link
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a data balance transmission method, system and storage medium based on an aggregation link.
Background
The aggregation link is formed by aggregating a plurality of sub-links directly connected between two switches, usually supporting up to 8 sub-links to be aggregated into one aggregation link, and the bandwidth of the aggregation link is the sum of the bandwidths of all the participating aggregation ports, thereby providing larger communication bandwidth between the switches.
When a plurality of sub-links are aggregated into an aggregated link, input data of a sub-link load balancing algorithm needs to be specified, and the input data is a certain piece of data (for example, destination MAC, source MAC, destination IP, source IP) of a data packet. The load balancing algorithm is used for balancing and distributing the traffic of each sublink by the switch, so that the phenomenon that the traffic on some links is too large to exceed the working rate of the sublinks and packet loss is caused due to unbalanced distribution is avoided. When a data packet needs to be sent from the aggregation link, the load balancing algorithm carries out hash operation according to the appointed input data to obtain a numerical value A, and the numerical value A is divided by the number N of the sub-links in the aggregation link to obtain a remainder M; n sub-links are respectively numbered (0, 1, 2.,. N-1), the remainder M just corresponds to the number of a certain sub-link, and the data packet is sent out from the sub-link with the number equal to the remainder M.
The hash operation is characterized in that the calculated value of the same input data is always the same, so that the data packets with the same characteristics can be stably distributed to a certain sublink for transmission. Similarly, the calculated values A1 and A2 are different from the algorithm input data of the data packets with different characteristics; however, the remainders M1 and M2 obtained by dividing a1 and a2 by the number N of the sublinks in the aggregated link may be the same, so that the packets with different characteristics are stably allocated to the same sublink to be sent out.
It can be seen that in the case where some algorithm input data (destination MAC, source MAC, destination IP, one of source IP) is specified, the aggregated link is not sent as an absolute average of the fractions to the sublinks. For example, two ports (P1, P2) form an aggregated link, and hash calculation is performed according to the destination IP of the input data packet, wherein 65% of data packets in the aggregated link are transmitted from the port P1, and 35% of data packets in the aggregated link are transmitted from the port P2. So as the traffic in the aggregated link increases, port P1 will first go to full capacity and will not continue to increase traffic even though port P2 is still relatively idle.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to provide a data balance transmission method, a data balance transmission system and a data balance transmission storage medium based on an aggregation link, and aims to solve the problem that data packets are not evenly distributed to sub-links by the aggregation link in the prior art.
In order to achieve the above object, the present invention provides a data balanced transmission method based on an aggregation link, where the data balanced transmission method based on an aggregation link includes the following steps:
calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver;
acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value;
comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value;
and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
Optionally, in the method for balanced data transmission based on an aggregated link, the operating rates of all sub-links in the aggregated link are the same.
Optionally, in the method for balanced data transmission based on aggregated links, when the operating rate of a sub-link is 1000M, the maximum flow rate of the sub-link for transmitting packets is 1000 Mbit/s.
Optionally, in the data balanced transmission method based on the aggregation link, the threshold is 5% of the operating bandwidth of the sublink.
Optionally, the data balanced transmission method based on the aggregated link, wherein the input data sequentially includes: destination MAC, source MAC, destination IP and source IP.
Optionally, the data balance transmission method based on an aggregated link, where, when the traffic difference is greater than the threshold, the input data of the hash algorithm is reset until the traffic difference is less than or equal to the threshold, specifically including:
when the flow difference value is greater than the working bandwidth of the sublink by 5%, indicating that the flow is distributed unevenly on each sublink, and needing to adjust the input data of the hash algorithm for redistribution;
and resetting input data of the Hash algorithm, and sequentially replacing the input data according to the sequence of the target MAC, the source MAC, the target IP and the source IP until the flow difference is less than or equal to 5% of the working bandwidth of the sublink.
In addition, to achieve the above object, the present invention further provides a data balanced transmission system based on an aggregation link, wherein the data balanced transmission system based on an aggregation link includes: two switches connected through a port;
a plurality of sub-links directly connected between two switches are converged into an aggregation link;
the aggregation link-based data balance transmission system is used for:
calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver;
acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value;
comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value;
and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
In addition, to achieve the above object, the present invention further provides a storage medium, wherein the storage medium stores an aggregation link-based data balance transmission program, and the aggregation link-based data balance transmission program implements the steps of the aggregation link-based data balance transmission method as described above when executed by a processor.
The method comprises the steps of respectively obtaining the current flow of data packets sent by all sub-links in an aggregation link through calling a driver; acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value; comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value; and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value. The method obtains the flow of each sublink through the driving program, calculates the flow difference value between the maximum flow and the minimum flow, and resets the input data of the Hash algorithm when the flow difference value exceeds the threshold value until one input data is found, so that the difference value of the flow shared by the sublinks does not exceed the threshold value, and the aggregation link distributes the data packets to the sublinks as evenly as possible.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the method for balanced data transmission based on aggregated links according to the present invention;
fig. 2 is a schematic diagram of a preferred embodiment of the data balanced transmission system based on aggregation link according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the aggregation link-based data balanced transmission method according to the preferred embodiment of the present invention includes the following steps:
and step S10, calling a driver, and respectively obtaining the current traffic sizes of the sending packets of all the sub-links in the aggregation link through the driver.
Specifically, an aggregated link is formed by aggregating a plurality of sub-links directly connected between two switches, and usually, up to 8 sub-links are supported to be aggregated into one aggregated link, and the bandwidth of the aggregated link is the sum of the bandwidths of all the ports participating in aggregation, so that a larger communication bandwidth is provided between the switches; the working rates of n sub-links in the aggregated link are all equal, a common working rate is 1000M, and a working rate of 1000M means that the maximum flow rate of the sub-link for transmitting the data packets is 1000Mbit per second, i.e. when the working rate of the sub-link is 1000M, the maximum flow rate of the sub-link for transmitting the data packets is 1000 Mbit/s. The flow sizes (0-1000Mbit/s) of the current sending data packets of all the sub-links are respectively obtained by the driver, and are D1, D2.
Step S20, obtaining a first sublink with the largest flow and a second sublink with the smallest flow in all the sublinks, and subtracting the smallest flow of the second sublinks from the largest flow of the first sublink to obtain a flow difference.
Specifically, after the driver respectively obtains that the current traffic sizes (0-1000Mbit/S) of the transmitted data packets of all the sub-links are D1, D2,. and Dn, a first sub-link (for example, D7 with the largest traffic) and a second sub-link (for example, D2 with the smallest traffic) with the largest traffic are obtained, and a traffic difference value (for example, a difference value S7-D2) is obtained by subtracting a value (D2) with the smallest traffic from a value (D7) with the largest traffic.
Step S30, comparing the flow rate difference value with a threshold value, and determining whether the flow rate difference value is greater than the threshold value.
Specifically, a threshold is preset, for example, the threshold is 5% of the operating bandwidth of the sub-link, and then it is determined whether the flow difference (for example, the difference S is D7-D2) is greater than the threshold (5% of the operating bandwidth of the sub-link).
And step S40, when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
Specifically, the input data sequentially includes: destination MAC, source MAC, destination IP and source IP. When the traffic difference is greater than the working bandwidth of the sub-link by 5% (for example, when the working bandwidth of the sub-link is 1000M, the working bandwidth of the sub-link by 5% is 1000Mbit/s by 5% — 50Mbit/s), it indicates that traffic is unevenly distributed on each sub-link, and input data of the hash algorithm needs to be adjusted for reallocation; resetting input data of a hash algorithm (namely, a secure hash algorithm, which is a cryptographic hash function family and is a secure hash algorithm authenticated by FIPS, and can calculate a string with a fixed length corresponding to a digital message (also called an algorithm of message digest)), and sequentially replacing the input data according to the sequence of a destination MAC, a source MAC, a destination IP and a source IP (the steps are executed again every time the input data is replaced), until the flow difference is less than or equal to 5% of the working bandwidth of the sublink.
In the invention, only the input data (destination MAC, source MAC, destination IP and one of source IP) of the hash algorithm is changed to change the sub-link distributed by the data packet with a certain characteristic; the invention relates to a method for dynamically balancing load of an aggregation link, which is characterized in that the flow of each sublink is obtained through a driving program, the difference value of the sublinks is calculated, when the difference value exceeds 5% of the bandwidth of the sublink, the input data of a Hash algorithm is reset until one input data is found, so that the difference value of the flow shared by the sublinks does not exceed 5% of the bandwidth of the sublinks, and the aggregation link is distributed to the sublinks as evenly as possible for sending.
Further, as shown in fig. 2, based on the above aggregation link-based data balanced transmission method, the present invention also provides a aggregation link-based data balanced transmission system, where the aggregation link-based data balanced transmission system includes:
two switches (switch 1 and switch 2 in fig. 2) connected by a port;
a plurality of sub-links directly connected between two switches are converged into an aggregation link;
the aggregation link-based data balance transmission system is used for:
calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver;
acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value;
comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value;
and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
Wherein the working rates of all the sub-links in the aggregation link are the same. When the working rate of the sub-link is 1000M, the maximum flow of the sub-link for transmitting the data packets is 1000 Mbit/s. The threshold value is 5% of the working bandwidth of the sublink. The input data sequentially comprises: destination MAC, source MAC, destination IP and source IP.
Further, when the flow difference is greater than the working bandwidth of the sublink by 5%, it indicates that the flow is unevenly distributed on each sublink, and the input data of the hash algorithm needs to be adjusted for redistribution; and resetting input data of the Hash algorithm, and sequentially replacing the input data according to the sequence of the target MAC, the source MAC, the target IP and the source IP until the flow difference is less than or equal to 5% of the working bandwidth of the sublink.
The present invention also provides a storage medium, wherein the storage medium stores an aggregation link-based data balance transmission program, and the aggregation link-based data balance transmission program implements the steps of the aggregation link-based data balance transmission method when executed by a processor.
In summary, the present invention provides a method, a system and a storage medium for balanced data transmission based on an aggregation link, where the method includes: calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver; acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value; comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value; and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value. The method obtains the flow of each sublink through the driving program, calculates the flow difference value between the maximum flow and the minimum flow, and resets the input data of the Hash algorithm when the flow difference value exceeds the threshold value until one input data is found, so that the difference value of the flow shared by the sublinks does not exceed the threshold value, and the aggregation link distributes the data packets to the sublinks as evenly as possible.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (8)

1. A data balance transmission method based on an aggregation link is characterized in that the data balance transmission method based on the aggregation link comprises the following steps:
calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver;
acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value;
comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value;
and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
2. The method according to claim 1, wherein the working rates of all the sub-links in the aggregated link are the same.
3. The method according to claim 2, wherein when the working rate of the sub-link is 1000M, the maximum flow rate of the sub-link for transmitting the data packets is 1000 Mbit/s.
4. The method according to claim 1, wherein the threshold is 5% of the working bandwidth of the sublink.
5. The method according to claim 4, wherein the input data sequentially comprises: destination MAC, source MAC, destination IP and source IP.
6. The method according to claim 5, wherein when the traffic difference is greater than the threshold, resetting input data of the hash algorithm until the traffic difference is less than or equal to the threshold specifically includes:
when the flow difference value is greater than the working bandwidth of the sublink by 5%, indicating that the flow is distributed unevenly on each sublink, and needing to adjust the input data of the hash algorithm for redistribution;
and resetting input data of the Hash algorithm, and sequentially replacing the input data according to the sequence of the target MAC, the source MAC, the target IP and the source IP until the flow difference is less than or equal to 5% of the working bandwidth of the sublink.
7. An aggregation link-based data balanced transmission system, comprising: two switches connected through a port;
a plurality of sub-links directly connected between two switches are converged into an aggregation link;
the aggregation link-based data balance transmission system is used for:
calling a driver, and respectively acquiring the current flow of the sending data packets of all the sub-links in the aggregation link through the driver;
acquiring a first sublink with the largest flow and a second sublink with the smallest flow in all sublinks, and subtracting the smallest flow of the second sublink from the largest flow of the first sublink to obtain a flow difference value;
comparing the flow difference value with a threshold value, and judging whether the flow difference value is larger than the threshold value;
and when the flow difference value is larger than the threshold value, resetting the input data of the hash algorithm until the flow difference value is smaller than or equal to the threshold value.
8. A storage medium, characterized in that the storage medium stores an aggregation link-based data balance transmission program, and the aggregation link-based data balance transmission program, when executed by a processor, implements the steps of the aggregation link-based data balance transmission method according to any one of claims 1 to 6.
CN202010353845.4A 2020-04-29 2020-04-29 Data balance transmission method, system and storage medium based on aggregation link Pending CN111600803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010353845.4A CN111600803A (en) 2020-04-29 2020-04-29 Data balance transmission method, system and storage medium based on aggregation link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010353845.4A CN111600803A (en) 2020-04-29 2020-04-29 Data balance transmission method, system and storage medium based on aggregation link

Publications (1)

Publication Number Publication Date
CN111600803A true CN111600803A (en) 2020-08-28

Family

ID=72192105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010353845.4A Pending CN111600803A (en) 2020-04-29 2020-04-29 Data balance transmission method, system and storage medium based on aggregation link

Country Status (1)

Country Link
CN (1) CN111600803A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118319A (en) * 2011-04-06 2011-07-06 杭州华三通信技术有限公司 Traffic load balancing method and device
CN103023804A (en) * 2012-12-18 2013-04-03 北京星网锐捷网络技术有限公司 Method, device and network equipment for polymerization chain self-adaption flow load balance
US20140198656A1 (en) * 2013-01-15 2014-07-17 Brocade Communications Systems, Inc. Adaptive link aggregation and virtual link aggregation
CN109218216A (en) * 2017-06-29 2019-01-15 中兴通讯股份有限公司 Chain polymerization traffic distribution method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118319A (en) * 2011-04-06 2011-07-06 杭州华三通信技术有限公司 Traffic load balancing method and device
CN103023804A (en) * 2012-12-18 2013-04-03 北京星网锐捷网络技术有限公司 Method, device and network equipment for polymerization chain self-adaption flow load balance
US20140198656A1 (en) * 2013-01-15 2014-07-17 Brocade Communications Systems, Inc. Adaptive link aggregation and virtual link aggregation
CN109218216A (en) * 2017-06-29 2019-01-15 中兴通讯股份有限公司 Chain polymerization traffic distribution method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210105221A1 (en) Network processing resource management in computing systems
CN107579923B (en) Link load balancing method of SDN and SDN controller
EP3281369B1 (en) Server load balancing
US8285881B2 (en) System and method for load balancing and fail over
US7881185B1 (en) Switch failover for aggregated data communication links
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
US9385954B2 (en) Hashing techniques for use in a network environment
US9979656B2 (en) Methods, systems, and computer readable media for implementing load balancer traffic policies
US10193806B2 (en) Performing a finishing operation to improve the quality of a resulting hash
CN113132249A (en) Load balancing method and equipment
US9456030B2 (en) Methods of operating load balancing switches and controllers using modified flow entries
US9537785B2 (en) Link aggregation group (LAG) link allocation
US10110421B2 (en) Methods, systems, and computer readable media for using link aggregation group (LAG) status information
US20110216769A1 (en) Dynamic Path Selection
CN112311674B (en) Message sending method, device and storage medium
EP3298735A1 (en) Method and apparatus for self-tuned adaptive routing
CN110290072B (en) Flow control method, flow control device, network equipment and storage medium
CN114006863A (en) Multi-core load balancing cooperative processing method and device and storage medium
US8699373B1 (en) Service-card load distribution
CN111600803A (en) Data balance transmission method, system and storage medium based on aggregation link
CN115348212A (en) Load balancing method and device, network equipment and computer readable storage medium
US10805258B2 (en) Multiple link layer address resolution protocol (ARP)
US20180213462A1 (en) Transmission device, transmission control method, and recording medium
CN111585910B (en) Input data selection method, system and storage medium
US20200036625A1 (en) Communication apparatus, communication control method, and communication system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200828

RJ01 Rejection of invention patent application after publication