WO2013131431A1 - Method and apparatus for managing link aggregation group of network equipment - Google Patents

Method and apparatus for managing link aggregation group of network equipment Download PDF

Info

Publication number
WO2013131431A1
WO2013131431A1 PCT/CN2013/071781 CN2013071781W WO2013131431A1 WO 2013131431 A1 WO2013131431 A1 WO 2013131431A1 CN 2013071781 W CN2013071781 W CN 2013071781W WO 2013131431 A1 WO2013131431 A1 WO 2013131431A1
Authority
WO
WIPO (PCT)
Prior art keywords
lag
priority
primary
network device
state
Prior art date
Application number
PCT/CN2013/071781
Other languages
French (fr)
Chinese (zh)
Inventor
范汇华
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013131431A1 publication Critical patent/WO2013131431A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks

Definitions

  • the present invention relates to a link aggregation technology in Ethernet communication, and in particular, to a method and an apparatus for managing a Link Aggregation Group (LAG) of a network device.
  • LAG Link Aggregation Group
  • link aggregation technology is usually used to solve the bandwidth bottleneck problem in a network.
  • the so-called link aggregation is to bind two or more ports of the network device with the same attribute as a logical interface to increase.
  • a method of bandwidth By establishing a LAG between two network devices, the N ports in the network device are aggregated, so that the bandwidth between the network devices is increased by N times that of the original single port. Thus, the network device does not need hardware through link aggregation. Upgrades can increase the bandwidth of network devices.
  • each link in the LAG is a backup of each other. As long as there is an available link in the LAG, the interworking between the network devices at both ends can be ensured, thereby ensuring network reliability.
  • the network device service is lost, which affects the reliability of the network and affects the customer experience.
  • the industry proposes a cross-device link aggregation (MC-LAG, Multi Chassis-LAG), as shown in FIG. 1, including: User Edge (CE), network equipment, and main supplier edge ( PE, Provider Edged)
  • CE User Edge
  • PE Provider Edged
  • the CE network device establishes a primary LAG with the primary PE network device, and the CE network device and the standby PE network device establish a standby LAG.
  • the CE network device enables the backup LAG to connect to the standby PE network device.
  • the service is transmitted to the standby PE network device.
  • an object of the present invention is to provide a method and an apparatus for managing a network device LAG, which can analyze a situation of a LAG managed by a network device as a CE network device, and select an optimal LAG as a primary LAG. To ensure network performance.
  • the present invention provides a method for managing a network device LAG, the method comprising: determining, according to a priority policy, whether a priority of a current standby LAG is higher than a primary LAG, and if so, setting the standby LAG to a current primary LAG, The primary LAG is set to the current standby LAG; otherwise, it continues to determine whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy.
  • the method before determining, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, the method further includes: after the network device is turned on, establishing an active LAG, and establishing a standby LAG.
  • the establishing the primary LAG includes: determining whether the LAG of the received packet status is entered in the network device, and if yes, setting the LAG that has entered the received message state to an active state, and As the primary LAG; otherwise, continue to determine whether there is a LAG that has entered the status of the received message.
  • the establishing the standby LAG includes: determining whether a LAG in the network device except the activation state LAG enters the received message state, and if yes, the The LAG is used as the current standby LAG; otherwise, it continues to determine whether the LAG has entered the received message state in other LAGs other than the active state LAG in the network device.
  • the LAG that is currently in the state of the received packet is set to the active state, and the LAG is used as the primary LAG.
  • the method further includes: after the network device is enabled, adding each port to the corresponding LAG one by one;
  • the port in the network device After the port in the network device receives the link aggregation control protocol data unit LACPDU packet, the port is set to the state of the received packet, and is removed from the original LAG; the port is added to the corresponding port. LAG, and set the status of the LAG to the received message.
  • the priority policy includes:
  • the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
  • the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device.
  • the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
  • the present invention also provides an apparatus for managing a network device LAG, the apparatus comprising: a policy module and a link aggregation control protocol LACP processing module;
  • a priority policy module configured to determine, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, and if yes, notify the LACP processing module that the priority of the current standby LAG is higher than the primary LAG, otherwise, according to the priority
  • the policy determines whether the priority of the current standby LAG is higher than the primary LAG
  • the LACP processing module is configured to: when the priority of the current standby LAG sent by the priority policy module is higher than the notification of the primary LAG, set the standby LAG as the current primary LAG, and set the primary LAG to the current Alternate LAG.
  • the LACP processing module is further configured to establish a primary LAG and establish a standby LAG after the network device is enabled.
  • the LACP processing module is specifically configured to determine whether a LAG that has received the received packet status is present in the network device, and if yes, set the current LAG that has entered the received message state to an active state. And as the primary LAG; otherwise, continue to determine whether there is a LAG that has entered the status of the received message.
  • the LACP processing module is specifically configured to determine whether a LAG enters a received message state in another LAG of the network device except the active state LAG, and if yes, the LAG is used as the current standby LAG. Otherwise, continue to judge whether the LAG in the other LAGs other than the active state LAG in the network device enters the received state.
  • the LACP processing module is specifically configured to add each port to the corresponding LAG one by one after the network device is enabled; when the port in the network device receives the link aggregation control protocol data unit LACPDU packet Then, the port is set to the state of the received message and is removed from the original LAG; the port is added to the corresponding LAG, and the status of the LAG is set to the received message.
  • the priority policy module is further configured to execute a priority policy; the priority policy includes: Determine whether the primary/backup LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/backup LAG is higher than the priority of the non-full-duplex LAG;
  • the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
  • the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device.
  • the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
  • the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority.
  • the priority comparison between the primary and secondary LAGs established in the current network device is performed. Once the backup LAG has a higher priority than the primary LAG, the current standby LAG is the optimal LAG, and the current standby LAG is used as the primary LAG. In this way, the impact of manually selecting the primary/backup LAG can be avoided.
  • the network device is used as the CE network device, the LAG of the self-managed LAG is analyzed, and the optimal LAG is automatically selected as the primary LAG. Thereby ensuring network performance.
  • Figure 1 is a schematic diagram showing the structure of an MC-LAG
  • FIG. 2 is a schematic flowchart of a method for managing a network device LAG according to the present invention
  • FIG. 3 is a schematic structural diagram of a device for managing a network device LAG according to the present invention. detailed description
  • the basic idea of the present invention is: determining whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy, and if so, setting the standby LAG as the current primary LAG, and setting the primary LAG as the current standby LAG; Otherwise, it is determined whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy.
  • a method for managing a network device LAG includes the following steps:
  • Step 101 Determine, according to the priority policy, whether the priority of the current standby LAG is higher than the priority of the primary LAG. If yes, go to step 102; otherwise, set the primary standby LAG to end the processing flow.
  • the determining may be a periodic determination, and the period may be arbitrarily set according to requirements;
  • the priority policy includes:
  • the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
  • the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device.
  • the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
  • the number of the activated links is the total number of links included in the LAG; the system priority of the peer network device and the MAC address of the peer network device are all in accordance with the LACP requirements in the prior art.
  • the number of ports in the state of the received packet is the number of ports on which the recorded port is set to the status of the received packet.
  • Step 102 Set the standby LAG to activate the LAG and act as the current primary LAG; set the primary LAG to the inactive LAG and act as the current alternate LAG.
  • Step a After the network device is turned on, determine whether there is any LAG that has entered the received message status in real time, and if so, perform the steps. b; Otherwise, repeat step a.
  • the LAG that enters the received message state includes: when the network device is turned on, each port in the network device does not receive the network information, and each port is added to the corresponding LAG one by one; when the network device is in the network device After receiving the Link Aggregation Control Protocol Data Unit (LACPDU), any port is set to the status of the received packet and is removed from the original LAG. Add the corresponding LAG to the port of the LACPDU and set the status of the LAG to the received packet.
  • LACPDU Link Aggregation Control Protocol Data Unit
  • the adding the corresponding LAG includes: searching for a corresponding LAG according to the key value of the port and the system ID, and if yes, joining the LAG; otherwise, establishing a new LAG by using the key value of the port and the system ID as the LAG ID. ;
  • the method of adding the LAG and establishing a new LAG to the existing LACP protocol is not mentioned here; the method for generating and obtaining the Key value is the technology specified by the existing LACP, and is not described here;
  • the LACPDUs are received and sent by the network device according to the Link Aggregation Control Protocol (LACP).
  • LACP Link Aggregation Control Protocol
  • Step b Set the LAG that has entered the status of the received message to the active state and use it as the current primary LAG.
  • Step c Real-time judge whether any LAG in the network device except the activation state LAG enters the received message state, and if yes, the LAG is used as the current standby LAG, and step 101 is performed; otherwise, the execution is repeated. Step c.
  • the network device determines in real time whether any port managed by itself is in the state of the received packet, and the idle time of the packet is not received. If the timeout occurs, the state of the port is set to The status of the received packet is removed from the current LAG. The LAG with the same key value, the same system ID, and the status is added to the corresponding LAG, and then the process returns to step c.
  • the present invention also provides an apparatus for managing a network device LAG. As shown in FIG. 3, the present invention includes: a priority policy module 21 and an LACP processing module 22;
  • the priority policy module 21 is configured to determine, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, and if yes, notify the LACP processing module 22 that the priority of the current standby LAG is higher than the primary LAG, otherwise, according to the priority LAG
  • the priority policy determines whether the priority of the current standby LAG is higher than the primary LAG
  • the LACP processing module 22 is configured to: after receiving the notification that the priority of the current standby LAG sent by the priority policy module 21 is higher than that of the primary LAG, set the standby LAG as the current primary LAG, and set the primary LAG to The current alternate LAG.
  • the LACP processing module 22 is further configured to determine, in real time, whether there is any LAG that has entered the received message status, and if so, the current LAG that has entered the received message status. Set to activate LAG and act as the current primary LAG; otherwise, Continue to determine if there is any LAG that has entered the status of the received message.
  • the LACP processing module 22 is specifically configured to add each port to the corresponding LAG one by one after the network device is turned on. When any port receives the network information, the port is set to the status of the received packet. After the original LAG is removed, the port that receives the network information is added to the corresponding LAG, and the status of the LAG is set to the received message.
  • the LACP processing module 22 is specifically configured to search for a corresponding LAG according to the key value of the port and the system ID, and if yes, join the LAG; otherwise, establish a new LAG by using the key value of the port and the system ID as the LAG ID. .
  • the LACP processing module 22 is further configured to determine, in real time, whether any LAG in the LAG other than the activated LAG enters the received message state, and if yes, the LAG is used as the current standby LAG, and the priority policy module is notified. 21: Compare the priority of the standby LAG with the primary LAG. Otherwise, continue to determine whether any LAG in the LAG other than the activated LAG enters the received message state; correspondingly, the priority policy module 21 is further used. The notification sent by the LACP processing module 22 to compare the priorities of the standby LAG and the primary LAG is received.
  • the priority policy module 21 is further configured to execute a priority policy, where the priority policy includes:
  • the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
  • the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device.
  • the LAG of the peer network device with a smaller MAC address has a higher priority than the LAG of the peer network device with a larger MAC address;
  • the LACP processing module 22 is further configured to determine in real time whether any port that is in the state of the received packet has not received the idle time of the packet, and if the timeout occurs, the state of the port is set to be unreceived. Go to the status of the packet; remove the port from the current LAG, find the LAG with the same key value, the same system ID, and the status, add the corresponding LAG, and then determine the LAG in the network device except the active LAG. Whether any LAG appears in the message has entered the status of the received message.
  • the LACP processing module also has all the functions of processing LACP related packets specified in the network device in the prior art, and is not mentioned here.
  • the above device can be installed as a logic module in a network device such as an Ethernet switch.

