[go: up one dir, main page]

CN109995567A - Method, device and system for automatic protection of link aggregation group - Google Patents

Method, device and system for automatic protection of link aggregation group Download PDF

Info

Publication number
CN109995567A
CN109995567A CN201711498941.2A CN201711498941A CN109995567A CN 109995567 A CN109995567 A CN 109995567A CN 201711498941 A CN201711498941 A CN 201711498941A CN 109995567 A CN109995567 A CN 109995567A
Authority
CN
China
Prior art keywords
aggregation group
link aggregation
network element
link
bandwidth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711498941.2A
Other languages
Chinese (zh)
Inventor
刘海生
舒庆辉
易科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies Co Ltd
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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201711498941.2A priority Critical patent/CN109995567A/en
Publication of CN109995567A publication Critical patent/CN109995567A/en
Pending legal-status Critical Current

Links

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
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/0001Arrangements for dividing the transmission path
    • H04L5/0003Two-dimensional division
    • H04L5/0005Time-frequency
    • H04L5/0007Time-frequency the frequencies being orthogonal, e.g. OFDM(A) or DMT
    • H04L5/001Time-frequency the frequencies being orthogonal, e.g. OFDM(A) or DMT the frequencies being arranged in component carriers

Landscapes

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

Abstract

本发明公开了一种对链路聚合组进行自动保护的方法、设备以及系统。所述方法包括:第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,第一链路聚合组为第一网元与第二网元之间的链路聚合组;第一网元记录第一链路聚合组发生了轻量级故障,并且,将第一链路聚合组倒换为第二链路聚合组;在第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据第一链路聚合组发生了轻量级故障的记录将第二链路聚合组倒换为第一链路聚合组。上述方法能够在第一链路聚合组不满足期望带宽时,倒换至无故障的第二链路聚合组,第二链路聚合组发生故障时,重新倒换至第一链路聚合组,更好的保证数据通信质量。

The invention discloses a method, equipment and system for automatic protection of link aggregation groups. The method includes: a first network element determining that a working bandwidth of a first link aggregation group is less than or equal to a first bandwidth threshold, where the first link aggregation group is a link between the first network element and the second network element aggregation group; the first network element records that the first link aggregation group has a lightweight fault, and switches the first link aggregation group to the second link aggregation group; the working bandwidth of the second link aggregation group is less than Or when it is equal to the second bandwidth threshold, the second link aggregation group is switched to the first link aggregation group according to the record of the light-weight failure of the first link aggregation group. The above method can switch to the second link aggregation group without fault when the first link aggregation group does not meet the expected bandwidth, and when the second link aggregation group fails, switch to the first link aggregation group again, preferably to ensure the quality of data communication.

Description

链路聚合组进行自动保护的方法、设备以及系统Method, device and system for automatic protection of link aggregation group

技术领域technical field

本发明涉及通讯领域,尤其涉及一种链路聚合组进行自动保护的方法、设备以及系统。The present invention relates to the field of communications, and in particular, to a method, device and system for automatic protection of a link aggregation group.

背景技术Background technique

随着移动通信技术的发展,越来越多的通讯系统采用链路聚合组(LinkAggregation Group, LAG)方式进行数据通信。其中,链路聚合组是通过将多条链路聚合起来形成的带宽更大的 逻辑链路。With the development of mobile communication technologies, more and more communication systems use a link aggregation group (Link Aggregation Group, LAG) mode to perform data communication. The link aggregation group is a logical link with larger bandwidth formed by aggregating multiple links.

以简单的二元通信系统为例,如图1所示,第一网元与第二网元之间通过由链路1、链 路2以及链路3组成的第一链路聚合组进行数据通信。在正常工作状态下,第一链路聚合组 的工作带宽等于链路1、链路2以及链路3的工作带宽之和;在部分链路受损时,第一链路聚合组的工作带宽小于正常工作链路的带宽之和。为了保障第一网元和第二网元之间能够正 常工作,还可以在第一网元和第二网元之间设置第二链路聚合组,其中,第二链路聚合组包 括链路4、链路5以及链路6。Taking a simple binary communication system as an example, as shown in Figure 1, the first network element and the second network element communicate with each other through the first link aggregation group consisting of link 1, link 2, and link 3. communication. In the normal working state, the working bandwidth of the first link aggregation group is equal to the sum of the working bandwidths of link 1, link 2 and link 3; when some links are damaged, the working bandwidth of the first link aggregation group Less than the sum of the bandwidths of the normal working links. To ensure normal operation between the first network element and the second network element, a second link aggregation group may also be set between the first network element and the second network element, where the second link aggregation group includes links 4. Link 5 and Link 6.

当第一链路聚合组的正常工作带宽受损而导致不能满足第一网元和第二网元之间的数据 通信要求时,第一网元可以将第一链路聚合组倒换为第二链路聚合组。即,在倒换之前,第 一网元和第二网元之间通过第一链路聚合组进行数据通信,在倒换之后,第一网元和第二网 元之间通过第二链路聚合组进行数据通信。When the normal working bandwidth of the first link aggregation group is damaged and the data communication requirements between the first network element and the second network element cannot be met, the first network element may switch the first link aggregation group to the second network element Link Aggregation Group. That is, before the switchover, data communication is performed between the first network element and the second network element through the first link aggregation group, and after the switchover, the second link aggregation group is used between the first network element and the second network element for data communication. data communication.

但是,如果一旦第一网元和第二网元之间的第二链路聚合组发生了故障,则尽管第一网 元和第二网元之间的第一链路聚合组只是带宽受损而非完全不能工作,第一网元和第二网元 之间依然无法进行数据通信。However, if the second link aggregation group between the first network element and the second network element fails, even though the first link aggregation group between the first network element and the second network element is only damaged in bandwidth Instead of completely inoperable, data communication between the first network element and the second network element is still impossible.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种链路聚合组进行自动保护的方法、设备以及系统,能够在第一 链路聚合组不满足期望带宽时,倒换至无故障的第二链路聚合组,第二链路聚合组发生故障 时,重新倒换至第一链路聚合组,更好的保证数据通信质量。Embodiments of the present application provide a method, device, and system for automatic protection of a link aggregation group, which can switch to a fault-free second link aggregation group when the first link aggregation group does not meet the expected bandwidth, and the second link aggregation group When the link aggregation group fails, it is switched to the first link aggregation group to better ensure the quality of data communication.

第一方面,提供了一种对链路聚合组进行自动保护的方法,包括:In a first aspect, a method for automatically protecting a link aggregation group is provided, including:

第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一 链路聚合组为所述第一网元与第二网元之间的链路聚合组;The first network element determines that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, where the first link aggregation group is the link aggregation between the first network element and the second network element Group;

所述第一网元记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合 组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间 的链路聚合组;The first network element records that a lightweight fault has occurred in the first link aggregation group, and switches the first link aggregation group to a second link aggregation group, where the second link aggregation group is The aggregation group is a link aggregation group between the first network element and the second network element;

在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚 合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, the second link aggregation group is switched to the other link aggregation group according to the record of the light failure of the first link aggregation group the first link aggregation group.

结合第一方面,第一方面的第一种可能的实施方式中,所述第一网元增加所述第二链路 聚合组中链路以得到增加后的第二链路聚合组;所述第一网元确定所述增加后的第二链路聚 合组的工作带宽大于所述第一链路聚合组的工作带宽;所述第一网元将所述第一链路聚合组 倒换为所述增加后的第二链路聚合组。With reference to the first aspect, in a first possible implementation manner of the first aspect, the first network element adds links in the second link aggregation group to obtain the added second link aggregation group; the The first network element determines that the working bandwidth of the added second link aggregation group is greater than the working bandwidth of the first link aggregation group; the first network element switches the first link aggregation group to the the added second link aggregation group.

结合第一方面,第一方面的第二种可能的实施方式中,所述第一网元删除所述第一链路 聚合组中的链路以得到删减后的第一链路聚合组;所述第一网元确定所述删减后的第一链路 聚合组的工作带宽小于所述第二链路聚合组的工作带宽;所述第一网元将所述删减后的第一 链路聚合组倒换到所述第二链路聚合组。With reference to the first aspect, in a second possible implementation manner of the first aspect, the first network element deletes the links in the first link aggregation group to obtain the deleted first link aggregation group; The first network element determines that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; The link aggregation group is switched to the second link aggregation group.

结合第一方面,第一方面的第三种可能的实施方式中,所述第一链路聚合组中聚合链路 的总数减去故障链路的个数小于或者等于最小激活链路的个数。With reference to the first aspect, in a third possible implementation manner of the first aspect, the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum number of active links .

结合第一方面,第一方面的第四种可能的实施方式中,所述轻量级故障为导致工作带宽 受损,但还能继续传输数据的故障。With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the lightweight fault is a fault that causes the working bandwidth to be damaged, but can continue to transmit data.

第二方面,提供了一种网元,包括:确定单元、记录单元以及倒换单元,In a second aspect, a network element is provided, including: a determining unit, a recording unit, and a switching unit,

