WO2012075748A1 - Method and device for enabling physical port to join or exit from trunk port - Google Patents

Method and device for enabling physical port to join or exit from trunk port Download PDF

Info

Publication number
WO2012075748A1
WO2012075748A1 PCT/CN2011/071609 CN2011071609W WO2012075748A1 WO 2012075748 A1 WO2012075748 A1 WO 2012075748A1 CN 2011071609 W CN2011071609 W CN 2011071609W WO 2012075748 A1 WO2012075748 A1 WO 2012075748A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
physical port
aggregation
physical
gvrp
Prior art date
Application number
PCT/CN2011/071609
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 WO2012075748A1 publication Critical patent/WO2012075748A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for a physical port to join or leave an aggregation port.
  • VLAN virtual local area network
  • GVRP GRP VLAN Registration Protocol
  • GVRP GRP VLAN Registration Protocol
  • GVRP protocol support for aggregation ports becomes more important.
  • An aggregation port is an entity that is uniquely identifiable by any grouping of one or several ports for aggregation reasons.
  • GVRP is an application protocol of the GARP protocol. It uses the GRP (GRP Information Declaration) resource in the GARP (Generic Attribute Registration Protocol).
  • GRP GRP Information Declaration
  • GARP Generic Attribute Registration Protocol
  • a primary object of the present invention is to provide a method and apparatus for a physical port to join/exit an aggregation port, so as to at least solve the problem that the GID resource of the device cannot be reasonably utilized.
  • a method for a physical port to join an aggregation port including: executing an instruction that a physical port joins an aggregation port; determining whether a physical virtual port is enabled with a general virtual The local area network registration protocol GVRP function; if yes, the physical port releases the GID resource and joins the aggregation port.
  • the physical port releases the GID resource and joins the aggregation port, including: the physical port is deactivated from the dynamic virtual office i or the network vlan, the GID resource is released, and the dynamic vlan of the aggregation port is added. And use the same GID resource as the aggregate port.
  • the method before determining whether the physical port is enabled with the GVRP function, the method further includes: determining whether the static vlan attribute of the physical port is consistent with the aggregation port; if yes, determining whether the physical port has the GVRP function enabled; if not, the physical port is added.
  • the aggregation port failed, and the attributes of the physical port and the aggregation port remain unchanged.
  • the physical port after the physical port releases the GID resource and joins the aggregation port, the physical port also exits the aggregation port.
  • a method for a physical port to exit an aggregation port including: executing an instruction that a physical port exits an aggregation port; and the physical port exits the aggregation port, and determines whether the GVRP function is enabled before the physical port joins the aggregation port. If yes, the physical port re-applies for the GID resource and enables the GVRP function of the physical port.
  • the physical port exits the aggregation port, including: the physical port deregisters its dynamic VLAN, releases the GID resource, and disables the GVRP function.
  • an apparatus for adding a physical port to an aggregation port includes: adding an instruction execution module, configured to execute an instruction to join a physical port to an aggregation port; and determining, by the first determination module, whether the physical port is enabled GVRP function; release module, set to release the GID resource of the physical port, and add the physical port to the aggregation port.
  • the release module is also used to cancel the dynamic VLAN of the physical port, release the GID resource of the physical port, and add the physical port to the dynamic VLAN where the aggregation port is located, so that the physical port is aggregated.
  • the port uses the same GID resource, and further includes: a second determining mode, configured to determine whether the static vlan attribute of the physical port is consistent with the aggregation port before the first determining module determines whether the physical port has the GVRP function enabled; if not, The physical port fails to be added to the aggregation port. The attributes of the physical port and the aggregation port remain unchanged.
  • an apparatus for a physical port to exit an aggregation port including: an exit instruction execution module, configured to execute an instruction that a physical port exits the aggregation port; an exit module, configured to exit the aggregation port as a physical port, and
  • the GVRP function is enabled on the physical port before the physical port is added to the aggregation port.
  • the application module is set to re-apply the GID resource of the physical port and enable the GVRP function on the physical port.
  • FIG. 1 is a flowchart of a physical port added to a GVRP-enabled aggregation port according to the first embodiment of the present invention
  • FIG. 2 is a physical port port in which the GVRP is not enabled according to the second embodiment of the present invention
  • FIG. 3 is a flow chart of the physical port exiting the GVRP aggregation port according to the third embodiment of the present invention
  • FIG. 1 is a flowchart of a physical port added to a GVRP-enabled aggregation port according to the first embodiment of the present invention
  • FIG. 2 is a physical port port in which the GVRP is not enabled according to the second embodiment of the present invention
  • FIG. 3 is a flow chart of the physical port exiting the GVRP aggregation port according to the third embodiment of the present invention
  • FIG. 1 is a flowchart of a physical port added to a GVRP-enabled aggregation port according to the first embodiment of the present invention
  • FIG. 2 is
  • FIG. 4 is a diagram showing the physical port exiting the GVRP according to the fourth embodiment of the present invention.
  • FIG. 5 is a block diagram of an apparatus module for a physical port to join an aggregation port according to an embodiment of the present invention; and
  • FIG. 6 is a block diagram of a device module for exiting an aggregation port of a physical port according to Embodiment 4 of the present invention.
  • Embodiment 1 This embodiment describes the process of adding a physical port to an aggregation port that enables GVRP. As shown in Figure 1, the following steps are included: Step S101: Perform an instruction to join a physical port to an aggregation port.
  • step S102 it is determined whether the static vlan attribute of the physical port is consistent with the aggregation port. If they are consistent, step 104 is performed. If not, step 4 is performed. If the physical port is added to the aggregation port, the physical port and the original attributes of the aggregation port remain unchanged. Step 4 gathers S 104, determines whether the physical port has the GVRP function enabled, and if it is enabled, performs the step.
  • Step S105 The physical port is deactivated from the dynamic VLAN, the GID resource is released, and the dynamic VLAN is added to the aggregation port.
  • Step S106 The physical port is added to the dynamic VLAN where the aggregation port is located.
  • Step S107 The physical port joins the aggregation port successfully, using the same In this embodiment, when the physical port joins the aggregation port, the GID resource is released, and the physical port and the aggregation port use the same GID resource, thereby solving the problem of rational use of the GID resource in the GVRP protocol, and further The effect of saving the CPU and the storage space is achieved.
  • Embodiment 2 This embodiment mainly describes the physical port force.
  • Step S201 executing an instruction that the physical port joins the aggregation port.
  • Step S202 Determine whether the static vlan attribute of the physical port is consistent with the aggregation port. If they are consistent, go to step 4 to process 204; if they are inconsistent, go to step 4 to collect S203.
  • Step S203 The physical port fails to join the aggregation port, and the original attributes of the physical port and the aggregation port remain unchanged.
  • Step S204 determining whether the GVRP function is enabled on the physical port.
  • Step S205 The physical port logs out the dynamic vlan, releases the GID resource, and disables the GVRP function.
  • Step S206 The physical port joins the aggregation port successfully, and neither the physical port nor the aggregation port has the GVRP function. In this embodiment, the physical port releases its own GID resource when it joins the aggregation port, which solves the problem of rational utilization of the GID resource in the GVRP protocol, thereby achieving the effect of saving CPU and storage space.
  • the third embodiment of the present invention mainly describes the process of the physical port exiting the GVRP-enabled aggregation port.
  • the physical port exiting the GVRP-enabled aggregation port includes the following steps: Step S301: Perform physical port exit to enable GVRP. The step of the aggregation port is performed. Step S302: The physical port is deactivated from the dynamic VLAN, the GID resource is released, and the GVRP function is disabled. Step S303: Determine whether the GVRP function is enabled before the physical port joins the aggregation port.
  • Step S40 If it is turned on, go to step S40; if it is not, go to step S30; Step S304, the physical port exits the aggregation port, re-apply GID resources, and enable GVRP function; Step S305, the physical port exits the aggregation port, does not have GVRP function .
  • Embodiment 4 This embodiment describes the process of the physical port exiting the GVRP-enabled aggregation port. As shown in Figure 4, the physical port exiting the GVRP-enabled aggregation port includes the following steps: Step S401: Perform physical port exit to enable GVRP.
  • FIG. 5 is a block diagram of a device module for adding a physical port to an aggregation port according to an embodiment of the present invention. As shown in FIG. 5, the device includes: an instruction execution module 10, a first determination module 20, and a release module 30.
  • the instruction execution module 10 is configured to execute an instruction to join the physical port to the aggregation port; the first determination module 20 is configured to determine whether the physical port has the GVRP function enabled; the release module 30 is configured to release the GID resource of the physical port, and Add the physical port to the aggregation port.
  • the release module 30 releases its own GID resource, thereby solving the problem of rational utilization of the GID resource in the GVRP protocol, thereby achieving the effect of saving CPU and storage space.
  • the release module is configured to log out the dynamic VLAN of the physical port, release the GID resource of the physical port, and add the physical port to the dynamic VLAN where the aggregation port resides. Use the same GID resource.
  • the above device may further include a second determining mode (not shown) configured to be in the first determining module
  • FIG. 6 is a block diagram of an apparatus module for exiting an aggregation port of a physical port according to Embodiment 4 of the present invention. As shown in FIG. 6, the apparatus includes: an exit instruction execution module 40, an exit module 50, and an application module 60.
  • the exit instruction execution module 40 is configured to execute the instruction that the physical port exits the aggregation port; the exit module 50 is configured to exit the aggregation port of the physical port, and determine whether the GVRP function is enabled before the physical port joins the aggregation port; To re-apply the GID resource of the physical port, and enable the GVRP function of the physical port.
  • an efficient and reliable GVRP protocol is implemented to support an aggregation port. When the device is enabled with the GVRP protocol, a physical port is added to the aggregation port, and Can save limited GID resources.
  • the physical port can enable or disable the GVRP protocol
  • the aggregation port can also enable or disable the GVRP protocol.
  • the method can be applied to various Ethernet environments, and is generally applicable to a large number of switch networking scenarios, and the execution efficiency is high and simple.
  • those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.