Landscapes

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

Abstract

Disclosed is a method for managing the link aggregation group (LAG) of network equipment, the method comprising: determining whether the priority of the current standby LAG is higher than the priority of the main LAG according to the priority policy, if yes, setting the standby LAG as the current main LAG, and setting the main LAG as the current standby LAG; if not, continuing determining whether the priority of the current standby LAG is higher than the priority of the main LAG according to the priority policy. Further disclosed is an apparatus for managing the link aggregation group LAG of network equipment. The present invention enables network equipment, as customer equipment (CE), analyses the condition of the self-managed LAG, and selects the optimized LAG as the main LAG, thus ensuring the network performance.

Description

一种管理网络设备 聚合组的方法及装置 技术领域  Method and device for managing network device aggregation group
本发明涉及以太网通信中的链路聚合技术, 尤其涉及一种管理网络设 备链路聚合组(LAG, Link Aggregation Group ) 的方法及装置。 背景技术  The present invention relates to a link aggregation technology in Ethernet communication, and in particular, to a method and an apparatus for managing a Link Aggregation Group (LAG) of a network device. Background technique
目前, 在通信网络中, 通常使用链路聚合技术来解决网络中的带宽瓶 颈问题, 所谓链路聚合, 是将网络设备的两个或更多属性相同的端口绑定 在一起作为逻辑接口来增加带宽的一种方法。 通过在两台网络设备之间建 立 LAG将网络设备中的 N个端口聚合,使网络设备之间的带宽增加为原来 单个端口带宽的 N倍, 如此, 通过链路聚合使网络设备不需要进行硬件升 级即可提升网络设备的带宽。并且, LAG中的各条链路互为备份,只要 LAG 中存在一条可用链路, 就可以保证两端网络设备之间的互通, 从而保障了 网络的可靠性。 但是, 当上述 LAG中所有链路均出现故障、 或所述对端网 络设备出现故障时, 就会导致网络设备业务丟失, 影响网络的可靠性, 从 而影响客户体验。  Currently, in a communication network, link aggregation technology is usually used to solve the bandwidth bottleneck problem in a network. The so-called link aggregation is to bind two or more ports of the network device with the same attribute as a logical interface to increase. A method of bandwidth. By establishing a LAG between two network devices, the N ports in the network device are aggregated, so that the bandwidth between the network devices is increased by N times that of the original single port. Thus, the network device does not need hardware through link aggregation. Upgrades can increase the bandwidth of network devices. In addition, each link in the LAG is a backup of each other. As long as there is an available link in the LAG, the interworking between the network devices at both ends can be ensured, thereby ensuring network reliability. However, when all the links in the LAG fail, or the peer network device fails, the network device service is lost, which affects the reliability of the network and affects the customer experience.
为了解决上述问题, 业界提出一种跨设备链路聚合(MC-LAG, Multi Chassis- LAG ), 如图 1所示, 包括: 用户边缘(CE, Customer Edged ) 网 络设备、 主用供应商边缘(PE, Provider Edged ) 网络设备和备用 PE网络 设备; 其中, 所述 CE网络设备为用户端网络设备, 所述 PE网络设备为服 务提供方的网络设备。 CE网络设备同主用 PE网络设备建立主用 LAG, CE 网络设备和备用 PE网络设备建立备用 LAG; 当主用 PE网络设备或主用 LAG出现故障时, CE网络设备启用备用 LAG连接备用 PE网络设备, 将 业务传送给备用 PE网络设备。 但是, 这种方法需要操作人员根据网络实际 情况对主 /备 PE网络设备及主 /备 LAG进行设置, 无法由 CE网络设备自动 对主 /备用 PE网络设备对应的主 /备用 LAG的情况进行评估,选择当前最优 的 LAG作为主用 LAG,如此,就会产生由于需要人工干预而导致的时延以 及影响网络性能。 To solve the above problem, the industry proposes a cross-device link aggregation (MC-LAG, Multi Chassis-LAG), as shown in FIG. 1, including: User Edge (CE), network equipment, and main supplier edge ( PE, Provider Edged) The network device and the standby PE network device; wherein the CE network device is a client network device, and the PE network device is a network device of the service provider. The CE network device establishes a primary LAG with the primary PE network device, and the CE network device and the standby PE network device establish a standby LAG. When the primary PE network device or the primary LAG fails, the CE network device enables the backup LAG to connect to the standby PE network device. , the service is transmitted to the standby PE network device. However, this method requires the operator to actually follow the network. The situation is that the primary/standby PE network device and the primary/secondary LAG are set. The CE network device cannot automatically evaluate the primary/backup LAG corresponding to the primary/secondary PE network device, and select the current optimal LAG as the primary LAG. Thus, there is a delay due to the need for manual intervention and affecting network performance.
可见, 目前已有的网络设备作为 CE网络设备时, 无法自动的对自身管 理的 LAG的情况进行分析, 选择最优的主用 LAG, 从而影响网络性能。 发明内容  It can be seen that when the existing network device is used as the CE network device, the LAG of the self-managed ACL cannot be automatically analyzed, and the optimal primary LAG is selected, thereby affecting network performance. Summary of the invention
有鉴于此, 本发明的目的在于提供一种管理网络设备 LAG的方法及装 置, 能使网络设备作为 CE网络设备时, 对自身管理的 LAG的情况进行分 析, 选择最优的 LAG作为主用 LAG, 从而保证网络性能。  In view of the above, an object of the present invention is to provide a method and an apparatus for managing a network device LAG, which can analyze a situation of a LAG managed by a network device as a CE network device, and select an optimal LAG as a primary LAG. To ensure network performance.
为达到上述目的, 本发明的技术方案是这样实现的:  In order to achieve the above object, the technical solution of the present invention is achieved as follows:
本发明提供了一种管理网络设备 LAG的方法, 该方法包括: 根据优先级策略判断当前备用 LAG的优先级是否高于主用 LAG, 若 是, 则将备用 LAG设置为当前的主用 LAG, 将主用 LAG设置为当前的备 用 LAG; 否则, 继续根据优先级策略判断当前备用 LAG的优先级是否高 于主用 LAG。  The present invention provides a method for managing a network device LAG, the method comprising: determining, according to a priority policy, whether a priority of a current standby LAG is higher than a primary LAG, and if so, setting the standby LAG to a current primary LAG, The primary LAG is set to the current standby LAG; otherwise, it continues to determine whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy.
上述方案中, 所述根据优先级策略判断当前备用 LAG的优先级是否 高于主用 LAG之前, 该方法还包括: 网络设备开启后, 建立主用 LAG, 并建立备用 LAG。  In the foregoing solution, before determining, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, the method further includes: after the network device is turned on, establishing an active LAG, and establishing a standby LAG.
上述方案中, 所述建立主用 LAG, 包括: 判断网络设备中是否有进 入已收到报文状态的 LAG,若有,则将当前进入已收到报文状态的 LAG设 置为激活状态, 并作为主用 LAG; 否则, 继续判断是否有进入已收到报文 状态的 LAG。  In the above solution, the establishing the primary LAG includes: determining whether the LAG of the received packet status is entered in the network device, and if yes, setting the LAG that has entered the received message state to an active state, and As the primary LAG; otherwise, continue to determine whether there is a LAG that has entered the status of the received message.
上述方案中, 所述建立备用 LAG, 包括: 判断网络设备中除激活状态 LAG的其他 LAG中是否出现 LAG进入已收到报文状态, 若有, 则将所述 LAG作为当前的备用 LAG; 否则, 继续判断网络设备中除激活状态 LAG 的其他 LAG中是否出现 LAG进入已收到报文状态。 In the above solution, the establishing the standby LAG includes: determining whether a LAG in the network device except the activation state LAG enters the received message state, and if yes, the The LAG is used as the current standby LAG; otherwise, it continues to determine whether the LAG has entered the received message state in other LAGs other than the active state LAG in the network device.
上述方案中, 所述将当前进入已收到报文状态的 LAG设置为激活状 态, 并作为主用 LAG之前, 该方法还包括: 当网络设备开启后, 逐个将各 个端口加入到对应的 LAG;  In the above solution, the LAG that is currently in the state of the received packet is set to the active state, and the LAG is used as the primary LAG. The method further includes: after the network device is enabled, adding each port to the corresponding LAG one by one;
当所述网络设备中的端口收到链路聚合控制协议数据单元 LACPDU报 文后, 将所述端口设置为已收到报文的状态, 并从原 LAG中移出; 将所述 端口加入对应的 LAG , 并设置所述 LAG的状态为已收到报文。  After the port in the network device receives the link aggregation control protocol data unit LACPDU packet, the port is set to the state of the received packet, and is removed from the original LAG; the port is added to the corresponding port. LAG, and set the status of the LAG to the received message.
上述方案中, 所述优先级策略, 包括:  In the foregoing solution, the priority policy includes:
判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级;  Determine whether the primary/standby LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/standby LAG is higher than the priority of the non-full-duplex LAG;
否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级;  Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级;  Otherwise, the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。  Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets. If they are not equal, the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority.
本发明还提供了一种管理网络设备 LAG的装置, 该装置包括: 优先级 策略模块和链路聚合控制协议 LACP处理模块; 其中, The present invention also provides an apparatus for managing a network device LAG, the apparatus comprising: a policy module and a link aggregation control protocol LACP processing module;
优先级策略模块, 用于根据优先级策略判断当前备用 LAG的优先级 是否高于主用 LAG, 若是, 则通知 LACP处理模块当前备用 LAG的优先 级高于主用 LAG, 否则, 继续根据优先级策略判断当前备用 LAG的优先 级是否高于主用 LAG;  a priority policy module, configured to determine, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, and if yes, notify the LACP processing module that the priority of the current standby LAG is higher than the primary LAG, otherwise, according to the priority The policy determines whether the priority of the current standby LAG is higher than the primary LAG;
LACP处理模块, 用于当接收到优先级策略模块发来的当前备用 LAG 的优先级高于主用 LAG的通知后, 将备用 LAG设置为当前的主用 LAG, 将主用 LAG设置为当前的备用 LAG。  The LACP processing module is configured to: when the priority of the current standby LAG sent by the priority policy module is higher than the notification of the primary LAG, set the standby LAG as the current primary LAG, and set the primary LAG to the current Alternate LAG.
上述方案中, 所述 LACP处理模块, 还用于网络设备开启后, 建立 主用 LAG, 并建立备用 LAG。  In the above solution, the LACP processing module is further configured to establish a primary LAG and establish a standby LAG after the network device is enabled.
上述方案中,所述 LACP处理模块,具体用于判断所在网络设备中是 否有进入已收到报文状态的 LAG, 若有, 则将当前的进入已收到报文状态 的 LAG设置为激活状态, 并作为主用 LAG; 否则, 继续判断是否有进入 已收到报文状态的 LAG。  In the foregoing solution, the LACP processing module is specifically configured to determine whether a LAG that has received the received packet status is present in the network device, and if yes, set the current LAG that has entered the received message state to an active state. And as the primary LAG; otherwise, continue to determine whether there is a LAG that has entered the status of the received message.
上述方案中, 所述 LACP处理模块, 具体用于判断所在网络设备中除 激活状态 LAG的其他 LAG中是否出现 LAG进入已收到报文状态, 若有, 则将所述 LAG作为当前的备用 LAG; 否则,继续判断网络设备中除激活状 态 LAG的其他 LAG中是否出现 LAG进入已收到才艮文状态。  In the above solution, the LACP processing module is specifically configured to determine whether a LAG enters a received message state in another LAG of the network device except the active state LAG, and if yes, the LAG is used as the current standby LAG. Otherwise, continue to judge whether the LAG in the other LAGs other than the active state LAG in the network device enters the received state.
上述方案中,所述 LACP处理模块,具体用于当所在网络设备开启后, 逐个将各个端口加入到对应的 LAG; 当所述网络设备中的端口收到链路聚 合控制协议数据单元 LACPDU报文后, 将所述端口设置为已收到报文的状 态并从原 LAG中移出; 将所述端口加入对应的 LAG , 并设置所述 LAG的 状态为已收到报文。  In the above solution, the LACP processing module is specifically configured to add each port to the corresponding LAG one by one after the network device is enabled; when the port in the network device receives the link aggregation control protocol data unit LACPDU packet Then, the port is set to the state of the received message and is removed from the original LAG; the port is added to the corresponding LAG, and the status of the LAG is set to the received message.
上述方案中, 所述优先级策略模块, 还用于执行优先级策略; 所述优先级策略包括: 判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级; In the above solution, the priority policy module is further configured to execute a priority policy; the priority policy includes: Determine whether the primary/backup LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/backup LAG is higher than the priority of the non-full-duplex LAG;
否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级;  Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级;  Otherwise, the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。 略对当前网络设备中建立的主用及备用 LAG 进行优先级比较, 一旦备用 LAG优先级高于主用 LAG时, 则当前的备用 LAG为最优的 LAG, 将当前 的备用 LAG作为主用 LAG, 如此, 即可避免由于手动选择主 /备用 LAG而 产生的影响, 实现由网络设备作为 CE网络设备时, 对自身管理的 LAG的 情况进行分析,并自动选择最优的 LAG作为主用 LAG,从而保证网络性能。 附图说明  Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets. If they are not equal, the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority. The priority comparison between the primary and secondary LAGs established in the current network device is performed. Once the backup LAG has a higher priority than the primary LAG, the current standby LAG is the optimal LAG, and the current standby LAG is used as the primary LAG. In this way, the impact of manually selecting the primary/backup LAG can be avoided. When the network device is used as the CE network device, the LAG of the self-managed LAG is analyzed, and the optimal LAG is automatically selected as the primary LAG. Thereby ensuring network performance. DRAWINGS
图 1为 MC-LAG组成结构示意图;  Figure 1 is a schematic diagram showing the structure of an MC-LAG;
图 2为本发明管理网络设备 LAG的方法流程示意图;  2 is a schematic flowchart of a method for managing a network device LAG according to the present invention;
图 3为本发明管理网络设备 LAG的装置的组成结构示意图。 具体实施方式 FIG. 3 is a schematic structural diagram of a device for managing a network device LAG according to the present invention. detailed description
本发明的基本思想是: 根据优先级策略判断当前备用 LAG的优先级 是否高于主用 LAG, 若是, 则将备用 LAG设置为当前的主用 LAG, 将主 用 LAG设置为当前的备用 LAG; 否则, 继续根据优先级策略判断当前备 用 LAG的优先级是否高于主用 LAG。  The basic idea of the present invention is: determining whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy, and if so, setting the standby LAG as the current primary LAG, and setting the primary LAG as the current standby LAG; Otherwise, it is determined whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy.
下面结合附图及具体实施例对本发明再作进一步详细的说明。  The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
本发明提供的一种管理网络设备 LAG的方法, 如图 2所示, 包括以下 步骤:  A method for managing a network device LAG, as shown in FIG. 2, includes the following steps:
步骤 101 : 根据优先级策略判断当前备用 LAG的优先级是否高于主用 LAG的优先级, 若是, 则执行步骤 102; 否则, 设置主用备用 LAG, 结束 处理流程。  Step 101: Determine, according to the priority policy, whether the priority of the current standby LAG is higher than the priority of the primary LAG. If yes, go to step 102; otherwise, set the primary standby LAG to end the processing flow.
这里, 所述判断可以是周期性判断, 周期可以根据需要任意设定; 所述优先级策略包括:  Here, the determining may be a periodic determination, and the period may be arbitrarily set according to requirements; the priority policy includes:
判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级;  Determine whether the primary/standby LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/standby LAG is higher than the priority of the non-full-duplex LAG;
否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级;  Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级;  Otherwise, the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。 Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets, if not If the number of the LAGs in the primary/secondary LAG is higher than the number of the LAGs that have received the received packets, the priority of the LAGs that are in the state of the received packets is higher than the priority of the LAGs that are in the state of the received packets. ; Otherwise, the primary/secondary LAGs have the same priority.
其中, 所述激活链路数为 LAG中包含的总链路数量; 所述对端网络设 备的系统优先级以及所述对端网络设备的 MAC的大小,均为按照现有技术 中 LACP要求的对链路聚合中的网络设备设置的参数; 所述处于已收到报 文的状态的端口个数为记录的端口设置为已收到报文状态的端口数量。  The number of the activated links is the total number of links included in the LAG; the system priority of the peer network device and the MAC address of the peer network device are all in accordance with the LACP requirements in the prior art. The parameter set for the network device in the link aggregation. The number of ports in the state of the received packet is the number of ports on which the recorded port is set to the status of the received packet.
所述设置主备用 LAG为现有技术, 这里不做赞述。  The setting of the primary and backup LAGs is prior art, and is not mentioned here.
步骤 102: 将备用 LAG设置为激活 LAG, 并作为当前的主用 LAG; 将主用 LAG设置为非激活 LAG, 并作为当前的备用 LAG。  Step 102: Set the standby LAG to activate the LAG and act as the current primary LAG; set the primary LAG to the inactive LAG and act as the current alternate LAG.
上述步骤 101之前,还需要建立主用 LAG和备用 LAG,包括以下步骤: 步骤 a: 当网络设备开启后, 实时判断是否有任意一个进入已收到报文 状态的 LAG, 若有, 则执行步骤 b; 否则, 重复执行步骤 a。  Before the foregoing step 101, the primary LAG and the standby LAG need to be established, including the following steps: Step a: After the network device is turned on, determine whether there is any LAG that has entered the received message status in real time, and if so, perform the steps. b; Otherwise, repeat step a.
这里, 所述进入已收到报文状态的 LAG包括: 当网络设备开启后, 该 网络设备中的各个端口均未收到网络信息, 逐个将各个端口加入到对应的 LAG; 当该网络设备中的任意一个端口收到链路聚合控制协议数据单元 ( LACPDU, Link Aggregation Control Protocol Data Unit )才艮文后, 将该端 口设置为已收到报文的状态并从原 LAG中移出; 将该收到 LACPDU报文 的端口加入对应的 LAG , 并设置该 LAG的状态为已收到报文;  Here, the LAG that enters the received message state includes: when the network device is turned on, each port in the network device does not receive the network information, and each port is added to the corresponding LAG one by one; when the network device is in the network device After receiving the Link Aggregation Control Protocol Data Unit (LACPDU), any port is set to the status of the received packet and is removed from the original LAG. Add the corresponding LAG to the port of the LACPDU and set the status of the LAG to the received packet.
其中 , 所述加入对应的 LAG包括: 根据端口的 Key值和系统 ID查找 是否有对应的 LAG, 如果有, 则加入该 LAG; 否则, 以端口的 Key值和系 统 ID为 LAG ID建立新的 LAG;  The adding the corresponding LAG includes: searching for a corresponding LAG according to the key value of the port and the system ID, and if yes, joining the LAG; otherwise, establishing a new LAG by using the key value of the port and the system ID as the LAG ID. ;
所述加入 LAG以及建立新的 LAG为现有 LACP协议规定的技术, 这 里不做赞述; 所述 Key值的产生及获取方法均为现有 LACP规定的技术, 这里不做赘述; 所述 LACPDU 文为按照链路聚合控制协议( LACP, Link Aggregation Control Protocol )的规定网络设备会收到以及发送的报文, 其产生及接收方 式均为现有技术, 这里不做赞述。 The method of adding the LAG and establishing a new LAG to the existing LACP protocol is not mentioned here; the method for generating and obtaining the Key value is the technology specified by the existing LACP, and is not described here; The LACPDUs are received and sent by the network device according to the Link Aggregation Control Protocol (LACP). The methods for generating and receiving are all in the prior art, and are not mentioned here.
步骤 b: 将当前进入已收到报文状态的 LAG设置为激活状态, 并作为 当前的主用 LAG。  Step b: Set the LAG that has entered the status of the received message to the active state and use it as the current primary LAG.
步骤 c:实时判断网络设备中除激活状态 LAG的其他 LAG中是否出现 任意一个 LAG进入已收到报文状态, 若有, 则将该 LAG作为当前的备用 LAG, 执行步骤 101 ; 否则, 重复执行步骤 c。  Step c: Real-time judge whether any LAG in the network device except the activation state LAG enters the received message state, and if yes, the LAG is used as the current standby LAG, and step 101 is performed; otherwise, the execution is repeated. Step c.
另外, 步骤 c 完成后, 网络设备还会实时判断自身管理的任意一个处 于已收到报文的状态的端口是否未接收报文的空闲时间超时, 若超时, 则 将该端口的状态设置为未收到报文的状态; 将该端口从当前所在的 LAG中 移出, 查找和自身 Key值相同、 系统 ID相同及状态对应的 LAG, 加入对 应的 LAG, 然后返回步骤 c。  In addition, after the step c is completed, the network device also determines in real time whether any port managed by itself is in the state of the received packet, and the idle time of the packet is not received. If the timeout occurs, the state of the port is set to The status of the received packet is removed from the current LAG. The LAG with the same key value, the same system ID, and the status is added to the corresponding LAG, and then the process returns to step c.
本发明还提出一种管理网络设备 LAG的装置, 如图 3所示, 包括: 优先级策略模块 21和 LACP处理模块 22; 其中,  The present invention also provides an apparatus for managing a network device LAG. As shown in FIG. 3, the present invention includes: a priority policy module 21 and an LACP processing module 22;
优先级策略模块 21 ,用于根据优先级策略判断当前备用 LAG的优先 级是否高于主用 LAG, 若是, 则通知 LACP处理模块 22当前备用 LAG的 优先级高于主用 LAG, 否则, 继续根据优先级策略判断当前备用 LAG的 优先级是否高于主用 LAG;  The priority policy module 21 is configured to determine, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, and if yes, notify the LACP processing module 22 that the priority of the current standby LAG is higher than the primary LAG, otherwise, according to the priority LAG The priority policy determines whether the priority of the current standby LAG is higher than the primary LAG;
LACP处理模块 22, 用于当接收到优先级策略模块 21发来的当前备用 LAG的优先级高于主用 LAG 的通知后, 将备用 LAG设置为当前的主用 LAG, 将主用 LAG设置为当前的备用 LAG。  The LACP processing module 22 is configured to: after receiving the notification that the priority of the current standby LAG sent by the priority policy module 21 is higher than that of the primary LAG, set the standby LAG as the current primary LAG, and set the primary LAG to The current alternate LAG.
所述 LACP处理模块 22, 还用于当所在网络设备开启后, 实时判断自 身是否有任意一个进入已收到报文状态的 LAG, 若有, 则将当前的进入已 收到报文状态的 LAG设置为激活 LAG, 并作为当前的主用 LAG; 否则, 继续判断自身是否有任意一个进入已收到报文状态的 LAG。 The LACP processing module 22 is further configured to determine, in real time, whether there is any LAG that has entered the received message status, and if so, the current LAG that has entered the received message status. Set to activate LAG and act as the current primary LAG; otherwise, Continue to determine if there is any LAG that has entered the status of the received message.
所述 LACP处理模块 22, 具体用于当所在网络设备开启后, 逐个将各 个端口加入到对应的 LAG, 当任意一个端口收到网络信息后, 将该端口设 置为已收到报文的状态并从原 LAG中移出, 将该收到网络信息的端口加入 对应的 LAG , 并设置该 LAG的状态为已收到报文。  The LACP processing module 22 is specifically configured to add each port to the corresponding LAG one by one after the network device is turned on. When any port receives the network information, the port is set to the status of the received packet. After the original LAG is removed, the port that receives the network information is added to the corresponding LAG, and the status of the LAG is set to the received message.
所述 LACP处理模块 22 , 具体用于根据端口的 Key值和系统 ID查找 是否有对应的 LAG, 如果有, 则加入该 LAG; 否则, 以端口的 Key值和系 统 ID为 LAG ID建立新的 LAG。  The LACP processing module 22 is specifically configured to search for a corresponding LAG according to the key value of the port and the system ID, and if yes, join the LAG; otherwise, establish a new LAG by using the key value of the port and the system ID as the LAG ID. .
所述 LACP处理模块 22 , 还用于实时判断除激活 LAG外的 LAG中是 否出现任意一个 LAG进入已收到报文状态, 若有, 则将该 LAG作为当前 的备用 LAG, 通知优先级策略模块 21 比较该备用 LAG与主用 LAG的优 先级, 否则, 继续判断除激活 LAG外的 LAG中是否出现任意一个 LAG进 入已收到报文状态; 相应的, 所述优先级策略模块 21 , 还用于接收 LACP 处理模块 22发来的比较该备用 LAG与主用 LAG的优先级的通知。  The LACP processing module 22 is further configured to determine, in real time, whether any LAG in the LAG other than the activated LAG enters the received message state, and if yes, the LAG is used as the current standby LAG, and the priority policy module is notified. 21: Compare the priority of the standby LAG with the primary LAG. Otherwise, continue to determine whether any LAG in the LAG other than the activated LAG enters the received message state; correspondingly, the priority policy module 21 is further used. The notification sent by the LACP processing module 22 to compare the priorities of the standby LAG and the primary LAG is received.
所述优先级策略模块 21 , 还用于执行优先级策略, 所述优先级策略包 括:  The priority policy module 21 is further configured to execute a priority policy, where the priority policy includes:
判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级;  Determine whether the primary/standby LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/standby LAG is higher than the priority of the non-full-duplex LAG;
否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级;  Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级; Otherwise, compare the MAC addresses of the primary/secondary LAG peer network devices. If they are not equal, In the primary/backup LAG, the LAG of the peer network device with a smaller MAC address has a higher priority than the LAG of the peer network device with a larger MAC address;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。  Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets. If they are not equal, the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority.
所述 LACP处理模块 22, 还用于实时判断自身管理的任意一个处于已 收到报文的状态的端口是否未接收报文的空闲时间超时, 若超时, 则将该 端口的状态设置为未收到报文的状态;将该端口从当前所在的 LAG中移出, 查找和自身 Key值相同、系统 ID相同及状态对应的 LAG,加入对应的 LAG, 然后实时判断网络设备中除激活 LAG外的 LAG中是否出现任意一个 LAG 进入已收到报文状态。  The LACP processing module 22 is further configured to determine in real time whether any port that is in the state of the received packet has not received the idle time of the packet, and if the timeout occurs, the state of the port is set to be unreceived. Go to the status of the packet; remove the port from the current LAG, find the LAG with the same key value, the same system ID, and the status, add the corresponding LAG, and then determine the LAG in the network device except the active LAG. Whether any LAG appears in the message has entered the status of the received message.
所述 LACP处理模块,还具有现有技术中网络设备中规定的处理 LACP 相关报文的所有功能, 这里不做赞述。  The LACP processing module also has all the functions of processing LACP related packets specified in the network device in the prior art, and is not mentioned here.
上述装置可作为逻辑模块安装在以太网交换机等网络设备中。  The above device can be installed as a logic module in a network device such as an Ethernet switch.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的 保护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、 一种管理网络设备链路聚合组 LAG的方法, 其特征在于, 该方法 包括:  A method for managing a link aggregation group LAG of a network device, the method comprising:
根据优先级策略判断当前备用 LAG的优先级是否高于主用 LAG, 若 是, 则将备用 LAG设置为当前的主用 LAG, 将主用 LAG设置为当前的备 用 LAG; 否则, 继续根据优先级策略判断当前备用 LAG的优先级是否高 于主用 LAG。  Determine whether the priority of the current standby LAG is higher than the primary LAG according to the priority policy, and if so, set the standby LAG to the current primary LAG, and set the primary LAG to the current standby LAG; otherwise, continue according to the priority policy Determine whether the priority of the current standby LAG is higher than the primary LAG.
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据优先级策略 判断当前备用 LAG的优先级是否高于主用 LAG之前, 该方法还包括: 网 络设备开启后, 建立主用 LAG, 并建立备用 LAG。  The method according to claim 1, wherein the determining, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, the method further includes: after the network device is turned on, establishing the primary LAG , and create an alternate LAG.
3、 根据权利要求 2所述的方法, 其特征在于, 所述建立主用 LAG, 包括: 判断网络设备中是否有进入已收到报文状态的 LAG, 若有, 则将当 前进入已收到报文状态的 LAG设置为激活状态, 并作为主用 LAG; 否则, 继续判断是否有进入已收到报文状态的 LAG。  The method according to claim 2, wherein the establishing the primary LAG comprises: determining whether the network device has a LAG that has received the received message status, and if yes, the current entry has been received. The LAG of the message status is set to the active state and is used as the primary LAG; otherwise, it continues to determine whether there is a LAG that has entered the status of the received message.
4、 根据权利要求 2所述的方法, 其特征在于, 所述建立备用 LAG, 包括:判断网络设备中除激活状态 LAG的其他 LAG中是否出现 LAG进入 已收到报文状态, 若有, 则将所述 LAG作为当前的备用 LAG; 否则, 继续 判断网络设备中除激活状态 LAG的其他 LAG中是否出现 LAG进入已收到 报文状态。  The method of claim 2, wherein the establishing the standby LAG comprises: determining whether a LAG in the network device other than the active state LAG has entered the received message state, if any, The LAG is used as the current standby LAG; otherwise, it is determined whether the LAG in the other LAGs other than the active state LAG in the network device enters the received message state.
5、 根据权利要求 3所述的方法, 其特征在于, 所述将当前进入已收到 报文状态的 LAG设置为激活状态, 并作为主用 LAG之前, 该方法还包括: 当网络设备开启后, 逐个将各个端口加入到对应的 LAG;  The method according to claim 3, wherein, after the LAG that currently enters the received message state is set to an active state and is used as the primary LAG, the method further includes: when the network device is turned on , each port is added to the corresponding LAG one by one;
当所述网络设备中的端口收到链路聚合控制协议数据单元 LACPDU报 文后, 将所述端口设置为已收到报文的状态, 并从原 LAG中移出; 将所述 端口加入对应的 LAG , 并设置所述 LAG的状态为已收到报文。 After the port in the network device receives the link aggregation control protocol data unit LACPDU packet, the port is set to the state of the received packet, and is removed from the original LAG; the port is added to the corresponding port. LAG, and set the status of the LAG to the received message.
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述优先级 策略, 包括: The method according to any one of claims 1 to 5, wherein the priority policy comprises:
判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级;  Determine whether the primary/standby LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/standby LAG is higher than the priority of the non-full-duplex LAG;
否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级;  Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. Level
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级;  Otherwise, the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。  Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets. If they are not equal, the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority.
7、 一种管理网络设备 LAG的装置, 其特征在于, 该装置包括: 优先 级策略模块和链路聚合控制协议 LACP处理模块; 其中 ,  A device for managing a network device LAG, the device comprising: a priority policy module and a link aggregation control protocol LACP processing module;
优先级策略模块, 用于根据优先级策略判断当前备用 LAG的优先级 是否高于主用 LAG, 若是, 则通知 LACP处理模块当前备用 LAG的优先 级高于主用 LAG, 否则, 继续根据优先级策略判断当前备用 LAG的优先 级是否高于主用 LAG;  a priority policy module, configured to determine, according to the priority policy, whether the priority of the current standby LAG is higher than the primary LAG, and if yes, notify the LACP processing module that the priority of the current standby LAG is higher than the primary LAG, otherwise, according to the priority The policy determines whether the priority of the current standby LAG is higher than the primary LAG;
LACP处理模块, 用于当接收到优先级策略模块发来的当前备用 LAG 的优先级高于主用 LAG的通知后, 将备用 LAG设置为当前的主用 LAG, 将主用 LAG设置为当前的备用 LAG。 The LACP processing module is configured to: after receiving the notification that the priority of the current standby LAG sent by the priority policy module is higher than that of the primary LAG, setting the standby LAG as the current primary LAG, Set the primary LAG to the current alternate LAG.
8、 根据权利要求 7所述的装置, 其特征在于,  8. Apparatus according to claim 7 wherein:
所述 LACP处理模块, 还用于网络设备开启后, 建立主用 LAG, 并 建立备用 LAG。  The LACP processing module is further configured to establish a primary LAG and establish a standby LAG after the network device is turned on.
9、 根据权利要求 8所述的装置, 其特征在于,  9. Apparatus according to claim 8 wherein:
所述 LACP处理模块,具体用于判断所在网络设备中是否有进入已收 到报文状态的 LAG,若有,则将当前的进入已收到报文状态的 LAG设置为 激活状态, 并作为主用 LAG; 否则, 继续判断是否有进入已收到报文状态 的 LAG。  The LACP processing module is specifically configured to determine whether a LAG that has received the received packet status is present in the network device, and if yes, set the current LAG that has entered the received packet state to an active state, and Use LAG; otherwise, continue to determine if there is a LAG that has entered the status of the received message.
10、 根据权利要求 9所述的装置, 其特征在于,  10. Apparatus according to claim 9 wherein:
所述 LACP处理模块,具体用于判断所在网络设备中除激活状态 LAG 的其他 LAG中是否出现 LAG进入已收到报文状态, 若有, 则将所述 LAG 作为当前的备用 LAG; 否则,继续判断网络设备中除激活状态 LAG的其他 LAG中是否出现 LAG进入已收到才艮文状态。  The LACP processing module is specifically configured to determine whether a LAG enters a received message state in another LAG of the network device except the activation state LAG, and if yes, the LAG is used as the current standby LAG; otherwise, continue It is judged whether the LAG in the other LAG of the network device except the activation state LAG enters the received state.
11、 根据权利要求 10所述的装置, 其特征在于,  11. Apparatus according to claim 10 wherein:
所述 LACP处理模块, 具体用于当所在网络设备开启后, 逐个将各个 端口加入到对应的 LAG; 当所述网络设备中的端口收到链路聚合控制协议 数据单元 LACPDU报文后, 将所述端口设置为已收到报文的状态并从原 LAG中移出; 将所述端口加入对应的 LAG , 并设置所述 LAG的状态为已 收到报文。  The LACP processing module is specifically configured to: after the network device is enabled, add each port to the corresponding LAG one by one; after the port in the network device receives the link aggregation control protocol data unit LACPDU packet, The port is set to the state of the received message and is removed from the original LAG; the port is added to the corresponding LAG, and the status of the LAG is set to the received message.
12、 根据权利要求 7所述的装置, 其特征在于,  12. Apparatus according to claim 7 wherein:
所述优先级策略模块, 还用于执行优先级策略;  The priority policy module is further configured to execute a priority policy;
所述优先级策略包括:  The priority policy includes:
判断主 /备用 LAG是否均是全双工 LAG, 如果不是, 则主 /备用 LAG 中, 全双工 LAG的优先级高于非全双工 LAG的优先级; 否则, 判断主 /备用 LAG是否均满足最小激活链路数, 如果不是, 则主 /备用 LAG中, 满足最小激活链路数的 LAG的优先级高于不满足最小激活 链路数的 LAG的优先级; Determine whether the primary/backup LAG is a full-duplex LAG. If not, the priority of the full-duplex LAG in the primary/backup LAG is higher than the priority of the non-full-duplex LAG; Otherwise, it is determined whether the primary/backup LAGs satisfy the minimum number of active links. If not, in the primary/backup LAG, the priority of the LAG that satisfies the minimum activated link number is higher than the priority of the LAG that does not satisfy the minimum activated link number. level;
否则, 比较主 /备用 LAG对端网络设备的系统优先级, 如果不相等, 则 主 /备用 LAG中, 对端网络设备的系统优先级数低的 LAG的优先级高于对 端网络设备的系统优先级数高的 LAG的优先级;  Otherwise, the system priority of the primary/secondary LAG peer network device is compared. If they are not equal, the LAG of the peer network device with a lower system priority is higher than the system of the peer network device. The priority of the LAG with a high priority;
否则, 比较主 /备用 LAG对端网络设备的 MAC的大小, 如果不相等, 则主 /备用 LAG中, 对端网络设备的 MAC较小的 LAG的优先级高于对端 网络设备的 MAC较大的 LAG的优先级;  Otherwise, the MAC addresses of the primary/secondary LAG peer network devices are compared. If they are not equal, the LAG of the peer network device has a lower MAC address than the peer network device. Priority of the LAG;
否则, 比较主 /备用 LAG中处于已收到报文的状态的端口个数,如果不 相等, 则主 /备用 LAG中, 处于已收到报文的状态的端口个数较多的 LAG 的优先级, 高于处于已收到报文的状态的端口个数较少的 LAG的优先级; 否则, 主 /备用 LAG的优先级相等。  Otherwise, compare the number of ports in the primary/backup LAG that are in the state of received packets. If they are not equal, the LAG in the primary/backup LAG that has received more packets will have priority. Level, higher than the priority of the LAG with a small number of ports in the state of the received message; otherwise, the primary/secondary LAGs have the same priority.
PCT/CN2013/071781 2012-03-08 2013-02-22 Method and apparatus for managing link aggregation group of network equipment WO2013131431A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210059842.5A CN102594696B (en) 2012-03-08 2012-03-08 A kind of method and device managing network device link aggregation group
CN201210059842.5 2012-03-08

