WO2016138705A1 - Method and device for managing link in load sharing - Google Patents

Method and device for managing link in load sharing Download PDF

Info

Publication number
WO2016138705A1
WO2016138705A1 PCT/CN2015/081354 CN2015081354W WO2016138705A1 WO 2016138705 A1 WO2016138705 A1 WO 2016138705A1 CN 2015081354 W CN2015081354 W CN 2015081354W WO 2016138705 A1 WO2016138705 A1 WO 2016138705A1
Authority
WO
WIPO (PCT)
Prior art keywords
load sharing
link
sharing link
network device
load
Prior art date
Application number
PCT/CN2015/081354
Other languages
French (fr)
Chinese (zh)
Inventor
张树冲
叶正鑫
钟炜
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016138705A1 publication Critical patent/WO2016138705A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Definitions

  • This document relates to the field of communications, and in particular, to a method and apparatus for managing links in load sharing.
  • load sharing is a strategy and method for load balancing on multiple links on network node devices.
  • This policy method is used more and more frequently in network data devices. With the frequent use, more and more problems are exposed, and data developers need to use reasonable methods to solve them.
  • the link in the load sharing is abnormally interrupted, for example, one link in the load sharing is manually shut down, or the optical fiber module in the link is damaged, the demand for fast convergence of the link is becoming stronger.
  • the link load sharing is re-formed. For example, the load balancing is performed on the IP route that is formed by the route.
  • the update platform and the forwarding plane route form a route load sharing.
  • the link aggregation is discovered by the Link Aggregation Control Protocol (LACP). Form and update the forwarding path in the link aggregation.
  • Link detection methods such as BFD (Bidirectional Forwarding Detection), OAM (Operation Administration and Maintenance), and other link detection methods are used to detect link connectivity. Switching.
  • the load sharing convergence needs to be dependent on the protocol awareness. Then, the forwarding module is notified to reselect the effective path for forwarding.
  • the load sharing convergence technology is implemented in the centralized device or the distributed device within 50 ms. Convergence is very difficult.
  • FIG. 1 is a schematic diagram of networking of a network in the related art.
  • the IP of the network a 100.1.1.2 communicates with the IP of the network b: 200.1.1.2.
  • the network device a checks the routing table to find that there are n routes to the network b.
  • the routing module of the platform will switch the path. After the path switching occurs, the route will not be updated immediately. This causes the route to reconverge to update this A large number of forwarded packets are discarded due to the incomplete routing update.
  • This document provides a method and apparatus for managing links in load sharing to reduce the number of lost packets during link switching.
  • a method for managing a link in load sharing includes: when an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, the network device switches the traffic to the i+1th load sharing link And forwarding the traffic to the destination network using the i+1th load sharing link, where i is a positive integer.
  • the method further includes: the network device detecting whether the i+1th load sharing link works normally; If the i+1th load sharing link works normally, the network device triggers the operation of switching the traffic to the i+1th load sharing link.
  • the detecting, by the network device, whether the operation of the (i)th load sharing link is normal the network device acquiring the first random corresponding to the i-th load sharing link in the pre-stored routing policy a value, the value of the first random number is increased by one to obtain a second random value, and the second random value is used to perform a modulo operation on the number of load sharing links to obtain a pre-stored load sharing of the second random value.
  • the network device For the key value corresponding to the table, obtain the state of the outbound interface corresponding to the key value in the load sharing table; if the state of the outbound interface is enabled, determine that the i+1th load sharing link works normally. If the status of the outbound interface is off, it is determined that the i+1th load sharing link is not working properly.
  • the method further includes: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
  • the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  • a device for managing a link in load sharing includes: a switching module, configured to: when an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, switch the traffic to the (i+1)th
  • the load sharing module is configured to: forward the traffic to the destination network by using the i+1th load sharing link, where i is a positive integer.
  • the device further includes: a detecting module, configured to: detect whether the i+1th load sharing link works normally; and the triggering module is configured to: if the i+1th load sharing link If the operation is normal, the operation of switching the traffic to the i+1th load sharing link is triggered.
  • a detecting module configured to: detect whether the i+1th load sharing link works normally
  • the triggering module is configured to: if the i+1th load sharing link If the operation is normal, the operation of switching the traffic to the i+1th load sharing link is triggered.
  • the detecting module includes: an acquiring unit, configured to: acquire a first random value corresponding to the i-th load sharing link in a pre-stored routing policy; and the first calculating unit is configured to: The value of the first random number is increased by one to obtain a second random value; the second calculating unit is configured to perform a modulo operation by using the second random value and the number of load sharing links, to obtain the second random value is stored in advance
  • the key value corresponding to the load sharing table, the state of the outbound interface corresponding to the key value is obtained in the load sharing table; and the determining unit is configured to: if the state of the outgoing interface is open, determine the ith If the status of the outbound interface is off, the i+1 load balancing link is working properly.
  • the detecting module is further configured to: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
  • the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  • a computer readable storage medium storing computer executable instructions for performing the method of any of the above.
  • the present invention provides an embodiment, in which the outbound interface of the network device is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network, thereby realizing the rediscovering of the link without affecting the protocol or the detection mechanism.
  • the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing. This solves the problem of slow link convergence and serious packet loss when link abnormalities are common in data devices.
  • FIG. 1 is a schematic diagram of networking of a network in related art
  • FIG. 2 is a schematic flowchart of a method for managing a link in load sharing according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for managing a link in load sharing according to an application example of the present invention
  • FIG. 4 is a schematic diagram of networking of a network according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a device for managing a link in load sharing according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for managing a link in load sharing according to an embodiment of the present invention.
  • the method shown in Figure 1 includes:
  • Step 201 When an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, the network device switches the traffic to the i+1th load sharing link.
  • Step 202 The network device forwards the traffic to the destination network by using an i+1th load sharing link, where i is a positive integer.
  • the traffic is automatically switched to the next link to continue forwarding to the destination network, so that the link is not affected or the detection mechanism is rediscovered.
  • the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing, and the problem of slow link convergence and serious packet loss when the link abnormality is common in data devices is solved.
  • the method further includes: the network device detecting whether the i+1th load sharing link works normally; If the i+1th load sharing link works normally, the network device triggers the operation of switching the traffic to the i+1th load sharing link.
  • the detecting, by the network device, whether the work of the i+1th load sharing link is normal includes:
  • the network device acquires a first random value corresponding to the ith load balancing link in the pre-stored routing policy, and increases the value of the first random number by one to obtain a second random value, and uses the second Performing a modulo operation on the number of the load sharing link, and obtaining a key value corresponding to the second random value in the pre-stored load sharing table, and acquiring the state of the outbound interface corresponding to the key value in the load sharing table;
  • the status of the outbound interface is on, it is determined that the i+1th load sharing link is working normally; if the status of the outbound interface is off, it is determined that the i+1th load sharing link does not work. normal.
  • the i+1th link is determined by adding the first random value corresponding to the faulty link to the first random value, which conforms to the provisions of the management protocol in the prior art, and does not need to modify the management in the prior art.
  • the method provided by the embodiment of the present invention can be used, and the compatibility is strong.
  • the network device detects whether the i++th load sharing link works normally.
  • the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  • load sharing link is only used as an example. Other types of load sharing links are also applicable to the embodiments of the present invention, and are not described herein again.
  • FIG. 3 is a schematic flowchart diagram of a method for managing a link in load sharing according to an application example of the present invention.
  • the method shown in Figure 3 includes:
  • the data packet sent from the network a is in the forwarding module of the network device a, and the route is searched according to the destination (destination) IP in the packet.
  • the above steps are the basic process of load sharing processing.
  • the processing flow of the related technology is in a waiting state, waiting for the platform to form a new routing load sharing, but in this process, the abnormal link occurs.
  • the packet will be discarded by the link down.
  • the embodiment of the present invention is improved on the basis of the original, and the interface is queried by the forwarding plane when the link is abnormal, and the link is not taken after the interface is down.
  • the added exception is handled as follows:
  • the forwarding plane obtains the interface information from the load balancing table, and then uses the outbound interface information to find the interface attribute table, and obtains the interface status on/off (UP/DOWN) from the outbound interface attribute table.
  • step 309 Add 1 to the random value obtained originally, and the purpose is to point to the next load sharing entry.
  • the number of links obtained from the load balancing policy table is decremented by one. If not equal to 0, step 305 is executed, and a new load sharing table key value is set to check the load sharing table; if equal to 0, the process ends.
  • steps 305-309 are sequentially looped until the interface status is up; if all interfaces are down, the maximum number of cyclic links is n times.
  • link abnormalities there are two kinds of link abnormalities in general, namely: 1, artificially shut down the interface; 2, the physical components in the link suddenly damaged, including fiber breaks, optical module anomalies and so on.
  • the interface is actively shut down, and the platform will pass the information from the platform to the forwarding plane, and the physical component suddenly is detected by the forwarding plane and reported to the main control platform.
  • route load sharing will take more time to converge.
  • whether in the first or the second case minimal or no packet loss convergence is achieved.
  • the processing in the embodiment of the present invention is mainly processed when the link is abnormal and the new load sharing has not been formed. Referring to the processing flow of 307 to 309 in the flow shown in FIG. 3, the new steady state is restored and then restored. Normal load sharing processing, and just when the link does not reach steady state, packets with the outbound interface will be discarded. The amount of discarded packets is completely determined by the convergence of load sharing.
  • Example 1 suitable for the present invention As shown in FIG. 1, network a to network b have N route load sharing links on network device a. With the embodiment of the present invention, when any link of the outbound interface of the network device a is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network. The network routing stability and security for the similar network 1 can be greatly improved by using the embodiment of the present invention.
  • Example 2 suitable for the embodiment of the present invention As shown in FIG. 1, the network a to the network b have N tunnel load sharing links on the network device a.
  • the interface information obtained from the routing table is replaced with the interface information obtained from the label table.
  • the traffic will be automatically switched to the next link to continue forwarding to the destination network.
  • the embodiment of the present invention can greatly improve the stability and security of the network tunnel similar to the network 1.
  • FIG. 4 is a schematic diagram of networking of a network according to an embodiment of the present invention.
  • the network a to the network b arrives at the network device b through the network device a, which is a smart group (link aggregation) link aggregated by N links, and the N physical links form a smart group load sharing.
  • the interface is obtained from the routing table as a smartgroup interface, and then the forwarding side checks the smartgroup routing policy table and the load sharing table information to obtain the outbound interface information.
  • the embodiment of the present invention can also be connected. Port polling check.
  • FIG. 5 is a schematic structural diagram of a device for managing a link in load sharing according to an embodiment of the present invention. Referring to the method shown in FIG. 2 and FIG. 3, the apparatus shown in FIG. 5 includes:
  • the switching module 501 is configured to: when the i-th load sharing link currently used by the outbound interface of the network device is abnormal, switch the traffic to the i+1th load sharing link;
  • the transmission module 502 is configured to: forward the traffic to the destination network by using the i+1th load sharing link, where i is a positive integer.
  • the device may further include:
  • the detecting module is configured to: detect whether the i+1th load sharing link works normally;
  • the triggering module is configured to: if the i+1th load sharing link works normally, trigger the operation of switching the traffic to the i+1th load sharing link.
  • the detection module includes:
  • the obtaining unit is configured to: obtain a first random value corresponding to the ith load balancing link in the pre-stored routing policy;
  • a first calculating unit configured to: increase a value of the first random number by one to obtain a second random value
  • the second calculating unit is configured to perform a modulo operation by using the second random value and the load sharing link number to obtain a key value corresponding to the second random value in a pre-stored load sharing table, where the load sharing table is Obtaining a state of the outbound interface corresponding to the key value;
  • the determining unit is configured to: if the status of the outbound interface is on, determining that the i+1th load sharing link works normally; if the status of the outbound interface is off, determining the i+1th The load sharing link is not working properly.
  • the detecting module is further configured to: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
  • the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  • the traffic is automatically switched to the next link to continue forwarding to the destination network, so that the link is not affected or the detection mechanism is rediscovered.
  • the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing, and the problem of slow link convergence and serious packet loss when the link abnormality is common in data devices is solved.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the present invention provides an embodiment, in which the outbound interface of the network device is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network, thereby realizing the rediscovering of the link without affecting the protocol or the detection mechanism.
  • the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing. This solves the problem of slow link convergence and serious packet loss when link abnormalities are common in data devices.