所述确定单元用于确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中, 所述第一链路聚合组为所述第一网元与第二网元之间的链路聚合组;The determining unit is configured to determine that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, wherein the first link aggregation group is a link between the first network element and the second network element. road aggregation group;

所述记录单元用于记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路 聚合组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元 之间的链路聚合组;The recording unit is configured to record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, wherein the second link aggregation group is The aggregation group is a link aggregation group between the first network element and the second network element;

所述倒换单元用于在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根 据所述第一链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路 聚合组。The switching unit is configured to, when the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, switch the second link The link aggregation group is switched to the first link aggregation group.

结合第二方面,第二方面的第一种可能的实施方式中,所述网元还包括增加单元,所述 增加单元用于增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组;所述确定单 元用于确定所述增加后的第二链路聚合组的工作带宽大于所述第一链路聚合组的工作带宽; 所述倒换单元用于将所述第一链路聚合组倒换为所述增加后的第二链路聚合组。With reference to the second aspect, in a first possible implementation manner of the second aspect, the network element further includes an adding unit, and the adding unit is configured to add links in the second link aggregation group to obtain the added the second link aggregation group; the determining unit is configured to determine that the increased working bandwidth of the second link aggregation group is greater than the working bandwidth of the first link aggregation group; the switching unit is configured to convert the The first link aggregation group is switched to the added second link aggregation group.

结合第二方面,第二方面的第二种可能的实施方式中,所述网元还包括删除单元,所述 删除单元还用于删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组;所述确 定单元还用于确定所述删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组的工作 带宽;所述倒换单元还用于将所述删减后的第一链路聚合组倒换到所述第二链路聚合组。With reference to the second aspect, in a second possible implementation manner of the second aspect, the network element further includes a deletion unit, and the deletion unit is further configured to delete the links in the first link aggregation group to obtain deletion. the reduced first link aggregation group; the determining unit is further configured to determine that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; the switching unit It is also used for switching the deleted first link aggregation group to the second link aggregation group.

结合第二方面,第二方面的第三种可能的实施方式中,所述第一链路聚合组中聚合链路 的总数减去故障链路的个数小于或者等于最小激活链路的个数。With reference to the second aspect, in a third possible implementation manner of the second aspect, the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum number of active links .

结合第二方面,第二方面的第四种可能的实施方式中,所述轻量级故障为导致工作带宽 受损,但还能继续传输数据的故障。With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the lightweight fault is a fault that causes the working bandwidth to be damaged, but can continue to transmit data.

第三方面,提供了一种网元,包括:处理器、发射器和接收器,所述处理器分别连接所 述发射器以及所述接收器,其中:所述处理器用于执行如下方法:In a third aspect, a network element is provided, comprising: a processor, a transmitter and a receiver, the processor is connected to the transmitter and the receiver respectively, wherein: the processor is configured to execute the following method:

确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一链路聚合 组为第一网元与第二网元之间的链路聚合组;Determine that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, wherein the first link aggregation group is the link aggregation group between the first network element and the second network element;

记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合组倒换为第二 链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间的链路聚合组;Record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first link aggregation group. A link aggregation group between a network element and the second network element;

在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚 合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, the second link aggregation group is switched to the other link aggregation group according to the record of the light failure of the first link aggregation group the first link aggregation group.

结合第三方面,第三方面的第一种可能的实施方式中,所述处理器还用于:增加所述第 二链路聚合组中链路以得到增加后的第二链路聚合组;确定所述增加后的第二链路聚合组的 工作带宽大于所述第一链路聚合组的工作带宽;将所述第一链路聚合组倒换为所述增加后的 第二链路聚合组。With reference to the third aspect, in a first possible implementation manner of the third aspect, the processor is further configured to: increase the links in the second link aggregation group to obtain an increased second link aggregation group; determining that the working bandwidth of the added second link aggregation group is greater than the working bandwidth of the first link aggregation group; switching the first link aggregation group to the added second link aggregation group .

结合第三方面,第三方面的第二种可能的实施方式中,所述处理器还用于:删除所述第 一链路聚合组中的链路以得到删减后的第一链路聚合组;确定所述删减后的第一链路聚合组 的工作带宽小于所述第二链路聚合组的工作带宽;将所述删减后的第一链路聚合组倒换到所 述第二链路聚合组。With reference to the third aspect, in a second possible implementation manner of the third aspect, the processor is further configured to: delete the links in the first link aggregation group to obtain the deleted first link aggregation group; determine that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; switch the deleted first link aggregation group to the second link aggregation group Link Aggregation Group.

结合第三方面,第三方面的第三种可能的实施方式中,所述第一链路聚合组中聚合链路 的总数减去故障链路的个数小于或者等于最小激活链路的个数。With reference to the third aspect, in a third possible implementation manner of the third aspect, the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum number of active links .

结合第三方面,第三方面的第四种可能的实施方式中,所述轻量级故障为导致工作带宽 受损,但还能继续传输数据的故障。With reference to the third aspect, in a fourth possible implementation manner of the third aspect, the lightweight fault is a fault that causes the working bandwidth to be damaged, but can continue to transmit data.

在上述方案中,第一网元在第一链路聚合组发生了轻量级故障时,将轻量级故障进行记 录,并将第一链路聚合组倒换为第二链路聚合组,然后,第一网元在第二链路聚合组发生故 障时,可以根据轻量级故障的记录将第二链路聚合组重新倒换为第一链路聚合组,从而能够 在第一链路聚合组不满足期望带宽时,倒换至无故障的第二链路聚合组,第二链路聚合组发 生故障时,重新倒换至第一链路聚合组,更好的保证数据通信质量。In the above solution, when a lightweight fault occurs in the first link aggregation group, the first network element records the lightweight fault, switches the first link aggregation group to the second link aggregation group, and then , when the second link aggregation group fails, the first network element can re-switch the second link aggregation group to the first link aggregation group according to the record of the lightweight failure, so that the first link aggregation group can be When the expected bandwidth is not met, it is switched to the second link aggregation group without failure. When the second link aggregation group is faulty, it is switched to the first link aggregation group again, so as to better ensure the quality of data communication.

附图说明Description of drawings

为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作 简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术 人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention, which are of great significance to the art For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.

图1是现有技术的一种二元通信系统的结构示意图;1 is a schematic structural diagram of a binary communication system in the prior art;

图2a是本申请实施例提供的一种应用场景的结构示意图;2a is a schematic structural diagram of an application scenario provided by an embodiment of the present application;

图2b是本申请实施例提供的另一种应用场景的结构示意图;FIG. 2b is a schematic structural diagram of another application scenario provided by an embodiment of the present application;

图3是本申请实施例提供的第一种链路聚合组进行自动保护的方法的流程示意图;3 is a schematic flowchart of a first method for automatic protection of a link aggregation group provided by an embodiment of the present application;

图4是本申请实施例提供的第二种链路聚合组进行自动保护的方法的流程示意图;4 is a schematic flowchart of a second method for automatic protection of a link aggregation group provided by an embodiment of the present application;

图5是本申请实施例提供的第三种链路聚合组进行自动保护的方法的流程示意图;5 is a schematic flowchart of a third method for automatic protection of a link aggregation group provided by an embodiment of the present application;

图6是本申请实施例提供的一种装置的结构示意图;6 is a schematic structural diagram of a device provided by an embodiment of the present application;

图7是本申请实施例提供的一种第一网元的结构示意图。FIG. 7 is a schematic structural diagram of a first network element provided by an embodiment of the present application.

具体实施方式Detailed ways

本发明实施例的技术方案可以应用于SDH(Synchronous Digital Hierarchy,同步数字体 系)/SONET(Synchronous Optical Network,同步光纤网)、或OTN(OpticalTransport Network, 光传送网)等光网络。The technical solutions of the embodiments of the present invention can be applied to optical networks such as SDH (Synchronous Digital Hierarchy, Synchronous Digital Hierarchy)/SONET (Synchronous Optical Network, Synchronous Optical Network), or OTN (Optical Transport Network, Optical Transport Network).

请参阅图2a,图2a是本发明实施例公开的一种应用场景的示意图。在图2a所示的应用 场景中,第一网元与第二网元之间通过物理介质进行数据通信。其中,所述物理介质可以是 铜缆、光纤或者其他传输介质。Please refer to FIG. 2a, which is a schematic diagram of an application scenario disclosed by an embodiment of the present invention. In the application scenario shown in Figure 2a, data communication is performed between the first network element and the second network element through a physical medium. Wherein, the physical medium may be copper cable, optical fiber or other transmission medium.

在本申请实施例中,第一网元可以是分组传送网(Packet Transport Network,PTN)设备, 例如,路由器等等,此处不作具体限定。第一网元能够实现分组转发(forwarding)、服务质 量(Quality of Service,QoS)、网络保护、操作管理维护等等功能,可以理解,上述第一网 元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the first network element may be a packet transport network (Packet Transport Network, PTN) device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding (forwarding), quality of service (QoS), network protection, operation management and maintenance, etc. should constitute a specific limitation.

