WO2012109910A1 - 链路聚合选路方法及装置 - Google Patents

链路聚合选路方法及装置 Download PDF

Info

Publication number
WO2012109910A1
WO2012109910A1 PCT/CN2011/081050 CN2011081050W WO2012109910A1 WO 2012109910 A1 WO2012109910 A1 WO 2012109910A1 CN 2011081050 W CN2011081050 W CN 2011081050W WO 2012109910 A1 WO2012109910 A1 WO 2012109910A1
Authority
WO
WIPO (PCT)
Prior art keywords
link aggregation
aggregation member
bandwidth
routing
entries
Prior art date
Application number
PCT/CN2011/081050
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2012109910A1 publication Critical patent/WO2012109910A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the present invention relates to the field of communications, and in particular to a link aggregation routing method and apparatus.
  • BACKGROUND In order to enhance the reliability of network communication and increase communication bandwidth, multiple links may be bundled together to form one logical link.
  • This link bundling technology is generally called link aggregation.
  • the bandwidth of a port after link aggregation is the sum of the bandwidth of each independent port. For example, six 100M/S physical ports can be aggregated into one 600M/S logical port. Therefore, when the bandwidth of the physical port cannot meet the demand, the chain is passed.
  • Road aggregation can increase port bandwidth easily and efficiently.
  • Link aggregation can improve the reliability of network communication. For example, when the physical status of a link in an aggregation group changes, the link connection fails.
  • Link aggregation routing usually has two different strategies: flow-based and packet-based. They are described separately below. The flow is based on the eigenvalue of the packet (usually including the destination address, source address, destination port number, source port number, protocol type, and service type of the packet, usually referred to as the "six-tuple" of the packet). The advantage of this routing strategy is that it can ensure that the data flows belonging to the same service go the same link, reducing the possibility of out-of-order and jitter of packet packets.
  • the disadvantage is that the same traffic flows the same link.
  • the members of the link aggregation cannot be effectively allocated, which causes network congestion and does not reflect the link aggregation load sharing.
  • the packet-based routing is based on the order in which the packets arrive.
  • the advantage of this routing strategy is that the traffic is evenly distributed to each member link, which can achieve a good load sharing effect, but because of this routing and If the packets are not related to each other, the packets of the same application group may be split into different member links, which may cause packet packets to be out of order and jitter.
  • the flow-based link aggregation routing and the packet-based link aggregation routing mainly use time-switching space, that is, after the sequence value is calculated, the link aggregation member table is further selected to perform routing, because the calculation is complicated and computationally A large amount of time and a long time are required, so that the load error between the link aggregation members is large, and the packet forwarding performance is not high.
  • the present invention has been made in view of the problems of complex calculation, large computational complexity, and long time-consuming calculation of link aggregation routing in the related art. Therefore, the main object of the present invention is to provide a link aggregation routing method and apparatus to solve the problem. The above question.
  • a link aggregation routing method includes: weighting a link aggregation member according to a bandwidth of a link aggregation member; obtaining a routing index according to a preset routing policy; and searching for a weight according to the routing index Link aggregation member; select the discovered link aggregation member to forward the packet.
  • weighting the link aggregation member includes: determining the link aggregation member with the smallest bandwidth among the link aggregation members; using the bandwidth of the link aggregation member with the smallest bandwidth as the weight reference, according to the link aggregation The ratio of the bandwidth of the link aggregation member except the link aggregation member with the smallest bandwidth to the weight reference, and determines the weight value of other link aggregation members. The integer part of the ratio is determined as the weight value of other link aggregation members.
  • the method further includes: generating a link aggregation member table, where the link aggregation member table includes multiple entries, each of the multiple entries A link aggregation member in a link aggregation member is saved, and the number of entries occupied by the link aggregation member in multiple entries corresponds to its weight value.
  • obtaining a routing index includes one of the following: For a packet-based routing policy, setting a time stamp for the received data packet, and determining a time-scale as a routing index; for stream-based selection The path strategy extracts the stream feature sequence value of the received message, calculates a modulus value of the stream feature sequence value for the number of entries of the plurality of entries included in the link aggregation member table, and determines the modulus value as the routing index.
  • Setting a time stamp for the received data packet includes: setting a time stamp for the received first data packet; determining whether the time stamp is smaller than the number of entries of the plurality of entries included in the link aggregation member table; if the determination result is yes, The time stamp adds a pair of received second data packets to set the time stamp. Otherwise, the time stamp of the second data packet is set to zero, wherein the second data packet is received after the first data packet.
  • the method further includes: setting a plurality of time stamp generators for setting the time stamp, wherein each time stamp generator corresponds to a microprocessor of each link aggregation member Each time stamp generator is scheduled by the network processor.
  • the modulus value of the number of entries of the plurality of entries included in the link aggregation member table includes: splitting the stream feature sequence value in bytes; calculating the split stream feature sequence value to the number of entries a first modulus value; combining the first modulus values in units of bytes; and calculating a second modulus value of the combined first modulus value pair of entries.
  • a link aggregation routing device is provided.
  • the link aggregation routing device includes: a weighting module configured to weight a link aggregation member according to a bandwidth of a link aggregation member; and an acquisition module configured to acquire a routing according to a preset routing policy
  • the indexing module is configured to search for the weighted link aggregation member according to the routing index
  • the forwarding module is configured to select the discovered link aggregation member to forward the packet.
  • the weighting module includes: a first determining submodule, configured to determine a link aggregation member with the smallest bandwidth among the link aggregation members; and a second determining submodule, configured to use the bandwidth of the link aggregation member with the smallest bandwidth as a weight reference, according to The ratio of the bandwidth of the link aggregation member except the link aggregation member with the smallest bandwidth to the weight reference, and determines the weight value of other link aggregation members.
  • the present invention achieves absolute current sharing by weighting the weights of the link aggregation members and searching for the weighted link aggregation members through the routing index, thereby improving packet forwarding performance.
  • FIG. 1 is a flowchart of a link aggregation routing method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a link aggregation routing method according to a preferred embodiment of the present invention
  • FIG. 4 is a structural block diagram of a link aggregation routing device according to an embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The invention will be described in detail below with reference to the drawings in conjunction with the embodiments.
  • FIG. 1 is a flowchart of a link aggregation routing method according to an embodiment of the present invention. As shown in FIG. 1, the following steps S102 to S108 are included.
  • Step S102 Weight the link aggregation member according to the bandwidth of the link aggregation member.
  • Step S104 Obtain a routing index according to a preset routing policy.
  • Step S106 Search for the weighted link aggregation member according to the routing index.
  • Step S108 selecting the found link aggregation member to perform packet forwarding.
  • the link aggregation routing mainly uses time-switching space, that is, after the sequence value is calculated, the link aggregation member table is further selected to perform routing, which is complicated in computation, large in computation, and time-consuming, so that each link aggregation member is The load error is large and the packet forwarding performance is not high.
  • the weighted link aggregation member is used to find the weighted link aggregation member through the routing index, so that the average current sharing can be implemented, thereby improving packet forwarding performance.
  • the link aggregation routing method in the embodiment of the present invention may be applied to multiple link aggregation groups, where each link aggregation group includes multiple link aggregation members, and each link aggregation group passes its own The link aggregation number is differentiated, so that the extension of the link aggregation routing method in the embodiment of the present invention can be implemented.
  • weighting the link aggregation member according to the bandwidth of the link aggregation member includes: determining a link aggregation member with the smallest bandwidth among the link aggregation members; and using the bandwidth of the link aggregation member with the smallest bandwidth as a weight reference, according to The ratio of the bandwidth of the link aggregation member except the link aggregation member with the smallest bandwidth to the weight reference, and determines the weight value of other link aggregation members.
  • the integer portion of the ratio is determined as the weight value of other link aggregation members.
  • the method further includes: generating a link aggregation member table, where the link aggregation member table includes multiple entries, and multiple entries Each entry holds one link aggregation member in the link aggregation member, and the number of entries occupied by the link aggregation member in multiple entries corresponds to its weight value.
  • the bandwidth of the link aggregation member is used as the routing weight, and the frequency of occurrence of the link aggregation member in the link aggregation member table is arranged according to the weight ratio.
  • the link aggregation member table is a member list of the link aggregation member that has been weighted.
  • the number of entries is only the number of members of the link aggregation member that has been weighted, and the accuracy of link aggregation routing load sharing. Irrelevant, this can greatly reduce the occupation of the table space, facilitate the use of direct table implementation, and improve the speed of table lookup. It should be noted that, in the present invention, the number of entries of the link aggregation member table is the number of optional link aggregation members, and the number of optional link aggregation members is usually greater than or equal to the actual number of link aggregation members (only when all When the bandwidth of the link aggregation member is equal, it is equal to).
  • obtaining the routing index includes one of the following: for the packet-based routing policy, setting a time stamp for the received data packet, and determining the time-scale as the routing index;
  • the routing policy of the stream extracts the stream feature sequence value of the received packet, calculates the modulus value of the stream feature sequence value for the number of entries of the plurality of entries included in the link aggregation member table, and determines the modulus value as the routing index.
  • the common points of the two routing strategies are unified as much as possible, and the same module is used to implement the same process, which reduces the occupation of resources and improves the overall performance of the link aggregation routing device.
  • setting a time stamp for the received data packet includes: setting a time stamp for the first data packet; determining whether the time stamp is smaller than the number of entries of the plurality of entries included in the link aggregation member table; if the determination result is yes, The time stamp adds a pair of second data packets to set the time stamp. Otherwise, the time stamp of the second data packet is set to zero, wherein the second data packet is received after the first data packet.
  • the method before the time stamp is set on the received data packet, the method further includes: setting a plurality of time stamp generators for setting the time stamp, wherein each time stamp generator and each link aggregation member are micro-processed Corresponding to each, each time-scale generator is scheduled by the network processor.
  • calculating a modulus value of the stream feature sequence value to the number of entries of the plurality of entries included in the link aggregation member table includes: splitting the stream feature sequence value in units of bytes; and calculating the split stream feature sequence value pair a first modulus value of the number of entries; combining the first modulus values in units of bytes; and calculating a second modulus value of the combined first modulus value pair of entries.
  • the calculation of the modulus value can be simplified, thereby greatly improving the load accuracy between the members with a small amount of computation.
  • FIG. 2 is a flowchart of a link aggregation routing method according to a preferred embodiment of the present invention. As shown in FIG. 2, the following steps S202 to S210 are included. Step S202, self-learning the current link aggregation member parameter.
  • Step S204 analyzing the link aggregation member parameters learned in step S202, and performing weighting processing on the optional members, that is, assigning the routing weight values according to the bandwidth ratio of each member, and using the lowest weight value as the reference, and the weight values of other members.
  • step S206 the link aggregation routing policy is read. Specifically, the routing policy corresponding to the link aggregation number is searched for by the link aggregation number.
  • step S208 calculating a routing index value, and the specific calculation process is as shown in FIG. 3.
  • Step S210 Check the member table by using the link aggregation number and the routing index to obtain the port number, and the routing process ends.
  • Step 3 is a flowchart of calculating a routing index of a link aggregation member according to a preferred embodiment of the present invention. As shown in FIG. 3, the following steps 301 to 312 are included.
  • step 301 the configured link aggregation member routing policy is obtained. If the packet-by-packet mode is in the packet-by-packet mode, the process proceeds to step 302.
  • Step 302 Read a time stamp value of the arrival time of the data packet, and assign the data packet to the data packet.
  • each microprocessor is assigned an independent time stamp generator, and the scheduling of each time stamp generator is performed by the scheduling module of the network processor.
  • Step 303 The time stamp of the data packet is compared with the number of optional members of the link aggregation. If the time stamp value is less than the number of optional members, the process proceeds to step 304. Otherwise, the process proceeds to step 305. In step 304, the time stamp is incremented by 1, but the time stamp value that has been hit on the data packet is not changed, and the process proceeds to step 306. In step 305, the time stamp has reached the maximum assignable value, and the time scale is zeroed. The next received packet, the time stamp is re-assigned from "0". Step 306, using the time stamp value on the data packet as the link aggregation routing index, and proceeding to step 312.
  • Step 309 Perform modulo on the number of optional link members for each part of the split stream feature value; Step 310, perform byte-by-byte combination on the modulo-valued value in step 309, and then select an optional link member. Number modulo. Step 311, the modulo result of step 310 is used as a routing index value. Step 312: Search the routing table with the routing index value to obtain the port information.
  • FIG. 4 is a structural block diagram of a link aggregation routing device according to an embodiment of the present invention. As shown in FIG. 4, the method includes a weighting module 42, an obtaining module 44, a searching module 46, and a forwarding module 48. The structure is described in detail below.
  • the weighting module 42 is configured to weight the link aggregation member according to the bandwidth of the link aggregation member; the obtaining module 44 is configured to obtain the routing index according to the preset routing policy; the searching module 46 is connected to the weighting module 42 and the obtaining module 44, configured to search the link aggregation member weighted by the weighting module 42 according to the routing index acquired by the obtaining module 44; the forwarding module 48 is connected to the searching module 46, and is configured to select the chain found by the searching module 46.
  • the route aggregation member forwards the packet.
  • the weighting module 42 includes a first determining sub-module 422 and a second determining sub-module 424. The structure is described in detail below.
  • the first determining sub-module 422 is configured to determine a link aggregation member with the smallest bandwidth among the link aggregation members; the second determining sub-module 424 is connected to the first determining sub-module 422, and is configured to be determined by the first determining sub-module 422.
  • the bandwidth of the link aggregation member with the smallest bandwidth is the weight reference, according to the chain with the smallest bandwidth except the link aggregation member.
  • the link aggregation routing device described in the device embodiment corresponds to the foregoing method embodiment, and the specific implementation process has been described in detail in the method embodiment, and details are not described herein again.
  • a link aggregation routing method and apparatus are provided.
  • the present invention achieves absolute current sharing by weighting the weights of the link aggregation members and searching for the weighted link aggregation members through the routing index, thereby improving packet forwarding performance.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种链路聚合选路方法及装置,该方法包括:根据链路聚合成员的带宽,对链路聚合成员进行加权;根据预先设定的选路策略,获取选路索引;根据选路索引,查找加权后的链路聚合成员;选择查找到的链路聚合成员进行报文转发。本发明可以实现绝对的均流,从而提高报文转发性能。

