CN102413053A - Method and device for realizing load balance of trunk port - Google Patents

Method and device for realizing load balance of trunk port Download PDF

Info

Publication number
CN102413053A
CN102413053A CN2011104107659A CN201110410765A CN102413053A CN 102413053 A CN102413053 A CN 102413053A CN 2011104107659 A CN2011104107659 A CN 2011104107659A CN 201110410765 A CN201110410765 A CN 201110410765A CN 102413053 A CN102413053 A CN 102413053A
Authority
CN
China
Prior art keywords
port
message
aggregation
member port
actual
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
CN2011104107659A
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.)
Centec Networks Suzhou Co Ltd
Original Assignee
Centec Networks Suzhou 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 Centec Networks Suzhou Co Ltd filed Critical Centec Networks Suzhou Co Ltd
Priority to CN2011104107659A priority Critical patent/CN102413053A/en
Publication of CN102413053A publication Critical patent/CN102413053A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for realizing load balance of a trunk port. The method comprises the following steps: receiving a message, and calculating according to the attribute of the message to obtain a weighted value; identifying the number of the current member ports which actually join in the trunk port; learning the number of the destination member port from which the current message needs to be sent according to the weighted value and the number of the member ports which actually join in the trunk port; and sending the message from the destination member port. The method disclosed by the invention has the beneficial effects that the number of the ports which actually join in the trunk port is stored in an added register, then the number of the destination member port from which the current message needs to be sent is learnt according to the weighted value and the number of the member ports which actually join in the trunk port, and finally the message is sent, thus realizing uniform distribution of the ports and further realizing load balance of the trunk port.

Description