在本申请实施例中,第二网元可以是分组传送网(Packet Transport Network,PTN)设备, 例如,路由器等等,此处不作具体限定。第二网元能够实现分组转发(forwarding)、服务质 量(Quality of Service,QoS)、网络保护、操作管理维护等等功能,可以理解,上述第二网 元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the second network element may be a packet transport network (Packet Transport Network, PTN) device, for example, a router, etc., which is not specifically limited here. The second network element can implement functions such as packet forwarding (forwarding), quality of service (QoS), network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the second network element are only used for example, not should constitute a specific limitation.

在本申请实施中,第一网元与第二网元之间通过物理介质进行连接。其中,第一链路聚 合组合和第二链路聚合组可以共存于第一网元与第二网元之间的物理介质中。In the implementation of this application, the first network element and the second network element are connected through a physical medium. Wherein, the first link aggregation group and the second link aggregation group may coexist in the physical medium between the first network element and the second network element.

在本申请实施中,第一链路聚合组可以是工作路径,第二链路聚合组可以是保护路径。 在通常使用中,可以选择通信质量较好的路径作为工作路径,通信质量较差的路径作为保护 路径,可以上述工作路径和保护路径的选择方式仅仅是作为一种举例,不应构成具体限定。In the implementation of this application, the first link aggregation group may be a working path, and the second link aggregation group may be a protection path. In normal use, a path with better communication quality can be selected as a working path, and a path with poor communication quality can be selected as a protection path.

当第一链路聚合组的正常工作带宽受损而导致不能满足第一网元和第二网元之间的数据 通信要求时,第一网元可以将第一链路聚合组倒换为第二链路聚合组。即,在倒换之前,第 一网元和第二网元之间通过第一链路聚合组进行数据通信,在倒换之后,第一网元和第二网 元之间通过第二链路聚合组进行数据通信。When the normal working bandwidth of the first link aggregation group is damaged and the data communication requirements between the first network element and the second network element cannot be met, the first network element may switch the first link aggregation group to the second network element Link Aggregation Group. That is, before the switchover, data communication is performed between the first network element and the second network element through the first link aggregation group, and after the switchover, the second link aggregation group is used between the first network element and the second network element for data communication. data communication.

但是,如果第二链路聚合组的带宽不能满足期望(例如,第二链路聚合组发生了严重故 障),则尽管第一网元和第二网元之间的第一链路聚合组只是带宽受损而非完全不能工作, 第一网元和第二网元之间依然无法进行数据通信。However, if the bandwidth of the second link aggregation group cannot meet expectations (for example, the second link aggregation group has a serious failure), although the first link aggregation group between the first network element and the second network element is only The bandwidth is damaged rather than completely inoperable, and data communication between the first network element and the second network element is still impossible.

请参阅图2b,图2b是本发明实施例公开的另一种应用场景的示意图。在图2b所示的应 用场景中,第一网元与第二网元之间通过物理介质进行数据通信,此外,第一网元和第三网 元之间通过物理介质进行数据通信,第三网元和第二网元之间通过物理介质进行数据通信。 其中,所述物理介质可以是铜缆、光纤或者其他传输介质。Please refer to FIG. 2b. FIG. 2b is a schematic diagram of another application scenario disclosed by an embodiment of the present invention. In the application scenario shown in Fig. 2b, data communication is performed between the first network element and the second network element through a physical medium. In addition, data communication is performed between the first network element and the third network element through a physical medium, and the third network element is used for data communication. Data communication is performed between the network element and the second network element through a physical medium. Wherein, the physical medium may be copper cable, optical fiber or other transmission medium.

在本申请实施例中,第一网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the first network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施例中,第二网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第二网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第二网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the second network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The second network element can implement functions such as packet forwarding, quality of service, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the second network element are only used for example and should not constitute a specific limitation.

在本申请实施例中,第三网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第三网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第三网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the third network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The third network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the functions of the third network element described above are only for example and should not constitute a specific limitation.

在本申请实施中,第一网元与第二网元之间通过物理介质进行连接。其中,第一链路聚 合组合可以存在于第一网元与第二网元之间的物理介质中。第二链路聚合组合可以存在于第 一网元与第三网元之间的物理介质中。In the implementation of this application, the first network element and the second network element are connected through a physical medium. Wherein, the first link aggregation combination may exist in the physical medium between the first network element and the second network element. The second link aggregation combination may exist in the physical medium between the first network element and the third network element.

在本申请实施中,第一链路聚合组可以是工作路径,第二链路聚合组可以是保护路径。 在通常使用中,可以选择通信质量较好的路径作为工作路径,通信质量较差的路径作为保护 路径,可以上述工作路径和保护路径的选择方式仅仅是作为一种举例,不应构成具体限定。In the implementation of this application, the first link aggregation group may be a working path, and the second link aggregation group may be a protection path. In normal use, a path with better communication quality can be selected as a working path, and a path with poor communication quality can be selected as a protection path.

当第一链路聚合组的正常工作带宽受损而导致不能满足第一网元和第二网元之间的数据 通信要求时,第一网元可以将第一链路聚合组倒换为第二链路聚合组。即,在倒换之前,第 一网元和第二网元之间通过第一链路聚合组进行数据通信,在倒换之后,第一网元和第二网 元之间通过第二链路聚合组进行数据通信。When the normal working bandwidth of the first link aggregation group is damaged and the data communication requirements between the first network element and the second network element cannot be met, the first network element may switch the first link aggregation group to the second network element Link Aggregation Group. That is, before the switchover, data communication is performed between the first network element and the second network element through the first link aggregation group, and after the switchover, the second link aggregation group is used between the first network element and the second network element for data communication. data communication.

但是,如果第二链路聚合组的带宽不能满足期望(例如,第二链路聚合组发生了严重故 障),则尽管第一网元和第二网元之间的第一链路聚合组只是带宽受损而非完全不能工作, 第一网元和第二网元之间依然无法进行数据通信。However, if the bandwidth of the second link aggregation group cannot meet expectations (for example, the second link aggregation group has a serious failure), although the first link aggregation group between the first network element and the second network element is only The bandwidth is damaged rather than completely inoperable, and data communication between the first network element and the second network element is still impossible.

为了解决上述问题,现有技术提供了一种链路聚合组进行自动保护的方法、设备以及系 统,能够在第一链路聚合组不满足期望带宽时,倒换至无故障的第二链路聚合组,第二链路 聚合组发生故障时,重新倒换至第一链路聚合组,更好的保证数据通信质量。In order to solve the above problems, the prior art provides a method, device and system for automatic protection of a link aggregation group, which can switch to a fault-free second link aggregation when the first link aggregation group does not meet the expected bandwidth When the second link aggregation group fails, it is switched to the first link aggregation group to better ensure the quality of data communication.

如图3所示,本申请实施例提供了第一种链路聚合组进行自动保护的方法的流程示意图。 在本申请实施例中,链路聚合组进行自动保护的方法包括:As shown in FIG. 3 , an embodiment of the present application provides a schematic flowchart of a first method for automatic protection of a link aggregation group. In the embodiment of the present application, the method for automatic protection of the link aggregation group includes:

S101:第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,并记录所 述第一链路聚合组发生了轻量级故障。其中,所述第一链路聚合组为所述第一网元与第二网 元之间的链路聚合组。S101: The first network element determines that the working bandwidth of the first link aggregation group is less than or equal to a first bandwidth threshold, and records that a lightweight fault occurs in the first link aggregation group. The first link aggregation group is a link aggregation group between the first network element and the second network element.

在本申请实施例中,第一网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the first network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施例中,第二网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the second network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施中,第一网元与第二网元之间通过物理介质进行连接,所述物理介质可以 是铜缆、光纤或者其他传输介质。其中,第一链路聚合组合和第二链路聚合组可以共存于所 述物理介质中。第一链路聚合组合和第二链路聚合组可以共存于同一物理介质中,例如,第 一链路聚合组合和第二链路聚合组共存于同一铜缆;第一链路聚合组合和第二链路聚合组可 以存在于不同的物理介质中,例如,第一链路聚合组合可以存在于铜缆线中,第二链路聚合 组合可以存在于光纤中。需要说明的是,第二链路聚合组可以直接连接第二网元,也可以通 过其他的转接设备(例如,第三网元)再连接第二网元,此处不作具体限定。In the implementation of this application, the first network element and the second network element are connected through a physical medium, and the physical medium may be a copper cable, an optical fiber, or other transmission medium. Wherein, the first link aggregation group and the second link aggregation group may coexist in the physical medium. The first LAG and the second LAG can coexist in the same physical medium, for example, the first LAG and the second LAG coexist in the same copper cable; the first LAG and the second LAG The two link aggregation groups may exist in different physical media, for example, the first link aggregation group may exist in copper cables, and the second link aggregation group may exist in optical fibers. It should be noted that the second link aggregation group may be directly connected to the second network element, or may be connected to the second network element through other switching devices (for example, a third network element), which is not specifically limited here.