Description

链路聚合选路方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种链路聚合选路方法及装置。 背景技术 为了增强网络通信的可靠性、 增加通信带宽, 可以将多条链路捆绑在一起形成一 个逻辑链路, 这种链路捆绑技术通常称为链路聚合。 链路聚合后端口的带宽是每个独立端口带宽的总和,例如可以将 6个 100M/S的物 理端口聚合成一个 600M/S的逻辑端口, 因此当物理端口的带宽无法满足需求时,通过 链路聚合可以便捷有效地增加端口带宽。 通过链路聚合能有效提高网络通信的可靠性, 例如当一个聚合组的某一条链路物 理状态发生改变, 导致链路连接失败, 此时数据流会自动重新定向到其他链路上, 保 证网络正常工作, 因此链路聚合是增强网络可靠性的有效方法。 为了将数据流有效地分配给各个成员链路, 可以采取链路聚合选路。 链路聚合选 路通常有两种不同的策略: 基于流和基于包。 下面分别对其进行描述。 基于流是根据报文的特征值 (通常包括报文的目的地址、 源地址、 目的端口号、 源 端口号、 协议类型和服务类型, 通常简称为报文的"六元组")进行选路, 这种选路策略 的优点是能够保证属于同一业务的数据流走相同的链路, 降低报文分组出现乱序、 抖 动的可能性, 其缺点是相同业务的流走相同的链路, 当该业务的流量较大时不能有效 地分担给链路聚合的各个成员,造成网络的拥塞、体现不出链路聚合负荷分担的优点。 基于包的选路是根据报文到达的先后顺序依次选路, 这种选路策略的优点是将流 量平均分配给各个成员链路, 能取得良好的负荷分担效果, 但由于这种选路与报文无 关, 可能将同一应用分组的报文分到不同的成员链路, 可能会造成分组报文乱序和抖 动。 相关技术中, 基于流的链路聚合选路和基于包的链路聚合选路均主要通过时间换 空间, 即对序列值计算后再查链路聚合成员表实现选路, 因计算复杂、 运算量大、 耗 时长, 使得各链路聚合成员间的负荷误差较大, 报文转发性能不高。 发明内容 针对相关技术中链路聚合选路计算复杂、运算量大、耗时长的问题而提出本发明, 为此, 本发明的主要目的在于提供一种链路聚合选路方法及装置, 以解决上述问题。 为了实现上述目的, 根据本发明的一个方面, 提供了一种链路聚合选路方法。 根据本发明的链路聚合选路方法包括: 根据链路聚合成员的带宽, 对链路聚合成 员进行加权; 根据预先设定的选路策略, 获取选路索引; 根据选路索引, 查找加权后 的链路聚合成员; 选择查找到的链路聚合成员进行报文转发。 根据链路聚合成员的带宽, 对链路聚合成员进行加权包括: 在链路聚合成员中确 定带宽最小的链路聚合成员; 以带宽最小的链路聚合成员的带宽为权重基准, 根据链 路聚合成员中除带宽最小的链路聚合成员之外的其它链路聚合成员的带宽与权重基准 的比值, 确定其它链路聚合成员的权重值。 确定比值的整数部分作为其它链路聚合成员的权重值。 在根据链路聚合成员的带宽, 对链路聚合成员进行加权之后, 上述方法还包括: 生成链路聚合成员表, 其中链路聚合成员表中包括多个条目, 多个条目中的每个条目 保存有链路聚合成员中的一个链路聚合成员, 链路聚合成员在多个条目中占有的条目 数与其权重值相对应。 根据预先设定的选路策略, 获取选路索引包括以下之一: 对于基于包的选路策略, 对接收到的数据包设置时标, 并确定时标作为选路索引; 对于基于流的选路策略, 提 取接收到的报文的流特征序列值, 计算流特征序列值对链路聚合成员表包括的多个条 目的条目数的模值, 并确定模值作为选路索引。 对接收到的数据包设置时标包括: 对接收到的第一数据包设置时标; 判断时标是 否小于链路聚合成员表包括的多个条目的条目数; 如果判断结果为是, 则按照时标加 一对接收到的第二数据包设置时标, 否则, 设置第二数据包的时标为零, 其中第二数 据包是在第一数据包之后接收到的。 在对接收到的数据包设置时标之前, 上述方法还包括: 设置多个用于设置时标的 时标发生器, 其中每个时标发生器与每个链路聚合成员的微处理器相对应, 每个时标 发生器均由网络处理器进行调度。 计算流特征序列值对链路聚合成员表包括的多个条目的条目数的模值包括: 以字 节为单位, 拆分流特征序列值; 计算拆分后的流特征序列值对条目数的第一模值; 以 字节为单位, 对第一模值进行组合; 计算组合后的第一模值对条目数的第二模值。 为了实现上述目的, 根据本发明的另一个方面, 提供了一种链路聚合选路装置。 根据本发明的链路聚合选路装置包括: 加权模块, 设置为根据链路聚合成员的带 宽, 对链路聚合成员进行加权; 获取模块, 设置为根据预先设定的选路策略, 获取选 路索引; 查找模块, 设置为根据选路索引, 查找加权后的链路聚合成员; 转发模块, 设置为选择查找到的链路聚合成员进行报文转发。 加权模块包括: 第一确定子模块, 设置为在链路聚合成员中确定带宽最小的链路 聚合成员; 第二确定子模块, 设置为以带宽最小的链路聚合成员的带宽为权重基准, 根据链路聚合成员中除带宽最小的链路聚合成员之外的其它链路聚合成员的带宽与权 重基准的比值, 确定其它链路聚合成员的权重值。 本发明通过链路聚合成员的加权并通过选路索引查找该加权后的链路聚合成员, 可以实现绝对的均流, 从而提高报文转发性能。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的链路聚合选路方法的流程图; 图 2是根据本发明优选实施例的链路聚合选路方法的流程图; 图 3是本发明优选实施例的计算链路聚合成员的选路索引的流程图; 图 4是根据本发明实施例的链路聚合选路装置的结构框图。 具体实施方式 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相 互组合。 下面将参考附图并结合实施例来详细说明本发明。 图 1是根据本发明实施例的链路聚合选路方法的流程图, 如图 1所示, 包括如下 的步骤 S102至步骤 S108。 步骤 S102, 根据链路聚合成员的带宽, 对链路聚合成员进行加权。 步骤 S104, 根据预先设定的选路策略, 获取选路索引。 步骤 S106, 根据选路索引, 查找加权后的链路聚合成员。 步骤 S108, 选择查找到的链路聚合成员进行报文转发。 相关技术中, 链路聚合选路主要通过时间换空间, 即对序列值计算后再查链路聚 合成员表实现选路, 因计算复杂、 运算量大、 耗时长, 使得各链路聚合成员间的负荷 误差较大, 报文转发性能不高。 本发明实施例中, 通过链路聚合成员的加权并通过选 路索引查找该加权后的链路聚合成员,可以实现绝对的均流, 从而提高报文转发性能。 优选地, 本发明实施例的链路聚合选路方法可以应用于多个链路聚合组中, 其中 每个链路聚合组均包含多个链路聚合成员, 每个链路聚合组通过各自的链路聚合号进 行区分, 这样, 可以实现本发明实施例的链路聚合选路方法的扩展。 优选地, 根据链路聚合成员的带宽, 对链路聚合成员进行加权包括: 在链路聚合 成员中确定带宽最小的链路聚合成员;以带宽最小的链路聚合成员的带宽为权重基准, 根据链路聚合成员中除带宽最小的链路聚合成员之外的其它链路聚合成员的带宽与权 重基准的比值, 确定其它链路聚合成员的权重值。 优选地, 确定比值的整数部分作为其它链路聚合成员的权重值。 优选地, 在根据链路聚合成员的带宽, 对链路聚合成员进行加权之后, 上述方法 还包括: 生成链路聚合成员表, 其中链路聚合成员表中包括多个条目, 多个条目中的 每个条目保存有链路聚合成员中的一个链路聚合成员, 链路聚合成员在多个条目中占 有的条目数与其权重值相对应。 本优选实施例中, 将链路聚合成员的带宽作为选路权重, 按权重比例安排各链路 聚合成员在链路聚合成员表中出现的频次。 由于链路聚合成员表是经过权重化处理后 的链路聚合成员的成员列表, 其条目数仅为经过权重化处理的链路聚合成员的成员个 数, 与链路聚合选路负荷分担的精度无关, 这样可以极大地缩小表空间占用, 便于采 用直接表实现, 提高查表速度。 需要说明的是, 本发明中定义上述链路聚合成员表的条目数为可选链路聚合成员 数, 该可选链路聚合成员数通常大于或等于实际的链路聚合成员数 (只有当所有链路 聚合成员的带宽都相等时才取等于)。 优选地, 根据预先设定的选路策略, 获取选路索引包括以下之一: 对于基于包的 选路策略, 对接收到的数据包设置时标, 并确定时标作为选路索引; 对于基于流的选 路策略, 提取接收到的报文的流特征序列值, 计算流特征序列值对链路聚合成员表包 括的多个条目的条目数的模值, 并确定模值作为选路索引。 本优选实施例中, 将两种选路策略的共同点尽可能地统一, 采用同一模块同一流 程来实现, 减少了对资源的占用, 提高了链路聚合选路装置的整体性能。 优选地, 对接收到的数据包设置时标包括: 对第一数据包设置时标; 判断时标是 否小于链路聚合成员表包括的多个条目的条目数; 如果判断结果为是, 则按照时标加 一对第二数据包设置时标, 否则, 设置第二数据包的时标为零, 其中第二数据包是在 第一数据包之后接收到的。 优选地, 在对接收到的数据包设置时标之前, 上述方法还包括: 设置多个用于设 置时标的时标发生器, 其中每个时标发生器与每个链路聚合成员的微处理器相对应, 每个时标发生器均由网络处理器进行调度。 优选地, 计算流特征序列值对链路聚合成员表包括的多个条目的条目数的模值包 括: 以字节为单位, 拆分流特征序列值; 计算拆分后的流特征序列值对条目数的第一 模值; 以字节为单位, 对第一模值进行组合; 计算组合后的第一模值对条目数的第二 模值。 本优选实施例中, 通过报文流特征序列值拆分与组合, 可以简化模值的计算, 从 而用较小的运算量极大地提高了各成员间的负荷精度。 优选地, 在选择查找到的链路聚合成员进行报文转发之后, 上述方法还包括: 根 据链路聚合成员的绑定 /解绑, 和 /或根据物理链路的激活 /非激活, 添加 /删除链路聚合 成员。 下面将结合实例对本发明实施例的实现过程进行详细描述。 图 2是根据本发明优选实施例的链路聚合选路方法的流程图, 如图 2所示, 包括 如下的步骤 S202至步骤 S210。 步骤 S202, 自学习当前链路聚合成员参数。 具体地, 学习当前链路聚合组的个数, 链路聚合成员个数, 各成员的链路带宽、 链路状态等参数, 实时监测链路的绑定与解绑、 成员的激活与非激活。 步骤 S204, 分析步骤 S202学习到的链路聚合成员参数, 对可选成员作权重化处 理, 即按照各成员的带宽比例赋予选路权重值, 以权重值最小者为基准, 其他成员的 权重值除以基准值, 其整数部分作为该成员可被选取的频率; 将各成员按照各自可选 的频率生成选路成员列表, 并给出经权重处理后的可选成员数, 该数值通常大于或等 于实际的链路聚合成员数目。 步骤 S206, 读取链路聚合选路策略, 具体地, 通过链路聚合号查找与之对应的选 路策略。 步骤 S208, 计算选路索引值, 具体计算过程如图 3所示。 步骤 S210, 用链路聚合号和选路索引查成员表, 获取出端口号, 选路过程结束。 图 3是本发明优选实施例的计算链路聚合成员的选路索引的流程图,如图 3所示, 包括如下的步骤 301至步骤 312。 步骤 301, 获取配置的链路聚合成员选路策略, 若为逐包模式, 进入步骤 302, 若 为逐流模式进入步骤 307。 步骤 302, 读取数据包到达时刻的时标值, 并赋给该数据包。 特别地, 当多个微 处理器并行处理时, 易造成时标冲突与越界。 因此, 为各个微处理器均分配一个独立 的时标发生器, 各时标发生器的调度由网络处理器的调度模块完成。 步骤 303, 数据包的时标与链路聚合可选成员数相比较, 若时标值小于可选成员 数, 进入步骤 304, 否则进入步骤 305。 步骤 304, 时标加 1, 但并不改变已打在数据包上的时标值, 进入步骤 306。 步骤 305, 时标已经达到可分配的最大值, 时标归零。 下一个接收到的数据包, 重新从 "0"开始分配时标。 步骤 306, 用打在数据包上的时标值作为链路聚合选路索引, 进入步骤 312。 步骤 307, 提取报文特征信息, 例如可获取 IP报文的 "六元组", 通过哈希运算单 元计算出适当长度的流特征值序列值, 序列值的长度与成员链路间负荷分担的精度密 切相关, 通常序列值长度越大越有利于负荷分担的精度。 步骤 308, 为了利用网络处理器简单的求模运算, 将流特征值按照字节拆分成若 干个, 例如一个 2字节长度的流特征值 X, 可以拆分为 XI和 X0, 其中 Χ1=Χ/255, X0=X%255。 步骤 309, 对拆分后的流特征值的各部分分别对可选链路成员数求模; 步骤 310, 对步骤 309求模后的数值再进行按字节组合, 再对可选链路成员数求 模。 步骤 311, 步骤 310的求模结果作为选路索引值。 步骤 312, 用选路索引值查找选路表, 获取出端口信息。 需要说明的是, 在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的 计算机系统中执行, 并且, 虽然在流程图中示出了逻辑顺序, 但是在某些情况下, 可 以以不同于此处的顺序执行所示出或描述的步骤。 本发明实施例提供了一种链路聚合选路装置, 该链路聚合选路装置可以用于实现 上述链路聚合选路方法。 图 4是根据本发明实施例的链路聚合选路装置的结构框图, 如图 4所示, 包括加权模块 42, 获取模块 44, 查找模块 46, 转发模块 48。 下面对其 结构进行详细描述。 加权模块 42, 设置为根据链路聚合成员的带宽, 对链路聚合成员进行加权; 获取 模块 44, 设置为根据预先设定的选路策略, 获取选路索引; 查找模块 46, 连接至加权 模块 42和获取模块 44, 设置为根据获取模块 44获取的选路索引, 查找加权模块 42 加权后的链路聚合成员; 转发模块 48, 连接至查找模块 46, 设置为选择查找模块 46 查找到的链路聚合成员进行报文转发。 优选地, 加权模块 42包括第一确定子模块 422和第二确定子模块 424。 下面对其 结构进行详细描述。 第一确定子模块 422, 设置为在链路聚合成员中确定带宽最小的链路聚合成员; 第二确定子模块 424,连接至第一确定子模块 422, 设置为以第一确定子模块 422确定 的带宽最小的链路聚合成员的带宽为权重基准, 根据链路聚合成员中除带宽最小的链 路聚合成员之外的其它链路聚合成员的带宽与权重基准的比值, 确定其它链路聚合成 员的权重值。 需要说明的是,装置实施例中描述的链路聚合选路装置对应于上述的方法实施例, 其具体的实现过程在方法实施例中已经进行过详细说明, 在此不再赘述。 综上所述, 根据本发明的上述实施例, 提供了一种链路聚合选路方法及装置。 本 发明通过链路聚合成员的加权并通过选路索引查找该加权后的链路聚合成员, 可以实 现绝对的均流, 从而提高报文转发性能。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 或者将它们分别制作成各个集成电路模 块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明 不限制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种链路聚合选路方法, 包括:
根据链路聚合成员的带宽, 对所述链路聚合成员进行加权; 根据预先设定的选路策略, 获取选路索引;
根据所述选路索引, 查找加权后的所述链路聚合成员;
选择查找到的所述链路聚合成员进行报文转发。
2. 根据权利要求 1所述的方法, 其中, 根据链路聚合成员的带宽, 对所述链路聚 合成员进行加权包括:
在所述链路聚合成员中确定带宽最小的链路聚合成员;
以所述带宽最小的链路聚合成员的带宽为权重基准, 根据所述链路聚合成 员中除所述带宽最小的链路聚合成员之外的其它链路聚合成员的带宽与所述权 重基准的比值, 确定所述其它链路聚合成员的权重值。
3. 根据权利要求 2所述的方法, 其中, 确定所述比值的整数部分作为所述其它链 路聚合成员的权重值。
4. 根据权利要求 3所述的方法, 其中, 在根据链路聚合成员的带宽, 对所述链路 聚合成员进行加权之后, 所述方法还包括: 生成链路聚合成员表, 其中所述链 路聚合成员表中包括多个条目, 所述多个条目中的每个条目保存有所述链路聚 合成员中的一个链路聚合成员, 所述链路聚合成员在所述多个条目中占有的条 目数与其权重值相对应。
5. 根据权利要求 4所述的方法, 其中, 根据预先设定的选路策略, 获取选路索引 包括以下之一:
对于基于包的选路策略, 对接收到的数据包设置时标, 并确定所述时标作 为所述选路索引;
对于基于流的选路策略, 提取接收到的报文的流特征序列值, 计算所述流 特征序列值对所述链路聚合成员表包括的多个条目的条目数的模值, 并确定所 述模值作为所述选路索引。
6. 根据权利要求 5所述的方法, 其中, 对接收到的数据包设置时标包括: 对接收到的第一数据包设置时标;
判断所述时标是否小于所述链路聚合成员表包括的多个条目的条目数; 如果判断结果为是,则按照所述时标加一对接收到的第二数据包设置时标, 否则, 设置所述第二数据包的时标为零, 其中所述第二数据包是在所述第一数 据包之后接收到的。 根据权利要求 5所述的方法, 其中, 在对接收到的数据包设置时标之前, 所述 方法还包括:
设置多个用于设置时标的时标发生器, 其中每个时标发生器与每个链路聚 合成员的微处理器相对应, 所述每个时标发生器均由网络处理器进行调度。 根据权利要求 5所述的方法, 其中, 计算所述流特征序列值对所述链路聚合成 员表包括的多个条目的条目数的模值包括:
以字节为单位, 拆分所述流特征序列值;
计算拆分后的所述流特征序列值对所述条目数的第一模值;
以字节为单位, 对所述第一模值进行组合;
计算组合后的所述第一模值对所述条目数的第二模值。 一种链路聚合选路装置, 包括:
加权模块, 设置为根据链路聚合成员的带宽, 对所述链路聚合成员进行加 权;
获取模块, 设置为根据预先设定的选路策略, 获取选路索引;
查找模块, 设置为根据所述选路索引, 查找加权后的所述链路聚合成员; 转发模块, 设置为选择查找到的所述链路聚合成员进行报文转发。 根据权利要求 9所述的装置, 其中, 所述加权模块包括: 第一确定子模块, 设置为在所述链路聚合成员中确定带宽最小的链路聚合 成员;
第二确定子模块, 设置为以所述带宽最小的链路聚合成员的带宽为权重基 准, 根据所述链路聚合成员中除所述带宽最小的链路聚合成员之外的其它链路 聚合成员的带宽与所述权重基准的比值,确定所述其它链路聚合成员的权重值。
PCT/CN2011/081050 2011-02-15 2011-10-20 链路聚合选路方法及装置 WO2012109910A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110038703.XA CN102098740B (zh) 2011-02-15 2011-02-15 链路聚合选路方法及装置
CN201110038703.X 2011-02-15