Realize the method and the device of aggregation port load balancing
Technical field
The present invention relates to the network communications technology, relate in particular to and be applied to the physical link layer protocol, use the LACP agreement that the physical equipment of link load sharing is provided, more specifically, relate to a kind of method and device of realizing the aggregation port load balancing.
Background technology
LACP (Link Aggregation Control Protocol, Link Aggregation Control Protocol) is the standard agreement that IEEE 802.3ad describes.Link aggregation (Link Aggregation) is meant that a kind of physical link section with concrete identical traffic media type, identical traffic speed bundles, and it allows between the switch or the physical link of the equity between switch and the server increases bandwidth simultaneously exponentially.Therefore it is a kind of very important techniques at aspects such as the bandwidth that increases link, the transmission elasticity of creating link and redundancies.
Available technology adopting fixed member searches; As shown in Figure 1; This technological operation principle is: chip is that aggregation port distributes fixedly entry number n (this entry number must more than or equal to aggregation port greatest member number), and the physical member port circulation is filled in the clauses and subclauses of correspondence.Attribute (such as IP address, MAC Address) through message when aggregation port sends message calculates a weighted value, and the value that will calculate again divides exactly n and gets remainder, and chip finds the member port of correspondence in the fixing entry number as subscript according to remainder.Message will send from this member port.
Yet the entry number that aggregation port is supported can cause port can not realize uniform distribution, and then cause system can not reach real load balancing if not the integral multiple of actual disposition port number.For example: aggregation port is supported 4 members at most, and 3 physics mouths of actual disposition have added aggregation port, and wherein, remaining clauses and subclauses are filled by port one, so this moment, port one and port 2,3 just were not complete uniform distribution.
Summary of the invention
The object of the present invention is to provide a kind of method that realizes the aggregation port load balancing.The present invention deposits the port number of actual adding aggregation port through adding a register, thereby has realized the load balancing of aggregation port.
Corresponding to said method, the present invention also provides a kind of device of realizing the aggregation port load balancing.
For realizing one of foregoing invention purpose, the invention provides a kind of method that realizes the aggregation port load balancing, comprise the steps:
S1, receive message and calculate and obtain a weighted value according to message attribute;
S2, the current actual quantity that adds the member port in the aggregation port of identification;
S3, according to said weighted value and the said actual quantity that adds the member port in the aggregation port, know purpose member port that current message need send to number;
S4, send said message from said purpose member port.
As further improvement of the present invention, can comprise some actual member port and empty clauses and subclauses that add in the said aggregation port.
As further improvement of the present invention, said step S2 is specially:
In system, add a register;
Discern the quantity m of the different members port that comprises in the current aggregation port;
With in m storage and the said register to make things convenient for calling of subsequent step.
As further improvement of the present invention, said step S3 is specially:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder;
According to the remainder of current acquisition, match corresponding target member port number.
For realizing another goal of the invention of the present invention, a kind of device of realizing the aggregation port load balancing of the present invention comprises like lower unit:
The message receiving element, be used to receive message and calculate obtain a weighted value according to message attribute;
The actual port acquiring unit, be used for discerning the current actual quantity that adds the member port of aggregation port;
Destination slogan acquiring unit, be used for, know purpose member port that current message need send to number according to said weighted value and the said actual quantity that adds the member port of aggregation port;
Packet sending unit, be used for sending said message from said purpose member port.
As further improvement of the present invention, can comprise some actual member port and empty clauses and subclauses that add in the said aggregation port.
As further improvement of the present invention, said actual port acquiring unit specifically is used for:
In system, add a register;
Discern the quantity m of the different members port that comprises in the current aggregation port;
With in m storage and the said register to make things convenient for calling of subsequent step.
As further improvement of the present invention, said destination slogan acquiring unit specifically is used for:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder;
According to the remainder of current acquisition, match corresponding target member port number.
Compared with prior art; The present invention deposits the port number of actual adding aggregation port through adding a register; Afterwards again according to weighted value and the said actual quantity that adds the member port in the aggregation port; Know purpose member port that current message need send to number and carry out the transmission of message, realized the uniform distribution of each port, and then realized the load balancing of aggregation port.
Description of drawings
Fig. 1 is the configuration schematic diagram of member port in the aggregation port in the prior art;
Fig. 2 representes to realize in an embodiment of the present invention the workflow diagram of the method for aggregation port load balancing;
The member port configuration schematic diagram of aggregation port in Fig. 3 presentation graphs 2 described execution modes;
Fig. 4 is a module diagram of realizing the device of aggregation port load balancing in an embodiment of the present invention.
Embodiment
Below will combine embodiment shown in the drawings to describe the present invention.But these execution modes do not limit the present invention, and the conversion on the structure that those of ordinary skill in the art makes according to these execution modes, method or the function all is included in protection scope of the present invention.
In conjunction with Fig. 2 and shown in Figure 3, introduce the operation principle of the method for the realization aggregation port load balancing in an embodiment of the present invention.
Join shown in Figure 2, a kind of method that realizes the aggregation port load balancing, it is for realize the load balancing of system really, it comprises the steps:
S1, receive message and calculate and obtain a weighted value according to message attribute; Wherein, port trunking also is called Gigabit EtherChannel (ethernet channel), is mainly used between the switch to connect.Preferably, aggregation port is accepted one section message information from network, can comprise IP address, Mac address or the like in the message information.The weighted value of here mentioning calculates according to the IP address in the current message information that is input to aggregation port, Mac address information or the like, and this technology is well known to those skilled in the art, so the applicant no longer gives unnecessary details at this.
S2, the current actual quantity that adds the member port in the aggregation port of identification; The entry number of the actual support that occurs in the prior art is not the situation of integral multiple of the member port quantity of actual disposition, and at this, the actual number that adds the different members port in the aggregation port of definition equates.Join shown in Figure 3; The quantity of supposing the member port in the actual adding aggregation port is 3 (member port 0, member port 1, member ports 2), and that, quantity of port 0, port one, port 2 was 1, its quantity for equating this moment; In other possible implementation; The kind of port is unrestricted, and its quantity of depositing in each member port in the aggregation port satisfies the condition that equates, just can satisfy demand of the present invention.
Preferably, in this execution mode, so can comprise some actual member port and empty clauses and subclauses that add in the aggregation port.For example, the entry number that aggregation port is supported altogether is 4, comprising 3 member ports and empty clauses and subclauses of putting sky.
Step S2 is specially:
In system, add a register; Preferably, register can be data register.
Discern the quantity m of the different members port that comprises in the current aggregation port; In this embodiment, the value of m is 3 (Fig. 3)
With in m storage and the said register to make things convenient for calling of subsequent step.Preferably, through control unit from shown in read the value of m and be used to calculate weighted value the register.
S3, according to said weighted value and the said actual quantity that adds the member port in the aggregation port, know purpose member port that current message need send to number; Said step S3 is specially:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder; In this execution mode, because the actual quantity that joins the member port in the aggregation port is 3, so just draw remainder divided by 3 with the weighted value that obtains;
Afterwards, according to the remainder of current acquisition, match corresponding target member port number.Preferably, when remainder was 1, specifying corresponding purpose member port number was 1; When remainder was 2, specifying corresponding purpose member port number was 2; When remainder was 3, specifying corresponding purpose member port number was 3; By that analogy.
S4, send said message from said purpose member port.Preferably, when remainder was 1, specifying corresponding purpose member port number was 1, just message is sent from the port one that is arranged in aggregation port; When remainder was 2, specifying corresponding purpose member port number was 2, just message is sent from the port 2 that is arranged in aggregation port; When remainder was 3, specifying corresponding purpose member port number was 3, just message is sent from the port 3 that is arranged in aggregation port; By that analogy.
Join shown in Figure 4, in the embodiment of the invention, a kind of device of realizing the aggregation port load balancing, it is the load balancing of real realization system, it comprises like lower unit:
Message receiving element 10, be used to receive message and calculate obtain a weighted value according to message attribute; Wherein, port trunking also is called Gigabit EtherChannel (ethernet channel), is mainly used between the switch to connect.Preferably, aggregation port is accepted one section message information from network, can comprise IP address, Mac address or the like in the message information.The weighted value of here mentioning calculates according to the IP address in the current message information that is input to aggregation port, Mac address information or the like, and this technology is well known to those skilled in the art, so the applicant no longer gives unnecessary details at this.
Actual port acquiring unit 20, be used for discerning the current actual quantity that adds the member port of aggregation port; The entry number of the actual support that occurs in the prior art is not the situation of integral multiple of the member port quantity of actual disposition, and at this, the actual number that adds the different members port in the aggregation port of definition equates.Join shown in Figure 3; The quantity of supposing the member port in the actual adding aggregation port is 3 (member port 0, member port 1, member ports 2), and that, quantity of port 0, port one, port 2 was 1, its quantity for equating this moment; In other possible implementation; The kind of port is unrestricted, and its quantity of depositing in each member port in the aggregation port satisfies the condition that equates, just can satisfy demand of the present invention.
Preferably, in this execution mode, so can comprise some actual member port and empty clauses and subclauses that add in the aggregation port.For example, the entry number that aggregation port is supported altogether is 4, comprising 3 member ports and empty clauses and subclauses of putting sky.
Particularly, this unit is used for and can realizes in the following manner:
In system, add a register; Preferably, register can be data register.
Discern the quantity m of the different members port that comprises in the current aggregation port; In this embodiment, the value of m is 3 (Fig. 3)
With in m storage and the said register to make things convenient for calling of subsequent step.Preferably, through control unit from shown in read the value of m and be used to calculate weighted value the register.
Destination slogan acquiring unit 30, be used for, know purpose member port that current message need send to number according to said weighted value and the said actual quantity that adds the member port of aggregation port; Said destination slogan acquiring unit 30 specifically is used for:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder; In this execution mode, because the actual quantity that joins the member port in the aggregation port is 3, so just draw remainder divided by 3 with the weighted value that obtains;
Afterwards, according to the remainder of current acquisition, match corresponding target member port number.Preferably, when remainder was 1, specifying corresponding purpose member port number was 1; When remainder was 2, specifying corresponding purpose member port number was 2; When remainder was 3, specifying corresponding purpose member port number was 3; By that analogy.
Packet sending unit 40, be used for sending said message from said purpose member port.Preferably, when remainder was 1, specifying corresponding purpose member port number was 1, just message is sent from the port one that is arranged in aggregation port; When remainder was 2, specifying corresponding purpose member port number was 2, just message is sent from the port 2 that is arranged in aggregation port; When remainder was 3, specifying corresponding purpose member port number was 3, just message is sent from the port 3 that is arranged in aggregation port; By that analogy.
Compared with prior art; The present invention deposits the port number of actual adding aggregation port through adding a register; Afterwards again according to weighted value and the said actual quantity that adds the member port in the aggregation port; Know purpose member port that current message need send to number and carry out the transmission of message, realized the uniform distribution of each port, and then realized the load balancing of aggregation port.
For the convenience of describing, be divided into various unit with function when describing above the device and describe respectively.Certainly, when implementing the application, can in same or a plurality of softwares and/or hardware, realize the function of each unit.
Description through above execution mode can know, those skilled in the art can be well understood to the application and can realize by the mode that software adds essential general hardware platform.Based on such understanding; The part that the application's technical scheme contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each execution mode of the application or execution mode.
Device embodiments described above only is schematic; Wherein said unit as the separating component explanation can or can not be physically to separate also; The parts that show as the unit can be or can not be physical locations also; Promptly can be positioned at a place, perhaps also can be distributed on a plurality of NEs.Can realize the purpose of this execution mode scheme according to the needs selection some or all of module wherein of reality.Those of ordinary skills promptly can understand and implement under the situation of not paying creative work.
The application can describe in the general context of the computer executable instructions of being carried out by computer, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in DCE, put into practice the application, in these DCEs, by through communication network connected teleprocessing equipment execute the task.In DCE, program module can be arranged in this locality and the remote computer storage medium that comprises memory device.
Be to be understood that; Though this specification is described according to execution mode; But be not that each execution mode only comprises an independently technical scheme, this narrating mode of specification only is for clarity sake, and those skilled in the art should make specification as a whole; Technical scheme in each execution mode also can form other execution modes that it will be appreciated by those skilled in the art that through appropriate combination.
The listed a series of detailed description of preceding text only is specifying to feasibility execution mode of the present invention; They are not in order to restriction protection scope of the present invention, allly do not break away from equivalent execution mode or the change that skill of the present invention spirit done and all should be included within protection scope of the present invention.

