CN102065022B - Method and device for flow balance of aggregation port, aggregation port and network equipment - Google Patents
Method and device for flow balance of aggregation port, aggregation port and network equipment Download PDFInfo
- Publication number
- CN102065022B CN102065022B CN2011100396236A CN201110039623A CN102065022B CN 102065022 B CN102065022 B CN 102065022B CN 2011100396236 A CN2011100396236 A CN 2011100396236A CN 201110039623 A CN201110039623 A CN 201110039623A CN 102065022 B CN102065022 B CN 102065022B
- Authority
- CN
- China
- Prior art keywords
- flow
- port
- aggregation port
- unit interval
- strategy
- 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.)
- Expired - Fee Related
Links
- 230000002776 aggregation Effects 0.000 title claims abstract description 152
- 238000004220 aggregation Methods 0.000 title claims abstract description 151
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000035772 mutation Effects 0.000 claims 5
- 238000004321 preservation Methods 0.000 claims 4
- 230000008859 change Effects 0.000 abstract description 19
- 238000006116 polymerization reaction Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种聚合口流量平衡的方法、装置、聚合口及网络设备,该方法包括:选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;周期地在单位时间内,判断该聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围;若是,重新确定单位时间内各成员口流量差异最小的流量平衡策略作为聚合口当前所使用的流量平衡策略;若否,维持聚合口当前流量平衡策略不变。本发明可自动实现最优流量平衡策略的配置,在成员口之间流量差异变化时,实时地对流量平衡策略进行调整,以获得流量变化后的最优流量平衡策略,使得流量平衡策略能够随着聚合口流量变化真正起到流量平衡的效用。
The invention discloses a method, device, aggregation port and network equipment for flow balance at an aggregation port. The method includes: selecting a flow balancing strategy with the smallest flow difference among member ports within a unit time as the flow balancing strategy used by the aggregation port; Within a unit time, judge whether the aggregation port uses the selected flow balancing strategy, whether the flow difference of each member port becomes larger and the range of change exceeds the set range; if so, re-determine the flow rate of each member port within a unit time The traffic balancing policy with the smallest difference is used as the traffic balancing policy currently used by the aggregation port; if not, the current traffic balancing policy of the aggregation port remains unchanged. The present invention can automatically realize the configuration of the optimal flow balance strategy, and adjust the flow balance strategy in real time when the flow difference between member ports changes, so as to obtain the optimal flow balance strategy after the flow change, so that the flow balance strategy can be The change of flow rate at the aggregation port really plays the role of flow balance.
Description
技术领域 technical field
本发明涉及网络通信领域,尤其涉及一种聚合口流量平衡的方法、装置、聚合口及网络设备。The invention relates to the field of network communication, in particular to a method, device, aggregation port and network equipment for traffic balance of an aggregation port.
背景技术 Background technique
端口聚合是指将多个端口汇聚在一起形成一个虚拟的汇聚端口,以实现出/入负荷在汇聚端口中各个成员端口中的分担,同时也提供了更高的连接可靠性。所形成的汇聚端口通常称为聚合口(Aggregate Port),组成聚合口的成员称为聚合成员口。Port aggregation refers to the aggregation of multiple ports together to form a virtual aggregation port, so as to realize the sharing of inbound/outbound load among the member ports in the aggregation port, and also provide higher connection reliability. The formed aggregate port is usually called aggregate port (Aggregate Port), and the members forming the aggregate port are called aggregate member ports.
端口聚合对比于普通端口的最大优点在于可以提供更大的带宽,如图1所示,设备A上有8个百兆口和设备B上的8个百兆口连接,每个连接在逻辑上只能提供一个百兆的带宽。如果将设备A的8个口组成一个聚合口,设备B上8个口也组成一个聚合口,就相当于两台设备通过一个聚合口连接,这样可以在逻辑上模拟出接近于一个千兆口的带宽,也就是存在8个成员链路共同承担该聚合口的流量。Compared with ordinary ports, the biggest advantage of port aggregation is that it can provide greater bandwidth. As shown in Figure 1, there are 8 100M ports on device A and 8 100M ports on device B. Each connection is logically Only one hundred megabytes of bandwidth can be provided. If the 8 ports of device A form an aggregation port, and the 8 ports of device B also form an aggregation port, it is equivalent to connecting two devices through an aggregation port, which can simulate a gigabit port logically. bandwidth, that is, there are 8 member links to share the traffic of the aggregation port.
聚合口上的流量平衡配置是指聚合口可以根据报文的特征字段把流量平均地分配到其成员链路中,以避免流量集中在个别成员口上。The traffic balance configuration on the aggregation port means that the aggregation port can evenly distribute traffic to its member links according to the characteristic field of the packet, so as to avoid traffic concentration on individual member ports.
目前聚合口的流量平衡的常用的几种策略包括:基于源MAC地址、基于目的MAC地址、基于源MAC地址+目的MAC地址、基于源IP地址、基于目的IP地址以及基于源IP地址+目的IP地址等聚合口流量平衡的策略。At present, several commonly used strategies for traffic balancing of aggregation ports include: based on source MAC address, based on destination MAC address, based on source MAC address+destination MAC address, based on source IP address, based on destination IP address, and based on source IP address+destination IP Address and other aggregation port traffic balance policies.
以基于源MAC地址的流量平衡策略为例,它的具体做法是根据报文的源MAC地址把报文分配到聚合口的各个成员口中进行转发。不同源MAC的报文,转发的成员口不同,相同源MAC的报文,从同一个成员口转发。通过流量平衡策略,可以将AP口上的流量按某种规则平均地分配到各个成员口上,避免所有流量集中从某个成员口转发,提高聚合口的使用效率。Take the source MAC address-based traffic balancing strategy as an example. Its specific method is to distribute packets to each member port of the aggregation port for forwarding according to the source MAC address of the packet. Packets with different source MAC addresses are forwarded through different member interfaces, and packets with the same source MAC address are forwarded through the same member interface. Through the traffic balance strategy, the traffic on the AP port can be evenly distributed to each member port according to a certain rule, so as to avoid all traffic being forwarded from a certain member port and improve the utilization efficiency of the aggregation port.
目前常用的聚合口的流量平衡策略只能由管理员预先择一配置,一旦网络流量发生变化,聚合口上的流量平衡策略可能不再是最优,因此无法起到较佳的平衡流量的效果。Currently, the commonly used traffic balancing policy on the aggregation port can only be pre-configured by the administrator. Once the network traffic changes, the traffic balancing policy on the aggregation port may no longer be optimal, so it cannot achieve a better effect of balancing traffic.
举例来说,如图2所示的应用场景,设备A和设备B通过一个聚合口连接,同时设备A还连接了设备X和设备Y。设备A和设备B之间的聚合口包含两个成员口。假设管理员对设备A和设备B之间聚合口配置的流量平衡策略是基于源MAC地址的流量平衡策略,设备X和Y需要和外网通讯时,假设设备X的MAC地址为00-00-00-00-00-01,设备Y的MAC地址为00-00-00-00-00-02,根据配置的流量平衡策略,设备X的流量从链路1传输,设备Y的流量从链路2传输。一旦设备Y发生故障,只剩下设备X和外网通讯时,所有流量仍然从链路1上传输,这就造成了链路2的浪费。For example, in the application scenario shown in Figure 2, device A and device B are connected through an aggregation port, and device A is also connected to device X and device Y. The aggregation port between device A and device B contains two member ports. Assume that the traffic balancing policy configured by the administrator on the aggregation port between device A and device B is based on the source MAC address. When devices X and Y need to communicate with the external network, assume that the MAC address of device X is 00-00- 00-00-00-01, the MAC address of device Y is 00-00-00-00-00-02, according to the configured traffic balance policy, the traffic of device X is transmitted through
发明内容 Contents of the invention
本发明实施例提供了一种聚合口流量平衡方法、装置、聚合口及网络设备,用以解决现有技术中聚合口的流量平衡策略不能根据网络流量的变化而适应性调整导致无法达到平衡流量的效果的问题。The embodiment of the present invention provides a flow balancing method and device of an aggregation port, an aggregation port and network equipment, which are used to solve the problem that the flow balancing strategy of the aggregation port in the prior art cannot be adaptively adjusted according to the change of network traffic, resulting in failure to achieve balanced traffic effect problem.
本发明实施例提供的一种聚合口流量平衡的方法,包括:A method for balancing flow at an aggregation port provided in an embodiment of the present invention includes:
选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;Select the traffic balancing policy with the smallest flow difference among member ports per unit time as the traffic balancing policy used by the aggregation port;
周期地在单位时间内,判断该聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围;Periodically, within a unit time, judge whether the aggregate port uses the selected traffic balance strategy, whether the flow difference of each member port becomes larger and the range of change exceeds the set range;
若是,重新确定单位时间内各成员口流量差异最小的流量平衡策略作为所述聚合口当前所使用的流量平衡策略;If so, re-determine the flow balancing strategy with the smallest flow difference among member ports per unit time as the flow balancing strategy currently used by the aggregation port;
若否,维持所述聚合口当前流量平衡策略不变;If not, maintaining the current traffic balance policy of the aggregation port unchanged;
所述单位时间内各成员口流量差异最小的流量平衡策略,通过下述方法确定:The flow balance policy with the smallest flow difference among member ports within the unit time is determined by the following method:
针对所述聚合口所支持的每一种流量平衡策略,计算单位时间内所述聚合口使用该流量平衡策略的情况下,在单位时间内速率的偏差率;For each traffic balancing strategy supported by the aggregation port, calculate the deviation rate of the rate per unit time when the aggregation port uses the traffic balancing strategy per unit time;
将每种流量平衡策略所得到的所述偏差率进行比较,选择所述偏差率最小的流量平衡策略作为所述单位时间内各成员口流量差异最小的流量平衡策略。The deviation rates obtained by each flow balancing strategy are compared, and the flow balancing strategy with the smallest deviation rate is selected as the flow balancing strategy with the smallest flow difference among member ports within the unit time.
本发明实施例提供的一种聚合口流量平衡的装置,包括:An embodiment of the present invention provides a flow balancing device at a polymerization port, including:
策略选择及调整模块,用于选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;以及在判断模块判断结果为是时,重新确定单位时间内各成员口流量差异最小的流量平衡策略作为所述聚合口当前所使用的流量平衡策略;以及在判断结果为否时,维持聚合口当前流量平衡策略不变;所述单位时间内各成员口流量差异最小的流量平衡策略,通过下述方法确定:针对所述聚合口所支持的每一种流量平衡策略,计算单位时间内所述聚合口使用该流量平衡策略的情况下,在单位时间内速率的偏差率;将每种流量平衡策略所得到的所述偏差率进行比较,选择所述偏差率最小的流量平衡策略作为所述单位时间内各成员口流量差异最小的流量平衡策略;The strategy selection and adjustment module is used to select the flow balance strategy with the smallest flow difference among member ports per unit time as the flow balance strategy used by the aggregation port; The flow balancing strategy with the smallest flow difference is used as the flow balancing strategy currently used by the aggregation port; and when the judgment result is no, the current flow balancing strategy of the aggregation port remains unchanged; the flow difference of each member port in the unit time is the smallest The flow balance strategy is determined by the following method: for each flow balance strategy supported by the aggregation port, calculate the deviation rate of the rate per unit time when the flow balance strategy is used by the aggregation port in a unit time ; Comparing the deviation rates obtained by each flow balancing strategy, selecting the flow balancing strategy with the smallest deviation rate as the flow balancing strategy with the smallest flow difference among member ports within the unit time;
判断模块,用于在选择所述流量差异最小的流量平衡策略之后,周期地在单位时间内,判断该聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围。The judging module is configured to, after selecting the traffic balancing strategy with the smallest traffic difference, periodically judge whether the aggregation port uses the selected traffic balancing strategy, whether the traffic difference of each member port becomes larger and The range of change exceeds the set range.
本发明实施例提供的一种聚合口,包括本发明实施例提供的聚合口流量平衡的装置。An aggregation port provided by an embodiment of the present invention includes the flow balancing device for an aggregation port provided by an embodiment of the present invention.
本发明实施例提供的一种网络设备,该网络设备包括本发明实施例提供的上述聚合口。A network device provided by an embodiment of the present invention, the network device includes the above aggregation port provided by the embodiment of the present invention.
本发明实施例的有益效果包括:The beneficial effects of the embodiments of the present invention include:
本发明实施例提供的聚合口流量平衡的方法、装置、聚合口及网络设备,首先选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;随后周期地在单位时间内,判断聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围;若是,则重新确定单位时间内各成员口流量差异最小的流量平衡策略作为该聚合口当前所使用的流量平衡策略,否则维持当前流量平衡策略不变。本发明实施例不需要预先对聚合口配置流量平衡策略,自动实现最优流量平衡策略的配置,并且,可以在成员口之间流量差异变化时,实时地对流量平衡策略进行调整,以获得流量变化后的最优流量平衡策略,使得流量平衡策略能够随着聚合口流量变化真正起到流量平衡的效用。The method, device, aggregation port, and network equipment provided by the embodiments of the present invention firstly select the flow balancing strategy with the smallest flow difference among member ports per unit time as the traffic balancing strategy used by the aggregation port; then periodically In unit time, judge whether the flow difference of each member port becomes larger and the range of change exceeds the set range when the aggregation port uses the selected flow balancing strategy; if so, re-determine the minimum flow difference of each member port in unit time The traffic balancing policy of the aggregation interface is currently used as the traffic balancing policy, otherwise the current traffic balancing policy remains unchanged. The embodiment of the present invention does not need to pre-configure the traffic balance policy on the aggregation port, and automatically realizes the configuration of the optimal traffic balance policy, and can adjust the traffic balance policy in real time when the traffic difference between the member ports changes, so as to obtain the traffic The changed optimal flow balance strategy enables the flow balance strategy to truly play a role in flow balance as the aggregation port flow changes.
附图说明 Description of drawings
图1为现有技术中聚合口的示意图;Fig. 1 is the schematic diagram of aggregation port in the prior art;
图2为现有技术中一种通过聚合口应用场景的连接示意图;FIG. 2 is a schematic diagram of a connection through an aggregation port application scenario in the prior art;
图3为本发明实施例提供的聚合口流量平衡的方法的流程图;FIG. 3 is a flow chart of a method for balancing flow at an aggregation port provided by an embodiment of the present invention;
图4为本发明实施例提供的一个实例的连接示意图;FIG. 4 is a schematic connection diagram of an example provided by an embodiment of the present invention;
图5为本发明实施例提供的聚合口流量平衡的装置的结构示意图。Fig. 5 is a schematic structural diagram of a device for balancing flow at a polymerization port provided by an embodiment of the present invention.
具体实施方式 Detailed ways
下面结合附图,对本发明实施例提供的一种聚合口流量平衡的方法、装置、聚合口及网络设备的具体实施方式进行详细地说明。The specific implementation manners of a method, device, aggregation port and network equipment provided by the embodiments of the present invention for traffic balancing at an aggregation port will be described in detail below with reference to the accompanying drawings.
本发明实施例提供的聚合口流量平衡的方法,如图3所示,包括:The method for balancing flow at an aggregation port provided by the embodiment of the present invention, as shown in FIG. 3 , includes:
S301、选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;S301. Select a traffic balancing policy with the smallest flow difference among member ports per unit time as the traffic balancing policy used by the aggregation port;
S302、周期地在单位时间内,判断该聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围;若是,执行下述步骤S303;若否,执行下述步骤S304;S302. Periodically, within a unit time, judge whether the aggregation port uses the selected traffic balancing strategy, whether the flow difference of each member port becomes larger and the range of change exceeds the set range; if so, perform the following step S303; If not, perform the following step S304;
S303、重新确定单位时间内各成员口流量差异最小的流量平衡策略,并将重新确定的所述流量平衡策略作为所述聚合口当前所使用的流量平衡策略,然后转向执行步骤S302;S303. Re-determine the flow balance strategy with the smallest flow difference among member ports within a unit time, and use the re-determined flow balance strategy as the flow balance strategy currently used by the aggregation port, and then turn to step S302;
S304、维持所述聚合口当前流量平衡策略不变,然后转向执行步骤S302。S304. Keep the current traffic balance policy of the aggregation port unchanged, and then turn to step S302.
下面对上述各步骤进行详细地说明。The above steps will be described in detail below.
在上述步骤S301~S304中,在聚合口开始工作的初始,并不采用管理员预先配置流量平衡策略的方法,而是根据该聚合口所支持的各种流量平衡策略下该聚合口各成员口流量差异的大小选举出一个差异最小的流量平衡策略作为当前聚合口所使用的流量平衡策略,后续再不断根据每个周期内得到的该聚合口各成员口流量差异的变化情况,进行适当的调整。In the above steps S301-S304, at the beginning of the aggregate port’s work, the administrator does not use the method of pre-configuring the traffic balance policy, but according to the various traffic balance policies supported by the aggregate port, each member port of the aggregate port According to the size of the traffic difference, a traffic balancing strategy with the smallest difference is selected as the traffic balancing strategy used by the current aggregation port, and then it is continuously adjusted according to the change of the traffic difference of each member port of the aggregation port obtained in each cycle .
具体来说,上述步骤S301中选择单位时间内各成员口流量差异最小的流量平衡策略的步骤,以及步骤S303中,重新确定单位时间内各成员口流量差异最小的流量平衡策略,通过下述方式实现:Specifically, the step of selecting the flow balancing strategy with the smallest flow difference among member ports per unit time in the above step S301, and re-determining the flow balance strategy with the smallest flow difference among member ports per unit time in step S303, through the following methods accomplish:
针对该聚合口所支持的每一种流量平衡策略,计算单位时间内该聚合口使用该流量平衡策略的情况下,在单位时间内速率的偏差率;For each traffic balancing strategy supported by the aggregation port, calculate the deviation rate of the rate per unit time when the aggregation port uses the traffic balancing strategy per unit time;
将每种流量平衡策略所得到的偏差率进行比较,选择偏差率最小的流量平衡策略作为单位时间内各成员口流量差异最小的流量平衡策略。Compare the deviation rates obtained by each flow balancing strategy, and select the flow balancing strategy with the smallest deviation rate as the flow balancing strategy with the smallest flow difference among member ports per unit time.
在上述步骤S302中,聚合口在使用所选择的流量平衡策略的情况下,单位时间内各成员口流量差异,也通过计算本周期内该聚合口速率的偏差率来实现。In the above step S302, when the aggregation port uses the selected traffic balancing strategy, the flow difference of each member port per unit time is also realized by calculating the deviation rate of the aggregation port rate in this period.
具体来说,上述步骤S301~S303中,聚合口速率的偏差率反映了该聚合口各成员口之间流量差异的大小,越大则证明该聚合口各成员口之间流量差异较大,存在彼此流量不平衡的现象,越小则证明聚合口各成员口之间流量差异较小,彼此流量较为均衡。其计算方法如下:Specifically, in the above steps S301-S303, the deviation rate of the aggregation port rate reflects the size of the flow difference between the member ports of the aggregation port. The smaller the flow imbalance between each other, the smaller the flow difference between the member ports of the aggregation port is, and the mutual flow is more balanced. Its calculation method is as follows:
1、在单位时间内,计算该聚合口各个成员口的速率的标准差,以及各个成员口速率的总和;1. Calculate the standard deviation of the rate of each member port of the aggregation port and the sum of the rate of each member port within a unit of time;
2、将标准差除以各个成员口速率的总和,得到该聚合口单位时间内速率的偏差率。2. Divide the standard deviation by the sum of the rates of each member port to obtain the deviation rate of the rate per unit time of the aggregation port.
举例来说,假设该聚合口内有N个成员口,在单位时间内,各个成员口的速率分别为X1、X2......Xn,计算单位时间内该聚合口各成员口的速率的标准差的公式如下:For example, assuming that there are N member ports in the aggregation port, and the rate of each member port is X 1 , X 2 ... X n in unit time, calculate the rate of each member port in the aggregation port in unit time The formula for the standard deviation of the rate is as follows:
其中: in:
w为X1、X2......Xn的平均值;w is the average value of X 1 , X 2 ... X n ;
X1、X2......Xn是N个成员口在单位时间内的速率。X 1 , X 2 . . . X n are the rates of N member ports in unit time.
其中:in:
为N个成员口速率的总和。 It is the sum of the rates of N member interfaces.
之所以采用各成员口速率的标准差来衡量各成员口流量差异的大小,是因为标准差用于表征数据离散的程度,上述计算速率偏差的公式中,将各成员口速率的标准差除以聚合口速率(各成员口速率总和)的目的在于消除接口速率绝对值所带来的影响,使得不同带宽的聚合口能够通过一个统一的阈值来衡量偏差率变化是否超过设定的范围,为了使聚合口能够更均匀地将不同流量分散到各个成员口上,需要选取各成员口的速率的偏差率最小的流量平衡策略作为聚合口当前所使用的流量平衡策略。The reason why the standard deviation of the rate of each member port is used to measure the flow difference of each member port is because the standard deviation is used to represent the degree of data dispersion. In the above formula for calculating the rate deviation, the standard deviation of the rate of each member port is divided by The purpose of aggregation interface rate (the sum of the rate of each member interface) is to eliminate the impact of the absolute value of the interface rate, so that aggregation interfaces with different bandwidths can use a unified threshold to measure whether the deviation rate change exceeds the set range. The aggregation port can distribute different traffic to each member port more evenly, so it is necessary to select the traffic balancing strategy with the smallest deviation rate of the rate of each member port as the traffic balancing strategy currently used by the aggregation port.
较佳地,本发明实施例提供的聚合口流量平衡的方法,在上述步骤S301之后,还包括保存所选择的流量平衡策略在单位时间内速率的偏差率的步骤。Preferably, the method for balancing traffic at the aggregation port provided by the embodiment of the present invention further includes the step of saving the deviation rate of the rate per unit time of the selected traffic balancing strategy after the above step S301.
由此,在上述步骤S302中,该单位时间内各成员口流量差异变大且变化幅度超出设定的范围,可以通过下述方式来判定:首先计算该单位时间内该聚合口速率的偏差率,判断该单位时间内聚合口速率的偏差率是否大于之前保存的偏差率;在判断结果为是的情况下,进一步判断该单位时间内聚合口速率的偏差率与保存的偏差率之间的差值是否大于设定的第一阈值;若是,则可判断该单位时间内各成员口流量差异变大且变化幅度超出了设定范围。Therefore, in the above-mentioned step S302, if the difference in the flow rate of each member port in the unit time becomes larger and the change range exceeds the set range, it can be judged in the following way: first calculate the deviation rate of the aggregation port rate in the unit time , to judge whether the deviation rate of the polymerization port rate in this unit time is greater than the previously saved deviation rate; if the judgment result is yes, further judge the difference between the deviation rate of the polymerization port rate in this unit time and the saved deviation rate Whether the value is greater than the set first threshold; if so, it can be judged that the difference in the flow rate of each member port within the unit time becomes larger and the range of change exceeds the set range.
较佳地,在上述步骤S303重新确定单位时间内各成员口流量差异最小的流量平衡策略并将其作为所述聚合口当前所使用的流量平衡策略的步骤之后,本发明实施例提供的聚合口流量平衡的方法,还可以执行下述步骤:Preferably, after the above step S303 re-determines the flow balancing strategy with the smallest flow difference among member ports per unit time and takes it as the flow balancing strategy currently used by the aggregation port, the aggregation port provided by the embodiment of the present invention For the flow balancing method, the following steps can also be performed:
将步骤S303重新确定的流量平衡策略在单位时间内速率的偏差率与保存的偏差率进行比较;如果重新确定的流量平衡策略在单位时间内速率的偏差率较保存的偏差率小,那么使用重新确定的流量平衡策略在单位时间内速率的偏差率更新所保存的偏差率。Compare the deviation rate per unit time of the traffic balance strategy re-determined in step S303 with the saved deviation rate; The deviation rate of the rate per unit time of the determined traffic balance strategy updates the saved deviation rate.
如果重新确定的流量平衡策略在单位时间内速率的偏差率不小于所保存的偏差率,那么不执行对保存的偏差率进行更新的操作。If the deviation rate of the re-determined traffic balance policy per unit time is not less than the saved deviation rate, the operation of updating the saved deviation rate is not performed.
这样做的益处在于,如果重新确定的流量平衡策略在单位时间内速率的偏差率较保存的偏差率小,则说明当前网络流量朝更符合当前流量平衡策略的方向变化,或者说使用该流量平衡策略下该端口的各成员口的流量更趋于均匀,如果此时对保存的偏差率进行更新,使得下一次的调整是以基于当前更新后的偏差率为基础进行判定后进行的调整,那么由于保存的偏差率较之前更小,对于流量平衡策略的下一次调整来说,其触发条件则显得更为严格(可以想象,如果保存的偏差率存在不断变小的趋势,极端的理想状态是所保存的偏差率为零,即只要出现各个端口流量不平衡的状态就需要进行相应调整),在第一阈值不变的情况下,触发流量平衡策略的偏差率降低,提高了调整的灵敏度,使得流量平衡策略的调整更为灵活。The advantage of this is that if the deviation rate of the re-determined traffic balancing policy per unit time is smaller than the saved deviation rate, it means that the current network traffic is changing in a direction that is more in line with the current traffic balancing policy, or using the traffic balancing policy Under the policy, the traffic of each member port of the port tends to be more uniform. If the saved deviation rate is updated at this time, the next adjustment is based on the current updated deviation rate. Since the saved deviation rate is smaller than before, the trigger conditions for the next adjustment of the traffic balance strategy are more stringent (it is conceivable that if the saved deviation rate has a tendency to decrease continuously, the extreme ideal state is The saved deviation rate is zero, that is, as long as the traffic imbalance of each port occurs, it needs to be adjusted accordingly), in the case of the first threshold unchanged, the deviation rate of triggering the traffic balance strategy is reduced, which improves the sensitivity of the adjustment. This makes the adjustment of the traffic balancing policy more flexible.
较佳地,为了避免网络短时间内流量异常抖动导致的不断引发流量平衡策略的相关运算和调整的震荡,本发明实施例提供的上述聚合口流量平衡的方法中,还可以在S302中,每次判断出该单位时间内各成员口流量差异变大且变化幅度超出设定的范围时,统计出现单位时间内各成员口流量差异变大且变化幅度超出设定的范围的情况的次数;并且判断当前周期统计的次数是否达到设定的第二阈值,并在达到所述第二阈值时,才转向执行重新确定单位时间内成员口流量差异最小的流量平衡策略的步骤。通过设定特定的出现流量差异变化超出设定范围的次数,在出现这种情况达到设定的阈值时,才发起重新确定流量差异最小的流量平衡策略的步骤,可避免短时间内流量异常抖动所引发的震荡问题。Preferably, in order to avoid fluctuations caused by abnormal traffic jitter in a short period of time in the network, which continuously triggers related calculations and adjustments of the traffic balancing strategy, in the above method for balancing traffic at the aggregation port provided by the embodiment of the present invention, in S302, each When it is judged that the difference in the flow rate of each member port in the unit time becomes larger and the range of change exceeds the set range, count the number of times that the flow rate difference of each member port in the unit time becomes larger and the range of change exceeds the set range; and Judging whether the number of counts counted in the current period reaches the set second threshold, and when the second threshold is reached, turn to the step of re-determining the flow balancing policy with the smallest flow difference between member ports within a unit time. By setting a specific number of times when the traffic difference changes beyond the set range, when this situation reaches the set threshold, the step of re-determining the traffic balancing strategy with the smallest traffic difference can be initiated, which can avoid abnormal traffic jitter in a short period of time caused vibration problems.
为了更清楚地说明本发明实施例提供的上述聚合口流量平衡的方法,下面具一个简单的实例进行说明:In order to more clearly illustrate the above method of flow balance at the polymerization port provided by the embodiment of the present invention, a simple example is used below to illustrate:
如图4所示,设备A和设备B通过一个聚合口连接,该聚合口由2个成员口组成。3台设备X、Y、Z和A连接,2台设备M、N和设备B连接。假设设备A仅支持基于源MAC、基于目的MAC这两种流量平衡策略。假设设备X、Y、Z的源MAC分别为00-00-00-00-00-01、00-00-00-00-00-02和00-00-00-00-00-03。假设设备M、N的源MAC分别为01-23-45-00-00-01和01-23-45-00-00-02。设备A上预设的单位时间为1分钟,第一阈值为0.2。As shown in Figure 4, device A and device B are connected through an aggregation port, which consists of two member ports. 3 devices X, Y, Z and A are connected, 2 devices M, N and device B are connected. Assume that device A supports only source MAC-based and destination MAC-based traffic balancing policies. Assume that the source MAC addresses of devices X, Y, and Z are 00-00-00-00-00-01, 00-00-00-00-00-02, and 00-00-00-00-00-03, respectively. Assume that the source MAC addresses of devices M and N are 01-23-45-00-00-01 and 01-23-45-00-00-02 respectively. The preset unit time on device A is 1 minute, and the first threshold is 0.2.
聚合口流量平衡策略的选择及调整过程说明如下:The selection and adjustment process of aggregate port traffic balance policy is described as follows:
假设初始时,设备X,Y,Z每分钟分别向设备M、N各发送100个报文,那么每分钟聚合口的流量是600个报文。Assume that at the beginning, devices X, Y, and Z send 100 packets to devices M and N respectively every minute, then the traffic of the aggregation port per minute is 600 packets.
1、为了选择各成员口流量差异最小的流量平衡策略,设备A上的聚合口首先选择第一个平衡策略为基于源MAC的流量平衡策略,聚合口使用该策略将X设备和Z设备发送的报文从链路1上发送,将Y设备发送的报文从链路2上发送。在第一分钟到期时,统计其中一个成员口port1上发送报文个数为400个,另一个成员口port2上发送报文个数为200个。计算出该流量平衡策略下速率的标准差为100,偏差率S为0.16。1. In order to select the traffic balancing strategy with the smallest flow difference among member ports, the aggregation port on device A first selects the first balancing strategy as the traffic balancing strategy based on the source MAC, and the aggregation port uses this strategy to transfer the traffic sent by X device and Z device. The packet is sent from
2、第二分钟内,设备A上的聚合口选择第二个流量平衡策略为基于目的MAC的流量平衡策略,该策略将目的设备为M的报文从链路1上发送,将目的设备为N的报文从链路2上发送。在第二分钟到期时,统计成员口port1上发送报文个数为300个,另一成员口port2上发送报文个数为300个。计算出该流量平衡策略下速率标准差为0,偏差率S为0。2. In the second minute, the aggregation port on device A selects the second traffic balancing policy as the traffic balancing policy based on the destination MAC. N's message is sent from
3、通过将两个单位时间分别得到的偏差率进行比较,设备A上聚合口选取基于目的MAC的流量平衡策略进行应用,并保存当前偏差率S=0。3. By comparing the deviation rates obtained by the two units of time, the aggregation port on device A selects a traffic balancing strategy based on the destination MAC for application, and saves the current deviation rate S=0.
以后,每隔一分钟,设备A上计算一次偏差率S`,如果计算出得偏差率S`变小或者变大但变化幅度小于0.2,则不修改聚合口上应用的流量平衡策略,反之则需要重新进行流量平衡策略的选举。Afterwards, every minute, the deviation rate S` is calculated on device A. If the calculated deviation rate S` becomes smaller or larger but the change range is less than 0.2, the traffic balance policy applied on the aggregation port will not be modified. Otherwise, it will need to Re-elect the traffic balancing policy.
4、假设运行过程中设备N出现故障而关闭,则网络流量变为X,Y,Z每分钟朝设备M发送100个报文。4. Assuming that device N fails and shuts down during operation, the network traffic becomes X, Y, and Z sends 100 messages to device M every minute.
此时设备A在计算速率标准差时,由于所有报文目的MAC都是M,故只在链路1上传输。统计成员口port1上发送报文个数为300个,另一成员口port2上发送报文个数为0个。计算出本次基于目的MAC的流量平衡策略下,各成员口速率的标准差为150,偏差率为S`=0.5。对比S`较S变大且变化幅度超过0.2,此时需要重新选举流量平衡策略。At this time, when device A calculates the rate standard deviation, since the destination MAC address of all packets is M, it only transmits on
设备A上的聚合口选定流量平衡策略为基于源MAC,在一分钟到期时,统计port1上发送报文个数为200个,port2上发送报文个数为100个。计算出该流量平衡策略下速率方差为50,偏差率S为0.16。The traffic balance policy selected for the aggregation port on device A is based on the source MAC address. When one minute expires, the number of packets sent on port1 is counted as 200, and the number of packets sent on port2 is 100. It is calculated that the rate variance under the traffic balance strategy is 50, and the deviation rate S is 0.16.
对比所支持的2种流量平衡策略,基于源MAC的流量平衡策略偏差率较小,将聚合口的流量平衡策略修改为基于源MAC的流量平衡策略。Compared with the two supported traffic balancing policies, the deviation rate of the traffic balancing policy based on the source MAC is small, and the traffic balancing policy of the aggregation port is changed to the traffic balancing policy based on the source MAC.
基于同一发明构思,本发明实施例还提供了一种聚合口流量平衡的装置、聚合口和网络设备,由于该装置、聚合口和网络设备解决问题的原理与前述一种聚合口流量平衡的方法相似,因此这些装置、聚合口和网络设备的实施可以参见前述方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present invention also provides a device for balancing traffic at an aggregated port, an aggregated port, and network equipment. Since the problem-solving principles of the device, the aggregated port, and the network device are the same as those of the aforementioned method for balancing traffic at the aggregated port Similar, therefore, the implementation of these devices, aggregation ports, and network equipment can refer to the implementation of the aforementioned methods, and repeated descriptions will not be repeated.
本发明实施例提供的聚合口流量平衡的装置,如图5所示,包括:The device for balancing flow at the aggregation port provided by the embodiment of the present invention, as shown in FIG. 5 , includes:
策略选择及调整模块501,用于选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;以及在判断模块判断结果为是时,重新确定单位时间内各成员口流量差异最小的流量平衡策略作为所述聚合口当前所使用的流量平衡策略;以及在判断结果为否时,维持聚合口当前流量平衡策略不变;The strategy selection and
判断模块502,用于在选择所述流量差异最小的流量平衡策略之后,周期地在单位时间内,判断该聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围。The judging
进一步地,上述策略选择及调整模块501,进一步用于针对所述聚合口所支持的每一种流量平衡策略,计算单位时间内所述聚合口使用该流量平衡策略的情况下,在单位时间内速率的偏差率;将每种流量平衡策略所得到的所述偏差率进行比较,选择所述偏差率最小的流量平衡策略作为所述单位时间内各成员口流量差异最小的流量平衡策略。Further, the above-mentioned policy selection and
进一步地,上述策略选择及调整模块501,具体用于在单位时间内,计算该聚合口各个成员口的速率的标准差,以及各个成员口速率的总和;将所述标准差除以所述总和,得到该聚合口单位时间内速率的偏差率。Further, the above-mentioned strategy selection and
进一步地,本发明实施例提供的聚合口流量平衡的装置,如图5所示,还包括:存储模块503,用于存储所述策略选择及调整模块所选择的流量平衡策略在单位时间内速率的偏差率。Further, the device for traffic balancing at the aggregation port provided by the embodiment of the present invention, as shown in FIG. 5 , further includes: a
相应地,上述判断模块502,进一步用于计算该本单位时间内该聚合口速率的偏差率;判断该单位时间内聚合口速率的偏差率是否大于保存的所述偏差率;在判断结果为是的情况下,进一步判断该单位时间内聚合口速率的偏差率与保存的所述偏差率之间的差值是否大于设定的第一阈值;若是,则判断该单位时间内各成员口流量差异变大且变化幅度超出了设定范围。Correspondingly, the above-mentioned
较佳地,本发明实施例提供的聚合口流量平衡的装置中的存储模块,还用于在重新确定单位时间内各成员口流量差异最小的流量平衡策略之后,将所述重新确定的流量平衡策略在单位时间内速率的偏差率与保存的偏差率进行比较;在保存的偏差率较大时,使用所述重新确定的流量平衡策略在单位时间内速率的偏差率更新保存的偏差率。Preferably, the storage module in the device for balancing aggregated port traffic provided by the embodiment of the present invention is further configured to re-determine the traffic balancing strategy with the smallest traffic difference among member ports per unit time, and then rebalance the re-determined traffic. The policy deviation rate per unit time is compared with the saved deviation rate; when the saved deviation rate is relatively large, the saved deviation rate is updated using the re-determined traffic balance policy rate deviation rate per unit time.
本发明实施例提供的上述聚合口流量平衡的装置,在具体实施时,可采用硬件或者硬件与软件结合的方式,例如设计为一个独立于聚合口各成员口之外的模块,该聚合口流量平衡的装置,分别与聚合口的各个成员口相连,对聚合口所使用的各种流量平衡策略下的各成员口的流量差异进行监控、计算并适时对聚合口流量平衡的策略进行调整。The above-mentioned aggregation port flow balance device provided by the embodiment of the present invention can be implemented in a hardware or a combination of hardware and software. For example, it can be designed as a module independent of each member port of the aggregation port. The balancing device is connected to each member port of the aggregation port, monitors and calculates the flow difference of each member port under the various flow balancing strategies used by the aggregation port, and adjusts the flow balancing strategy of the aggregation port in due course.
相应地,本发明实施例还提供了一种聚合口,该聚合口除了包含各个成员口之外,还可以包括本发明实施例提供的上述聚合口流量平衡的装置。Correspondingly, an embodiment of the present invention also provides an aggregation port, which may include the above-mentioned device for balancing traffic at the aggregation port provided by the embodiment of the present invention in addition to each member port.
进一步地,本发明实施例还提供了一种网络设备,该网络设备包括本发明实施例提供的上述聚合口。Furthermore, an embodiment of the present invention also provides a network device, which includes the above aggregation port provided by the embodiment of the present invention.
本发明实施例提供的聚合口流量平衡的方法、装置、聚合口及网络设备,首先选择单位时间内各成员口流量差异最小的流量平衡策略作为聚合口所使用的流量平衡策略;随后周期地在单位时间内,判断聚合口在使用所选择的流量平衡策略的情况下,各成员口流量差异是否变大且变化幅度超出设定的范围;若是,则重新确定单位时间内各成员口流量差异最小的流量平衡策略作为该聚合口当前所使用的流量平衡策略,否则维持当前流量平衡策略不变。本发明实施例不需要预先对聚合口配置流量平衡策略,自动实现最优流量平衡策略的配置,并且,可以在成员口之间流量差异变化时,实时地对流量平衡策略进行调整,以获得流量变化后的最优流量平衡策略,使得流量平衡策略能够随着聚合口流量变化真正起到流量平衡的效用。The method, device, aggregation port, and network equipment provided by the embodiments of the present invention firstly select the flow balancing strategy with the smallest flow difference among member ports per unit time as the traffic balancing strategy used by the aggregation port; then periodically In unit time, judge whether the flow difference of each member port becomes larger and the range of change exceeds the set range when the aggregation port uses the selected flow balancing strategy; if so, re-determine the minimum flow difference of each member port in unit time The traffic balancing policy of the aggregation interface is currently used as the traffic balancing policy, otherwise the current traffic balancing policy remains unchanged. The embodiment of the present invention does not need to pre-configure the traffic balance policy on the aggregation port, and automatically realizes the configuration of the optimal traffic balance policy, and can adjust the traffic balance policy in real time when the traffic difference between the member ports changes, so as to obtain the traffic The changed optimal flow balance strategy enables the flow balance strategy to truly play a role in flow balance as the aggregation port flow changes.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100396236A CN102065022B (en) | 2011-02-17 | 2011-02-17 | Method and device for flow balance of aggregation port, aggregation port and network equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100396236A CN102065022B (en) | 2011-02-17 | 2011-02-17 | Method and device for flow balance of aggregation port, aggregation port and network equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102065022A CN102065022A (en) | 2011-05-18 |
CN102065022B true CN102065022B (en) | 2012-07-25 |
Family
ID=44000128
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100396236A Expired - Fee Related CN102065022B (en) | 2011-02-17 | 2011-02-17 | Method and device for flow balance of aggregation port, aggregation port and network equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102065022B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102437956B (en) * | 2011-12-16 | 2014-07-30 | 福建星网锐捷网络有限公司 | Method, device and equipment for equalizing flow of uplink aggregation port |
CN106599563B (en) * | 2016-12-07 | 2019-01-25 | 华北电力科学研究院有限责任公司 | A method and device for verifying milling equipment |
CN109831388A (en) * | 2017-11-23 | 2019-05-31 | 中国电信股份有限公司 | Method and apparatus for optimizing flow load balance |
CN113709053B (en) * | 2021-08-03 | 2023-05-26 | 杭州迪普科技股份有限公司 | Flow definition-based flow dividing method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6498781B1 (en) * | 1999-08-13 | 2002-12-24 | International Business Machines Corporation | Self-tuning link aggregation system |
CN1366402B (en) * | 2002-02-05 | 2010-10-13 | 威盛电子股份有限公司 | Load balancing device for packet switching |
CN101605091B (en) * | 2009-02-13 | 2012-02-22 | 华为技术有限公司 | A multi-port load sharing method, device and network system |
-
2011
- 2011-02-17 CN CN2011100396236A patent/CN102065022B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN102065022A (en) | 2011-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10097465B2 (en) | Data transfer between endpoints using a multipath connection | |
US10200277B2 (en) | Influencing path selection during a multipath connection | |
EP1521409B1 (en) | System and method for load balancing and fail over | |
US8611251B2 (en) | Method and apparatus for the distribution of network traffic | |
US11140082B2 (en) | Data transmission method and device | |
US8630297B2 (en) | Method and apparatus for the distribution of network traffic | |
CN102447619B (en) | Load sharing mode selecting method, device and system | |
US9667556B2 (en) | Adjusting connection validating control signals in response to changes in network traffic | |
US7529180B1 (en) | Switch failover for aggregated data communication links | |
CN102804717B (en) | Method and device for adjusting IP network load | |
CN102065022B (en) | Method and device for flow balance of aggregation port, aggregation port and network equipment | |
CN111526089B (en) | A device for data fusion transmission and scheduling based on variable length granularity | |
US12010025B2 (en) | System and method for accelerating or decelerating a data transport network protocol based on real time transport network congestion conditions | |
CN109379297B (en) | Method and device for realizing flow load balance | |
Li et al. | MPTCP incast in data center networks | |
CN106059942A (en) | Flow control method based on load prediction in SDN network | |
US11805071B2 (en) | Congestion control processing method, packet forwarding apparatus, and packet receiving apparatus | |
Banfi et al. | Endpoint-transparent multipath transport with software-defined networks | |
US9882820B2 (en) | Communication apparatus | |
Jouet et al. | Measurement-based TCP parameter tuning in cloud data centers | |
Wang et al. | eMPTCP: Towards high performance multipath data transmission by leveraging SDN | |
CN105072053A (en) | Flow control method for Ethernet switch | |
Le et al. | Coordinated TCP Westwood congestion control for multiple paths over wireless networks | |
CN106101005A (en) | Jamming control method based on block length in a kind of data center network | |
US7483371B2 (en) | Management module controlled ingress transmission capacity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor Patentee after: RUIJIE NETWORKS Co.,Ltd. Address before: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor Patentee before: Fujian Star-net Ruijie Network Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120725 |