Publications (1)

Publication Number Publication Date
WO2012109910A1 true WO2012109910A1 (zh) 2012-08-23

Family

ID=44131556

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/081050 WO2012109910A1 (zh) 2011-02-15 2011-10-20 链路聚合选路方法及装置

Country Status (2)

Country Link
CN (1) CN102098740B (zh)
WO (1) WO2012109910A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098740B (zh) * 2011-02-15 2015-05-20 中兴通讯股份有限公司 链路聚合选路方法及装置
CN102447619B (zh) * 2011-11-10 2014-09-17 华为技术有限公司 选择负载分担方式的方法、装置和系统
CN103701712B (zh) * 2013-12-03 2016-10-19 中国电子科技集团公司第三十研究所 一种将多个e1线路绑定且实现逻辑通道分离的方法
WO2016030724A1 (en) * 2014-08-29 2016-03-03 Pismo Labs Technology Limited Methods and systems for transmitting packets through an aggregated connection
CN106034085A (zh) * 2015-03-19 2016-10-19 中兴通讯股份有限公司 一种负荷分担方法、传输设备及级联设备
CN106656842A (zh) * 2015-10-29 2017-05-10 华为数字技术(苏州)有限公司 一种负载均衡方法和流量转发设备
CN107528711B (zh) 2016-06-22 2021-08-20 华为技术有限公司 一种数据传输方法、装置以及网元
US10833891B2 (en) 2017-02-11 2020-11-10 Pismo Labs Technology Limited Methods and systems for transmitting information packets through tunnel groups at a network node
CN109120524B (zh) * 2018-08-23 2020-12-08 Oppo广东移动通信有限公司 链路聚合方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325544A (zh) * 2008-07-21 2008-12-17 武汉理工大学 无线传感器网络中基于链路多特征值的多路径路由建立方法
CN101951658A (zh) * 2010-09-16 2011-01-19 北京邮电大学 一种基于路径质量感知的移动自组网Internet网关路由选择方法
CN101965031A (zh) * 2010-05-19 2011-02-02 北京科技大学 一种基于最大概率的认知无线电多径组播路由方法
CN102098740A (zh) * 2011-02-15 2011-06-15 中兴通讯股份有限公司 链路聚合选路方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7787370B1 (en) * 2001-09-06 2010-08-31 Nortel Networks Limited Technique for adaptively load balancing connections in multi-link trunks
CA2390883C (en) * 2001-12-20 2009-06-02 Tropic Networks Inc. Communication system with balanced transmission bandwidth
CN101110763A (zh) * 2007-06-22 2008-01-23 中兴通讯股份有限公司 一种快速加权选择端口的方法
CN101938406B (zh) * 2009-07-02 2012-07-04 华为技术有限公司 微波多通道报文发送方法和装置及传送系统
CN101645850B (zh) * 2009-09-25 2013-01-30 杭州华三通信技术有限公司 转发路径确定方法和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325544A (zh) * 2008-07-21 2008-12-17 武汉理工大学 无线传感器网络中基于链路多特征值的多路径路由建立方法
CN101965031A (zh) * 2010-05-19 2011-02-02 北京科技大学 一种基于最大概率的认知无线电多径组播路由方法
CN101951658A (zh) * 2010-09-16 2011-01-19 北京邮电大学 一种基于路径质量感知的移动自组网Internet网关路由选择方法
CN102098740A (zh) * 2011-02-15 2011-06-15 中兴通讯股份有限公司 链路聚合选路方法及装置