Claims (8)

1. a method that realizes the aggregation port load balancing is characterized in that it comprises the steps:
S1, receive message and calculate and obtain a weighted value according to message attribute;
S2, the current actual quantity that adds the member port in the aggregation port of identification;
S3, according to said weighted value and the said actual quantity that adds the member port in the aggregation port, know purpose member port that current message need send to number;
S4, send said message from said purpose member port.
2. method according to claim 1 is characterized in that, can comprise some actual member port and empty clauses and subclauses that add in the said aggregation port.
3. method according to claim 1 is characterized in that, said step S2 is specially:
In system, add a register;
Discern the quantity m of the different members port that comprises in the current aggregation port;
With in m storage and the said register to make things convenient for calling of subsequent step.
4. method according to claim 1 is characterized in that, said step S3 is specially:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder;
According to the remainder of current acquisition, match corresponding target member port number.
5. a device of realizing the aggregation port load balancing is characterized in that, it comprises like lower unit:
The message receiving element, be used to receive message and calculate obtain a weighted value according to message attribute;
The actual port acquiring unit, be used for discerning the current actual quantity that adds the member port of aggregation port;
Destination slogan acquiring unit, be used for, know purpose member port that current message need send to number according to said weighted value and the said actual quantity that adds the member port of aggregation port;
Packet sending unit, be used for sending said message from said purpose member port.
6. device according to claim 5 is characterized in that, can comprise some actual member port and empty clauses and subclauses that add in the said aggregation port.
7. device according to claim 5 is characterized in that, said actual port acquiring unit specifically is used for:
In system, add a register;
Discern the quantity m of the different members port that comprises in the current aggregation port;
With in m storage and the said register to make things convenient for calling of subsequent step.
8. device according to claim 5 is characterized in that, said destination slogan acquiring unit specifically is used for:
Said weighted value and the said actual quantity that adds the member port in the aggregation port are divided by, obtain a remainder;
According to the remainder of current acquisition, match corresponding target member port number.
CN2011104107659A 2011-12-12 2011-12-12 Method and device for realizing load balance of trunk port Pending CN102413053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104107659A CN102413053A (en) 2011-12-12 2011-12-12 Method and device for realizing load balance of trunk port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104107659A CN102413053A (en) 2011-12-12 2011-12-12 Method and device for realizing load balance of trunk port

