WO2011095017A1 - 一种实现负荷分担的方法和路由设备 - Google Patents

一种实现负荷分担的方法和路由设备 Download PDF

Info

Publication number
WO2011095017A1
WO2011095017A1 PCT/CN2010/078395 CN2010078395W WO2011095017A1 WO 2011095017 A1 WO2011095017 A1 WO 2011095017A1 CN 2010078395 W CN2010078395 W CN 2010078395W WO 2011095017 A1 WO2011095017 A1 WO 2011095017A1
Authority
WO
WIPO (PCT)
Prior art keywords
load sharing
routing
packet
policy
load
Prior art date
Application number
PCT/CN2010/078395
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 WO2011095017A1 publication Critical patent/WO2011095017A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/564Enhancement of application control based on intercepted application data

Definitions

  • the present invention relates to the field of IP packet forwarding technologies, and in particular, to a method and a routing device for implementing load sharing. Background technique
  • the outbound interfaces in the routing table are the same as the destination IP address. That is, all the traffic passes through the next hop in the routing table. The outgoing interface is sent to the next device. When the traffic exceeds the interface bandwidth or is traffic-managed, part of the data is discarded by the router device, which affects the normal service of the user. In order to reduce the possibility of data loss, the data traffic of the same destination IP can be allocated to a plurality of different links according to a certain strategy during forwarding, and finally aggregated to a common target device, which is load sharing.
  • the first one is to evenly distribute the same destination IP traffic to all load sharing links.
  • This routing strategy is suitable for use in traffic ordering.
  • the advantage is that the traffic is absolutely balanced.
  • the disadvantage is that the packet sequence cannot be guaranteed.
  • the packets destined for Router B are evenly distributed to the three links and forwarded to Router B.
  • the packets are forwarded through different chains.
  • the time used by the route is different. Therefore, the sequence of the packet after the packet arrives at the router B may change.
  • the user After receiving the out-of-order packet, the user will send a request for retransmission of the packet, and the network service quality will be reduced.
  • the traffic characteristics are selected according to the traffic characteristics.
  • the packets of the same destination IP address are generated according to the port number and the protocol type.
  • Each flow feature identifier corresponds to a load sharing link, thereby ensuring that the same service traffic of the user goes the same.
  • the link reduces the possibility of packet disorder and improves the quality of service.
  • the same disadvantages are: When a certain type of traffic accounts for the bandwidth ratio When there are many, the load sharing effect of the link is not reflected.
  • the same destination IP packet to Router B is only classified according to the protocol type.
  • the User Datagram Protocol UDP
  • TCP link control protocol
  • the packet is routed to ensure that the same protocol type packets are selected on the same link, which reduces the possibility of packet disorder.
  • the packet sequence number, or the random number, or the packet flow feature identifier needs to be mapped to the load, whether it is based on the uniform routing mode of the packet or the routing mode based on the flow feature identifier.
  • a shared link generally uses a stream feature to identify the number of links. For a processor that does not have a remainder calculation module, using software to implement the algorithm is very command-oriented. For a network processor, If a message consumes too many lines in an algorithm during processing, the forwarding performance of the router device is degraded.
  • the maximum range of the packet sequence number or the random number used is not a multiple of the number of load sharing links, when the message-based check method is used, the traffic will generate errors and will not be completely evenly distributed to each.
  • the load-sharing link is the outbound interface of three identical bandwidths as shown in Figure 1, and the packet is used when calculating the route. If the serial number is 0, the remainder result is 0, and the remainder result is 1 or 2. Therefore, the number of packets selecting link 1 will be one more, and a certain error will occur after long-term forwarding. When the message sequence number range is smaller, the error will be more obvious. Summary of the invention
  • the main purpose of the present invention is to provide a method and a routing device for implementing load balancing, which can directly select the next hop and outbound interface information to be forwarded, and forward the packet that generates the link selection unevenness error. This ensures high-efficiency, high-quality message forwarding.
  • the present invention provides a method for implementing load sharing, including:
  • the load sharing policy is based on packet routing and load sharing error occurs
  • the load sharing error count in the error counter is used.
  • the value is searched for the load sharing link table to obtain the next hop and outgoing interface information.
  • the method also includes:
  • the packet After receiving the forwarded packet, the packet is generated according to the packet count, and the packet identifier is generated according to the destination IP address and the protocol type.
  • the routing device is searched according to the destination IP address of the packet, and the corresponding routing information table is obtained. Whether the load sharing flag exists in the routing information table, and if there is the load sharing flag, it is determined that load sharing is performed. If the load sharing flag is not available, it is determined that load sharing is not performed.
  • the method further includes:
  • the judgment is based on the packet routing mode or the flow routing mode; if it is based on the packet routing mode, it is determined whether a load sharing error will occur.
  • the method further includes: when the load sharing policy is based on packet routing and does not generate a load sharing error, or when the load sharing policy is based on a flow routing, searching for the load sharing according to the packet identifier. Link table.
  • the method further includes: adding, by the load sharing error count value, by one.
  • the routing information table is generated according to the IP address of the destination routing device.
  • the load sharing is performed, the load balancing policy configured by the user is obtained, and the load sharing flag and the load sharing policy flag are automatically formed in the routing information table, and the bandwidth is obtained according to the bandwidth of each outgoing interface.
  • the load sharing ratio of each outbound interface in the load sharing link table is generated according to the load sharing policy, the load sharing flag, and the load sharing link interface bandwidth ratio.
  • the present invention also provides a routing device for implementing load sharing, including: load sharing configuration Module, generation module, forwarding module; wherein
  • the load balancing configuration module is configured to configure a load sharing policy.
  • a generating module configured to generate a load sharing link table according to the load sharing policy and routing information configured by the load sharing configuration module
  • a forwarding module configured to: when the load sharing policy is based on message routing and a load sharing error, use a load sharing error count value in the error counter to search for a load sharing link table generated by the generating module, according to the The next hop in the load sharing link table and the outbound interface information forwarding packet.
  • the routing device further includes a routing information table generating module, configured to generate a routing information table according to the IP of the destination routing device.
  • the generating module generates a load sharing link table as:
  • the load sharing policy configured by the user is obtained when the load sharing is performed, and the load sharing flag and the load sharing policy flag are automatically formed in the routing information table, according to the bandwidth of each outgoing interface.
  • the load sharing ratio of each outbound interface in the load sharing link table is obtained, and a load sharing link table is generated according to the load sharing policy, the load sharing flag, and the load sharing link interface bandwidth ratio.
  • the method for implementing the load sharing and the routing device can directly select the next hop and the outbound interface information to be forwarded, which greatly reduces the calculation time of the selected link during forwarding, and ensures efficient forwarding of the data forwarding channel; Separate the load-sharing link table from the routing information table, which increases the flexibility of the entry management and reduces the coupling between the route and the load balancing.
  • the routing information or load sharing configuration and link information change, the maintenance is performed separately. , improve the stability and efficiency of the system.
  • the error cumulative counting method is used to calculate the error generated in the message routing, which improves the performance of the router device when forwarding, thereby improving the service quality of load sharing.
  • FIG. 1 is a schematic diagram of a network for an existing load sharing application
  • FIG. 2 is a diagram showing an example of a load sharing link table of the present invention
  • FIG. 3 is a schematic flowchart of a method for implementing load sharing according to the present invention.
  • FIG. 4 is a schematic structural diagram of a routing device for implementing load sharing according to the present invention. detailed description
  • the basic idea of the present invention is: when the load sharing strategy is based on packet routing and generating load sharing error, the load sharing error link value in the error counter is used to find the load sharing link table, and the next hop and outbound interface information are obtained, and The packet is forwarded according to the obtained next hop and the outbound interface information.
  • FIG. 3 is a schematic flowchart of a method for implementing load sharing according to the present invention. As shown in FIG. 3, a method for implementing load sharing provided by the present invention includes the following steps:
  • Step 301 Obtain a load sharing policy and generate a load sharing link table.
  • the routing information table is generated according to the IP address of the destination routing device, and the load balancing policy configured by the user is obtained when the load balancing is performed, and the load sharing flag and the load sharing policy flag are automatically formed in the routing information table, according to the bandwidth of each outgoing interface.
  • the load sharing ratio of the outbound interface in the load sharing link table is obtained, and the load sharing link table is generated according to the load sharing policy, the load sharing flag, and the load sharing link interface bandwidth ratio.
  • the load sharing link relationship changes, the load You need to update the outbound interface and next hop information to share the link table.
  • the link 1 is the 1G bandwidth
  • the link 2 is the 1G bandwidth
  • the link 3 is the 10G bandwidth.
  • the ratio of the three links in the load sharing link table is 1: 1: 10.
  • the load sharing link table space can store 1024 link tables. Therefore, according to the obtained ratio, the 1024 link table entry spaces are cyclically filled in order, until 1024 table spaces are filled, and the load sharing link table is filled. Each entry contains the next hop and outbound interface information;
  • the load sharing policy includes: when the load sharing is required, whether the flow-based routing method or the packet-based routing method is used; and the load sharing flag in the routing information table is based on whether the routing information of the destination IP meets the load sharing. The flag generated by the condition satisfies the load sharing condition if multiple links correspond to the same destination IP.
  • the destination IP may be Ipv4 or Ipv6.
  • Step 302 Generate a message sequence number and a message identifier, and determine whether there is a load sharing flag in the routing information table. If there is a load sharing flag, go to step 303. If there is no load sharing flag, go to step 307.
  • the packet sequence number is generated according to the packet count, and the identifier is generated according to the destination IP and the protocol type, and the text sequence number and the text identifier correspond to the entries in the load sharing link table.
  • the index can be directly indexed to the entry of the load sharing link table, so that the next hop and the outgoing interface of the corresponding load sharing link table are obtained;
  • the routing device is configured according to the destination IP address of the packet, and the corresponding routing information table is obtained, and the load sharing flag is determined in the routing information table. If there is a load sharing flag, indicating that load sharing is required, step 303 is performed, if there is no load sharing flag. If the load sharing is not required, go to step 307.
  • Step 303 Determine whether the load sharing policy is based on the packet routing mode. If the packet routing mode is based on the packet routing mode, perform step 304. If not, based on the packet routing mode, perform step 306. Specifically, according to the load in the routing information table. The policy is marked based on whether the packet routing mode is based on the packet routing mode, and if the packet routing mode is based on the flow routing mode, step 304 is performed;
  • Step 304 it is determined whether a load sharing error will be generated, if an error occurs, step 305 is performed, if no error is generated, step 306 is performed;
  • the load sharing link corresponding to the packet sequence number it is determined whether a load sharing error will occur; as shown in FIG. 2, when the message sequence number corresponds to the last four links, if the four links continue to be used, The link forwards the packet, and the link that forwards the packet is better than other links. The opportunity to forward a message at a time will cause load sharing error. In this case, the steps are executed.
  • step 306 is performed.
  • Step 305 Find the load sharing link table by using the load sharing error count value of the error counter, and add 1 to the load sharing error count value;
  • the load sharing link table is searched according to the load sharing error count value of the error counter at this time, and the corresponding link in the corresponding load sharing link table is found, and then the next link is obtained.
  • One hop, out of interface For example, as shown in Figure 2, when the message sequence number corresponds to the last four links, if the next hop 1 and egress 1 links in the four links are used for message forwarding, an error occurs.
  • the load sharing error count value of the counter is 1; the link 1 is found in the load sharing link table according to the load sharing error count value of the error counter, and the next hop and the outgoing interface of the link 1 are obtained; then the load sharing error of the error counter is obtained.
  • the count value is incremented by 1, and the load sharing error count value of the error counter is 2.
  • the error counter can use the registers in the chip to obtain the load sharing error count value by reading the count value in the register.
  • Step 306 Find a load sharing link table according to the packet identifier.
  • the link in the load sharing link table corresponding to the packet is generated according to the packet identifier generated in step 302, and the next hop and the outbound interface information in the load sharing link table are obtained.
  • the links in the load sharing link table corresponding to these packets are also the same.
  • Step 307 Forward the packet according to the next hop and the outbound interface information in the routing information table, and end the current processing flow.
  • Step 308 Forward the packet according to the next hop and the outbound interface information in the load sharing link table.
  • the present invention further provides a routing device for implementing load sharing. As shown in FIG. 4, the routing device includes: a load sharing configuration module 41, a generating module 42, and a forwarding module. Block 43; wherein
  • the load sharing configuration module 41 is configured to configure a load sharing policy.
  • the load sharing strategy is: when the load sharing is required, whether it is based on the message routing mode or the flow routing mode;
  • the generating module 42 is configured to generate a load sharing link table according to the load sharing policy and routing information configured by the load sharing configuration module 41.
  • the forwarding module 43 is configured to use the load sharing error count value in the error counter to find the load sharing link table generated by the load sharing parameter 42 when the load sharing strategy is based on the message routing and the load sharing error is generated, according to the load sharing link. The next hop in the table and the outbound interface information forwarding message;
  • the load sharing error count value needs to be increased by 1 while forwarding the message.
  • the routing device may further include: a routing information table generating module 44, configured to generate a routing information table according to the IP of the destination routing device;
  • the load sharing flag and the load sharing policy flag can be automatically formed. According to the bandwidth of each outgoing interface, the sharing ratio of each outgoing interface in the load sharing link table can be obtained.
  • the specific process of generating the load sharing link table by the generating module 42 is as follows: According to the routing information table generated by the routing information table generating module 44, when the load sharing is performed, the load sharing policy configured by the user is obtained, and the routing information table is automatically formed in the routing information table.
  • the load sharing flag and the load sharing policy flag are used to obtain the load sharing ratio of each outbound interface in the load sharing link table according to the bandwidth of each outbound interface, and generate a load according to the load sharing policy, the load sharing flag, and the load sharing link interface bandwidth ratio. Share the link table.