Abstract

A method and device for enabling a physical port to join or exit from a trunk port are provided in the present invention, wherein, the method for enabling a physical port to join a trunk port includes the following steps: executing a instruction for enabling a physical port to join a trunk port, and judging whether the physical port has started general virtual local area network registration protocol (GVRP) function; if yes, enabling the physical port to release generic attribute registration protocol information declaration (GID) resources and join the trunk port. With the invention, when joining the trunk port, the physical port releases its own GID resources, and therefore the problem of rational utilization of the GID resources in the GVRP protocol is solved, and the effect of saving CPU and storage space is achieved.

Description

物理端口加入或退出聚合端口的方法^置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种物理端口加入或退出聚合端 口的方法及装置。 背景技术 交换机中对 VLAN ( Virtual Local Area Network, 虚拟局域网)的支持是 一个很重要的功能, 当网络的规模比较大时, VLAN的管理比较复杂。 GVRP ( GARP VLAN Registration Protocol, GARP VLAN 注册协议) 就是为解决 VLAN属性的动态配置而定义的协议。 对网络中的少数交换机进行配置, 其 VLAN信息可以在网络中分发传播,使网络上的所有交换机都能在 VLAN配 置上互相一致, 实现自由通信。 由于网络中会存在聚合端口、 聚合链路, 因此 GVRP协议对聚合端口的 支持就变得比较重要。 聚合端口就是一个由因聚合原因, 一个或几个端口的 任意分组组成可唯一辨认的实体。 另外, GVRP是 GARP协议的一个应用协 议, 它会用到 GARP ( Generic Attribute Registration Protocol , 通用属性注册 协议) 十办议中的 GID ( GARP Information Declaration, GARP 信息声明) 资 源, 当一个端口开启 GVRP协议的时候, 会占用一个 GID , —般情况下, 一 台设备会在多个端口开启 GVRP协议,所以对 GID资源的合理利用也是一个 很关键的问题。 而在现有的物理端口加入聚合端口的技术方案中, 通常, 物理端口加入 聚合端口后并不释放其 GID资源, 因此, 设备的 GID资源不能得到合理利 用。 发明内容 本发明的主要目的在于提供一种物理端口加入 /退出聚合端口的方法和 装置, 以至少解决上述设备的 GID资源不能得到合理利用的问题。 才艮据本发明的一个方面, 提供了一种物理端口加入聚合端口的方法, 包 括: 执行物理端口加入聚合端口的指令; 判断物理端口是否开启了通用虚拟 局域网注册协议 GVRP功能; 如果是, 则物理端口释放 GID资源, 加入聚合 端口。 优选地, 在聚合端口开启了 GVRP功能的情况下, 物理端口释放 GID资 源, 加入聚合端口, 包括: 物理端口注销其动态虚拟局 i或网 vlan, 释放 GID 资源, 加入聚合端口所在的动态 vlan, 并与聚合端口使用同一 GID资源。 优选地, 判断物理端口是否开启了 GVRP功能之前, 还包括: 判断物理 端口的静态 vlan属性是否与聚合端口一致; 如果是, 则进一步判断物理端口 是否开启了 GVRP功能; 如果否, 则物理端口加入聚合端口失败, 物理端口 和聚合端口的属性均保持不变。 优选地, 物理端口释放 GID资源, 加入聚合端口之后, 还包括: 物理端 口退出聚合端口。 根据本发明的另一方面, 提供了一种物理端口退出聚合端口的方法, 包 括: 执行物理端口退出聚合端口的指令; 物理端口退出聚合端口, 并判断物 理端口加入聚合端口前是否开启了 GVRP功能; 如果是, 则物理端口重新申 请 GID资源, 并开启物理端口的 GVRP功能。 优选地, 在聚合端口开启了 GVRP功能的情况下, 物理端口退出聚合端 口, 包括: 物理端口注销其动态 vlan, 释放 GID资源, 并关闭 GVRP功能。 根据本发明的又一个方面, 提供了一种物理端口加入聚合端口的装置, 包括: 加入指令执行模块, 设置为执行物理端口加入聚合端口的指令; 第一 判断模块, 设置为判断物理端口是否开启了 GVRP功能; 释放模块, 设置为 释放物理端口的 GID资源, 并将物理端口加入聚合端口。 优选地, 在聚合端口开启了 GVRP功能的情况下, 释放模块还用于注销 物理端口的动态 vlan, 释放物理端口的 GID资源, 并将物理端口加入聚合端 口所在的动态 vlan, 使物理端口与聚合端口使用同一 GID资源 优选地, 还包括: 第二判断模, 设置为在第一判断模块判断物理端口是 否开启了 GVRP功能之前,判断物理端口的静态 vlan属性是否与聚合端口一 致; 如果否, 则物理端口加入聚合端口失败, 物理端口和聚合端口的属性均 保持不变。 根据本发明的再一个方面, 提供了一种物理端口退出聚合端口的装置, 包括: 退出指令执行模块, 设置为执行物理端口退出聚合端口的指令; 退出 模块, 设置为物理端口退出聚合端口, 并判断物理端口加入聚合端口前是否 开启了 GVRP功能; 申请模块, 设置为重新申请物理端口的 GID资源, 并开 启物理端口的 GVRP功能。 通过本发明, 物理端口在加入聚合端口时, 释放自身的 GID资源, 解决 了 GVRP协议中的 GID资源合理利用的问题, 进而达到了节省 CPU和存储 空间的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中: 图 1是才艮据本发明实施例一的物理端口加入开启 GVRP功能的聚合端口 的流程图; 图 2是才艮据本发明实施例二的物理端口力口入未开启 GVRP的聚合端口的 流程图; 图 3是才艮据本发明实施例三的物理端口退出开启 GVRP的聚合端口的流 程图; 图 4是才艮据本发明实施例四的物理端口退出未开启 GVRP的聚合端口的 流程图; 图 5是根据本发明实施例的物理端口加入聚合端口的装置模块框图; 以 及 图 6是 居本发明实施例四的物理端口退出聚合端口的装置模块框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 每个端口开启 GVRP功能都要占用一个 GID (通用信息声明)结构。 基 于对 CPU和内存的考虑, 实现 GVRP时, 限制了交换机上最大开启 GVRP 功能的端口数目。 协议开启后, 会一次性申请最大开启端口数个 GID内存, 每个端口开启后分配一个空闲的 GID结构。 这样就涉及到, 端口加入、 退出 聚合端口时,如何保证 GVRP功能正常运行,如何充分利用有限的 GID结构。 下面的实施例主要涉及到四种应用场景, 分别以四个实施例加以描述。 实施例一 本实施例主要描述了物理端口加入开启 GVRP功能的聚合端口的流程, 如图 1所示, 包含如下步 4聚: 步骤 S 101 , 执行物理端口加入聚合端口的指令。 步骤 S 102 , 判断物理端口的静态 vlan属性是否和聚合端口一致, 如果 一致, 则执行步 4聚 104; 如果不一致, 则执行步 4聚 103。 步 4聚 S 103 , 物理端口加入聚合端口失败, 物理端口、 聚合端口原来的属 性都维持不变。 步 4聚 S 104, 判断物理端口是否开启了 GVRP功能, 如果开启, 则执行步TECHNICAL FIELD The present invention relates to the field of communications, and in particular, to a method and an apparatus for a physical port to join or leave an aggregation port. BACKGROUND OF THE INVENTION Support for a virtual local area network (VLAN) in a switch is an important function. When the size of the network is relatively large, the management of the VLAN is complicated. GVRP (GRP VLAN Registration Protocol) is a protocol defined to address the dynamic configuration of VLAN attributes. Configure a few switches in the network, and the VLAN information can be distributed and propagated in the network. All the switches on the network can be consistent with each other in the VLAN configuration to implement free communication. As the aggregation port and aggregation link exist on the network, GVRP protocol support for aggregation ports becomes more important. An aggregation port is an entity that is uniquely identifiable by any grouping of one or several ports for aggregation reasons. In addition, GVRP is an application protocol of the GARP protocol. It uses the GRP (GRP Information Declaration) resource in the GARP (Generic Attribute Registration Protocol). When a port is enabled with the GVRP protocol. At the same time, it will occupy a GID. Under normal circumstances, a device will open the GVRP protocol on multiple ports, so the rational use of GID resources is also a key issue. In the technical solution of adding an existing physical port to an aggregation port, the physical port does not release its GID resources after it is added to the aggregation port. Therefore, the GID resource of the device cannot be properly utilized. SUMMARY OF THE INVENTION A primary object of the present invention is to provide a method and apparatus for a physical port to join/exit an aggregation port, so as to at least solve the problem that the GID resource of the device cannot be reasonably utilized. According to an aspect of the present invention, a method for a physical port to join an aggregation port is provided, including: executing an instruction that a physical port joins an aggregation port; determining whether a physical virtual port is enabled with a general virtual The local area network registration protocol GVRP function; if yes, the physical port releases the GID resource and joins the aggregation port. Preferably, when the GVRP function is enabled on the aggregation port, the physical port releases the GID resource and joins the aggregation port, including: the physical port is deactivated from the dynamic virtual office i or the network vlan, the GID resource is released, and the dynamic vlan of the aggregation port is added. And use the same GID resource as the aggregate port. Preferably, before determining whether the physical port is enabled with the GVRP function, the method further includes: determining whether the static vlan attribute of the physical port is consistent with the aggregation port; if yes, determining whether the physical port has the GVRP function enabled; if not, the physical port is added. The aggregation port failed, and the attributes of the physical port and the aggregation port remain unchanged. Preferably, after the physical port releases the GID resource and joins the aggregation port, the physical port also exits the aggregation port. According to another aspect of the present invention, a method for a physical port to exit an aggregation port is provided, including: executing an instruction that a physical port exits an aggregation port; and the physical port exits the aggregation port, and determines whether the GVRP function is enabled before the physical port joins the aggregation port. If yes, the physical port re-applies for the GID resource and enables the GVRP function of the physical port. Preferably, when the GVRP function is enabled on the aggregation port, the physical port exits the aggregation port, including: the physical port deregisters its dynamic VLAN, releases the GID resource, and disables the GVRP function. According to still another aspect of the present invention, an apparatus for adding a physical port to an aggregation port includes: adding an instruction execution module, configured to execute an instruction to join a physical port to an aggregation port; and determining, by the first determination module, whether the physical port is enabled GVRP function; release module, set to release the GID resource of the physical port, and add the physical port to the aggregation port. Preferably, in the case that the GVRP function is enabled on the aggregation port, the release module is also used to cancel the dynamic VLAN of the physical port, release the GID resource of the physical port, and add the physical port to the dynamic VLAN where the aggregation port is located, so that the physical port is aggregated. Preferably, the port uses the same GID resource, and further includes: a second determining mode, configured to determine whether the static vlan attribute of the physical port is consistent with the aggregation port before the first determining module determines whether the physical port has the GVRP function enabled; if not, The physical port fails to be added to the aggregation port. The attributes of the physical port and the aggregation port remain unchanged. According to still another aspect of the present invention, an apparatus for a physical port to exit an aggregation port is provided, including: an exit instruction execution module, configured to execute an instruction that a physical port exits the aggregation port; an exit module, configured to exit the aggregation port as a physical port, and The GVRP function is enabled on the physical port before the physical port is added to the aggregation port. The application module is set to re-apply the GID resource of the physical port and enable the GVRP function on the physical port. Through the invention, when the physical port joins the aggregation port, the GID resource is released, and the problem of rational utilization of the GID resource in the GVRP protocol is solved, thereby achieving the effect of saving CPU and storage space. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawings: FIG. 1 is a flowchart of a physical port added to a GVRP-enabled aggregation port according to the first embodiment of the present invention; FIG. 2 is a physical port port in which the GVRP is not enabled according to the second embodiment of the present invention; FIG. 3 is a flow chart of the physical port exiting the GVRP aggregation port according to the third embodiment of the present invention; FIG. 4 is a diagram showing the physical port exiting the GVRP according to the fourth embodiment of the present invention. FIG. 5 is a block diagram of an apparatus module for a physical port to join an aggregation port according to an embodiment of the present invention; and FIG. 6 is a block diagram of a device module for exiting an aggregation port of a physical port according to Embodiment 4 of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The GVRP function is enabled on each port to occupy a GID (Common Information Declaration) structure. Based on the CPU and memory considerations, when GVRP is implemented, the maximum number of ports on the switch that enable GVRP is limited. After the protocol is enabled, it will apply for a maximum of several GID memory ports, and each port will be assigned an idle GID structure. This involves how to ensure that the GVRP function works properly when the port joins and exits the aggregation port, and how to make full use of the limited GID structure. The following embodiments are mainly related to four application scenarios, which are described in four embodiments. Embodiment 1 This embodiment describes the process of adding a physical port to an aggregation port that enables GVRP. As shown in Figure 1, the following steps are included: Step S101: Perform an instruction to join a physical port to an aggregation port. In step S102, it is determined whether the static vlan attribute of the physical port is consistent with the aggregation port. If they are consistent, step 104 is performed. If not, step 4 is performed. If the physical port is added to the aggregation port, the physical port and the original attributes of the aggregation port remain unchanged. Step 4 gathers S 104, determines whether the physical port has the GVRP function enabled, and if it is enabled, performs the step.
Ml S 105; 如果未开启, 则执行步 4聚 106。 步骤 S 105 , 物理端口注销其动态 vlan, 释放 GID资源, 加入聚合端口 所在的动态 vlan„ 步骤 S 106 , 物理端口加入聚合端口所在的动态 vlan。 步骤 S 107 , 物理端口加入聚合端口成功, 使用同一个 GID资源。 在本实施例中, 物理端口在加入聚合端口时, 释放自身的 GID资源, 物 理端口和聚合端口使用同一个 GID资源, 从而解决了 GVRP协议中的 GID 资源合理利用的问题, 进而达到了节省 CPU和存储空间的效果。 实施例二 本实施例主要描述了物理端口力。入未开启 GVRP功能的聚合端口的流 程,如图 2所示,物理端口加入未开启 GVRP功能的聚合端口包含如下步骤: 步骤 S201 , 执行物理端口加入聚合端口的指令。 步骤 S202 , 判断物理端口的静态 vlan属性是否和聚合端口一致。 如果 一致, 转步 4聚 204处理; 如果不一致, 转步 4聚 S203处理。 步骤 S203 , 物理端口加入聚合端口失败, 物理端口、 聚合端口原来的属 性都维持不变。 步骤 S204, 判断物理端口是否开启了 GVRP功能。 如果开启, 转步骤 S205; 如果未开启, 转步 4聚 S206。 步骤 S205 , 物理端口注销动态 vlan, 释放 GID资源, 关闭 GVRP功能。 步骤 S206, 物理端口加入聚合端口成功, 物理端口和聚合端口都不具有 GVRP功能。 在本实施例中, 物理端口在加入聚合端口时, 释放自身的 GID资源, 解 决了 GVRP协议中的 GID资源合理利用的问题, 进而达到了节省 CPU和存 储空间的效果。 实施例三 本实施例主要描述了物理端口退出开启 GVRP功能的聚合端口的流程, 如图 3所示, 物理端口退出开启 GVRP功能的聚合端口包含如下步骤: 步骤 S301 , 执行物理端口退出开启 GVRP功能的聚合端口的指令; 步骤 S302, 物理端口注销动态 vlan, 释放 GID资源, 关闭 GVRP功能; 步骤 S303 , 判断物理端口加入聚合端口前是否开启了 GVRP功能。如果 开启, 转步 4聚 S304; 如果未开启, 转步 4聚 S305; 步骤 S304, 物理端口退出聚合端口, 重新申请 GID资源, 开启 GVRP 功能; 步骤 S305 , 物理端口退出聚合端口, 不具有 GVRP功能。 实施例四 本实施例主要描述了物理端口退出未开启 GVRP功能的聚合端口的流 程,如图 4所示,物理端口退出未开启 GVRP功能的聚合端口包含如下步 4聚: 步骤 S401 , 执行物理端口退出开启 GVRP功能的聚合端口的指令; 步骤 S402, 判断物理端口加入聚合端口前是否开启了 GVRP功能。如果 开启, 转步 4聚 S403; 如果未开启, 转步 4聚 S404; 步骤 S403 , 物理端口退出聚合端口, 重新申请 GID资源, 开启 GVRP 功能; 步 4聚 S404, 物理端口退出聚合端口, 不具有 GVRP功能。 图 5是根据本发明实施例的物理端口加入聚合端口的装置模块框图, 如 图 5所示, 该装置包括: 加入指令执行模块 10、 第一判断模块 20和释放模 块 30。 其中, 加入指令执行模块 10 , 设置为执行物理端口加入聚合端口的 指令; 第一判断模块 20 , 设置为判断物理端口是否开启了 GVRP功能; 释放 模块 30 , 设置为释放物理端口的 GID资源, 并将物理端口加入聚合端口。 在本实施例中, 物理端口在加入聚合端口时, 通过释放模块 30释放自 身的 GID资源, 解决了 GVRP协议中的 GID资源合理利用的问题, 进而达 到了节省 CPU和存储空间的效果。 其中, 在聚合端口开启了 GVRP功能的情况下, 释放模块还设置为注销 物理端口的动态 vlan, 释放物理端口的 GID资源, 并将物理端口加入聚合端 口所在的动态 vlan, 使物理端口与聚合端口使用同一 GID资源。 上述装置还可以包括第二判断模(图中未示出),设置为在第一判断模块Ml S 105; If not, perform step 4 to gather 106. Step S105: The physical port is deactivated from the dynamic VLAN, the GID resource is released, and the dynamic VLAN is added to the aggregation port. Step S106: The physical port is added to the dynamic VLAN where the aggregation port is located. Step S107: The physical port joins the aggregation port successfully, using the same In this embodiment, when the physical port joins the aggregation port, the GID resource is released, and the physical port and the aggregation port use the same GID resource, thereby solving the problem of rational use of the GID resource in the GVRP protocol, and further The effect of saving the CPU and the storage space is achieved. Embodiment 2 This embodiment mainly describes the physical port force. The process of entering the aggregation port of the GVRP function is not shown. As shown in Figure 2, the physical port is added to the aggregation port that does not enable GVRP. Contains the following steps: Step S201, executing an instruction that the physical port joins the aggregation port. Step S202: Determine whether the static vlan attribute of the physical port is consistent with the aggregation port. If they are consistent, go to step 4 to process 204; if they are inconsistent, go to step 4 to collect S203. Step S203: The physical port fails to join the aggregation port, and the original attributes of the physical port and the aggregation port remain unchanged. Step S204, determining whether the GVRP function is enabled on the physical port. If it is turned on, go to step S205; if it is not turned on, go to step S206. Step S205: The physical port logs out the dynamic vlan, releases the GID resource, and disables the GVRP function. Step S206: The physical port joins the aggregation port successfully, and neither the physical port nor the aggregation port has the GVRP function. In this embodiment, the physical port releases its own GID resource when it joins the aggregation port, which solves the problem of rational utilization of the GID resource in the GVRP protocol, thereby achieving the effect of saving CPU and storage space. The third embodiment of the present invention mainly describes the process of the physical port exiting the GVRP-enabled aggregation port. As shown in Figure 3, the physical port exiting the GVRP-enabled aggregation port includes the following steps: Step S301: Perform physical port exit to enable GVRP. The step of the aggregation port is performed. Step S302: The physical port is deactivated from the dynamic VLAN, the GID resource is released, and the GVRP function is disabled. Step S303: Determine whether the GVRP function is enabled before the physical port joins the aggregation port. If it is turned on, go to step S40; if it is not, go to step S30; Step S304, the physical port exits the aggregation port, re-apply GID resources, and enable GVRP function; Step S305, the physical port exits the aggregation port, does not have GVRP function . Embodiment 4 This embodiment describes the process of the physical port exiting the GVRP-enabled aggregation port. As shown in Figure 4, the physical port exiting the GVRP-enabled aggregation port includes the following steps: Step S401: Perform physical port exit to enable GVRP. The function of the aggregation port of the function; Step S402, determining whether the GVRP function is enabled before the physical port is added to the aggregation port. If it is enabled, go to S40; if it is not, go to S404; Step S403, the physical port exits the aggregation port, re-apply GID resources, and enable GVRP function; Step 4 gathers S404, the physical port exits the aggregation port, does not have GVRP function. FIG. 5 is a block diagram of a device module for adding a physical port to an aggregation port according to an embodiment of the present invention. As shown in FIG. 5, the device includes: an instruction execution module 10, a first determination module 20, and a release module 30. The instruction execution module 10 is configured to execute an instruction to join the physical port to the aggregation port; the first determination module 20 is configured to determine whether the physical port has the GVRP function enabled; the release module 30 is configured to release the GID resource of the physical port, and Add the physical port to the aggregation port. In this embodiment, when the physical port is added to the aggregation port, the release module 30 releases its own GID resource, thereby solving the problem of rational utilization of the GID resource in the GVRP protocol, thereby achieving the effect of saving CPU and storage space. If the GVRP function is enabled on the aggregation port, the release module is configured to log out the dynamic VLAN of the physical port, release the GID resource of the physical port, and add the physical port to the dynamic VLAN where the aggregation port resides. Use the same GID resource. The above device may further include a second determining mode (not shown) configured to be in the first determining module
20判断物理端口是否开启了 GVRP功能之前, 判断物理端口的静态 vlan属 性是否与聚合端口一致; 如果否, 则物理端口加入聚合端口失败, 物理端口 和聚合端口的属性均保持不变。 图 6是 居本发明实施例四的物理端口退出聚合端口的装置模块框图, 如图 6所示, 该装置包括: 退出指令执行模块 40、 退出模块 50和申请模块 60。其中, 退出指令执行模块 40 ,设置为执行物理端口退出聚合端口的指令; 退出模块 50 , 设置为物理端口退出聚合端口, 并判断物理端口加入聚合端口 前是否开启了 GVRP功能; 申请模块 60, 设置为重新申请物理端口的 GID 资源, 并开启物理端口的 GVRP功能。 在本发明的上述实施例中, 提出了一种效率高、 可靠性好的 GVRP协议 支持聚合端口的实现方法, 在设备开启 GVRP协议的情况下, 支持把一个物 理端口加入到聚合端口中, 并且能节省有限的 GID资源。 加入前, 这个物理 端口可以开启或者关闭 GVRP协议,聚合端口也可以开启或者关闭 GVRP协 议。 该方法可以应用于各种以太网环境下, 典型适用于大量交换机组网的情 况, 执行效率高且简单易行。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 并 且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤, 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作 成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件 结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的^"神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。 If the physical port is not enabled with the GVRP function, the physical port's static vlan attribute is the same as the aggregation port. If no, the physical port fails to be added to the aggregation port. The attributes of the physical port and the aggregation port remain unchanged. 6 is a block diagram of an apparatus module for exiting an aggregation port of a physical port according to Embodiment 4 of the present invention. As shown in FIG. 6, the apparatus includes: an exit instruction execution module 40, an exit module 50, and an application module 60. The exit instruction execution module 40 is configured to execute the instruction that the physical port exits the aggregation port; the exit module 50 is configured to exit the aggregation port of the physical port, and determine whether the GVRP function is enabled before the physical port joins the aggregation port; To re-apply the GID resource of the physical port, and enable the GVRP function of the physical port. In the foregoing embodiment of the present invention, an efficient and reliable GVRP protocol is implemented to support an aggregation port. When the device is enabled with the GVRP protocol, a physical port is added to the aggregation port, and Can save limited GID resources. Before the join, the physical port can enable or disable the GVRP protocol, and the aggregation port can also enable or disable the GVRP protocol. The method can be applied to various Ethernet environments, and is generally applicable to a large number of switch networking scenarios, and the execution efficiency is high and simple. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 一种物理端口加入聚合端口的方法, 包括: A method for a physical port to join an aggregation port, including:
执行物理端口加入聚合端口的指令;  Execute the instruction that the physical port joins the aggregation port;
判断所述物理端口是否开启了通用虚拟局域网注册协议 GVRP功 Determining whether the physical port has the universal virtual local area network registration protocol GVRP function enabled
. 如果是, 则所述物理端口释放通用信息声明 GID资源, 加入所述 聚合端口。 根据权利要求 1所述的方法, 其中, 在所述聚合端口开启了 GVRP功 能的情况下, 所述物理端口释放 GID资源, 加入所述聚合端口, 包括: 所述物理端口注销其动态虚拟局域网 vlan, 释放 GID资源, 加入 所述聚合端口所在的动态 vlan,并与所述聚合端口使用同一 GID资源。 根据权利要求 1或 2任一所述的方法, 其中, 判断所述物理端口是否 开启了 GVRP功能之前, 还包括: If yes, the physical port releases the generic information declaration GID resource and joins the aggregation port. The method of claim 1, wherein, when the GVRP function is enabled on the aggregation port, the physical port releasing the GID resource and joining the aggregation port includes: the physical port deregistering its dynamic virtual local area network vlan The GID resource is released, and the dynamic VLAN of the aggregation port is added, and the same GID resource is used with the aggregation port. The method according to any one of claims 1 to 2, wherein before determining whether the physical port has the GVRP function enabled, the method further includes:
判断所述物理端口的静态 vlan属性是否与所述聚合端口一致; 如果是, 则进一步判断所述物理端口是否开启了 GVRP功能; 如 果否, 则所述物理端口加入所述聚合端口失败, 所述物理端口和所述 聚合端口的属性均保持不变。 根据权利要求 1或 2任一项所述的方法,其中,所述物理端口释放 GID 资源, 加入所述聚合端口之后, 还包括:  Determining whether the static vlan attribute of the physical port is consistent with the aggregation port; if yes, determining whether the physical port is enabled with the GVRP function; if not, the physical port joining the aggregation port fails, The attributes of the physical port and the aggregated port remain unchanged. The method according to any one of claims 1 to 2, wherein the physical port releases the GID resource, and after joining the aggregation port, the method further includes:
所述物理端口退出所述聚合端口。 一种物理端口退出聚合端口的方法, 包括:  The physical port exits the aggregation port. A method for a physical port to exit an aggregation port includes:
执行物理端口退出聚合端口的指令;  Execute the instruction that the physical port exits the aggregation port;
所述物理端口退出所述聚合端口, 并判断所述物理端口加入所述 聚合端口前是否开启了通用虚拟局域网注册协议 GVRP功能;  The physical port exits the aggregation port, and determines whether the universal virtual local area network registration protocol GVRP function is enabled before the physical port joins the aggregation port;
如果是, 则所述物理端口重新申请通用信息声明 GID资源, 并开 启所述物理端口的 GVRP功能。 If yes, the physical port re-applies the general information to declare the GID resource, and enables the GVRP function of the physical port.
6. 根据权利要求 5所述的方法, 其中, 在所述聚合端口开启了 GVRP功 能的情况下, 所述物理端口退出所述聚合端口, 包括: The method of claim 5, wherein, when the GVRP function is enabled on the aggregation port, the physical port exiting the aggregation port, including:
所述物理端口注销其动态 vlan, 释放 GID资源, 并关闭 GVRP功  The physical port logs out its dynamic vlan, releases the GID resource, and turns off the GVRP function.
7. —种物理端口加入聚合端口的装置, 包括: 7. A device for adding a physical port to an aggregation port, including:
加入指令执行模块, 设置为执行物理端口加入聚合端口的指令; 第一判断模块, 设置为判断所述物理端口是否开启了通用虚拟局 域网注册协议 GVRP功能;  The instruction execution module is configured to execute the instruction that the physical port joins the aggregation port; the first determining module is configured to determine whether the physical port is enabled with the universal virtual local area network registration protocol GVRP function;
释放模块, 设置为释放所述物理端口的通用信息声明 GID资源, 并将所述物理端口加入所述聚合端口。  And releasing a module, configured to release a general information declaration GID resource of the physical port, and join the physical port to the aggregation port.
8. 根据权利要求 7所述的装置, 其中, 在所述聚合端口开启了 GVRP功 能的情况下, 所述释放模块还设置为注销所述物理端口的动态 vlan, 释放所述物理端口的 GID资源, 并将所述物理端口加入所述聚合端口 所在的动态 vlan,使所述物理端口与所述聚合端口使用同一 GID资源。 8. The device according to claim 7, wherein, in a case that the GVRP function is enabled on the aggregation port, the release module is further configured to log out a dynamic VLAN of the physical port, and release a GID resource of the physical port. And adding the physical port to the dynamic VLAN where the aggregation port is located, so that the physical port and the aggregation port use the same GID resource.
9. 根据权利要求 7所述的装置, 其中, 还包括: 9. The device according to claim 7, further comprising:
第二判断模, 设置为在所述第一判断模块判断所述物理端口是否 开启了 GVRP功能之前, 判断所述物理端口的静态 vlan属性是否与所 述聚合端口一致;  And determining, by the first determining module, whether the static vlan attribute of the physical port is consistent with the aggregation port, before the first determining module determines whether the physical port has the GVRP function enabled;
如果否, 则所述物理端口加入所述聚合端口失败, 所述物理端口 和所述聚合端口的属性均保持不变。  If no, the physical port fails to join the aggregation port, and the attributes of the physical port and the aggregation port remain unchanged.
10. —种物理端口退出聚合端口的装置, 包括: 10. A device for a physical port to exit an aggregation port, comprising:
退出指令执行模块, 设置为执行物理端口退出聚合端口的指令; 退出模块, 设置为所述物理端口退出所述聚合端口, 并判断所述 物理端口加入所述聚合端口前是否开启了通用虚拟局域网注册协议 GVRP功能;  Exiting the instruction execution module, configured to execute the instruction that the physical port exits the aggregation port; and exiting the module, setting the physical port to exit the aggregation port, and determining whether the universal virtual local area network registration is enabled before the physical port joins the aggregation port Protocol GVRP function;
申请模块, 设置为重新申请所述物理端口的通用信息声明 GID资 源, 并开启所述物理端口的 GVRP功能。  The application module is configured to re-apply the general information of the physical port to declare the GID resource, and enable the GVRP function of the physical port.
PCT/CN2011/071609 2010-12-09 2011-03-08 Method and device for enabling physical port to join or exit from trunk port WO2012075748A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010580765.9 2010-12-09
CN201010580765.9A CN102098213B (en) 2010-12-09 2010-12-09 Physical port adds or exits method and the device of aggregation port

