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 CN 201110410765 CN201110410765A CN102413053A CN 102413053 A CN102413053 A CN 102413053A CN 201110410765 CN201110410765 CN 201110410765 CN 201110410765 A CN201110410765 A CN 201110410765A CN 102413053 A CN102413053 A CN 102413053A
Authority
CN
China
Prior art keywords
port
number
ports
member
polymerization
Prior art date
Application number
CN 201110410765
Other languages
Chinese (zh)
Inventor
廖继平
韦健
Original Assignee
盛科网络(苏州)有限公司
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 盛科网络(苏州)有限公司 filed Critical 盛科网络(苏州)有限公司
Priority to CN 201110410765 priority Critical patent/CN102413053A/en
Publication of CN102413053A publication Critical patent/CN102413053A/en

Links

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

实现聚合端口负载均衡的方法及装置 Method and apparatus for load balancing to achieve aggregate interface

技术领域 FIELD

[0001] 本发明涉及网络通信技术,尤其涉及应用于物理链路层协议,使用LACP协议提供链路负载分担的物理设备,更具体地,涉及一种实现聚合端口负载均衡的方法及装置。 [0001] The present invention relates to network communication technology, in particular, to be applied to the physical link layer protocol, LACP protocol used to provide a physical link load balancing apparatus, and more particularly, relates to a method and apparatus for load balancing to achieve aggregate interface.

背景技术 Background technique

[0002] LACP (Link Aggregation Control Protocol,链路聚合控制协议)是IEEE 802. 3ad描述的标准协议。 [0002] LACP (Link Aggregation Control Protocol, Link Aggregation Control Protocol) standard protocol is the IEEE 802. 3ad described. 链路聚合(Link Aggregation)是指一种将具体相同传输介质类型、相同传输速率的物理链路段捆绑在一起,它允许交换机之间或交换机和服务器之间的对等的物理链路同时成倍地增加带宽。 Link Aggregation (Link Aggregation) refers to a physical link segment is bundled with the same specific type of transmission media, the same transmission rate, the physical link between the peer, or between a switch and allow the switches to the server at the same time doubling increase the bandwidth. 因此它在增加链路的带宽、创建链路的传输弹性和冗余等方面是一种很重要的技术。 So it is a very important technology in increasing the bandwidth of the link, create resilient and redundant transmission links and so on.

[0003] 现有技术中采用固定成员进行查找,如图1所示,该技术的工作原理为:芯片为聚合端口分配固定条目数η (该条目数必须大于等于聚合端口最大成员数),并将物理成员端口循环填充到对应的条目中。 [0003] the prior art to find a fixed member, as shown in FIG. 1, the working principle of the technology is: a polymeric chip assigned a fixed port number [eta] entries (number of entries which must be greater than the maximum number of member ports polymerization), and the physical member ports to fill cycles corresponding entry. 聚合端口发送报文时通过报文的属性(比如IP地址,MAC地址)计算一个加权值,再将计算的值整除η并取余数,芯片根据余数作为下标找到固定条目数中对应的成员端口。 Calculation of the polymerization sending the packets via packet attributes (such as IP address, MAC address) of a weight value, a value divisible then calculated η and take the remainder, the chip find member ports fixed number of entries corresponding as a subscript The remainder . 报文将从这个成员端口发送。 Packets sent from the port member.

[0004] 然而,聚合端口支持的条目数如果不是实际配置端口数量的整数倍,则会导致端口不能实现均勻分配,进而导致系统不能达到真正的负载均衡。 [0004] However, the number of entries of the aggregated ports support a port number, if not the actual integral multiple ports will result in a uniform distribution can not be achieved, and thus cause the system can not achieve true load balancing. 例如:聚合端口最多支持4 个成员,实际配置3个物理口加入了聚合端口,其中,剩余的条目被端口1填充,所以此时端口1和端口2、3就不是完全均勻分配的。 For example: aggregate interface supports up to four members, the actual configuration of the three physical ports added aggregation port, wherein the remaining entries are filled with a port, the port 1 and port 3 at this time is not entirely uniform distribution.