Landscapes

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

Description

一种实现负荷分担的方法和路由设备 技术领域
本发明涉及 IP报文转发技术领域, 尤其涉及一种实现负荷分担的方法 和路由设备。 背景技术
在路由器、 交换机等设备中, 通常在对同一目的 IP报文进行转发时, 根据目的 IP查找到的路由表中的出接口都是相同的, 即: 所有流量都通过 路由表中的下一跳以及出接口发送到下一个设备, 那么, 当流量超过接口 带宽或者受到流量管理时, 部分数据会被路由器设备丟弃, 从而影响用户 的正常业务。 为了减少数据丟失的可能, 可以在转发时将相同目的 IP的数 据流量按某种策略分配到多个不同的链路上, 最终再汇聚到共同的目标设 备, 这就是负荷分担。
负荷分担的选路策略一般有两种: 第一种, 是将相同的目的 IP的流量 均匀分配到所有的负荷分担链路上, 这种选路策略适合使用在对流量保序 要求不高的场合, 优点是流量绝对均衡, 缺点就是报文顺序不能保证, 如 图 1所示, 目的 IP同为到路由器 B的报文会均匀分配到三条链路转发到路 由器 B, 但因转发通过不同链路所用的时间是不同的, 因此, 报文到达路 由器 B后的顺序可能会改变,用户收到乱序报文后会发出报文重发的请求, 网络服务质量会因此降低; 第二种, 是按流量特征选择链路, 相同目的 IP 的报文根据端口号、 协议类型的不同等生成流特征标识, 每个流特征标识 对应一条负荷分担链路, 由此保证用户相同的业务流量走相同的链路, 减 少了报文顺序错乱的可能, 服务质量得以提高, 但是, 同样缺点在于: 当 某一种业务流量占带宽比较多时, 链路的负荷分担效果得不到体现, 同样 如图 1所示, 假设到路由器 B的相同目的 IP报文只按协议类型分类选路, 则可能用户数据包协议( UDP , User Datagram Protocol ) 4艮文走链路一, 传 输控制协议(TCP, Transmission Control Protocol )报文走链路二, 从而保 证了相同协议类型报文选择相同链路, 减少报文乱序的可能。
现有的负荷分担实现方法中, 无论是基于报文的均匀选路方式还是基 于流特征标识的选路方式, 都需要将报文序列号、 或随机数、 或报文流特 征标识对应到负荷分担的一条链路, 一般使用流特征标识对链路数求余的 方法, 对于没有求余计算模块的处理器, 用软件来实现这个算法是非常占 指令行的, 对于网络处理器来说, 如果一个报文在处理流程中某个算法占 用过多的指令行, 会导致路由器设备转发性能降低。
另外, 如果使用的报文序列号或随机数的最大范围不是负荷分担链路 数的倍数, 则使用基于报文的均勾选路方式时, 流量会产生误差, 并不会 完全均匀分布到各链路上。如图 1所示,当报文序列号范围是 0-65535( 16Bits 的计数器), 负荷分担链路为如图 1所示三条相同带宽的出接口, 报文在计 算选路时, 用报文序列号对 3求余, 余数结果为 0的会比余数结果为 1、 2 的多 1个, 因此, 选择链路一的报文会多 1个, 在长时间转发后会产生一 定的误差; 当报文序列号范围更小是时, 误差会更为明显。 发明内容
有鉴于此, 本发明的主要目的在于提供一种实现负荷分担的方法和路 由设备, 能直接选择转发的下一跳及出接口信息, 并对产生链路选择不均 匀误差的报文进行转发, 从而保证高效率、 高质量的报文转发。
为达到上述目的, 本发明的技术方案是这样实现的:
本发明提供了一种实现负荷分担的方法, 包括:
获取负荷分担策略并生成负荷分担链路表, 当负荷分担策略是基于报 文选路且会产生负荷分担误差时, 使用误差计数器中的负荷分担误差计数 值查找负荷分担链路表, 得到下一跳以及出接口信息;
根据所述负荷分担链路表中的下一跳以及出接口信息转发报文。 方法还包括:
在收到转发的报文后, 根据报文计数生成报文序列号, 根据目的 IP和 协议类型生成报文标识, 根据报文的目的 IP查找路由设备, 获得对应的路 由信息表, 判断所述路由信息表中是否存在负荷分担标记, 如果有所述负 荷分担标记, 则确定进行负荷分担, 如果没有所述负荷分担标记, 则确定 不进行负荷分担。
上述方案中, 所述确定进行负荷分担之后, 该方法还包括:
根据路由信息表中的负荷分担策略标记, 判断是基于报文选路方式还 是基于流选路方式; 如果是基于报文选路方式, 判断是否会产生负荷分担 误差。
上述方案中, 该方法进一步包括: 当所述负荷分担策略是基于报文选 路且不会产生负荷分担误差时、 或者当负荷分担策略是基于流选路时, 根 据报文标识查找所述负荷分担链路表。
上述方案中, 所述得到下一跳以及出接口信息之后, 该方法还包括: 所述负荷分担误差计数值增加 1。 根据目的路由设备的 IP生成路由信息表, 当存在负荷分担时获取用户 所配置的负荷分担策略, 在所述路由信息表中自动形成负荷分担标记和负 荷分担策略标记, 根据各个出接口的带宽得到负荷分担链路表中各个出接 口的分担比例, 根据所述负荷分担策略、 负荷分担标记、 负荷分担链路接 口带宽比例, 生成负荷分担链路表。
本发明还提供了一种实现负荷分担的路由设备, 包括: 负荷分担配置 模块、 生成模块、 转发模块; 其中,
负荷分担配置模块, 用于配置负荷分担策略;
生成模块, 用于根据所述负荷分担配置模块配置的负荷分担策略以及 路由信息, 生成负荷分担链路表;
转发模块, 用于在所述负荷分担策略是基于报文选路且会产生负荷分 担误差时, 使用误差计数器中的负荷分担误差计数值查找所述生成模块生 成的负荷分担链路表, 根据所述负荷分担链路表中的下一跳以及出接口信 息转发报文。
上述方案中, 该路由设备还包括路由信息表生成模块, 用于根据目的 路由设备的 IP生成路由信息表。
上述方案中, 所述生成模块生成负荷分担链路表为:
根据路由信息表生成模块生成的路由信息表, 当存在负荷分担时获取 用户所配置的负荷分担策略, 在所述路由信息表中自动形成负荷分担标记 和负荷分担策略标记, 根据各个出接口的带宽得到负荷分担链路表中各个 出接口的分担比例, 根据所述负荷分担策略、 负荷分担标记、 负荷分担链 路接口带宽比例, 生成负荷分担链路表。
本发明所提供的实现负荷分担的方法和路由设备, 可直接选择转发的 下一跳及出接口信息, 极大的减少了转发时选择链路的计算时间, 保证数 据转发通道的高效转发; 并且将负荷分担链路表与路由信息表分开, 增加 了表项管理的灵活性, 减小了路由与负荷分担的耦合性, 当路由信息或负 荷分担相关配置与链路信息发生变化时进行分别维护, 提高了系统的稳定 高效性。 同时, 在没有求余计算的情况下, 利用误差累积计数的方法计算 出在报文选路时产生的误差, 提高了路由器设备转发时的性能, 从而提高 了负荷分担的服务质量。 附图说明
图 1为现有的负荷分担应用组网示意图;
图 2为本发明负荷分担链路表的示例图;
图 3为本发明实现负荷分担的方法的流程示意图;
图 4为本发明实现负荷分担的路由设备的结构示意图。 具体实施方式
本发明的基本思想是: 当负荷分担策略是基于报文选路且产生负荷分 担误差时, 使用误差计数器中的负荷分担误差计数值查找负荷分担链路表, 得到下一跳以及出接口信息, 并根据得到的下一跳以及出接口信息转发报 文。
下面通过附图及具体实施例对本发明再做进一步的详细说明。
图 3是本发明实现负荷分担的方法的流程示意图, 如图 3所示, 本发 明提供的一种实现负荷分担的方法包括以下步骤:
步骤 301 , 获取负荷分担策略并生成负荷分担链路表;
具体的, 根据目的路由设备的 IP生成路由信息表, 当存在负荷分担时 获取用户所配置的负荷分担策略, 在路由信息表中自动形成负荷分担标记 和负荷分担策略标记, 根据各个出接口的带宽可以得到负荷分担链路表中 各个出接口的分担比例, 根据负荷分担策略、 负荷分担标记、 负荷分担链 路接口带宽比例, 生成负荷分担链路表; 当负荷分担链路关系发生变化时, 负荷分担链路表需要更新出接口和下一跳信息。 例如, 如图 2 所示, 链路 一为 1G带宽, 链路二为 1G带宽, 链路三为 10G带宽, 则负荷分担链路表 中三条链路的分担比例为 1 : 1: 10。
这里, 负荷分担链路表空间可以存放 1024条链路表, 因此, 根据得到 的比例, 按照顺序依次向 1024条链路表条目空间循环填充, 直到 1024条 表空间填充满, 负荷分担链路表的每个条目中包含下一跳以及出接口信息; 负荷分担策略包括: 当需要负荷分担时是釆用基于流的选路方式还是釆用 基于报文的选路方式; 路由信息表中的负荷分担标记, 是根据目的 IP的路 由信息是否符合负荷分担条件而生成的标记, 如果多条链路对应同一个目 的 IP, 就满足负荷分担条件。 其中, 目的 IP可以是 Ipv4, 也可以使 Ipv6。
步骤 302, 生成报文序列号和报文标识, 并判断路由信息表中是否有负 荷分担标记, 如果有负荷分担标记, 则执行步骤 303 , 如果没有负荷分担标 记, 则执行步骤 307;
具体的, 在收到需要转发的报文后, 根据报文计数生成报文序列号, 根据目的 IP和协议类型生成 ^艮文标识, 文序列号和 文标识都对应负荷 分担链路表中的条目索引, 可以直接索引到负荷分担链路表的条目, 从而 得到对应的负荷分担链路表的下一跳、 出接口;
根据报文的目的 IP查找路由设备, 获得对应的路由信息表, 判断路由 信息表中是否存在负荷分担标记, 如果有负荷分担标记, 表示需要进行负 荷分担, 则执行步骤 303 , 如果没有负荷分担标记, 表示不需要进行负荷分 担, 则执行步骤 307。
步骤 303 , 判断负荷分担策略是否基于报文选路方式, 如果是基于报文 选路方式, 则执行步骤 304,如果不是基于报文选路方式, 则执行步骤 306; 具体的, 根据路由信息表中的负荷分担策略标记, 判断是基于报文选 路方式还是基于流选路方式, 如果是基于报文选路方式, 则执行步骤 304, 如果是基于流选路方式, 则执行步骤 306;
步骤 304, 判断是否将会产生负荷分担误差, 如果会产生误差, 则执行 步骤 305 , 如果不会产生误差, 则执行步骤 306;
具体的, 根据报文序列号对应的负荷分担链路, 判断是否将会产生负 荷分担误差; 如图 2所示, 当报文序列号对应最后四条链路时, 如果继续 使用这四条链路中的链路进行报文转发, 进行报文转发的链路会比其他链 路多一次转发报文的机会, 将会导致负荷分担误差, 这种情况下执行步骤
305; 如果不使用这四条链路中的链路进行转发, 就不会产生误差, 这种情 况下执行步骤 306。
步骤 305 , 使用误差计数器的负荷分担误差计数值查找负荷分担链路 表, 负荷分担误差计数值加 1 ;
具体的, 当判断将会产生负荷分担误差时, 根据此时的误差计数器的 负荷分担误差计数值查找负荷分担链路表, 找到对应的负荷分担链路表中 的对应的链路后, 得到下一跳、 出接口。 例如, 如图 2 所示, 当报文序列 号对应最后四条链路时, 如果继续使用这四条链路中的下一跳 1、 出口 1链 路进行报文转发就会产生误差, 这时误差计数器的负荷分担误差计数值是 1;根据误差计数器的负荷分担误差计数值在负荷分担链路表中找到链路 1 , 得到链路 1的下一跳、出接口;然后误差计数器的负荷分担误差计数值加 1 , 此时误差计数器的负荷分担误差计数值是 2。
这里, 误差计数器可以利用芯片中的寄存器, 通过读取寄存器中的计 数值得到负荷分担误差计数值。
步骤 306, 根据报文标识查找负荷分担链路表;
具体的, 根据步骤 302 中产生的报文标识, 查找与其对应的负荷分担 链路表中的链路, 得到负荷分担链路表中的下一跳以及出接口信息; 如果 需要进行转发的报文具有一样的报文标识, 那么这些报文对应的负荷分担 链路表中的链路也是一样的。
步骤 307,根据路由信息表中的下一跳以及出接口信息转发报文, 结束 当前处理流程。
步骤 308, 根据负荷分担链路表中的下一跳以及出接口信息转发报文。 为实现上述方法, 本发明还提供了一种实现负荷分担的路由设备, 如 图 4所示, 该路由设备包括: 负荷分担配置模块 41、 生成模块 42、 转发模 块 43; 其中,
负荷分担配置模块 41 , 用于配置负荷分担策略;
其中, 负荷分担策略是: 当需要进行负荷分担时, 是基于报文选路方 式还是基于流选路方式;
生成模块 42 ,用于根据负荷分担配置模块 41配置的负荷分担策略以及 路由信息, 生成负荷分担链路表;
转发模块 43 , 用于在负荷分担策略是基于报文选路且会产生负荷分担 误差时, 使用误差计数器中的负荷分担误差计数值查找生成模块 42生成的 负荷分担链路表, 根据负荷分担链路表中的下一跳以及出接口信息转发报 文;
这里, 在转发报文的同时需将负荷分担误差计数值增加 1。
该路由设备还可以进一步包括: 路由信息表生成模块 44, 用于根据目 的路由设备的 IP生成路由信息表;
在路由信息表中, 可以自动形成负荷分担标记和负荷分担策略标记, 根据各个出接口的带宽, 可以得到负荷分担链路表中各个出接口的分担比 例;
生成模块 42生成负荷分担链路表的具体过程为: 根据路由信息表生成 模块 44生成的路由信息表, 当存在负荷分担时获取用户所配置的负荷分担 策略, 在所述路由信息表中自动形成负荷分担标记和负荷分担策略标记, 根据各个出接口的带宽得到负荷分担链路表中各个出接口的分担比例, 根 据所述负荷分担策略、 负荷分担标记、 负荷分担链路接口带宽比例, 生成 负荷分担链路表。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围, 凡在本发明的精神和原则之内所作的任何修改、 等同替换和改进 等, 均应包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种实现负荷分担的方法, 其特征在于, 该方法包括:
获取负荷分担策略并生成负荷分担链路表, 当负荷分担策略是基于报 文选路且会产生负荷分担误差时, 使用误差计数器中的负荷分担误差计数 值查找负荷分担链路表, 得到下一跳以及出接口信息;
根据所述负荷分担链路表中的下一跳以及出接口信息转发报文。
2、 根据权利要求 1所述的方法, 其特征在于, 所述获取负荷分担策略 并生成负荷分担链路表之后, 该方法还包括:
在收到转发的报文后, 根据报文计数生成报文序列号, 根据目的 IP和 协议类型生成报文标识, 根据报文的目的 IP查找路由设备, 获得对应的路 由信息表, 判断所述路由信息表中是否存在负荷分担标记, 如果有所述负 荷分担标记, 则确定进行负荷分担, 如果没有所述负荷分担标记, 则确定 不进行负荷分担。
3、 根据权利要求 2所述的方法, 其特征在于, 所述确定进行负荷分担 之后, 该方法还包括:
根据路由信息表中的负荷分担策略标记, 判断是基于报文选路方式还 是基于流选路方式; 如果是基于报文选路方式, 判断是否会产生负荷分担 误差。
4、 根据权利要求 3所述的方法, 其特征在于, 该方法还包括: 当所述 负荷分担策略是基于报文选路且不会产生负荷分担误差时、 或者当负荷分 担策略是基于流选路时, 根据报文标识查找所述负荷分担链路表。
5、 根据权利要求 1所述的方法, 其特征在于, 所述得到下一跳以及出 接口信息之后, 该方法还包括: 所述负荷分担误差计数值增加 1。
6、 根据权利要求 1所述的方法, 其特征在于, 所述获取负荷分担策略 并生成负荷分担链路表为: 根据目的路由设备的 IP生成路由信息表, 当存在负荷分担时获取用户 所配置的负荷分担策略, 在所述路由信息表中自动形成负荷分担标记和负 荷分担策略标记, 根据各个出接口的带宽得到负荷分担链路表中各个出接 口的分担比例, 根据所述负荷分担策略、 负荷分担标记、 负荷分担链路接 口带宽比例, 生成负荷分担链路表。
7、 一种实现负荷分担的路由设备, 其特征在于, 该路由设备包括: 负 荷分担配置模块、 生成模块、 转发模块; 其中,
负荷分担配置模块, 用于配置负荷分担策略;
生成模块, 用于根据所述负荷分担配置模块配置的负荷分担策略以及 路由信息, 生成负荷分担链路表;
转发模块, 用于在所述负荷分担策略是基于报文选路且会产生负荷分 担误差时, 使用误差计数器中的负荷分担误差计数值查找所述生成模块生 成的负荷分担链路表, 根据所述负荷分担链路表中的下一跳以及出接口信 息转发报文。
8、根据权利要求 7所述的路由设备,其特征在于,该路由设备还包括: 路由信息表生成模块, 用于根据目的路由设备的 IP生成路由信息表。
9、 根据权利要求 8所述的路由设备, 其特征在于, 所述生成模块生成 负荷分担链路表为:
根据路由信息表生成模块生成的路由信息表, 当存在负荷分担时获取 用户所配置的负荷分担策略, 在所述路由信息表中自动形成负荷分担标记 和负荷分担策略标记, 根据各个出接口的带宽得到负荷分担链路表中各个 出接口的分担比例, 根据所述负荷分担策略、 负荷分担标记、 负荷分担链 路接口带宽比例, 生成负荷分担链路表。
PCT/CN2010/078395 2010-02-04 2010-11-04 一种实现负荷分担的方法和路由设备 WO2011095017A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010112784.9A CN101789949B (zh) 2010-02-04 2010-02-04 一种实现负荷分担的方法和路由设备
CN201010112784.9 2010-02-04