Publications (1)

Publication Number Publication Date
WO2012075748A1 true WO2012075748A1 (en) 2012-06-14

Family

ID=44131085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/071609 WO2012075748A1 (en) 2010-12-09 2011-03-08 Method and device for enabling physical port to join or exit from trunk port

Country Status (2)

Country Link
CN (1) CN102098213B (en)
WO (1) WO2012075748A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6515969B1 (en) * 1999-03-01 2003-02-04 Cisco Technology, Inc. Virtual local area network membership registration protocol for multiple spanning tree network environments
CN1823507A (en) * 2003-09-25 2006-08-23 思科技术公司 System and method for registering and unregistering membership in virtual local area networks
CN101018228A (en) * 2006-12-22 2007-08-15 华为技术有限公司 A port convergence method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6515969B1 (en) * 1999-03-01 2003-02-04 Cisco Technology, Inc. Virtual local area network membership registration protocol for multiple spanning tree network environments
CN1823507A (en) * 2003-09-25 2006-08-23 思科技术公司 System and method for registering and unregistering membership in virtual local area networks
CN101018228A (en) * 2006-12-22 2007-08-15 华为技术有限公司 A port convergence method and device

Also Published As

Publication number Publication date
CN102098213B (en) 2015-09-16
CN102098213A (en) 2011-06-15