发明内容 SUMMARY

[0005] 本发明的目的在于提供一种实现聚合端口负载均衡的方法。 [0005] The object of the present invention to provide a method for implementing an aggregation port load balancing. 本发明通过添加一个寄存器来存放实际加入聚合端口的端口数量,从而实现了聚合端口的负载均衡。 The present invention is to store the number of ports actually added to the polymerization by adding a register port, thereby achieving load balancing aggregation port.

[0006] 相应于所述方法,本发明还提供一种实现聚合端口负载均衡的装置。 [0006] corresponding to the method, the present invention also provides an apparatus for implementing an aggregation port load balancing.

[0007] 为实现上述发明目的之一,本发明提供了一种实现聚合端口负载均衡的方法,包括如下步骤: [0007] In order to achieve one of the above object, the present invention provides a method for implementing load balancing aggregate interface, comprising the steps of:

51、接收报文并根据报文属性计算获得一加权值; 51, the received message and calculates a weighted value is obtained based on packet attributes;

52、识别当前实际加入聚合端口中的成员端口的数量; 52, the identification number of ports in the port member of the actual current fed to the polymerization;

53、根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号; 53, according to the number of member ports in the aggregation port of said weighted values ​​are added and the actual, known members of the order the current port number to packets to be sent;

54、从所述目的成员端口发送所述报文。 54, the port to send the packet from the destination members.

[0008] 作为本发明的进一步改进,所述聚合端口中可包括若干实际加入的成员端口和空条目。 [0008] As a further improvement of the present invention, the polymerization may comprise a plurality of port member ports and the actual empty entry added.

[0009] 作为本发明的进一步改进,所述步骤S2具体为: 在系统中添加一寄存器; [0009] As a further improvement of the present invention, the step S2 is specifically: adding a register system;

识别当前聚合端口中包括的不同成员端口的数量m ;将m存储与所述寄存器中以方便后续步骤的调用。 Identification number of the current aggregate ports comprise m different members of ports; the m stored in the register to facilitate the subsequent step of calls.

[0010] 作为本发明的进一步改进,所述步骤S3具体为: [0010] As a further improvement of the present invention, the step S3 is specifically:

将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数; 根据当前获得的余数,匹配到相应的目的成员端口号。 The weighted value and the actual number of ports to the polymerization of the dividing member ports, to obtain a remainder; The remainder of the currently obtained, to the respective members of the order matching port number.

[0011] 为实现本发明另一发明目的,本发明的一种实现聚合端口负载均衡的装置,包括如下单元: [0011] In order to achieve another object of the present invention, a polymerization according to the present invention achieves load balancing port means, comprising the following units:

报文接收单元、用于接收报文并根据报文属性计算获得一加权值; 实际端口获取单元、用于识别当前实际加入聚合端口中的成员端口的数量; 目的端口号获取单元、用于根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号; Packet receiving means for receiving a packet and obtaining a weighted value is calculated based on packet attributes; the actual port acquisition unit for identifying the current actual addition amount of the polymerization port member port; destination port number acquisition unit, according to the weighted value and the actual addition amount of the polymerization port member port, packets need to know the current object sent to the member port number;

报文发送单元、用于从所述目的成员端口发送所述报文。 Packet transmission means for transmitting the packet from the port the destination members.

[0012] 作为本发明的进一步改进,所述聚合端口中可包括若干实际加入的成员端口和空条目。 [0012] As a further improvement of the present invention, the polymerization may comprise a plurality of port member ports and the actual empty entry added.

[0013] 作为本发明的进一步改进,所述实际端口获取单元具体用于: 在系统中添加一寄存器; [0013] As a further improvement of the present invention, the actual port acquisition unit is configured to: add a register system;