在本申请实施中,第一链路聚合组可以是工作路径,第二链路聚合组可以是保护路径。 在通常使用中,可以选择通信质量较好的路径作为工作路径,通信质量较差的路径作为保护 路径。如果数据通信过程中,工作路径出现了故障,则可以倒换至保护路径,从而保证数据 通信的可靠性。In the implementation of this application, the first link aggregation group may be a working path, and the second link aggregation group may be a protection path. In normal use, the path with better communication quality can be selected as the working path, and the path with poor communication quality can be selected as the protection path. If the working path fails during data communication, it can be switched to the protection path to ensure the reliability of data communication.

在本申请实施例中,第一网元可以分别获取第一链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第一链路聚合组的工作带宽。如果第一链路聚合 组的工作带宽小于或者等于第一带宽阈值,则确定第一链路聚合组发生了轻量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the first link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the working bandwidth of the first link aggregation group. working bandwidth. If the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, it is determined that a light failure has occurred in the first link aggregation group.

在一具体的实施例中,第一网元可以分别获取第一链路聚合组的总链路数a以及故障链 路数量i,从而确定正常工作链路的数量为a-i。如果第一链路聚合组的正常工作链路的数量 小于或者等于第一数量阈值,则确定第一链路聚合组发生了轻量级故障。In a specific embodiment, the first network element may obtain the total number of links a and the number i of faulty links of the first link aggregation group, respectively, so as to determine that the number of normal working links is a-i. If the number of normal working links of the first link aggregation group is less than or equal to the first number threshold, it is determined that a light failure has occurred in the first link aggregation group.

在本申请实施例中,轻量级故障是指导致网络设备之间的带宽受损,但是,网络设备之 间依然可以进行通信的故障。例如,轻量级故障可以是指第一链路聚合组中的小部分链路没 有被激活,或者,轻量级故障可以是指第一链路聚合组中的小部分链路发生了故障等等,此 处不作具体限定。In this embodiment of the present application, a lightweight fault refers to a fault that causes the bandwidth between network devices to be damaged, but the network devices can still communicate with each other. For example, the light failure may mean that a small part of the links in the first link aggregation group are not activated, or the light failure may refer to the failure of a small part of the links in the first link aggregation group, etc. etc., which are not specifically limited here.

S102:所述第一网元将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链 路聚合组为所述第一网元与所述第二网元之间的链路聚合组。S102: The first network element switches the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first network element and the second network element link aggregation group between.

在本申请实施例中,第一网元检测到第一链路聚合组发生轻量级故障导致第一链路聚合 组工作带宽不满足第一带宽阈值,记录第一链路聚合组发生了信号劣化故障,倒换到第二链 路聚合组进行数据通信,同时发送APS协议报文通知第二网元第一链路聚合组发生了信号劣 化,以后需要通过第二链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a lightweight fault occurs in the first link aggregation group, causing the working bandwidth of the first link aggregation group to not meet the first bandwidth threshold, and records that a signal occurs in the first link aggregation group Deterioration failure, switch to the second link aggregation group for data communication, and send an APS protocol packet to notify the second network element that signal degradation has occurred in the first link aggregation group, and data communication needs to be performed through the second link aggregation group in the future.

S103:在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一 链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。S103: When the working bandwidth of the second link aggregation group is less than or equal to a second bandwidth threshold, switch the second link aggregation group according to the record of the light-weight failure of the first link aggregation group is the first link aggregation group.

在本申请实施例中,第一网元可以分别获取第二链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第二链路聚合组的工作带宽。如果第二链路聚合 组的工作带宽小于或者等于第二带宽阈值,则确定第二链路聚合组发生了重量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the second link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the operating bandwidth of the second link aggregation group. working bandwidth. If the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在一具体的实施例中,第一网元可以分别获取第二链路聚合组的总链路数b以及故障链 路数量j,从而确定正常工作链路的数量为b-j。如果第一链路聚合组的正常工作链路的数量 小于或者等于第二数量阈值,则确定第二链路聚合组发生了重量级故障。In a specific embodiment, the first network element may obtain the total number of links b and the number of faulty links j of the second link aggregation group, respectively, so as to determine that the number of normal working links is b-j. If the number of normal working links of the first link aggregation group is less than or equal to the second number threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在本申请实施例中,重量级故障是指导致网络设备之间的带宽严重受损至几乎无法正常 进行通信,或者,网络设备之间已经完全无法进行通信。例如,重量级故障可以是指第二链 路聚合组中的绝大部分或者全部链路没有被激活,或者,重量级故障可以是指第二链路聚合 组中的绝大部分或者全部链路发生了故障等等,此处不作具体限定。In this embodiment of the present application, the heavyweight fault means that the bandwidth between network devices is severely damaged to the point that it is almost impossible to communicate normally, or communication between network devices is completely impossible. For example, the heavyweight fault may mean that most or all links in the second link aggregation group are not activated, or the heavyweight fault may refer to most or all links in the second link aggregation group A failure or the like has occurred, which is not specifically limited here.

在本申请实施例中,第一网元检测到第二链路聚合组发生重量级故障导致第二链路聚合 组工作带宽不满足第二带宽阈值,记录第二链路聚合组发生了重量级故障,重新倒换到第一 链路聚合组进行数据通信,同时发送APS协议报文通知第二网元第二链路聚合组发生了重量 级故障,以后需要重新通过第一链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a heavyweight fault occurs in the second link aggregation group, resulting in that the working bandwidth of the second link aggregation group does not meet the second bandwidth threshold, and records that a heavyweight failure occurs in the second link aggregation group. If the fault occurs, switch to the first link aggregation group again for data communication, and send an APS protocol packet to notify the second network element that a heavy fault has occurred in the second link aggregation group. communication.

在上述方案中,第一网元在第一链路聚合组发生了轻量级故障时,将轻量级故障进行记 录,并将第一链路聚合组倒换为第二链路聚合组,然后,第一网元在第二链路聚合组发生故 障时,可以根据轻量级故障的记录将第二链路聚合组重新倒换为第一链路聚合组,从而能够 在第一链路聚合组不满足期望带宽时,倒换至无故障的第二链路聚合组,第二链路聚合组发 生故障时,重新倒换置第一链路聚合组,更好的保证业务转发质量。In the above solution, when a lightweight fault occurs in the first link aggregation group, the first network element records the lightweight fault, switches the first link aggregation group to the second link aggregation group, and then , when the second link aggregation group fails, the first network element can re-switch the second link aggregation group to the first link aggregation group according to the record of the lightweight failure, so that the first link aggregation group can be When the expected bandwidth is not met, it is switched to a fault-free second link aggregation group, and when the second link aggregation group fails, the first link aggregation group is re-switched to better ensure service forwarding quality.

如图4所示,本申请实施例提供了第二种链路聚合组进行自动保护的方法的流程示意图。 在本申请实施例中,链路聚合组进行自动保护的方法包括:As shown in FIG. 4 , an embodiment of the present application provides a schematic flowchart of a second method for automatic protection of a link aggregation group. In the embodiment of the present application, the method for automatic protection of the link aggregation group includes:

S201:第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,并记录所 述第一链路聚合组发生了轻量级故障。其中,所述第一链路聚合组为所述第一网元与第二网 元之间的链路聚合组。S201: The first network element determines that the working bandwidth of the first link aggregation group is less than or equal to a first bandwidth threshold, and records that a light fault occurs in the first link aggregation group. The first link aggregation group is a link aggregation group between the first network element and the second network element.

在本申请实施例中,第一网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the first network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施例中,第二网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the second network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施中,第一网元与第二网元之间通过物理介质进行连接,所述物理介质可以 是铜缆、光纤或者其他传输介质。其中,第一链路聚合组合和第二链路聚合组可以共存于所 述物理介质中。第一链路聚合组合和第二链路聚合组可以共存于同一物理介质中,例如,第 一链路聚合组合和第二链路聚合组共存于同一铜缆;第一链路聚合组合和第二链路聚合组可 以存在于不同的物理介质中,例如,第一链路聚合组合可以存在于铜缆线中,第二链路聚合 组合可以存在于光纤中。需要说明的是,第二链路聚合组可以直接连接第二网元,也可以通 过其他的转接设备(例如,第三网元)再连接第二网元,此处不作具体限定。In the implementation of this application, the first network element and the second network element are connected through a physical medium, and the physical medium may be a copper cable, an optical fiber, or other transmission medium. Wherein, the first link aggregation group and the second link aggregation group may coexist in the physical medium. The first LAG and the second LAG can coexist in the same physical medium, for example, the first LAG and the second LAG coexist in the same copper cable; the first LAG and the second LAG The two link aggregation groups may exist in different physical media, for example, the first link aggregation group may exist in copper cables, and the second link aggregation group may exist in optical fibers. It should be noted that the second link aggregation group may be directly connected to the second network element, or may be connected to the second network element through other switching devices (for example, a third network element), which is not specifically limited here.