Publications (1)

Publication Number Publication Date
WO2011095017A1 true WO2011095017A1 (zh) 2011-08-11

Family

ID=42533002

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/078395 WO2011095017A1 (zh) 2010-02-04 2010-11-04 一种实现负荷分担的方法和路由设备

Country Status (2)

Country Link
CN (1) CN101789949B (zh)
WO (1) WO2011095017A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546922A (zh) * 2020-11-27 2022-05-27 新疆金风科技股份有限公司 用于风电场的串口通信方法及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789949B (zh) * 2010-02-04 2014-07-02 中兴通讯股份有限公司 一种实现负荷分担的方法和路由设备
CN102098224B (zh) * 2011-02-16 2015-06-03 中兴通讯股份有限公司 数据流负荷分担方法及装置
CN102437956B (zh) * 2011-12-16 2014-07-30 福建星网锐捷网络有限公司 上链聚合端口的流量均衡方法、装置及设备
CN102448120B (zh) * 2011-12-23 2015-06-24 上海顶竹通讯技术有限公司 多路径负荷分担方法及装置
CN106302218A (zh) * 2015-05-29 2017-01-04 中兴通讯股份有限公司 网络负荷的分担方法和装置
CN105791116A (zh) * 2016-03-15 2016-07-20 上海缔安科技股份有限公司 一种数据传输路由方法
CN105897882B (zh) * 2016-04-06 2020-02-18 中国人民解放军国防科学技术大学 一种数据中心网络更新中数据流的迁移方法
WO2020062268A1 (zh) 2018-09-30 2020-04-02 华为技术有限公司 在网络中的负载均衡和报文重排序方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829189A (zh) * 2005-03-01 2006-09-06 杭州华为三康技术有限公司 路由下一跳负荷分担的方法
CN101184049A (zh) * 2007-12-12 2008-05-21 中兴通讯股份有限公司 一种动态负荷分担方法及系统
WO2009151848A1 (en) * 2008-06-12 2009-12-17 Optimum Communications Services, Inc. Packet-layer transparent packet-switching network
CN101789949A (zh) * 2010-02-04 2010-07-28 中兴通讯股份有限公司 一种实现负荷分担的方法和路由设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829189A (zh) * 2005-03-01 2006-09-06 杭州华为三康技术有限公司 路由下一跳负荷分担的方法
CN101184049A (zh) * 2007-12-12 2008-05-21 中兴通讯股份有限公司 一种动态负荷分担方法及系统
WO2009151848A1 (en) * 2008-06-12 2009-12-17 Optimum Communications Services, Inc. Packet-layer transparent packet-switching network
CN101789949A (zh) * 2010-02-04 2010-07-28 中兴通讯股份有限公司 一种实现负荷分担的方法和路由设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546922A (zh) * 2020-11-27 2022-05-27 新疆金风科技股份有限公司 用于风电场的串口通信方法及装置
CN114546922B (zh) * 2020-11-27 2024-05-31 金风科技股份有限公司 用于风电场的串口通信方法及装置