识别当前聚合端口中包括的不同成员端口的数量m ; 将m存储与所述寄存器中以方便后续步骤的调用。 Identification number of the current aggregate ports comprise m different members of ports; the m stored in the register to facilitate the subsequent step of calls.

[0014] 作为本发明的进一步改进,所述目的端口号获取单元具体用于: [0014] As a further improvement of the present invention, the destination port number acquisition unit is configured to:

将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数; 根据当前获得的余数,匹配到相应的目的成员端口号。 The weighted value and the actual number of ports to the polymerization of the dividing member ports, to obtain a remainder; The remainder of the currently obtained, to the respective members of the order matching port number.

[0015] 与现有技术相比,本发明通过添加一个寄存器来存放实际加入聚合端口的端口数量,之后再根据加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号并进行报文的发送,实现了各端口的均勻分配,进而实现了聚合端口的负载均衡。 [0015] Compared with the prior art, the present invention is by adding a register to store the actual number of ports aggregated ports was added, and then after the polymerization according to the number of ports in the port member and the actual weight value is added, you need to know the current packet the members of the order sent to the port number of packets transmitted and, to achieve a uniform distribution of the ports, thus achieving load balancing aggregation port.

附图说明 BRIEF DESCRIPTION

[0016] 图1是现有技术中聚合端口中成员端口的配置示意图; [0016] FIG. 1 is a prior art port members polymerization schematic configuration of a port;

图2表示本发明一实施方式中实现聚合端口负载均衡的方法的工作流程图; 图3表示图2所描述的实施方式中聚合端口的成员端口配置示意图; 图4是本发明一实施方式中实现聚合端口负载均衡的装置的模块示意图。 Figure 2 shows a flow chart of the polymerization method of load balancing a port embodiment of the present invention implemented; port member port configuration diagram embodiment depicted in Figure 3 showing the polymerization FIG. 2; FIG. 4 is an embodiment of the present invention to achieve aggregation port load balancing module device FIG.

具体实施方式 Detailed ways

[0017] 以下将结合附图所示的具体实施方式对本发明进行详细描述。 [0017] The present invention will hereinafter be described in detail with reference to specific embodiments shown in the drawings. 但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所做出的结构、方法、或功能上的变换均包含在本发明的保护范围内。 However, these embodiments do not limit the present invention, the structure of those of ordinary skill in the art according to these embodiments made, methods, or conversion functions are included in the scope of the present invention.

[0018] 结合图2和图3所示,介绍本发明一实施方式中的实现聚合端口负载均衡的方法的工作原理。 [0018] in conjunction with FIGS. 2 and 3, describes a polymerization method works port load balancing implemented in the embodiment of the present invention.

[0019] 参图2所示,一种实现聚合端口负载均衡的方法,其为真真实现系统的负载均衡, 其包括如下步骤:Si、接收报文并根据报文属性计算获得一加权值;其中,端口聚合也叫做以太通道(ethernet channel),主要用于交换机之间连接。 [0019] reference to FIG. 2, a method of polymerization to achieve load balancing port, which is Barbara load balancing system, comprising the steps of: Si, the received message and calculates a weighted value is obtained based on packet attributes; wherein the polymerization is also called an Ethernet port channel (ethernet channel), it is mainly used to connect the switch. 优选地,聚合端口从网络上接受一段报文信息,报文信息中可包括IP地址、Mac地址等等。 Preferably, the polymerization period port accepts the message information from the network, the message information may include an IP address, Mac address, etc. 这边提及的加权值就是根据当前输入到聚合端口的报文信息中的IP地址、Mac地址信息等等来计算得出的,此技术为本领域技术人员所熟知的,故申请人在此不再予以赘述。 Weighted value mentioned here is based on the current input to the IP address of the message information in the aggregate interface, Mac address information and the like calculated by this technique are known to those skilled in the art, it is the applicant herein It will not be repeated here.