在本申请实施中,第一链路聚合组可以是工作路径,第二链路聚合组可以是保护路径。 在通常使用中,可以选择通信质量较好的路径作为工作路径,通信质量较差的路径作为保护 路径。如果数据通信过程中,工作路径出现了故障,则可以倒换至保护路径,从而保证数据 通信的可靠性。In the implementation of this application, the first link aggregation group may be a working path, and the second link aggregation group may be a protection path. In normal use, the path with better communication quality can be selected as the working path, and the path with poor communication quality can be selected as the protection path. If the working path fails during data communication, it can be switched to the protection path to ensure the reliability of data communication.

在本申请实施例中,第一网元可以分别获取第一链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第一链路聚合组的工作带宽。如果第一链路聚合 组的工作带宽小于或者等于第一带宽阈值,则确定第一链路聚合组发生了轻量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the first link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the working bandwidth of the first link aggregation group. working bandwidth. If the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, it is determined that a light failure has occurred in the first link aggregation group.

在一具体的实施例中,第一网元可以分别获取第一链路聚合组的总链路数a以及故障链 路数量i,从而确定正常工作链路的数量为a-i。如果第一链路聚合组的正常工作链路的数量 小于或者等于第一数量阈值,则确定第一链路聚合组发生了轻量级故障。In a specific embodiment, the first network element may obtain the total number of links a and the number i of faulty links of the first link aggregation group, respectively, so as to determine that the number of normal working links is a-i. If the number of normal working links of the first link aggregation group is less than or equal to the first number threshold, it is determined that a light failure has occurred in the first link aggregation group.

在本申请实施例中,轻量级故障是指导致网络设备之间的带宽受损,但是,网络设备之 间依然可以进行通信的故障。例如,轻量级故障可以是指第一链路聚合组中的小部分链路没 有被激活,或者,轻量级故障可以是指第一链路聚合组中的小部分链路发生了故障等等,此 处不作具体限定。In this embodiment of the present application, a lightweight fault refers to a fault that causes the bandwidth between network devices to be damaged, but the network devices can still communicate with each other. For example, the light failure may mean that a small part of the links in the first link aggregation group are not activated, or the light failure may refer to the failure of a small part of the links in the first link aggregation group, etc. etc., which are not specifically limited here.

S202:所述第一网元将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链 路聚合组为所述第一网元与所述第二网元之间的链路聚合组。S202: The first network element switches the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first network element and the second network element link aggregation group between.

在本申请实施例中,第一网元检测到第一链路聚合组发生轻量级故障导致第一链路聚合 组工作带宽不满足第一带宽阈值,记录第一链路聚合组发生了信号劣化故障,倒换到第二链 路聚合组进行数据通信,同时发送APS协议报文通知第二网元第一链路聚合组发生了信号劣 化,以后需要通过第二链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a lightweight fault occurs in the first link aggregation group, causing the working bandwidth of the first link aggregation group to not meet the first bandwidth threshold, and records that a signal occurs in the first link aggregation group Deterioration failure, switch to the second link aggregation group for data communication, and send an APS protocol packet to notify the second network element that signal degradation has occurred in the first link aggregation group, and data communication needs to be performed through the second link aggregation group in the future.

S203:在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一 链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组,其 中,所述第二带宽阈值小于所述第一带宽阈值。S203: When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, switch the second link aggregation group according to the record of the light-weight failure of the first link aggregation group is the first link aggregation group, wherein the second bandwidth threshold is smaller than the first bandwidth threshold.

在本申请实施例中,第一网元可以分别获取第二链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第二链路聚合组的工作带宽。如果第二链路聚合 组的工作带宽小于或者等于第二带宽阈值,则确定第二链路聚合组发生了重量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the second link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the operating bandwidth of the second link aggregation group. working bandwidth. If the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在一具体的实施例中,第一网元可以分别获取第二链路聚合组的总链路数b以及故障链 路数量j,从而确定正常工作链路的数量为b-j。如果第一链路聚合组的正常工作链路的数量 小于或者等于第二数量阈值,则确定第二链路聚合组发生了重量级故障。In a specific embodiment, the first network element may obtain the total number of links b and the number of faulty links j of the second link aggregation group, respectively, so as to determine that the number of normal working links is b-j. If the number of normal working links of the first link aggregation group is less than or equal to the second number threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在本申请实施例中,重量级故障是指导致网络设备之间的带宽严重受损至几乎无法正常 进行通信,或者,网络设备之间已经完全无法进行通信。例如,重量级故障可以是指第二链 路聚合组中的绝大部分或者全部链路没有被激活,或者,重量级故障可以是指第二链路聚合 组中的绝大部分或者全部链路发生了故障等等,此处不作具体限定。In this embodiment of the present application, the heavyweight fault means that the bandwidth between network devices is severely damaged to the point that it is almost impossible to communicate normally, or communication between network devices is completely impossible. For example, the heavyweight fault may mean that most or all links in the second link aggregation group are not activated, or the heavyweight fault may refer to most or all links in the second link aggregation group A failure or the like has occurred, which is not specifically limited here.

在本申请实施例中,第一网元检测到第二链路聚合组发生重量级故障导致第二链路聚合 组工作带宽不满足第二带宽阈值,记录第二链路聚合组发生了重量级故障,重新倒换到第一 链路聚合组进行数据通信,同时发送APS协议报文通知第二网元第二链路聚合组发生了重量 级故障,以后需要重新通过第一链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a heavyweight fault occurs in the second link aggregation group, resulting in that the working bandwidth of the second link aggregation group does not meet the second bandwidth threshold, and records that a heavyweight failure occurs in the second link aggregation group. If the fault occurs, switch to the first link aggregation group again for data communication, and send an APS protocol packet to notify the second network element that a heavy fault has occurred in the second link aggregation group. communication.

S204:第一网元增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组。S204: The first network element adds links in the second link aggregation group to obtain an added second link aggregation group.

S205:第一网元确定所述增加后的第二链路聚合组的工作带宽大于所述第一链路聚合组 的工作带宽。S205: The first network element determines that the working bandwidth of the added second link aggregation group is greater than the working bandwidth of the first link aggregation group.

在本申请实施例中,第一网元可以分别获取第二链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第二链路聚合组的工作带宽。如果第二链路聚合 组的工作带宽大于第一带宽阈值,则确定需要将第一链路聚合组再次倒换至第二链路聚合组。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the second link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the operating bandwidth of the second link aggregation group. working bandwidth. If the working bandwidth of the second link aggregation group is greater than the first bandwidth threshold, it is determined that the first link aggregation group needs to be switched to the second link aggregation group again.

S206:第一网元将所述第一链路聚合组倒换为所述增加后的第二链路聚合组。S206: The first network element switches the first link aggregation group to the added second link aggregation group.

如图5所示,本申请实施例提供了第三种链路聚合组进行自动保护的方法的流程示意图。 在本申请实施例中,链路聚合组进行自动保护的方法包括:As shown in FIG. 5 , an embodiment of the present application provides a schematic flowchart of a third method for automatic protection of a link aggregation group. In the embodiment of the present application, the method for automatic protection of the link aggregation group includes:

S301:第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,并记录所 述第一链路聚合组发生了轻量级故障。其中,所述第一链路聚合组为所述第一网元与第二网 元之间的链路聚合组。S301: The first network element determines that the working bandwidth of the first link aggregation group is less than or equal to a first bandwidth threshold, and records that a lightweight fault occurs in the first link aggregation group. The first link aggregation group is a link aggregation group between the first network element and the second network element.

在本申请实施例中,第一网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the first network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施例中,第二网元可以是分组传送网设备,例如,路由器等等,此处不作具 体限定。第一网元能够实现分组转发、服务质量、网络保护、操作管理维护等等功能,可以 理解,上述第一网元的功能仅仅是用于进行举例,不应构成具体限定。In this embodiment of the present application, the second network element may be a packet transmission network device, for example, a router, etc., which is not specifically limited here. The first network element can implement functions such as packet forwarding, service quality, network protection, operation management and maintenance, etc. It can be understood that the above-mentioned functions of the first network element are only used for example and should not constitute a specific limitation.