Abstract

A method and device for managing links in load sharing, the method comprising: when an ith load sharing link currently used by an output interface of a network device is abnormal, switching, by the network device, traffic to an (i+1)th load sharing link, and forwarding the traffic to a target network by using the (i+1)th load sharing link, wherein i is an positive integer.

Description

一种负荷分担中链路的管理方法和装置Method and device for managing link in load sharing 技术领域Technical field
本文涉及通信领域,尤其涉及一种负荷分担中链路的管理方法和装置。This document relates to the field of communications, and in particular, to a method and apparatus for managing links in load sharing.
背景技术Background technique
数据通讯领域,尤其是数据承载网,负荷分担是一种在网络节点设备上,在多条链路上进行负载均衡的策略和方法,而今这种策略方法在网络数据设备使用越来越频繁。而随之使用的频繁,越来越多的问题暴露出来,需要数据开发人员用合理的方法去解决。In the field of data communication, especially data bearer network, load sharing is a strategy and method for load balancing on multiple links on network node devices. Today, this policy method is used more and more frequently in network data devices. With the frequent use, more and more problems are exposed, and data developers need to use reasonable methods to solve them.
其中负荷分担中链路的异常中断,如负荷分担中一条链路被人为误操作shutdown(关闭),或者链路中的光纤光模块损坏,链路的快速收敛的需求越来越强烈。而目前国内外主流的实现负荷分担收敛的方法有两种:1、一种是由协议发现链路异常,重新形成链路负荷分担。例如,通过路由形成的IP路由负荷分担,当发现有链路中断后,更新平台与转发面路由形成路由负荷分担;链路聚合通过LACP(Link Aggregation Control Protocol,链路汇聚控制协议)来发现和形成与更新链路聚合中的转发路径。2、通过检测机制,如:BFD(Bidirectional Forwarding Detection,双向侦测协议)、OAM(Operation Administration and Maintenance,操作管理与维护)等链路检测方法检测链路的连通性,发现链路异常进行快速的切换。If the link in the load sharing is abnormally interrupted, for example, one link in the load sharing is manually shut down, or the optical fiber module in the link is damaged, the demand for fast convergence of the link is becoming stronger. At present, there are two methods for achieving load sharing convergence at home and abroad: 1. One is that the link is found to be abnormal by the protocol, and the link load sharing is re-formed. For example, the load balancing is performed on the IP route that is formed by the route. When the link is interrupted, the update platform and the forwarding plane route form a route load sharing. The link aggregation is discovered by the Link Aggregation Control Protocol (LACP). Form and update the forwarding path in the link aggregation. 2. Link detection methods such as BFD (Bidirectional Forwarding Detection), OAM (Operation Administration and Maintenance), and other link detection methods are used to detect link connectivity. Switching.
上述2种方式负荷分担收敛都需要依赖于协议感知,然后,通知转发模块重新选择有效路径来进行转发,通过该负荷分担收敛技术,无论是在集中式设备还是分布式设备上,做到50ms内收敛都是很困难的。In the above two modes, the load sharing convergence needs to be dependent on the protocol awareness. Then, the forwarding module is notified to reselect the effective path for forwarding. The load sharing convergence technology is implemented in the centralized device or the distributed device within 50 ms. Convergence is very difficult.
图1为相关技术中的网络的组网示意图。如图1所示,网络a的IP:100.1.1.2与网络b的IP:200.1.1.2通信,中间经过网络设备a查路由表发现有n条路由到网络b。按照目前转发面实现流程所示,当网络设备a上通往网络b有链路出现异常的时候,平台的路由模块会发生路径切换,路径切换发生后,并不会立刻将路由更新过来,从而导致在路由重新收敛更新的这 段时间内,由于路由更新未完成,造成大量的转发报文丢弃。FIG. 1 is a schematic diagram of networking of a network in the related art. As shown in Figure 1, the IP of the network a: 100.1.1.2 communicates with the IP of the network b: 200.1.1.2. The network device a checks the routing table to find that there are n routes to the network b. According to the implementation process of the current forwarding plane, when the link to the network b on the network device a has an abnormality, the routing module of the platform will switch the path. After the path switching occurs, the route will not be updated immediately. This causes the route to reconverge to update this A large number of forwarded packets are discarded due to the incomplete routing update.
发明内容Summary of the invention
本文提供一种负荷分担中链路的管理方法和装置,以减少在链路切换时丢包的数量。This document provides a method and apparatus for managing links in load sharing to reduce the number of lost packets during link switching.
一种负荷分担中链路的管理方法,包括:当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,所述网络设备将流量切换到第i+1条负荷分担链路,并使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。A method for managing a link in load sharing includes: when an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, the network device switches the traffic to the i+1th load sharing link And forwarding the traffic to the destination network using the i+1th load sharing link, where i is a positive integer.
可选地,所述网络设备将流量切换到第i+1条负荷分担链路之前,所述方法还包括:所述网络设备检测所述第i+1条负荷分担链路工作是否正常;如果所述第i+1条负荷分担链路工作正常,则所述网络设备触发将流量切换到第i+1条负荷分担链路的操作。Optionally, before the network device switches the traffic to the i+1th load sharing link, the method further includes: the network device detecting whether the i+1th load sharing link works normally; If the i+1th load sharing link works normally, the network device triggers the operation of switching the traffic to the i+1th load sharing link.
可选地,所述网络设备检测所述第i+1条负荷分担链路工作是否正常包括:所述网络设备获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值,将所述第一随机数的数值增加一,得到第二随机值,利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。Optionally, the detecting, by the network device, whether the operation of the (i)th load sharing link is normal: the network device acquiring the first random corresponding to the i-th load sharing link in the pre-stored routing policy a value, the value of the first random number is increased by one to obtain a second random value, and the second random value is used to perform a modulo operation on the number of load sharing links to obtain a pre-stored load sharing of the second random value. For the key value corresponding to the table, obtain the state of the outbound interface corresponding to the key value in the load sharing table; if the state of the outbound interface is enabled, determine that the i+1th load sharing link works normally. If the status of the outbound interface is off, it is determined that the i+1th load sharing link is not working properly.
可选地,所述方法还包括:如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。Optionally, the method further includes: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
可选地,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。Optionally, the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
一种负荷分担中链路的管理装置,包括:切换模块,设置为:当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,将流量切换到第i+1 条负荷分担链路;传输模块,设置为:使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。A device for managing a link in load sharing includes: a switching module, configured to: when an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, switch the traffic to the (i+1)th The load sharing module is configured to: forward the traffic to the destination network by using the i+1th load sharing link, where i is a positive integer.
可选地,所述装置还包括:检测模块,设置为:检测所述第i+1条负荷分担链路工作是否正常;触发模块,设置为:如果所述第i+1条负荷分担链路工作正常,则触发将流量切换到第i+1条负荷分担链路的操作。Optionally, the device further includes: a detecting module, configured to: detect whether the i+1th load sharing link works normally; and the triggering module is configured to: if the i+1th load sharing link If the operation is normal, the operation of switching the traffic to the i+1th load sharing link is triggered.
可选地,所述检测模块包括:获取单元,设置为:获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值;第一计算单元,设置为:将所述第一随机数的数值增加一,得到第二随机值;第二计算单元,设置为:利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;确定单元,设置为:如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。Optionally, the detecting module includes: an acquiring unit, configured to: acquire a first random value corresponding to the i-th load sharing link in a pre-stored routing policy; and the first calculating unit is configured to: The value of the first random number is increased by one to obtain a second random value; the second calculating unit is configured to perform a modulo operation by using the second random value and the number of load sharing links, to obtain the second random value is stored in advance The key value corresponding to the load sharing table, the state of the outbound interface corresponding to the key value is obtained in the load sharing table; and the determining unit is configured to: if the state of the outgoing interface is open, determine the ith If the status of the outbound interface is off, the i+1 load balancing link is working properly.
可选地,所述检测模块,还设置为:如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。Optionally, the detecting module is further configured to: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
可选地,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。Optionally, the load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项的方法。A computer readable storage medium storing computer executable instructions for performing the method of any of the above.
本发明提供实施例,网络设备的出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络,从而实现在不影响协议或者检测机制重新发现链路的情况下,进行链路切换的目的,达到负荷分担、链路聚合负荷分担的快速收敛的目的,解决了数据设备中普遍存在的链路异常时候链路收敛慢,丢包严重的问题。The present invention provides an embodiment, in which the outbound interface of the network device is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network, thereby realizing the rediscovering of the link without affecting the protocol or the detection mechanism. In this case, the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing. This solves the problem of slow link convergence and serious packet loss when link abnormalities are common in data devices.
附图概述BRIEF abstract
图1为相关技术中的网络的组网示意图; FIG. 1 is a schematic diagram of networking of a network in related art;
图2为本发明实施例提供的负荷分担中链路的管理方法的流程示意图;2 is a schematic flowchart of a method for managing a link in load sharing according to an embodiment of the present invention;
图3为本发明应用实例提供的负荷分担中链路的管理方法的流程示意图;3 is a schematic flowchart of a method for managing a link in load sharing according to an application example of the present invention;
图4为本发明实施例提供的网络的组网示意图;FIG. 4 is a schematic diagram of networking of a network according to an embodiment of the present disclosure;
图5为本发明实施例提供的负荷分担中链路的管理装置的结构示意图。FIG. 5 is a schematic structural diagram of a device for managing a link in load sharing according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下面将结合附图对本发明的实施方式进行描述。需要说明的是,在不冲突的情况下,本文中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present invention will be described below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments herein may be arbitrarily combined with each other.
图2为本发明实施例提供的负荷分担中链路的管理方法的流程示意图。图1所示方法,包括:2 is a schematic flowchart of a method for managing a link in load sharing according to an embodiment of the present invention. The method shown in Figure 1 includes:
步骤201、当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,所述网络设备将流量切换到第i+1条负荷分担链路;Step 201: When an abnormality occurs in the i-th load sharing link currently used by the outbound interface of the network device, the network device switches the traffic to the i+1th load sharing link.
步骤202、所述网络设备使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。Step 202: The network device forwards the traffic to the destination network by using an i+1th load sharing link, where i is a positive integer.
本发明提供的方法实施例,网络设备的出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络,从而实现在不影响协议或者检测机制重新发现链路的情况下,进行链路切换的目的,达到负荷分担、链路聚合负荷分担的快速收敛的目的,解决了数据设备中普遍存在的链路异常时候链路收敛慢,丢包严重的问题。According to the method embodiment provided by the present invention, no matter which link is abnormal on the outbound interface of the network device, the traffic is automatically switched to the next link to continue forwarding to the destination network, so that the link is not affected or the detection mechanism is rediscovered. In the case of a link, the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing, and the problem of slow link convergence and serious packet loss when the link abnormality is common in data devices is solved.
下面对本发明提供的方法实施例作进一步说明:The method embodiments provided by the present invention are further described below:
其中,所述网络设备将流量切换到第i+1条负荷分担链路之前,所述方法还包括:所述网络设备检测所述第i+1条负荷分担链路工作是否正常;如果所述第i+1条负荷分担链路工作正常,则所述网络设备触发将流量切换到第i+1条负荷分担链路的操作。If the network device switches the traffic to the i+1th load sharing link, the method further includes: the network device detecting whether the i+1th load sharing link works normally; If the i+1th load sharing link works normally, the network device triggers the operation of switching the traffic to the i+1th load sharing link.
在切换前检测链路是否正常,保证流量切换到第i+1条链路后能够传输出去,提高切换的有效性。 Check whether the link is normal before switching, and ensure that the traffic can be transmitted after being switched to the i+1th link to improve the effectiveness of the handover.
其中,所述网络设备检测所述第i+1条负荷分担链路工作是否正常包括:The detecting, by the network device, whether the work of the i+1th load sharing link is normal includes:
所述网络设备获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值,将所述第一随机数的数值增加一,得到第二随机值,利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;The network device acquires a first random value corresponding to the ith load balancing link in the pre-stored routing policy, and increases the value of the first random number by one to obtain a second random value, and uses the second Performing a modulo operation on the number of the load sharing link, and obtaining a key value corresponding to the second random value in the pre-stored load sharing table, and acquiring the state of the outbound interface corresponding to the key value in the load sharing table;
如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。If the status of the outbound interface is on, it is determined that the i+1th load sharing link is working normally; if the status of the outbound interface is off, it is determined that the i+1th load sharing link does not work. normal.
需要说明的是,通过将出现故障的链路对应的第一随机值加一的方式来确定第i+1条链路,符合已有技术中管理协议的规定,无需修改已有技术中的管理流程,即可使用本发明实施例提供的方法,兼容性强。It should be noted that the i+1th link is determined by adding the first random value corresponding to the faulty link to the first random value, which conforms to the provisions of the management protocol in the prior art, and does not need to modify the management in the prior art. For the process, the method provided by the embodiment of the present invention can be used, and the compatibility is strong.
另外,如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。In addition, if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
如果出接口为关闭down,在原来获取的随机值基础上加1,目的是指向下一个负荷分担条目。从负荷分担策略表中获取的链路数进行加一,并将组建好新的负荷分担表键值去查负荷分担表,依次循环下去,直到查到出接口状态为up的;如果所有接口为down的话,最多循环链路数n次。If the outbound interface is down, add 1 to the original random value to redirect to the next load sharing entry. Add the number of links obtained from the load balancing policy table, and set up a new load sharing table key value to check the load sharing table, and then loop through it until the interface status is up; if all interfaces are If it is down, the maximum number of cyclic links is n times.
其中,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。The load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
上述负荷分担链路仅作举例说明,其他类型的负荷分担链路同样适用于本发明实施例,此处不再赘述。The foregoing load sharing link is only used as an example. Other types of load sharing links are also applicable to the embodiments of the present invention, and are not described herein again.
下面以应用实例对本发明实施例提供的方法做进一步说明:The method provided by the embodiment of the present invention is further described below by using an application example:
图3为本发明应用实例提供的负荷分担中链路的管理方法的流程示意图。图3所示方法包括:FIG. 3 is a schematic flowchart diagram of a method for managing a link in load sharing according to an application example of the present invention. The method shown in Figure 3 includes:
301:从网络a过来的数据报文在网络设备a的转发模块,根据报文中的destination(目的)IP查找路由; 301: The data packet sent from the network a is in the forwarding module of the network device a, and the route is searched according to the destination (destination) IP in the packet.
302:获取路由表中的出接口、下一跳IP、负荷分担标志位以及负荷分担索引;302: Obtain an outbound interface, a next hop IP, a load balancing flag, and a load sharing index in the routing table.
303:判断到目的IP路由是否形成负荷分担,如果不是负荷分担,就封装报文中的下一跳destination IP从路由表中给出的出接口发出去,结束流程;如果是负荷分担,则执行下一步;303: Determine whether the destination IP route is load-sharing. If the load balancing is not performed, the next hop destination IP in the encapsulated packet is sent from the outbound interface given in the routing table to terminate the process. If the load is shared, the process is performed. Next step;
304:根据路由表中给出的负荷分担索引去查负荷分担选路策略表,从负荷分担选路策略表中获取通往目的IP的链路数以及基于包基于流的选路策略;304: Check the load sharing routing policy table according to the load sharing index given in the routing table, obtain the number of links to the destination IP from the load sharing routing policy table, and select a routing algorithm based on the packet based on the flow;
305:根据策略表选路策略的随机值与链路数进行模运算,算出负荷分担表的键值来查负荷分担表;305: Perform a modulo operation according to a random value of the routing policy of the policy table and the number of links, and calculate a key value of the load sharing table to check the load sharing table;
306:获取负荷分担表中的出接口和下一跳IP;306: Obtain an outbound interface and a next hop IP in the load balancing table.
上述步骤是负荷分担处理的基本流程,当负荷分担链路发生异常的时候,相关技术的处理流程处于等待状态,等待平台形成新的路由负荷分担,但是在这个过程中,走出现异常链路的报文会被链路down丢弃。本发明实施例在原有的基础上加以改进,在链路出现异常的时候由转发面做接口查询,发现接口down后就不会走该链路,添加的异常处理如下:The above steps are the basic process of load sharing processing. When an abnormality occurs in the load sharing link, the processing flow of the related technology is in a waiting state, waiting for the platform to form a new routing load sharing, but in this process, the abnormal link occurs. The packet will be discarded by the link down. The embodiment of the present invention is improved on the basis of the original, and the interface is queried by the forwarding plane when the link is abnormal, and the link is not taken after the interface is down. The added exception is handled as follows:
307:根据负荷分担获取的出接口信息查询出口方向端口属性表中接口状态。转发面从负荷分担表中获取出接口信息,然后使用出接口信息查出接口属性表,从出接口属性表中获取出接口状态开启/关闭(UP/DOWN)。307: Query the interface status of the egress port attribute table according to the outbound interface information obtained by the load sharing. The forwarding plane obtains the interface information from the load balancing table, and then uses the outbound interface information to find the interface attribute table, and obtains the interface status on/off (UP/DOWN) from the outbound interface attribute table.
308:判断如果出接口为up,那么就获取当前负荷分担表中的出接口和下一跳IP转发出去,结束流程;如果出接口为down,则执行下一步;308: If the outbound interface is up, the outbound interface and the next hop IP address in the current load sharing table are forwarded, and the process ends; if the outbound interface is down, the next step is performed;
309:在原来获取的随机值基础上加1,目的是指向下一个负荷分担条目。从负荷分担策略表中获取的链路数减一,如果不等于0,则执行步骤305,将组建好新的负荷分担表键值去查负荷分担表;如果等于0,则结束流程。309: Add 1 to the random value obtained originally, and the purpose is to point to the next load sharing entry. The number of links obtained from the load balancing policy table is decremented by one. If not equal to 0, step 305 is executed, and a new load sharing table key value is set to check the load sharing table; if equal to 0, the process ends.
上述步骤305~309依次循环下去,直到查到出接口状态为up的;如果所有接口为down的话,最多循环链路数n次。The above steps 305-309 are sequentially looped until the interface status is up; if all interfaces are down, the maximum number of cyclic links is n times.
数据开发技术人员都会知道,链路异常一般情况下有两种,分别为: 1、人为的将接口shutdown;2、链路中物理元器件忽然的损坏,包括光纤断裂、光模块异常等情况。对于第一种情况,主动去关闭(shutdown)接口,平台会将该信息从平台向转发面传递,而物理元器件忽然异常是由转发面发现而上报到主控平台。对于第二种情况,路由负荷分担收敛会花更多的时间。但是对于本发明实施例,不管是第一种还是第二种情况,都会做到极小的甚至不丢包收敛。Data development technicians will know that there are two kinds of link abnormalities in general, namely: 1, artificially shut down the interface; 2, the physical components in the link suddenly damaged, including fiber breaks, optical module anomalies and so on. For the first case, the interface is actively shut down, and the platform will pass the information from the platform to the forwarding plane, and the physical component suddenly is detected by the forwarding plane and reported to the main control platform. For the second case, route load sharing will take more time to converge. However, for the embodiment of the present invention, whether in the first or the second case, minimal or no packet loss convergence is achieved.
本发明实施例的处理主要在链路发生异常,并且新的负荷分担还没有形成的情况下处理,参见图3所示流程中307~309的处理流程,当新的稳态形成后又恢复了正常负荷分担处理,而恰恰在链路未达到稳态的情况下,走接口为down的报文都将会被丢弃。丢弃报文的多寡完全是由负荷分担的收敛来决定的。The processing in the embodiment of the present invention is mainly processed when the link is abnormal and the new load sharing has not been formed. Referring to the processing flow of 307 to 309 in the flow shown in FIG. 3, the new steady state is restored and then restored. Normal load sharing processing, and just when the link does not reach steady state, packets with the outbound interface will be discarded. The amount of discarded packets is completely determined by the convergence of load sharing.
举例说明for example
适合本发明的实例1:如图1所示,网络a到网络b在经过网络设备a上有N条路由负荷分担链路。运用本发明实施例,当网络设备a出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络。使用本发明实施例可以极大的提高对于类似与组网1的网络路由稳定与安全。Example 1 suitable for the present invention: As shown in FIG. 1, network a to network b have N route load sharing links on network device a. With the embodiment of the present invention, when any link of the outbound interface of the network device a is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network. The network routing stability and security for the similar network 1 can be greatly improved by using the embodiment of the present invention.
适合本发明实施例的实例2:如图1所示,网络a到网络b在经过网络设备a上有N条隧道负荷分担链路。运用本发明实施例,仅仅将从路由表中获取出接口信息换成从标签表中获取出接口信息。当网络设备a出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络。使用本发明实施例可以极大的提高对于类似与组网1的网络隧道稳定与安全。Example 2 suitable for the embodiment of the present invention: As shown in FIG. 1, the network a to the network b have N tunnel load sharing links on the network device a. In the embodiment of the present invention, only the interface information obtained from the routing table is replaced with the interface information obtained from the label table. When the outbound interface of the network device a is abnormal, the traffic will be automatically switched to the next link to continue forwarding to the destination network. The embodiment of the present invention can greatly improve the stability and security of the network tunnel similar to the network 1.
适合本发明实施例的实例3:图4为本发明实施例提供的网络的组网示意图。如图4所示,网络a到网络b在经过网络设备a到达网络设备b是一条由N条链路聚合的smartgroup(链路聚合)链路,N条物理链路形成smartgroup负荷分担。运用本发明实施例,从路由表中获取出接口为smartgroup接口,然后转发面查smartgroup选路策略表以及负荷分担表信息获取出接口信息。当链路异常的时候,同样可以进行本发明实施例进行接 口轮询检查。Example 3 of the embodiment of the present invention: FIG. 4 is a schematic diagram of networking of a network according to an embodiment of the present invention. As shown in FIG. 4, the network a to the network b arrives at the network device b through the network device a, which is a smart group (link aggregation) link aggregated by N links, and the N physical links form a smart group load sharing. In the embodiment of the present invention, the interface is obtained from the routing table as a smartgroup interface, and then the forwarding side checks the smartgroup routing policy table and the load sharing table information to obtain the outbound interface information. When the link is abnormal, the embodiment of the present invention can also be connected. Port polling check.
图5为本发明实施例提供的负荷分担中链路的管理装置的结构示意图。结合图2和图3所示方法,图5所示装置,包括:FIG. 5 is a schematic structural diagram of a device for managing a link in load sharing according to an embodiment of the present invention. Referring to the method shown in FIG. 2 and FIG. 3, the apparatus shown in FIG. 5 includes:
切换模块501,设置为:当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,将流量切换到第i+1条负荷分担链路;The switching module 501 is configured to: when the i-th load sharing link currently used by the outbound interface of the network device is abnormal, switch the traffic to the i+1th load sharing link;
传输模块502,设置为:使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。The transmission module 502 is configured to: forward the traffic to the destination network by using the i+1th load sharing link, where i is a positive integer.
其中,所述装置还可包括:Wherein, the device may further include:
检测模块,设置为:检测所述第i+1条负荷分担链路工作是否正常;The detecting module is configured to: detect whether the i+1th load sharing link works normally;
触发模块,设置为:如果所述第i+1条负荷分担链路工作正常,则触发将流量切换到第i+1条负荷分担链路的操作。The triggering module is configured to: if the i+1th load sharing link works normally, trigger the operation of switching the traffic to the i+1th load sharing link.
其中,所述检测模块包括:The detection module includes:
获取单元,设置为:获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值;The obtaining unit is configured to: obtain a first random value corresponding to the ith load balancing link in the pre-stored routing policy;
第一计算单元,设置为:将所述第一随机数的数值增加一,得到第二随机值;a first calculating unit, configured to: increase a value of the first random number by one to obtain a second random value;
第二计算单元,设置为:利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;The second calculating unit is configured to perform a modulo operation by using the second random value and the load sharing link number to obtain a key value corresponding to the second random value in a pre-stored load sharing table, where the load sharing table is Obtaining a state of the outbound interface corresponding to the key value;
确定单元,设置为:如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。The determining unit is configured to: if the status of the outbound interface is on, determining that the i+1th load sharing link works normally; if the status of the outbound interface is off, determining the i+1th The load sharing link is not working properly.
其中,所述检测模块,还设置为:如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。The detecting module is further configured to: if the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
其中,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。 The load sharing link includes at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
本发明提供的装置实施例,网络设备的出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络,从而实现在不影响协议或者检测机制重新发现链路的情况下,进行链路切换的目的,达到负荷分担、链路聚合负荷分担的快速收敛的目的,解决了数据设备中普遍存在的链路异常时候链路收敛慢,丢包严重的问题。According to the device embodiment provided by the present invention, no matter which link is abnormal on the outbound interface of the network device, the traffic is automatically switched to the next link to continue forwarding to the destination network, so that the link is not affected or the detection mechanism is rediscovered. In the case of a link, the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing, and the problem of slow link convergence and serious packet loss when the link abnormality is common in data devices is solved.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
工业实用性Industrial applicability
本发明提供实施例,网络设备的出接口无论哪条链路出现异常,流量会自动的换到下一条链路上去继续转发到目的网络,从而实现在不影响协议或者检测机制重新发现链路的情况下,进行链路切换的目的,达到负荷分担、链路聚合负荷分担的快速收敛的目的,解决了数据设备中普遍存在的链路异常时候链路收敛慢,丢包严重的问题。 The present invention provides an embodiment, in which the outbound interface of the network device is abnormal, the traffic is automatically switched to the next link to continue forwarding to the destination network, thereby realizing the rediscovering of the link without affecting the protocol or the detection mechanism. In this case, the purpose of link switching is to achieve the purpose of fast convergence of load sharing and link aggregation load sharing. This solves the problem of slow link convergence and serious packet loss when link abnormalities are common in data devices.