[0020] S2、识别当前实际加入聚合端口中的成员端口的数量;为了避免现有技术中出现的实际支持的条目数不是实际配置的成员端口数量的整数倍的情况,在此,定义实际加入聚合端口中的不同成员端口的数目相等。 [0020] S2, the identification number of ports in the port member of the actual current fed to the polymerization; in order to avoid the port number of entries in the actual number of members supported by the prior art appear not an integer multiple of the actual configuration, in this case, the definition of the actual added equal to the number of different members of the polymerization ports ports. 参图3所示,假设实际加入聚合端口中的成员端口的数量为3个(成员端口0、成员端口1、成员端口2),那此时端口0、端口1、端口2的数量均为1个,其为相等的数量,在其他可行的实施方式中,端口的种类不受限制,其存放于聚合端口中的各成员端口的数量满足相等的条件,便可以满足本发明的需求。 Reference to FIG. 3, assumed that the actual number of ports to the polymerization of member ports 3 (the member ports 0, 1 port member, the port member 2), that this time the number of port 0, port 1, port 2 are both 1 one, the number of which is equal, in other possible embodiments, the type of unrestricted port, which is stored in the member ports of polymerization equal to the number of ports to meet the conditions, can meet the demands of the present invention.

[0021] 优选地,本实施方式中,所以聚合端口中可包括若干实际加入的成员端口和空条目。 [0021] Preferably, in this embodiment, the port may comprise several polymeric member ports and the actual empty entry added. 例如,聚合端口总共支持的条目数为4,其中包括3个成员端口和一个置空的空条目。 For example, the number of entries in total support for the aggregated ports 4, including three members of the ports and a blank empty entry.

[0022] 步骤S2具体为: [0022] Step S2 is specifically:

在系统中添加一寄存器;优选地,寄存器可为数据寄存器。 Add a register in the system; preferably, the register may be a data register.

[0023] 识别当前聚合端口中包括的不同成员端口的数量m ;在本具体实施方式中,m的值为3 (图3) [0023] identifying the number of different members of the current aggregate ports port comprises m; in this embodiment, m is 3 (FIG. 3)

将m存储与所述寄存器中以方便后续步骤的调用。 The storing said m register to facilitate the call subsequent steps. 优选地,通过控制单元从所示寄存器中读出m的值并用于计算加权值。 Preferably, m is read out from the register value is shown by the control unit and used to calculate weighted values.

[0024] S3、根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号;所述步骤S3具体为: [0024] S3, the polymerization according to the number of ports of the port member and the actual weight value is added, to know the current packet to be sent to the port number of the members of the order; step S3 is specifically:

将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数;在本实施方式中,因为实际加入到聚合端口中的成员端口的数量为3,所以就用得到的加权值除以3得出余数; The amount of the polymerization ports of said port member and said actual weight value divided is added to obtain a number of I; in the present embodiment, since the actual amount added to the polymerization ports member ports 3, so with 3 weighted value obtained by dividing the remainder obtained;

之后,根据当前获得的余数,匹配到相应的目的成员端口号。 Thereafter, the remainder of the current available, matched to the appropriate destination port number of members. 优选地,当余数为1时,指定对应的目的成员端口号为1 ;当余数为2时,指定对应的目的成员端口号为2 ;当余数为3 时,指定对应的目的成员端口号为3 ;以此类推。 Preferably, when the remainder is 1, specifies the corresponding object member port number is 1; and when the remainder is 2, and associate the object member port number is 2; and when the remainder is 3, and associate the object member port number is 3 ; and so on.