在本申请实施中,第一网元与第二网元之间通过物理介质进行连接,所述物理介质可以 是铜缆、光纤或者其他传输介质。其中,第一链路聚合组合和第二链路聚合组可以共存于所 述物理介质中。第一链路聚合组合和第二链路聚合组可以共存于同一物理介质中,例如,第 一链路聚合组合和第二链路聚合组共存于同一铜缆;第一链路聚合组合和第二链路聚合组可 以存在于不同的物理介质中,例如,第一链路聚合组合可以存在于铜缆线中,第二链路聚合 组合可以存在于光纤中。需要说明的是,第二链路聚合组可以直接连接第二网元,也可以通 过其他的转接设备(例如,第三网元)再连接第二网元,此处不作具体限定。In the implementation of this application, the first network element and the second network element are connected through a physical medium, and the physical medium may be a copper cable, an optical fiber, or other transmission medium. Wherein, the first link aggregation group and the second link aggregation group may coexist in the physical medium. The first LAG and the second LAG can coexist in the same physical medium, for example, the first LAG and the second LAG coexist in the same copper cable; the first LAG and the second LAG The two link aggregation groups may exist in different physical media, for example, the first link aggregation group may exist in copper cables, and the second link aggregation group may exist in optical fibers. It should be noted that the second link aggregation group may be directly connected to the second network element, or may be connected to the second network element through other switching devices (for example, a third network element), which is not specifically limited here.

在本申请实施中,第一链路聚合组可以是工作路径,第二链路聚合组可以是保护路径。 在通常使用中,可以选择通信质量较好的路径作为工作路径,通信质量较差的路径作为保护 路径。如果数据通信过程中,工作路径出现了故障,则可以倒换至保护路径,从而保证数据 通信的可靠性。In the implementation of this application, the first link aggregation group may be a working path, and the second link aggregation group may be a protection path. In normal use, the path with better communication quality can be selected as the working path, and the path with poor communication quality can be selected as the protection path. If the working path fails during data communication, it can be switched to the protection path to ensure the reliability of data communication.

在本申请实施例中,第一网元可以分别获取第一链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第一链路聚合组的工作带宽。如果第一链路聚合 组的工作带宽小于或者等于第一带宽阈值,则确定第一链路聚合组发生了轻量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the first link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the working bandwidth of the first link aggregation group. working bandwidth. If the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, it is determined that a light failure has occurred in the first link aggregation group.

在一具体的实施例中,第一网元可以分别获取第一链路聚合组的总链路数a以及故障链 路数量i,从而确定正常工作链路的数量为a-i。如果第一链路聚合组的正常工作链路的数量 小于或者等于第一数量阈值,则确定第一链路聚合组发生了轻量级故障。In a specific embodiment, the first network element may obtain the total number of links a and the number i of faulty links of the first link aggregation group, respectively, so as to determine that the number of normal working links is a-i. If the number of normal working links of the first link aggregation group is less than or equal to the first number threshold, it is determined that a light failure has occurred in the first link aggregation group.

在本申请实施例中,轻量级故障是指导致网络设备之间的带宽受损,但是,网络设备之 间依然可以进行通信的故障。例如,轻量级故障可以是指第一链路聚合组中的小部分链路没 有被激活,或者,轻量级故障可以是指第一链路聚合组中的小部分链路发生了故障等等,此 处不作具体限定。In this embodiment of the present application, a lightweight fault refers to a fault that causes the bandwidth between network devices to be damaged, but the network devices can still communicate with each other. For example, the light failure may mean that a small part of the links in the first link aggregation group are not activated, or the light failure may refer to the failure of a small part of the links in the first link aggregation group, etc. etc., which are not specifically limited here.

S302:所述第一网元将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链 路聚合组为所述第一网元与所述第二网元之间的链路聚合组。S302: The first network element switches the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first network element and the second network element link aggregation group between.

在本申请实施例中,第一网元检测到第一链路聚合组发生轻量级故障导致第一链路聚合 组工作带宽不满足第一带宽阈值,记录第一链路聚合组发生了信号劣化故障,倒换到第二链 路聚合组进行数据通信,同时发送APS协议报文通知第二网元第一链路聚合组发生了信号劣 化,以后需要通过第二链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a lightweight fault occurs in the first link aggregation group, causing the working bandwidth of the first link aggregation group to not meet the first bandwidth threshold, and records that a signal occurs in the first link aggregation group Deterioration failure, switch to the second link aggregation group for data communication, and send an APS protocol packet to notify the second network element that signal degradation has occurred in the first link aggregation group, and data communication needs to be performed through the second link aggregation group in the future.

S303:在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一 链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组,其 中,所述第二带宽阈值小于所述第一带宽阈值。S303: When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, switch the second link aggregation group according to the record of the light-weight failure of the first link aggregation group is the first link aggregation group, wherein the second bandwidth threshold is smaller than the first bandwidth threshold.

在本申请实施例中,第一网元可以分别获取第二链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第二链路聚合组的工作带宽。如果第二链路聚合 组的工作带宽小于或者等于第二带宽阈值,则确定第二链路聚合组发生了重量级故障。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the second link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the operating bandwidth of the second link aggregation group. working bandwidth. If the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在一具体的实施例中,第一网元可以分别获取第二链路聚合组的总链路数b以及故障链 路数量j,从而确定正常工作链路的数量为b-j。如果第一链路聚合组的正常工作链路的数量 小于或者等于第二数量阈值,则确定第二链路聚合组发生了重量级故障。In a specific embodiment, the first network element may obtain the total number of links b and the number of faulty links j of the second link aggregation group, respectively, so as to determine that the number of normal working links is b-j. If the number of normal working links of the first link aggregation group is less than or equal to the second number threshold, it is determined that a heavyweight fault has occurred in the second link aggregation group.

在本申请实施例中,重量级故障是指导致网络设备之间的带宽严重受损至几乎无法正常 进行通信,或者,网络设备之间已经完全无法进行通信。例如,重量级故障可以是指第二链 路聚合组中的绝大部分或者全部链路没有被激活,或者,重量级故障可以是指第二链路聚合 组中的绝大部分或者全部链路发生了故障等等,此处不作具体限定。In this embodiment of the present application, the heavyweight fault means that the bandwidth between network devices is severely damaged to the point that it is almost impossible to communicate normally, or communication between network devices is completely impossible. For example, the heavyweight fault may mean that most or all links in the second link aggregation group are not activated, or the heavyweight fault may refer to most or all links in the second link aggregation group A failure or the like has occurred, which is not specifically limited here.

在本申请实施例中,第一网元检测到第二链路聚合组发生重量级故障导致第二链路聚合 组工作带宽不满足第二带宽阈值,记录第二链路聚合组发生了重量级故障,重新倒换到第一 链路聚合组进行数据通信,同时发送APS协议报文通知第二网元第二链路聚合组发生了重量 级故障,以后需要重新通过第一链路聚合组进行数据通信。In this embodiment of the present application, the first network element detects that a heavyweight fault occurs in the second link aggregation group, resulting in that the working bandwidth of the second link aggregation group does not meet the second bandwidth threshold, and records that a heavyweight failure occurs in the second link aggregation group. If the fault occurs, switch to the first link aggregation group again for data communication, and send an APS protocol packet to notify the second network element that a heavy fault has occurred in the second link aggregation group. communication.

S304:第一网元删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组。S304: The first network element deletes the links in the first link aggregation group to obtain the deleted first link aggregation group.

S305:第一网元确定所述删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组 的工作带宽。S305: The first network element determines that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group.

在本申请实施例中,第一网元可以分别获取第一链路聚合组中每个链路的工作带宽,并 对每个链路的工作带宽进行统计,从而确定第一链路聚合组的工作带宽。如果第一链路聚合 组的工作带宽小于或者等于第二带宽阈值,则确定需要将第一链路聚合组再次倒换至第二链 路聚合组。In this embodiment of the present application, the first network element may separately obtain the working bandwidth of each link in the first link aggregation group, and collect statistics on the working bandwidth of each link, so as to determine the working bandwidth of the first link aggregation group. working bandwidth. If the working bandwidth of the first link aggregation group is less than or equal to the second bandwidth threshold, it is determined that the first link aggregation group needs to be switched to the second link aggregation group again.

S306:第一网元将删减后的第一链路聚合组倒换到第二链路聚合组。S306: The first network element switches the deleted first link aggregation group to the second link aggregation group.

基于与图3至图5所示的链路聚合组进行自动保护的方法相同的构思,本申请实施例还 提供一种第一网元(如图6所示),该装置用于实现前述图3-5实施例所描述的方法。如图6 所示,第一网元30包括:收发单元301、处理单元302以及存储单元303。收发单元301、处理单元302以及存储单元303可通过总线或者其它方式连接(图6中以通过总线连接为例)。Based on the same concept as the method for automatic protection of the link aggregation group shown in FIG. 3 to FIG. 5 , an embodiment of the present application further provides a first network element (as shown in FIG. 6 ), and the apparatus is used to realize the foregoing diagrams. Methods described in Examples 3-5. As shown in FIG. 6 , the first network element 30 includes: a transceiver unit 301 , a processing unit 302 and a storage unit 303 . The transceiver unit 301 , the processing unit 302 and the storage unit 303 may be connected by a bus or in other ways (in FIG. 6 , the connection by a bus is taken as an example).