Claims (11)

  1. 一种负荷分担中链路的管理方法,包括:A method for managing links in load sharing includes:
    当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,所述网络设备将流量切换到第i+1条负荷分担链路,并使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。When the i-th load sharing link currently used by the outbound interface of the network device is abnormal, the network device switches the traffic to the i+1th load sharing link and uses the i+1th load sharing link. The traffic is forwarded to the destination network, where i is a positive integer.
  2. 根据权利要求1所述的方法,其中,所述网络设备将流量切换到第i+1条负荷分担链路之前,所述方法还包括:The method of claim 1, wherein the method further comprises: before the network device switches the traffic to the i+1th load sharing link, the method further comprising:
    所述网络设备检测所述第i+1条负荷分担链路工作是否正常;The network device detects whether the work of the i+1th load sharing link is normal;
    如果所述第i+1条负荷分担链路工作正常,则所述网络设备触发将流量切换到第i+1条负荷分担链路的操作。If the i+1th load sharing link works normally, the network device triggers an operation of switching traffic to the i+1th load sharing link.
  3. 根据权利要求2所述的方法,其中,所述网络设备检测所述第i+1条负荷分担链路工作是否正常包括:The method of claim 2, wherein the detecting, by the network device, whether the i+1th load sharing link works normally comprises:
    所述网络设备获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值,将所述第一随机数的数值增加一,得到第二随机值,利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;The network device acquires a first random value corresponding to the ith load balancing link in the pre-stored routing policy, and increases the value of the first random number by one to obtain a second random value, and uses the second Performing a modulo operation on the number of the load sharing link, and obtaining a key value corresponding to the second random value in the pre-stored load sharing table, and acquiring the state of the outbound interface corresponding to the key value in the load sharing table;
    如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。If the status of the outbound interface is on, it is determined that the i+1th load sharing link is working normally; if the status of the outbound interface is off, it is determined that the i+1th load sharing link does not work. normal.
  4. 根据权利要求2或3所述的方法,还包括:The method of claim 2 or 3, further comprising:
    如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。If the i+1th load sharing link is not working properly, the network device detects whether the i++th load sharing link works normally.
  5. 根据权利要求1所述的方法,其中,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。The method of claim 1, wherein the load sharing link comprises at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  6. 一种负荷分担中链路的管理装置,包括: A device for managing a link in load sharing includes:
    切换模块,设置为:当网络设备的出接口当前使用的第i条负荷分担链路出现异常时,将流量切换到第i+1条负荷分担链路;The switch module is configured to switch the traffic to the i+1th load sharing link when the i-th load sharing link currently used by the outbound interface of the network device is abnormal.
    传输模块,设置为:使用第i+1条负荷分担链路将所述流量转发到目的网络,其中i为正整数。The transmission module is configured to: forward the traffic to the destination network by using the i+1th load sharing link, where i is a positive integer.
  7. 根据权利要求6所述的装置,还包括:The apparatus of claim 6 further comprising:
    检测模块,设置为:检测所述第i+1条负荷分担链路工作是否正常;The detecting module is configured to: detect whether the i+1th load sharing link works normally;
    触发模块,设置为:如果所述第i+1条负荷分担链路工作正常,则触发将流量切换到第i+1条负荷分担链路的操作。The triggering module is configured to: if the i+1th load sharing link works normally, trigger the operation of switching the traffic to the i+1th load sharing link.
  8. 根据权利要求7所述的装置,其中,所述检测模块包括:The apparatus of claim 7 wherein said detecting module comprises:
    获取单元,设置为:获取第i条负荷分担链路在预先存储的选路策略中对应的第一随机值;The obtaining unit is configured to: obtain a first random value corresponding to the ith load balancing link in the pre-stored routing policy;
    第一计算单元,设置为:将所述第一随机数的数值增加一,得到第二随机值;a first calculating unit, configured to: increase a value of the first random number by one to obtain a second random value;
    第二计算单元,设置为:利用所述第二随机值与负荷分担链路数进行模运算,得到所述第二随机值在预先存储的负荷分担表对应的键值,在所述负荷分担表中获取所述键值对应的出接口的状态;The second calculating unit is configured to perform a modulo operation by using the second random value and the load sharing link number to obtain a key value corresponding to the second random value in a pre-stored load sharing table, where the load sharing table is Obtaining a state of the outbound interface corresponding to the key value;
    确定单元,设置为:如果所述出接口的状态为开启,则确定所述第i+1条负荷分担链路工作正常;如果所述出接口的状态为关闭,确定所述第i+1条负荷分担链路工作不正常。The determining unit is configured to: if the status of the outbound interface is on, determining that the i+1th load sharing link works normally; if the status of the outbound interface is off, determining the i+1th The load sharing link is not working properly.
  9. 根据权利要求7或8所述的装置,其中:A device according to claim 7 or 8, wherein:
    所述检测模块,还设置为:如果所述第i+1条负荷分担链路工作不正常,则所述网络设备检测所述第i+2条负荷分担链路工作是否正常。The detecting module is further configured to: if the i+1th load sharing link is not working properly, the network device detects whether the i+2 load sharing link works normally.
  10. 根据权利要求6所述的装置,其中,所述负荷分担链路包括:路由负荷分担链路、隧道负荷分担链路和链路聚合负荷分担链路中的至少一个。The apparatus of claim 6, wherein the load sharing link comprises at least one of a route load sharing link, a tunnel load sharing link, and a link aggregation load sharing link.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5任一项的方法。 A computer readable storage medium storing computer executable instructions for performing the method of any of claims 1-5.