Publications (1)

Publication Number Publication Date
CN102413053A true CN102413053A (en) 2012-04-11

Family

ID=45914912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104107659A Pending CN102413053A (en) 2011-12-12 2011-12-12 Method and device for realizing load balance of trunk port

Country Status (1)

Country Link
CN (1) CN102413053A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683255A (en) * 2013-11-29 2015-06-03 华为技术有限公司 Load sharing balance method and device for physical ports, and link aggregation system
CN109151620A (en) * 2017-06-28 2019-01-04 中兴通讯股份有限公司 Aggregation group port switching method and device and Optical Line Terminal (OLT) equipment
CN112702277A (en) * 2020-12-15 2021-04-23 锐捷网络股份有限公司 Load balancing configuration optimization method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227402A (en) * 2008-02-20 2008-07-23 杭州华三通信技术有限公司 Method and apparatus for sharing polymerization link circuit flow
WO2008144774A1 (en) * 2007-05-24 2008-11-27 Harris Stratex Networks Operating Corporation Dynamic load balancing for layer-2 link aggregation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008144774A1 (en) * 2007-05-24 2008-11-27 Harris Stratex Networks Operating Corporation Dynamic load balancing for layer-2 link aggregation
CN101227402A (en) * 2008-02-20 2008-07-23 杭州华三通信技术有限公司 Method and apparatus for sharing polymerization link circuit flow

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683255A (en) * 2013-11-29 2015-06-03 华为技术有限公司 Load sharing balance method and device for physical ports, and link aggregation system
CN104683255B (en) * 2013-11-29 2018-02-13 华为技术有限公司 Equally loaded sharing method, device and the link aggregation system of physical port
CN109151620A (en) * 2017-06-28 2019-01-04 中兴通讯股份有限公司 Aggregation group port switching method and device and Optical Line Terminal (OLT) equipment
CN109151620B (en) * 2017-06-28 2022-05-13 中兴通讯股份有限公司 Aggregation group port switching method and device and Optical Line Terminal (OLT) equipment
CN112702277A (en) * 2020-12-15 2021-04-23 锐捷网络股份有限公司 Load balancing configuration optimization method and device
CN112702277B (en) * 2020-12-15 2023-01-10 锐捷网络股份有限公司 Load balancing configuration optimization method and device