Similar Documents

Publication Publication Date Title
US9270619B2 (en) Logical switch
TWI538445B (en) Distributed switch domain of heterogeneous components
US8665747B2 (en) Preventing loops on network topologies built with virtual switches and VMS
ES2567726T3 (en) Network policy configuration method, management device and network management center device
EP3176979A1 (en) Information processing method and device
WO2015117385A1 (en) Network virtualization processing method, device and system
US10326613B2 (en) Method and system for processing spanning tree protocol (STP) state in a multichassis link aggregation (MLAG) domain
ES2558109T3 (en) Device control method, network device, and network system
JP2007158870A (en) Virtual computer system and network communication method thereof
WO2014026524A1 (en) Resource allocation method and device
JP2015517765A5 (en)
WO2012122911A1 (en) Multicast data forwarding method and device supporting virtual terminal
WO2013154529A1 (en) Associating an identifier for a virtual machine with a published network configuration service type
WO2017000832A1 (en) Mac address synchronization method, device and system
WO2019006808A1 (en) Method and device for processing persistent connection establishment request
CN113923092A (en) Processing method and controller for appointed forwarder and provider edge device
US10841160B2 (en) System and method for processing messages during a reboot of a network device
WO2014094287A1 (en) Configuration method of virtual machine control policy and exchange
WO2015113435A1 (en) Data packet processing method and apparatus based on parallel protocol stack instances
WO2015055102A1 (en) Method and device for invoking network function
WO2018153355A1 (en) Control information transmission method, server, and system
US20130242757A1 (en) Interconnecting segmented layer two network for cloud switching
WO2014071811A1 (en) Construction method, node and system of trill network
WO2021103657A1 (en) Network operation method, apparatus, and device and storage medium
JP2013214809A (en) Information processing device, arithmetic device, and method for controlling information processing device

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

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

Country of ref document: EP

Kind code of ref document: A1