[0025] S4、从所述目的成员端口发送所述报文。 [0025] S4, the port sends the packets from the destination members. 优选地,当余数为1时,指定对应的目的成员端口号为1,便将报文从位于聚合端口中的端口1发送出去;当余数为2时,指定对应的目的成员端口号为2,便将报文从位于聚合端口中的端口2发送出去;当余数为3时,指定对应的目的成员端口号为3,便将报文从位于聚合端口中的端口3发送出去;以此类推。 Preferably, when the remainder is 1, specifies the corresponding object member port number is 1, put the packets sent from the located aggregate interface ports 1; and when the remainder is 2, and associate the object member port number is 2, put the packets sent from port 2 is located in the polymerization ports; when the remainder is 3, the corresponding destination members designated port number is 3, put the packets sent from the aggregation port located 3 ports; and so on.

[0026] 参图4所示,本发明一具体实施方式中,一种实现聚合端口负载均衡的装置,其为真正实现系统的负载均衡,其包括如下单元: [0026] Cf. FIG. 4, a particular embodiment of the invention, a load balancing effect polymerization port device, which is a true load balancing system, comprising the following units:

报文接收单元10、用于接收报文并根据报文属性计算获得一加权值;其中,端口聚合也叫做以太通道(ethernet channe 1),主要用于交换机之间连接。 Packet receiving unit 10 for receiving packets and a weight value obtained by calculation according to the attribute of the message; wherein the polymerization is also called an Ethernet port channel (ethernet channe 1), mainly used to connect between switches. 优选地,聚合端口从网络上接受一段报文信息,报文信息中可包括IP地址、Mac地址等等。 Preferably, the polymerization period port accepts the message information from the network, the message information may include an IP address, Mac address, etc. 这边提及的加权值就是根据当前输入到聚合端口的报文信息中的IP地址、Mac地址信息等等来计算得出的,此技术为本领域技术人员所熟知的,故申请人在此不再予以赘述。 Weighted value mentioned here is based on the current input to the IP address of the message information in the aggregate interface, Mac address information and the like calculated by this technique are known to those skilled in the art, it is the applicant herein It will not be repeated here.

[0027] 实际端口获取单元20、用于识别当前实际加入聚合端口中的成员端口的数量;为了避免现有技术中出现的实际支持的条目数不是实际配置的成员端口数量的整数倍的情况,在此,定义实际加入聚合端口中的不同成员端口的数目相等。 [0027] The actual port acquisition unit 20 for identifying current actual addition amount of the polymerization port member port; where the number of ports to support members of the prior art in order to avoid the actual occurrence of the number of entries in the actual configuration is not an integer multiple, here, the definition of the actual addition of a polymerization different members ports equal to the number of ports. 参图3所示,假设实际加入聚合端口中的成员端口的数量为3个(成员端口0、成员端口1、成员端口2),那此时端口0、端口1、端口2的数量均为1个,其为相等的数量,在其他可行的实施方式中,端口的种类不受限制,其存放于聚合端口中的各成员端口的数量满足相等的条件,便可以满足本发明的需求。 Reference to FIG. 3, assumed that the actual number of ports to the polymerization of member ports 3 (the member ports 0, 1 port member, the port member 2), that this time the number of port 0, port 1, port 2 are both 1 one, the number of which is equal, in other possible embodiments, the type of unrestricted port, which is stored in the member ports of polymerization equal to the number of ports to meet the conditions, can meet the demands of the present invention.

[0028] 优选地,本实施方式中,所以聚合端口中可包括若干实际加入的成员端口和空条目。 [0028] Preferably, in this embodiment, the port may comprise several polymeric member ports and the actual empty entry added. 例如,聚合端口总共支持的条目数为4,其中包括3个成员端口和一个置空的空条目。 For example, the number of entries in total support for the aggregated ports 4, including three members of the ports and a blank empty entry.

[0029] 具体地,本单元用于可通过以下方式来实现: [0029] In particular, the present unit may be implemented for the following ways:

在系统中添加一寄存器;优选地,寄存器可为数据寄存器。 Add a register in the system; preferably, the register may be a data register.