PCT/CN2015/081354 2015-03-04 2015-06-12 Method and device for managing link in load sharing WO2016138705A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510096102.2A CN105991426A (en) 2015-03-04 2015-03-04 Method and device for managing link in load sharing
CN201510096102.2 2015-03-04

Publications (1)

Publication Number Publication Date
WO2016138705A1 true WO2016138705A1 (en) 2016-09-09

Family

ID=56848257

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081354 WO2016138705A1 (en) 2015-03-04 2015-06-12 Method and device for managing link in load sharing

Country Status (2)

Country Link
CN (1) CN105991426A (en)
WO (1) WO2016138705A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965025A (en) * 2018-08-02 2018-12-07 郑州云海信息技术有限公司 The management method and device of flow in cloud computing system
CN113676405B (en) * 2021-08-18 2022-10-14 上海晨驭信息科技有限公司 Load sharing-based rapid link master-slave switching distributed system and method
CN114038181B (en) * 2021-10-25 2023-05-12 苏州浪潮智能科技有限公司 Remote debugging device and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090252036A1 (en) * 2008-04-04 2009-10-08 Cisco Technology, Inc. Multinode symmetric load sharing
CN102137018A (en) * 2011-03-21 2011-07-27 华为技术有限公司 Load sharing method and device thereof
CN102571457A (en) * 2012-02-28 2012-07-11 成都市华为赛门铁克科技有限公司 Method for triggering switching of bypass equipment, and method and device for switching bypass equipment
CN102780632A (en) * 2012-08-07 2012-11-14 华为技术有限公司 Load sharing method and flow transmission equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090252036A1 (en) * 2008-04-04 2009-10-08 Cisco Technology, Inc. Multinode symmetric load sharing
CN102137018A (en) * 2011-03-21 2011-07-27 华为技术有限公司 Load sharing method and device thereof
CN102571457A (en) * 2012-02-28 2012-07-11 成都市华为赛门铁克科技有限公司 Method for triggering switching of bypass equipment, and method and device for switching bypass equipment
CN102780632A (en) * 2012-08-07 2012-11-14 华为技术有限公司 Load sharing method and flow transmission equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PAN, LIN ET AL.: "Design and Realization of Load Balance with Self-Adapting Current Sharing Mode", NETWORK & INFORMATION, vol. 25, no. 6, 31 December 2011 (2011-12-31), pages 42 - 43 *