Publications (1)

Publication Number Publication Date
WO2013131431A1 true WO2013131431A1 (en) 2013-09-12

Family

ID=46482912

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/071781 WO2013131431A1 (en) 2012-03-08 2013-02-22 Method and apparatus for managing link aggregation group of network equipment

Country Status (2)

Country Link
CN (1) CN102594696B (en)
WO (1) WO2013131431A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594696B (en) * 2012-03-08 2016-09-07 中兴通讯股份有限公司 A kind of method and device managing network device link aggregation group
JP6278800B2 (en) * 2014-04-03 2018-02-14 APRESIA Systems株式会社 Relay system and switch device
JP6278818B2 (en) * 2014-04-28 2018-02-14 APRESIA Systems株式会社 Relay system and switch device
CN106603402B (en) * 2016-12-20 2019-10-18 北京华为数字技术有限公司 A kind of Broadband Remote Access Server sending down service method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7023797B2 (en) * 2000-12-30 2006-04-04 Intel Corporation Flexible aggregation of output links
CN1933442A (en) * 2005-09-15 2007-03-21 华为技术有限公司 Method and system for realizing virtual router redundant protocol master and standby equipment switching
CN101842779A (en) * 2007-12-03 2010-09-22 维里逊专利及许可公司 Bandwidth admission control on link aggregation groups
CN102594696A (en) * 2012-03-08 2012-07-18 中兴通讯股份有限公司 Method and device for managing link aggregation groups (LAGs) of network device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255740A (en) * 2010-05-21 2011-11-23 中兴通讯股份有限公司 Method and device for active-standby switch of service nodes
CN102271056A (en) * 2011-07-22 2011-12-07 中兴通讯股份有限公司 Active aggregator selection method and device
CN102316039B (en) * 2011-09-09 2017-12-05 中兴通讯股份有限公司 The method and system of condensate logic selection based on condensate priority policy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7023797B2 (en) * 2000-12-30 2006-04-04 Intel Corporation Flexible aggregation of output links
CN1933442A (en) * 2005-09-15 2007-03-21 华为技术有限公司 Method and system for realizing virtual router redundant protocol master and standby equipment switching
CN101842779A (en) * 2007-12-03 2010-09-22 维里逊专利及许可公司 Bandwidth admission control on link aggregation groups
CN102594696A (en) * 2012-03-08 2012-07-18 中兴通讯股份有限公司 Method and device for managing link aggregation groups (LAGs) of network device