[0030] 识别当前聚合端口中包括的不同成员端口的数量m ;在本具体实施方式中,m的值为3 (图3) [0030] identifying the number of different members of the current aggregate ports port comprises m; in this embodiment, m is 3 (FIG. 3)

将m存储与所述寄存器中以方便后续步骤的调用。 The storing said m register to facilitate the call subsequent steps. 优选地,通过控制单元从所示寄存器中读出m的值并用于计算加权值。 Preferably, m is read out from the register value is shown by the control unit and used to calculate weighted values.

[0031] 目的端口号获取单元30、用于根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号;所述目的端口号获取单元30具体用于: [0031] The destination port number acquisition unit 30, the polymerization according to the number of ports of the port member and the actual weight value is added, the current port number of known members of the order needs to be sent to the packet; the destination port number acquired unit 30 is specifically configured to:

将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数;在本实施方式中,因为实际加入到聚合端口中的成员端口的数量为3,所以就用得到的加权值除以3得出余数; The amount of the polymerization ports of said port member and said actual weight value divided is added to obtain a number of I; in the present embodiment, since the actual amount added to the polymerization ports member ports 3, so with 3 weighted value obtained by dividing the remainder obtained;

之后,根据当前获得的余数,匹配到相应的目的成员端口号。 Thereafter, the remainder of the current available, matched to the appropriate destination port number of members. 优选地,当余数为1时,指定对应的目的成员端口号为1 ;当余数为2时,指定对应的目的成员端口号为2 ;当余数为3 时,指定对应的目的成员端口号为3 ;以此类推。 Preferably, when the remainder is 1, specifies the corresponding object member port number is 1; and when the remainder is 2, and associate the object member port number is 2; and when the remainder is 3, and associate the object member port number is 3 ; and so on.

[0032] 报文发送单元40、用于从所述目的成员端口发送所述报文。 [0032] The packet sending unit 40, a port for sending the packet from the destination members. 优选地,当余数为1 时,指定对应的目的成员端口号为1,便将报文从位于聚合端口中的端口1发送出去;当余数为2时,指定对应的目的成员端口号为2,便将报文从位于聚合端口中的端口2发送出去; 当余数为3时,指定对应的目的成员端口号为3,便将报文从位于聚合端口中的端口3发送出去;以此类推。 Preferably, when the remainder is 1, specifies the corresponding object member port number is 1, put the packets sent from the located aggregate interface ports 1; and when the remainder is 2, and associate the object member port number is 2, put the packets sent from port 2 is located in the polymerization ports; when the remainder is 3, the corresponding destination members designated port number is 3, put the packets sent from the aggregation port located 3 ports; and so on.

[0033] 与现有技术相比,本发明通过添加一个寄存器来存放实际加入聚合端口的端口数量,之后再根据加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号并进行报文的发送,实现了各端口的均勻分配,进而实现了聚合端口的负载均衡。 [0033] Compared with the prior art, the present invention is by adding a register to store the actual number of ports aggregated ports was added, and then after the polymerization according to the number of ports in the port member and the actual weight value is added, you need to know the current packet the members of the order sent to the port number of packets transmitted and, to achieve a uniform distribution of the ports, thus achieving load balancing aggregation port.

[0034] 为了描述的方便,描述以上装置时以功能分为各种单元分别描述。 [0034] For convenience of description, the description of the above device is divided into various functional units are described. 当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。 Of course, the function of each unit is implemented in one or more software and / or hardware at the time of application of the present embodiment.

[0035] 通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。 [0035] By the above described embodiments can be seen, those skilled in the art can understand that the present application may be implemented by software plus a necessary universal hardware platform. 基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施方式或者实施方式的某些部分所述的方法。 Based on such understanding, the technical solutions of the present application or the nature of the part contributing to the prior art may be embodied in a software product, which computer software product may be stored in a storage medium such as ROM / RAM, magnetic disk, , an optical disc, and includes several instructions that enable a computer device (may be a personal computer, a server, or network device) to execute the methods of the various embodiments of the present application or embodiment of the.