Also Published As

Publication number Publication date
CN105991426A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
US9887902B2 (en) Traffic switching method, device, and system
US20200014614A1 (en) SDN Controller, Data Center System, and Routing Connection Method
EP3253011B1 (en) Method and device for shortest path bridging (spb) enhanced resilience with loop mitigation
US8593945B2 (en) Connectivity fault management traffic indication extension
US8672566B2 (en) Node apparatus and communication method
US9608903B2 (en) Systems and methods for recovery from network changes
CN107547243B (en) Message forwarding method and device
US20140369230A1 (en) Virtual Chassis Topology Management
US9548928B2 (en) Network system, controller, and load distribution method
US10735251B2 (en) Deadlock avoidance using modified ethernet connectivity fault management signaling
US20190007302A1 (en) Mechanism for Dual Active Detection Link Monitoring in Virtual Switching System with Hardware Accelerated Fast Hello
US20150295861A1 (en) Link problem handling
WO2016138705A1 (en) Method and device for managing link in load sharing
CN105634952A (en) Fast notification method and apparatus for LSP message
EP2858302B1 (en) Connectivity check method of service stream link, related apparatus and system
US20160112248A1 (en) Communication node, communication system, packet processing method, and program
CN110380966B (en) Method for discovering forwarding path and related equipment thereof
US20160315839A1 (en) Transmission method, transmission system, and transmission device
WO2016061943A1 (en) Method and apparatus for implementing spanning tree protocol protection switching, and computer storage medium
JP6591828B2 (en) Relay device and relay system
CN112953789B (en) Link detection method and device
Dong et al. An Enhanced Data Plane for Network Event Processing in Software Defined Networking
WO2024001324A1 (en) Network path detection method and system, and computer device
US20210203593A1 (en) Multicast Fast Switching Method, Device and Equipment, and Storage Medium
Yan et al. Fast Recovery from Link Failure in Software De ned Survivable Network

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

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

Country of ref document: EP

Kind code of ref document: A1