收发单元301用于实现处理单元302与其他单元或者网元的内容交互。具体的,收发单 元301可以是该装置的通信接口,也可以是收发电路或者收发器,还可以是收发信机。收发 单元301还可以是处理单元302的通信接口或者收发电路。可选的,收发单元301可以是一 个收发芯片。The transceiver unit 301 is used to realize the content interaction between the processing unit 302 and other units or network elements. Specifically, the transceiver unit 301 may be a communication interface of the device, a transceiver circuit or a transceiver, or a transceiver. The transceiver unit 301 may also be a communication interface or a transceiver circuit of the processing unit 302. Optionally, the transceiver unit 301 may be a transceiver chip.

处理单元302用于实现装置对数据的处理。处理单元302可以是处理电路,也可以是处 理器。其中,处理器可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。上述处理器302可以是通用处理器、数字信号处理 器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器 件、分立硬件组件。处理器还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路 (application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD) 或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD), 现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(Generic Array Logic,GAL)或其任意组合。在实现过程中,上述方法的各步骤可以通过处理单元302中的 硬件的集成逻辑电路或者软件形式的指令完成。其中,处理单元302可以实现或者执行本发 明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也 可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译 码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位 于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器 等本领域成熟的存储介质中。The processing unit 302 is used to realize the processing of data by the device. The processing unit 302 may be a processing circuit or a processor. The processor may be a central processing unit (central processing unit, CPU), a network processor (network processor, NP), or a combination of CPU and NP. The processor 302 described above may be a general purpose processor, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The processor may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (Generic Array Logic, GAL) or any combination thereof. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processing unit 302 or the instructions in the form of software. The processing unit 302 may implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present invention. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.

存储单元303用于存储处理单元302执行的计算机指令。存储单元303可以是存储电路 也可以是存储器。存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失 性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可 编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasablePROM, EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存 储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。The storage unit 303 is used to store computer instructions executed by the processing unit 302 . The storage unit 303 may be a storage circuit or a memory. The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable Except programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache.

处理单元302用于调用存储单元303中存储的程序代码,并执行以下步骤:The processing unit 302 is configured to call the program code stored in the storage unit 303, and execute the following steps:

确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一链路聚合 组为所述第一网元与第二网元之间的链路聚合组;Determine that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, wherein the first link aggregation group is the link aggregation group between the first network element and the second network element;

记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合组倒换为第二 链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间的链路聚合组;Record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first link aggregation group. A link aggregation group between a network element and the second network element;

在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚 合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, the second link aggregation group is switched to the other link aggregation group according to the record of the light failure of the first link aggregation group the first link aggregation group.

可选地,增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组;确定所述增 加后的第二链路聚合组的工作带宽大于所述第一链路聚合组的工作带宽;将所述第一链路聚 合组倒换为所述增加后的第二链路聚合组。Optionally, adding links in the second link aggregation group to obtain an added second link aggregation group; determining that the working bandwidth of the added second link aggregation group is greater than that of the first link Working bandwidth of the aggregation group; switching the first link aggregation group to the added second link aggregation group.

可选地,删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组;确定所述 删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组的工作带宽;将所述删减后的 第一链路聚合组倒换到所述第二链路聚合组。Optionally, delete the links in the first link aggregation group to obtain the deleted first link aggregation group; determine that the working bandwidth of the deleted first link aggregation group is smaller than the first link aggregation group after the deletion. Two working bandwidths of the link aggregation group; switching the deleted first link aggregation group to the second link aggregation group.

可选地,所述第一链路聚合组中聚合链路的总数减去故障链路的个数小于或者等于最小 激活链路的个数。Optionally, the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum number of active links.

可选地,所述轻量级故障为导致工作带宽受损,但还能继续传输数据的故障。Optionally, the lightweight fault is a fault that causes the working bandwidth to be damaged but can continue to transmit data.

需要说明的,处理单元302的执行步骤以及处理单元302涉及的其他技术特征还可参照 图3-5方法实施例中所述第一网元的相关内容,这里不再赘述。It should be noted that, for the execution steps of the processing unit 302 and other technical features involved in the processing unit 302, reference may also be made to the relevant content of the first network element described in the method embodiments in FIGS. 3-5, and details are not repeated here.

基于与图3至图5所示的链路聚合组进行自动保护的方法相同的构思,本申请实施例还 提供一种第一网元(如图7所示),该装置用于实现前述图3-5实施例所描述的方法。如图7 所示,第一网元包括确定单元401、记录单元402以及倒换单元403。Based on the same concept as the method for automatic protection of the link aggregation group shown in FIG. 3 to FIG. 5 , an embodiment of the present application further provides a first network element (as shown in FIG. 7 ), and the apparatus is used to realize the foregoing diagrams. Methods described in Examples 3-5. As shown in FIG. 7 , the first network element includes a determining unit 401 , a recording unit 402 and a switching unit 403 .

所述确定单元401用于确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其 中,所述第一链路聚合组为所述第一网元与第二网元之间的链路聚合组;The determining unit 401 is configured to determine that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, where the first link aggregation group is the connection between the first network element and the second network element. link aggregation group;

所述记录单元402用于记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一 链路聚合组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二 网元之间的链路聚合组;The recording unit 402 is configured to record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, wherein the second link aggregation group is The link aggregation group is a link aggregation group between the first network element and the second network element;

所述倒换单元403用于在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时, 根据所述第一链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链 路聚合组。The switching unit 403 is configured to, when the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, convert the second link aggregation group to The link aggregation group is switched to the first link aggregation group.

需要说明的,通过前述图3-5实施例的详细描述,本领域技术人员可以清楚的知道第一 网元所包含的各个功能模块的实现方法,所以为了说明书的简洁,在此不再详述。It should be noted that those skilled in the art can clearly know the implementation method of each functional module included in the first network element through the detailed description of the foregoing embodiments in FIGS. .

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、终端和方法,可以通过 其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分, 仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结 合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相 互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连 接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed system, terminal and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部 件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元 上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions in the embodiments of the present invention.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个 单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可 以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以 存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对 现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是 个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机 存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or a part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉 本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这 些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的 保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed by the present invention. Modifications or substitutions should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (15)