[0036] 以上所描述的装置实施方式仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。 [0036] The apparatus of the above-described embodiments are merely illustrative, as a unit wherein the separate parts may be or may not be physically separate, parts displayed as units may be or may not be physical units, i.e., it may be located in one place, or may be distributed to multiple network units. 可以根据实际的需要选择其中的部分或者全部模块来实现本实施方式方案的目的。 Part or all of the modules may be selected according to actual needs to achieve the object of the embodiment of the present embodiment. 本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。 Those of ordinary skill in the art without creative efforts, can be understood and implemented.

[0037] 本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。 [0037] The present application may be described in the general context of computer-executable instructions, executed by a computer, such as program modules. 一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。 Generally, program modules include performing particular tasks or implement particular abstract data types routines, programs, objects, components, data structures, and the like. 也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。 This application may be practiced in a distributed computing environment, the distributed computing environments, where tasks are performed by remote processing devices that are linked through a communications network. 在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。 In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices in.

[0038] 应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。 [0038] It should be understood that while the present specification be described in terms of embodiments, but not every embodiment contains only a separate aspect, this narrative description only for the sake of clarity, those skilled in the art should be used as a specification overall, the embodiments of the technical solutions may be suitably combined to form other embodiments of the present art can be appreciated in the art.

[0039] 上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,它们并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。 [0039] A series of the detailed description set forth above is merely for the feasibility of specifically described embodiments of the present invention, they are not intended to limit the scope of the present invention, who have not departing from the spirit of the present invention the equivalent skills made embodiment or changes be included within the scope of the present invention.

Claims (8)

1. 一种实现聚合端口负载均衡的方法,其特征在于,其包括如下步骤:51、接收报文并根据报文属性计算获得一加权值;52、识别当前实际加入聚合端口中的成员端口的数量;53、根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号;54、从所述目的成员端口发送所述报文。 A method of load balancing to achieve port polymerization, characterized in that it comprises the steps of: 51, the received message and calculates a weighted value is obtained based on packet attributes; 52, identifying the actual current fed to the polymerization of ports in the port member quantity; 53, according to the number of member ports in the aggregation port of said weighted values ​​are added and the actual, known members of the order the current port number to packets to be sent; 54, port sends the packet from the destination members.
2.根据权利要求1所述的方法,其特征在于,所述聚合端口中可包括若干实际加入的成员端口和空条目。 2. The method according to claim 1, wherein the polymeric port and a port number of members may comprise practical empty entry added.
3.根据权利要求1所述的方法,其特征在于,所述步骤S2具体为: 在系统中添加一寄存器;识别当前聚合端口中包括的不同成员端口的数量m ; 将m存储与所述寄存器中以方便后续步骤的调用。 3. The method according to claim 1, wherein said Step S2 is specifically: adding a register system; identifying the number of the current aggregate ports comprise m different members of ports; the register storing the m to facilitate the subsequent calls steps.
4.根据权利要求1所述的方法,其特征在于,所述步骤S3具体为:将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数; 根据当前获得的余数,匹配到相应的目的成员端口号。 4. The method according to claim 1, wherein the step S3 is specifically: the weighted added value and the actual amount of the polymerization ports dividing member port, obtaining a number of I; the current the remainder obtained matched to the appropriate destination port number of members.
5. 一种实现聚合端口负载均衡的装置,其特征在于,其包括如下单元: 报文接收单元、用于接收报文并根据报文属性计算获得一加权值; 实际端口获取单元、用于识别当前实际加入聚合端口中的成员端口的数量;目的端口号获取单元、用于根据所述加权值和所述实际加入聚合端口中的成员端口的数量,获知当前报文需要发送到的目的成员端口号;报文发送单元、用于从所述目的成员端口发送所述报文。 A port load balancing to achieve a polymerization apparatus, characterized in that it comprises the following units: packet receiving means for receiving a packet and obtaining a weighted value is calculated based on packet attributes; the actual port acquisition unit for identifying the actual amount of current fed to the polymerization of member ports in the port; destination port number acquisition unit, the polymerization according to the number of ports of the port member and the actual weight value is added, to know the current packet to be transmitted to the object member port No.; packet sending unit, for transmitting from the destination port of the packet member.
6.根据权利要求5所述的装置,其特征在于,所述聚合端口中可包括若干实际加入的成员端口和空条目。 6. The apparatus as claimed in claim 5, wherein said polymeric port and a port number of members may comprise practical empty entry added.
7.根据权利要求5所述的装置,其特征在于,所述实际端口获取单元具体用于: 在系统中添加一寄存器;识别当前聚合端口中包括的不同成员端口的数量m ; 将m存储与所述寄存器中以方便后续步骤的调用。 7. The apparatus according to claim 5, characterized in that the actual port obtaining unit configured to: add a register system; identifying the number of the current aggregate ports comprise m different member ports; storing the m the call register to facilitate the subsequent steps.
8.根据权利要求5所述的装置,其特征在于,所述目的端口号获取单元具体用于: 将所述加权值和所述实际加入聚合端口中的成员端口的数量相除,获得一余数; 根据当前获得的余数,匹配到相应的目的成员端口号。 8. The device according to claim 5, wherein said destination port number acquisition unit is configured to: the weighted value and the actual addition amount of the polymerization ports dividing member port, a remainder obtained number; according to the current remainder obtained objects matched to the corresponding member port number.
CN 201110410765 2011-12-12 2011-12-12 Method and device for realizing load balance of trunk port CN102413053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110410765 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
CN 201110410765 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
CN 201110410765 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 (1)