Similar Documents

Publication Publication Date Title
Wang et al. A survey on data center networking for cloud computing
CN105379218B (en) Processing method, device and the equipment of Business Stream
CN103929368B (en) Load balance method and device for multiple service units
CN101692652B (en) Method and device for preventing interrupt of traffics in aggregation link
CN103201989B (en) The methods, devices and systems of control data transmission
CN102377640B (en) Message processing apparatus, message processing method and preprocessor
CN101909054B (en) Method for aggregating multiple network interface cards in virtualized environment
CN104106240A (en) Balancing of Forwarding and Address Resolution in Overlay Networks
CN104378308A (en) Method and device for detecting message sending rate
CN104113879A (en) WiFi communication system deployed with cloud ACs (access controllers) and communication method adopting WiFi communication system deployed with cloud ACs
EP3378201B1 (en) Load balancing over multiple tunnel endpoints
CN103945000A (en) Load balance method and load balancer
US10397097B2 (en) Weighted next hop selection at a router using an equal cost multipath process
CN102208945B (en) Method for obtaining network address and FCoE target and communication system
CN102447638A (en) Load balancing method and forwarding apparatus
CN102130839B (en) Data transmission method and device
CN104518891A (en) Method and device for creating multicast group in fat-tree network and fat-tree network
CN102891803A (en) Congestion processing method and network device
CN102413053A (en) Method and device for realizing load balance of trunk port
CN101527685A (en) Method for assigning message transmission link and device
CN103534996B (en) Realize the method and apparatus of load balancing
CN104394075B (en) A kind of method and apparatus of message transmissions
Zhou et al. Resource-aware virtual network parallel embedding based on genetic algorithm
CN108093047A (en) Data transmission method for uplink, device, electronic equipment and middleware system
CN105991439A (en) Management method and device of data center server (DC server)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120411