1.一种对链路聚合组进行自动保护的方法,包括:1. A method for automatically protecting a link aggregation group, comprising: 第一网元确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一链路聚合组为所述第一网元与第二网元之间的链路聚合组;The first network element determines that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, where the first link aggregation group is the link aggregation between the first network element and the second network element Group; 所述第一网元记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间的链路聚合组;The first network element records that a lightweight fault has occurred in the first link aggregation group, and switches the first link aggregation group to a second link aggregation group, where the second link aggregation group is The aggregation group is a link aggregation group between the first network element and the second network element; 在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, the second link aggregation group is switched to the other link aggregation group according to the record of the light failure of the first link aggregation group the first link aggregation group. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 所述第一网元增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组;adding, by the first network element, links in the second link aggregation group to obtain an added second link aggregation group; 所述第一网元确定所述增加后的第二链路聚合组的工作带宽大于所述第一链路聚合组的工作带宽;The first network element determines that the increased working bandwidth of the second link aggregation group is greater than the working bandwidth of the first link aggregation group; 所述第一网元将所述第一链路聚合组倒换为所述增加后的第二链路聚合组。The first network element switches the first link aggregation group to the added second link aggregation group. 3.根据权利要求1或2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1 or 2, wherein the method further comprises: 所述第一网元删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组;The first network element deletes the links in the first link aggregation group to obtain the deleted first link aggregation group; 所述第一网元确定所述删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组的工作带宽;The first network element determines that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; 所述第一网元将所述删减后的第一链路聚合组倒换到所述第二链路聚合组。The first network element switches the deleted first link aggregation group to the second link aggregation group. 4.根据权利要求1至3任一权利要求所述的方法,其特征在于,第一链路聚合组的工作带宽小于或者等于第一带宽阈值,包括:4. The method according to any one of claims 1 to 3, wherein the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, comprising: 所述第一链路聚合组中聚合链路的总数减去故障链路的个数小于或者等于最小激活链路的个数。The total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum number of active links. 5.根据权利要求1所述的方法,其特征在于,所述轻量级故障为导致工作带宽受损,但还能继续传输数据的故障。5 . The method according to claim 1 , wherein the lightweight fault is a fault that causes the working bandwidth to be damaged but can continue to transmit data. 6 . 6.一种网元,其特征在于,包括:确定单元、记录单元以及倒换单元,6. A network element, comprising: a determining unit, a recording unit and a switching unit, 所述确定单元用于确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一链路聚合组为所述第一网元与第二网元之间的链路聚合组;The determining unit is configured to determine that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, where the first link aggregation group is a link between the first network element and the second network element. road aggregation group; 所述记录单元用于记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间的链路聚合组;The recording unit is configured to record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, wherein the second link aggregation group is The aggregation group is a link aggregation group between the first network element and the second network element; 所述倒换单元用于在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。The switching unit is configured to, when the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, switch the second link The link aggregation group is switched to the first link aggregation group. 7.根据权利要求6所述的网元,其特征在于,所述网元还包括增加单元,7. The network element according to claim 6, wherein the network element further comprises an adding unit, 所述增加单元用于增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组;The adding unit is configured to add links in the second link aggregation group to obtain the added second link aggregation group; 所述确定单元用于确定所述增加后的第二链路聚合组的工作带宽大于所述第一链路聚合组的工作带宽;The determining unit is configured to determine that the increased working bandwidth of the second link aggregation group is greater than the working bandwidth of the first link aggregation group; 所述倒换单元用于将所述第一链路聚合组倒换为所述增加后的第二链路聚合组。The switching unit is configured to switch the first link aggregation group to the added second link aggregation group. 8.根据权利要求6或7所述的网元,其特征在于,所述网元还包括删除单元,8. The network element according to claim 6 or 7, wherein the network element further comprises a deletion unit, 所述删除单元还用于删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组;The deletion unit is further configured to delete the links in the first link aggregation group to obtain the deleted first link aggregation group; 所述确定单元还用于确定所述删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组的工作带宽;The determining unit is further configured to determine that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; 所述倒换单元还用于将所述删减后的第一链路聚合组倒换到所述第二链路聚合组。The switching unit is further configured to switch the deleted first link aggregation group to the second link aggregation group. 9.根据权利要求6至8任一权利要求所述的网元,其特征在于,所述第一链路聚合组中聚合链路的总数减去故障链路的个数小于或者等于最小激活链路的个数。9 . The network element according to claim 6 , wherein the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum active link. 10 . number of roads. 10.根据权利要求6所述的网元,其特征在于,所述轻量级故障为导致工作带宽受损,但还能继续传输数据的故障。10 . The network element according to claim 6 , wherein the lightweight fault is a fault that causes damage to the working bandwidth but can continue to transmit data. 11 . 11.一种网元,包括:处理器、发射器和接收器,所述处理器分别连接所述发射器以及所述接收器,其中:所述处理器用于执行如下方法:11. A network element, comprising: a processor, a transmitter and a receiver, the processor is respectively connected to the transmitter and the receiver, wherein: the processor is configured to execute the following method: 确定第一链路聚合组的工作带宽小于或者等于第一带宽阈值,其中,所述第一链路聚合组为第一网元与第二网元之间的链路聚合组;determining that the working bandwidth of the first link aggregation group is less than or equal to the first bandwidth threshold, wherein the first link aggregation group is a link aggregation group between the first network element and the second network element; 记录所述第一链路聚合组发生了轻量级故障,并且,将所述第一链路聚合组倒换为第二链路聚合组,其中,所述第二链路聚合组为所述第一网元与所述第二网元之间的链路聚合组;Record that a lightweight fault occurs in the first link aggregation group, and switch the first link aggregation group to a second link aggregation group, where the second link aggregation group is the first link aggregation group. A link aggregation group between a network element and the second network element; 在所述第二链路聚合组的工作带宽小于或者等于第二带宽阈值时,根据所述第一链路聚合组发生了轻量级故障的记录将所述第二链路聚合组倒换为所述第一链路聚合组。When the working bandwidth of the second link aggregation group is less than or equal to the second bandwidth threshold, the second link aggregation group is switched to the other link aggregation group according to the record of the light failure of the first link aggregation group the first link aggregation group. 12.根据权利要求11所述的网元,其特征在于,所述处理器还用于:12. The network element according to claim 11, wherein the processor is further configured to: 增加所述第二链路聚合组中链路以得到增加后的第二链路聚合组;adding links in the second link aggregation group to obtain the added second link aggregation group; 确定所述增加后的第二链路聚合组的工作带宽大于所述第一链路聚合组的工作带宽;determining that the increased working bandwidth of the second link aggregation group is greater than the working bandwidth of the first link aggregation group; 将所述第一链路聚合组倒换为所述增加后的第二链路聚合组。The first link aggregation group is switched to the added second link aggregation group. 13.根据权利要求11或12所述的网元,其特征在于,所述处理器还用于:13. The network element according to claim 11 or 12, wherein the processor is further configured to: 删除所述第一链路聚合组中的链路以得到删减后的第一链路聚合组;deleting the links in the first link aggregation group to obtain the deleted first link aggregation group; 确定所述删减后的第一链路聚合组的工作带宽小于所述第二链路聚合组的工作带宽;determining that the working bandwidth of the deleted first link aggregation group is smaller than the working bandwidth of the second link aggregation group; 将所述删减后的第一链路聚合组倒换到所述第二链路聚合组。Switching the deleted first link aggregation group to the second link aggregation group. 14.根据权利要求11至13任一权利要求所述的网元,其特征在于,所述第一链路聚合组中聚合链路的总数减去故障链路的个数小于或者等于最小激活链路的个数。The network element according to any one of claims 11 to 13, wherein the total number of aggregated links in the first link aggregation group minus the number of faulty links is less than or equal to the minimum active link number of roads. 15.根据权利要求11所述的网元,其特征在于,所述轻量级故障为导致工作带宽受损,但还能继续传输数据的故障。15 . The network element according to claim 11 , wherein the lightweight fault is a fault that causes damage to the working bandwidth but can continue to transmit data. 16 .
CN201711498941.2A 2017-12-29 2017-12-29 Method, device and system for automatic protection of link aggregation group Pending CN109995567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711498941.2A CN109995567A (en) 2017-12-29 2017-12-29 Method, device and system for automatic protection of link aggregation group

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711498941.2A CN109995567A (en) 2017-12-29 2017-12-29 Method, device and system for automatic protection of link aggregation group

Publications (1)

Publication Number Publication Date
CN109995567A true CN109995567A (en) 2019-07-09

Family

ID=67110952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711498941.2A Pending CN109995567A (en) 2017-12-29 2017-12-29 Method, device and system for automatic protection of link aggregation group

Country Status (1)

Country Link
CN (1) CN109995567A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822102A (en) * 2020-12-30 2021-05-18 瑞斯康达科技发展股份有限公司 Link switching method, device, equipment, system and storage medium
CN114827016A (en) * 2022-04-12 2022-07-29 珠海星云智联科技有限公司 Method, device, equipment and storage medium for switching link aggregation scheme

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
CN101399737A (en) * 2008-10-21 2009-04-01 中兴通讯股份有限公司 Protection method and apparatus used for link convergence group of loop Ethernet
CN103840972A (en) * 2014-02-20 2014-06-04 烽火通信科技股份有限公司 System and method for backup between link aggregation groups in packet switched network
US20160241464A1 (en) * 2013-10-28 2016-08-18 Alcatel Lucent Data transmission system providing improved failure resilience

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
CN101399737A (en) * 2008-10-21 2009-04-01 中兴通讯股份有限公司 Protection method and apparatus used for link convergence group of loop Ethernet
US20160241464A1 (en) * 2013-10-28 2016-08-18 Alcatel Lucent Data transmission system providing improved failure resilience
CN103840972A (en) * 2014-02-20 2014-06-04 烽火通信科技股份有限公司 System and method for backup between link aggregation groups in packet switched network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822102A (en) * 2020-12-30 2021-05-18 瑞斯康达科技发展股份有限公司 Link switching method, device, equipment, system and storage medium
CN114827016A (en) * 2022-04-12 2022-07-29 珠海星云智联科技有限公司 Method, device, equipment and storage medium for switching link aggregation scheme

Similar Documents

Publication Publication Date Title
CN105827419B (en) Method, equipment and controller for processing forwarding equipment fault
US20140258772A1 (en) Utilizing backward defect indications in y-cable protection switching
CN112822102B (en) Link switching method, device, equipment, system and storage medium
US20140219080A1 (en) Method and apparatus for interworking protection switching
CN113472646B (en) Data transmission method, node, network manager and system
US20160204976A1 (en) Identifying the absence and presence of a ring protection link owner node in an ethernet network
US10135715B2 (en) Buffer flush optimization in Ethernet ring protection networks
JP5849911B2 (en) Communication system and optical transmission apparatus
CN110890933B (en) Service protection method, device, system, equipment and medium
CN109995567A (en) Method, device and system for automatic protection of link aggregation group
US11552881B2 (en) Faulty multi-layer link restoration method and controller
WO2015180265A1 (en) Multi-link protection switching method and device
WO2024087636A1 (en) Remote-unit protection system
CN218603576U (en) Remote unit protection system
CN110971477B (en) Communication method, device, system and storage medium
US11800262B2 (en) Service path switching method and related device
Ra et al. Implementation of FPGA‐based MPLS‐TP linear protection switching for 4000+ tunnels in packet transport network for optical carrier Ethernet
WO2023197644A1 (en) Cross-segmented network fault detection method, and communication system and related apparatus
CN113037623B (en) Time delay processing method, equipment and system
WO2014131156A1 (en) Protection switching method, system and node
JP2013192022A (en) Network device, link aggregation system and redundancy method therefor
CN102064998B (en) Ethernet path protection switching method and system
EP3499801B1 (en) Preventing failure processing delay
CN102487327B (en) Service switch method and device
US10122612B2 (en) Method and apparatus for network diagnosis processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190709

RJ01 Rejection of invention patent application after publication