* 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

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 (2)

* 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 华为技术有限公司 Balanced physical port load sharing method, apparatus and system link aggregation

Similar Documents

Publication Publication Date Title
US8355328B2 (en) Dynamic load balancing
EP2413550A1 (en) Methods and apparatus related to route selection within a network
US8553710B1 (en) Fibre channel credit-based link flow control overlay onto fibre channel over ethernet
US20130343191A1 (en) Ensuring predictable and quantifiable networking performance
Khalili et al. MPTCP is not pareto-optimal: performance issues and a possible solution
US7149817B2 (en) Infiniband TM work queue to TCP/IP translation
US8954992B2 (en) Distributed and scaled-out network switch and packet processing
JP5497244B2 (en) The method for implementing flow control in a switching network, the master switch, switching network, program, device, system
CN103595648B (en) A method for load balancing in a receiving side system and a server
US7962647B2 (en) Application delivery control module for virtual network switch
US7876689B2 (en) Method and apparatus for load balancing network interface adapters based on network information
US8855114B2 (en) Virtualized application acceleration infrastructure
WO2014068426A1 (en) A method for dynamic load balancing of network flows on lag interfaces
CN101217467B (en) An inter-core load dispensing device and method
EP2008387A2 (en) Two-way link aggregation
US7616568B2 (en) Generic packet generation
US7529180B1 (en) Switch failover for aggregated data communication links
US9906407B1 (en) Methods and apparatus for scalable resilient networks
US8155518B2 (en) Dynamic load balancing of fibre channel traffic
CN102160328B (en) Central controller for coordinating multicast message transmissions in distributed virtual network switch environment
CN104584491A (en) System and method providing distributed virtual routing and switching (DVRS)
CN104468358A (en) Message forwarding method and device of distributive virtual switch system
CN105191214A (en) Network bandwidth allocation in multi-tenancy cloud computing networks
Wang et al. Dynamic SDN controller assignment in data center networks: Stable matching with transfers
Ahmed et al. Cloud computing simulators: A detailed survey and future direction

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)