Also Published As

Publication number Publication date
CN101789949A (zh) 2010-07-28
CN101789949B (zh) 2014-07-02

Similar Documents

Publication Publication Date Title
US10735323B2 (en) Service traffic allocation method and apparatus
WO2011095017A1 (zh) 一种实现负荷分担的方法和路由设备
US9634929B2 (en) Using context labels to scale MAC tables on computer network edge devices
US20180069716A1 (en) Group bundling priority dissemination through link-state routing protocol in a network environment
US9450829B2 (en) Seamless segment routing
EP2614618B1 (en) Automated traffic engineering for multi-protocol label switching (mpls) with link utilization as feedback into the tie-breaking mechanism
US9077562B2 (en) System and method for layer-2 multicast multipathing
US8238324B2 (en) Method and system for network aware virtual machines
US8750121B2 (en) Addressing the large flow problem for equal cost multi-path in the datacenter
US20150032871A1 (en) Automated traffic engineering based upon the use of bandwidth and unequal cost path utilization
US20080159150A1 (en) Method and Apparatus for Preventing IP Datagram Fragmentation and Reassembly
US10361954B2 (en) Method and apparatus for processing modified packet
US9548930B1 (en) Method for improving link selection at the borders of SDN and traditional networks
WO2013026384A1 (zh) 业务数据传输的方法、网络节点及系统
JP2018191290A (ja) 負荷分散を実現するための方法、装置、およびネットワークシステム
WO2017008712A1 (zh) Vxlan隧道端点vtep之间的路径可达检测
WO2015055058A1 (zh) 转发表项生成的方法、转发节点和控制器
TWI543567B (zh) 在電腦網路中進行封包的多路徑路由選擇的裝置及其方法
US20170111260A1 (en) Trill isis-based route calculation method and device
WO2023226633A1 (zh) 故障处理方法、相关设备和系统
WO2015039616A1 (zh) 一种报文处理方法及设备
Kaymak et al. Per-packet load balancing in data center networks
WO2020168982A1 (zh) 一种发送和获取断言报文的方法和网络节点
JP2015057879A (ja) コンピュータ・ネットワーキングにおけるパケットのマルチパス・ルーティング・デバイスおよびその使用方法
WO2015011648A1 (en) Automated traffic engineering based upon the use of bandwidth and unequal cost path utilization

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: 10845100

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: 10845100

Country of ref document: EP

Kind code of ref document: A1