Also Published As

Publication number Publication date
CN102098740B (zh) 2015-05-20
CN102098740A (zh) 2011-06-15

Similar Documents

Publication Publication Date Title
WO2012109910A1 (zh) 链路聚合选路方法及装置
McKenney Stochastic fairness queueing
Wang et al. Adaptive path isolation for elephant and mice flows by exploiting path diversity in datacenters
Kumar et al. Beyond best effort: Router architectures for the differentiated services of tomorrow's internet
US9154394B2 (en) Dynamic latency-based rerouting
Carpio et al. DiffFlow: Differentiating short and long flows for load balancing in data center networks
EP3085036B1 (en) Increasing packet process rate in a network device
CN108462646B (zh) 一种报文处理方法及装置
US10708272B1 (en) Optimized hash-based ACL lookup offload
Wang et al. Implementation of multipath network virtualization with SDN and NFV
Xu et al. TinyFlow: Breaking elephants down into mice in data center networks
CN106209669A (zh) 面向sdn数据中心网络最大概率路径流调度方法及装置
US20220091754A1 (en) Methods and systems for nvme target load balancing based on real time metrics
US11706152B2 (en) Methods and systems for queue and pipeline latency metrology in network devices and smart NICs
WO2012109909A1 (zh) 数据流负荷分担方法及装置
JPWO2013039083A1 (ja) 通信システム、制御装置および通信方法
Tso et al. Longer is better: Exploiting path diversity in data center networks
Jia et al. Reducing and balancing flow table entries in software-defined networks
Jia et al. A low overhead flow-holding algorithm in software-defined networks
CN111224888A (zh) 发送报文的方法及报文转发设备
US8867408B2 (en) Fast convergence on child link failures and weighted load balancing of aggregate ethernet/sonet bundles
CN101478480B (zh) 一种实现负载均衡的方法及装置
Huang et al. An enhanced scheduling framework for elephant flows in SDN-based data center networks
Liu et al. An enhanced scheduling mechanism for elephant flows in SDN-based data center
WO2022052800A1 (zh) 一种通信系统、数据处理方法以及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11858790

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11858790

Country of ref document: EP

Kind code of ref document: A1