Also Published As

Publication number Publication date
CN102594696B (en) 2016-09-07
CN102594696A (en) 2012-07-18

Similar Documents

Publication Publication Date Title
US9705735B2 (en) System and method using RSVP hello suppression for graceful restart capable neighbors
EP3332511B1 (en) Method and system for path monitoring in a software-defined networking (sdn) system
US20220123961A1 (en) Network-link method useful for a last-mile connectivity in an edge-gateway multipath system
US10148492B2 (en) Data center bridging network configuration and management
US10374900B2 (en) Updating a virtual network topology based on monitored application data
JP4840236B2 (en) Network system and node device
US9338066B2 (en) Tunnel keep-alive timeout mechanism based on quality of service (QoS) value of received keep-alive messages
WO2013115177A1 (en) Network system and topology management method
US10411742B2 (en) Link aggregation configuration for a node in a software-defined network
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
JP2014501978A (en) Multiple connections in file system sessions
US10516599B1 (en) Link priority for loop-protect
WO2014032435A1 (en) Method and device for processing location information about fault point
WO2015149353A1 (en) Oam packet processing method, network device and network system
WO2013131431A1 (en) Method and apparatus for managing link aggregation group of network equipment
WO2012100671A1 (en) Method for binding physical network ports, network card and communication system
Irawati et al. Link aggregation control protocol on software defined network
CN104426732A (en) High-speed transmission tunnel realization method and system
WO2014146541A1 (en) Cdn and network convergence system, scheduling module selection method and computer storage medium
US20110047446A1 (en) Network management apparatus for setting communication method of network apparatus
CN103220189A (en) Multi-active detection (MAD) backup method and equipment
EP2787699A1 (en) Data transmission method, device, and system
WO2015039456A1 (en) Control method and device for self-loopback of network data
US11159424B2 (en) Networking aggregation link provisioning system
US10778510B2 (en) Coordinated network configuration system

Legal Events

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

Ref document number: 13757493

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13757493

Country of ref document: EP

Kind code of ref document: A1