[go: up one dir, main page]

CN106330781B - Method, device and switch for separating protocol control and forwarding link of stacking system - Google Patents

Method, device and switch for separating protocol control and forwarding link of stacking system Download PDF

Info

Publication number
CN106330781B
CN106330781B CN201510362338.6A CN201510362338A CN106330781B CN 106330781 B CN106330781 B CN 106330781B CN 201510362338 A CN201510362338 A CN 201510362338A CN 106330781 B CN106330781 B CN 106330781B
Authority
CN
China
Prior art keywords
protocol control
stacking
port
neighbor
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510362338.6A
Other languages
Chinese (zh)
Other versions
CN106330781A (en
Inventor
孙长斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510362338.6A priority Critical patent/CN106330781B/en
Priority to PCT/CN2016/085884 priority patent/WO2016206555A1/en
Publication of CN106330781A publication Critical patent/CN106330781A/en
Application granted granted Critical
Publication of CN106330781B publication Critical patent/CN106330781B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

本发明提供一种堆叠系统协议控制和转发链路分离的方法、装置及交换机,涉及通信技术领域。本发明的方法包括:通过已配置的堆叠端口发送堆叠邻居发现消息;根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数;根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路。本发明的实施例解决了现有堆叠系统数据转发链路和协议控制链路使用同一条物理链路,出现链路间的相互干扰的问题。

Figure 201510362338

The present invention provides a method, a device and a switch for separating protocol control and forwarding links of a stacking system, and relates to the technical field of communications. The method of the present invention includes: sending a stack neighbor discovery message through a configured stack port; determining a protocol control link and a data forwarding link of the switch corresponding to the stack neighbor according to the received stack neighbor response message of the stack neighbor discovery message The logarithm of the path; the protocol control link and the data forwarding link are separated according to the logarithm of the protocol control link and the data forwarding link corresponding to the stack neighbor of the switch and the preset rule. The embodiment of the present invention solves the problem of mutual interference between the links due to the use of the same physical link for the data forwarding link and the protocol control link of the existing stacking system.

Figure 201510362338

Description

堆叠系统协议控制和转发链路分离的方法、装置及交换机Stacking system protocol control and forwarding link separation method, device and switch

技术领域technical field

本发明涉及通信技术领域,特别是指一种堆叠系统协议控制和转发链路分离的方法、装置及交换机。The present invention relates to the technical field of communications, and in particular, to a method, a device and a switch for separating stacking system protocol control and forwarding links.

背景技术Background technique

随着政企网的蓬勃发展,交换机被广泛的应用,市场上需要交换机能够像积木一样组合,以满足不同的网络规模,建立了堆叠系统。With the vigorous development of government and enterprise networks, switches are widely used, and switches are required in the market to be combined like building blocks to meet different network scales and establish a stacking system.

然而目前堆叠系统的建立,数据转发链路和协议控制链路往往使用同一条物理链路,在实际使用过程中,业务报文和协议报文就不可避免相互影响,从而产生业务丢包或堆叠系统不稳定等问题。However, in the establishment of the current stack system, the data forwarding link and the protocol control link often use the same physical link. In the actual use process, service packets and protocol packets inevitably affect each other, resulting in service packet loss or stacking. system instability, etc.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种堆叠系统协议控制和转发链路分离的方法、装置及交换机,通过自动将堆叠系统的协议控制链路和数据转发链路分开,实现二者去耦合,避免链路间的相互干扰。The purpose of the present invention is to provide a method, device and switch for separating the protocol control and forwarding links of a stacking system. mutual interference.

为达到上述目的,本发明的实施例提供一种堆叠系统协议控制和转发链路分离的方法,应用于一交换机,所述交换机已开启堆叠模式,包括:In order to achieve the above object, an embodiment of the present invention provides a method for separating protocol control and forwarding links of a stacking system, which is applied to a switch that has enabled the stacking mode, including:

通过已配置的堆叠端口发送堆叠邻居发现消息;Send stack neighbor discovery messages through the configured stack port;

根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数;According to the received stack neighbor response message of the stack neighbor discovery message, determine the logarithm of the protocol control link and the data forwarding link of the switch corresponding to the stack neighbor;

根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路。The protocol control link and the data forwarding link are separated according to the logarithm of the protocol control link and the data forwarding link corresponding to the stack neighbor of the switch and a preset rule.

其中,所述根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,具体包括:Wherein, according to the received stack neighbor response message of the stack neighbor discovery message, determining the logarithm of the protocol control link and data forwarding link of the switch corresponding to the stack neighbor specifically includes:

获取接收到的所述堆叠邻居发现消息的堆叠邻居响应消息中的硬件地址MAC;Acquire the hardware address MAC in the stack neighbor response message of the received stack neighbor discovery message;

根据所述MAC,确定与所述交换机建立堆叠的堆叠邻居的数目;According to the MAC, determine the number of stack neighbors that establish a stack with the switch;

根据所述堆叠邻居的数目,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。According to the number of the stack neighbors, the number of pairs of protocol control links and data forwarding links of the switch corresponding to the stack neighbors is determined.

其中,所述根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,具体包括:Wherein, separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule specifically includes:

根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,获取每个堆叠邻居的端口信息;其中,所述端口信息包括端口的数目、带宽、ID和业务量;Obtain the port information of each stacking neighbor according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch; wherein, the port information includes the number of ports, bandwidth, ID and traffic;

在所述堆叠邻居的端口数目大于一预设值时,根据预先设定的规则,选择所述堆叠邻居的端口中的预设数量的端口作为协议控制端口;When the number of ports of the stacking neighbor is greater than a preset value, according to a preset rule, select a preset number of ports in the ports of the stacking neighbor as protocol control ports;

选择所述堆叠邻居的剩余端口作为数据转发端口;Selecting the remaining ports of the stack neighbors as data forwarding ports;

根据选择的协议控制端口和数据转发端口分离协议控制链路和数据转发链路。The protocol control link and the data forwarding link are separated according to the selected protocol control port and data forwarding port.

其中,所述根据预先设定的规则,选择所述堆叠邻居的端口中的一个端口作为协议控制端口,具体包括:Wherein, according to a preset rule, selecting one of the ports of the stack neighbors as the protocol control port specifically includes:

根据所述端口信息中的带宽,选择所述堆叠邻居中带宽最小的端口为协议控制端口,若端口的带宽相同,则选择ID最小的端口为协议控制端口;或者According to the bandwidth in the port information, the port with the smallest bandwidth among the stack neighbors is selected as the protocol control port, and if the bandwidths of the ports are the same, the port with the smallest ID is selected as the protocol control port; or

根据所述端口信息中的业务量,选择所述堆叠邻居中业务量最多的端口为协议控制端口,若端口的业务量相同,则选择ID最小的端口为协议控制端口;或者According to the traffic volume in the port information, select the port with the largest traffic volume among the stack neighbors as the protocol control port, and if the traffic volume of the ports is the same, select the port with the smallest ID as the protocol control port; or

根据所述端口信息中的ID,选择所述堆叠邻居中ID最小的端口为协议控制端口。According to the ID in the port information, the port with the smallest ID in the stack neighbor is selected as the protocol control port.

其中,所述根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,具体还包括:Wherein, separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule further includes:

获取所述堆叠邻居的端口选定信息,其中,由所述端口选定信息可知所述堆叠邻居选定的所述交换机的协议控制端口;Obtaining the port selection information of the stacking neighbor, wherein the port selection information can know the protocol control port of the switch selected by the stacking neighbor;

在所述交换机选定的协议控制端口与所述堆叠邻居选定的协议控制端口不是对应端口时,根据所述交换机和所述堆叠邻居的MAC大小确定协议控制链路的端口。When the protocol control port selected by the switch and the protocol control port selected by the stack neighbor are not corresponding ports, the port of the protocol control link is determined according to the MAC sizes of the switch and the stack neighbor.

其中,所述根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,具体还包括:Wherein, separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule further includes:

在所述堆叠邻居的端口的数目为预设值时,选择所述端口作为协议控制端口以及数据转发端口。When the number of ports of the stack neighbor is a preset value, the port is selected as a protocol control port and a data forwarding port.

为达到上述目的,本发明的实施例还提供了一种堆叠系统协议控制和转发链路分离的装置,应用于一交换机,所述交换机已开启堆叠模式,包括:In order to achieve the above object, an embodiment of the present invention also provides a device for separating protocol control and forwarding links in a stacking system, which is applied to a switch that has enabled the stacking mode, including:

发送模块,用于通过已配置的堆叠端口发送堆叠邻居发现消息;The sending module is used to send the stack neighbor discovery message through the configured stack port;

确定模块,用于根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数;a determining module, configured to determine the logarithm of the protocol control link and the data forwarding link of the switch corresponding to the stack neighbor according to the received stack neighbor response message of the stack neighbor discovery message;

分离模块,用于根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路。The separation module is configured to separate the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link corresponding to the stack neighbor of the switch and a preset rule.

其中,所述确定模块包括:Wherein, the determining module includes:

第一获取子模块,用于获取接收到的所述堆叠邻居发现消息的堆叠邻居响应消息中的硬件地址MAC;a first acquiring submodule, configured to acquire the hardware address MAC in the stack neighbor response message of the received stack neighbor discovery message;

第一确定子模块,用于根据所述MAC,确定与所述交换机建立堆叠的堆叠邻居的数目;a first determining submodule, configured to determine, according to the MAC, the number of stack neighbors that establish stacking with the switch;

第二确定子模块,用于根据所述堆叠邻居的数目,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。The second determination submodule is configured to determine, according to the number of the stack neighbors, the number of pairs of protocol control links and data forwarding links of the switch corresponding to the stack neighbors.

其中,所述分离模块包括:Wherein, the separation module includes:

第二获取子模块,用于根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,获取每个堆叠邻居的端口信息;其中,所述端口信息包括端口的数目、带宽、ID和业务量;The second obtaining sub-module is configured to obtain the port information of each stacking neighbor according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch; wherein, the port information includes the number of ports and the bandwidth , ID and business volume;

第一选择子模块,用于在所述堆叠邻居的端口数目大于一预设值时,根据预先设定的规则,选择所述堆叠邻居的端口中的预设数量的端口作为协议控制端口;a first selection submodule, configured to select a preset number of ports among the ports of the stack neighbor as protocol control ports according to a preset rule when the number of ports of the stack neighbor is greater than a preset value;

第二选择子模块,用于选择所述堆叠邻居的剩余端口作为数据转发端口;a second selection submodule, configured to select the remaining ports of the stack neighbors as data forwarding ports;

分离子模块,用于根据选择的协议控制端口和数据转发端口分离协议控制链路和数据转发链路。The separation sub-module is used for separating the protocol control link and the data forwarding link according to the selected protocol control port and data forwarding port.

其中,所述第一选择子模块包括:Wherein, the first selection submodule includes:

第一选择单元,用于根据所述端口信息中的带宽,选择所述堆叠邻居中带宽最小的端口为协议控制端口,若端口的带宽相同,则选择ID最小的端口为协议控制端口;或者A first selection unit, configured to select, according to the bandwidth in the port information, the port with the smallest bandwidth in the stack neighbor as the protocol control port, and if the bandwidths of the ports are the same, select the port with the smallest ID as the protocol control port; or

第二选择单元,用于根据所述端口信息中的业务量,选择所述堆叠邻居中业务量最多的端口为协议控制端口,若端口的业务量相同,则选择ID最小的端口为协议控制端口;或者The second selection unit is configured to select the port with the most traffic in the stack neighbors as the protocol control port according to the traffic in the port information, and if the traffic of the ports is the same, select the port with the smallest ID as the protocol control port ;or

第三选择单元,用于根据所述端口信息中的ID,选择所述堆叠邻居中ID最小的端口为协议控制端口。The third selection unit is configured to select, according to the ID in the port information, the port with the smallest ID among the stack neighbors as the protocol control port.

其中,所述分离模块还包括:Wherein, the separation module further includes:

第三获取子模块,用于获取所述堆叠邻居的端口选定信息,其中,由所述端口选定信息可知所述堆叠邻居选定的所述交换机的协议控制端口;a third acquiring submodule, configured to acquire port selection information of the stacking neighbor, wherein the port selection information can know the protocol control port of the switch selected by the stacking neighbor;

第三确定子模块,用于在所述交换机选定的协议控制端口与所述堆叠邻居选定的协议控制端口不是对应端口时,根据所述交换机和所述堆叠邻居的MAC大小确定协议控制链路的端口。A third determination submodule, configured to determine the protocol control chain according to the MAC size of the switch and the stack neighbor when the protocol control port selected by the switch and the protocol control port selected by the stack neighbor are not corresponding ports road port.

其中,所述分离模块还包括:Wherein, the separation module further includes:

第三选择子模块,用于在所述堆叠邻居的端口的数目为预设值时,选择所述端口作为协议控制端口以及数据转发端口。The third selection sub-module is configured to select the port as a protocol control port and a data forwarding port when the number of ports of the stack neighbor is a preset value.

为达到上述目的,本发明的实施例还提供了一种交换机,所述交换机已开启堆叠模式,包括如上所述的堆叠系统协议控制和转发链路分离的装置。To achieve the above object, an embodiment of the present invention further provides a switch, the switch has a stacking mode enabled, and includes the above-mentioned device for stacking system protocol control and forwarding link separation.

本发明的上述技术方案的有益效果如下:The beneficial effects of the above-mentioned technical solutions of the present invention are as follows:

本发明实施例的方法,通过已配置的堆叠端口发送堆叠邻居发现消息,去发现该交换机的堆叠邻居,在接收到返回的堆叠邻居响应消息后,就能够确定该交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,随后再根据协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,分别通过堆叠建立协议和数据转发协议处理。实现了自动将协议控制链路和数据转发链路分开,将二者的去耦合,避免了链路间的相互干扰。In the method of the embodiment of the present invention, a stack neighbor discovery message is sent through a configured stack port to discover the stack neighbor of the switch, and after receiving the returned stack neighbor response message, the protocol control chain of the switch corresponding to the stack neighbor can be determined. Then separate the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link and the preset rules, and establish the protocol and data forwarding protocol through stacking respectively. deal with. The protocol control link and the data forwarding link are automatically separated, the two are decoupled, and the mutual interference between the links is avoided.

附图说明Description of drawings

图1表示本发明实施例的方法的步骤流程图;Fig. 1 shows the step flow chart of the method of the embodiment of the present invention;

图2表示本发明实施例的方法的具体步骤流程图一;FIG. 2 shows a flowchart 1 of the specific steps of the method according to the embodiment of the present invention;

图3表示本发明实施例的方法的具体步骤流程图二;FIG. 3 shows a flowchart 2 of the specific steps of the method according to the embodiment of the present invention;

图4表示应用了本发明实施例的方法后的堆叠系统;Fig. 4 shows the stacking system after applying the method of the embodiment of the present invention;

图5表示本发明实施例的装置的结构示意图。FIG. 5 shows a schematic structural diagram of an apparatus according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

本发明针对现有的数据转发链路和协议控制链路使用同一条物理链路,在实际使用过程中,业务报文和协议报文就不可避免相互影响,从而产生业务丢包或堆叠系统不稳定等问题,提供一种堆叠系统协议控制和转发链路分离的方法,通过自动将堆叠系统的协议控制链路和数据转发链路分开,实现二者去耦合,避免链路间的相互干扰。The present invention uses the same physical link for the existing data forwarding link and the protocol control link. In the actual use process, the service message and the protocol message inevitably affect each other, resulting in loss of service packets or failure of the stacking system. To solve problems such as stability, a method for separating protocol control and forwarding links in a stacking system is provided. By automatically separating the protocol control link and data forwarding link of the stacking system, the two are decoupled and mutual interference between the links is avoided.

如图1所示,本发明实施例的一种堆叠系统协议控制和转发链路分离的方法,应用于一交换机,所述交换机已开启堆叠模式,包括:As shown in FIG. 1 , a method for separating protocol control and forwarding links of a stacking system according to an embodiment of the present invention is applied to a switch, and the switch has enabled the stacking mode, including:

步骤11,通过已配置的堆叠端口发送堆叠邻居发现消息;Step 11: Send a stack neighbor discovery message through the configured stack port;

由于交换机已开启堆叠模式,该交换机会进行堆叠端口的配置,如此,可通过该些堆叠端口发送堆叠邻居发现消息,去发现与该交换机同一堆叠系统的一个或多个交换机,而发现的交换机可以称为本机的堆叠邻居。Since the switch has enabled the stacking mode, the switch will configure the stacking ports. In this way, the stack neighbor discovery message can be sent through the stacking ports to discover one or more switches in the same stacking system as the switch, and the discovered switches can be called the native's stacking neighbor.

步骤12,根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数;Step 12, according to the received stack neighbor response message of the stack neighbor discovery message, determine the logarithm of the protocol control link and the data forwarding link of the switch corresponding to the stack neighbor;

堆叠邻居在接收到堆叠邻居发现消息后,会返回堆叠邻居响应消息,通过堆叠邻居响应消息可以确定该交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,交换机会为每个堆叠邻居配设一对协议控制链路和数据转发链路,当然,一般情况下协议控制链路只有一条,而数据转发链路并不一定是一条,可能是多条。After receiving the stack neighbor discovery message, the stack neighbor will return a stack neighbor response message. Through the stack neighbor response message, the number of protocol control links and data forwarding links of the switch corresponding to the stack neighbor can be determined. Neighbors are configured with a pair of protocol control links and data forwarding links. Of course, in general, there is only one protocol control link, but not necessarily one data forwarding link, but may be multiple.

步骤13,根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路。Step 13: Separate the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link corresponding to the stack neighbor of the switch and a preset rule.

按照上述步骤,本发明的实施例通过已配置的堆叠端口发送堆叠邻居发现消息,去发现该交换机的堆叠邻居,在接收到返回的堆叠邻居响应消息后,就能够确定该交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,随后再根据协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,分别通过堆叠建立协议和数据转发协议处理。这样,可如图4所示,将堆叠系统的相邻交换机1、2通过不同物理链路分别实现协议控制链路和数据转发链路,自动将协议控制链路和数据转发链路分开,实现二者的去耦合,避免链路间的相互干扰。According to the above steps, the embodiment of the present invention sends a stack neighbor discovery message through the configured stack port to discover the stack neighbor of the switch. After receiving the returned stack neighbor response message, the protocol of the switch corresponding to the stack neighbor can be determined. The logarithm of the control link and the data forwarding link, and then separate the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link and the preset rules, and establish the protocol and data through the stack. Forwarding protocol processing. In this way, as shown in Fig. 4, the adjacent switches 1 and 2 of the stacking system can respectively realize the protocol control link and the data forwarding link through different physical links, and automatically separate the protocol control link and the data forwarding link to realize The decoupling of the two avoids mutual interference between the links.

其中,所述堆叠邻居发现消息还可以通过已知协议邻居发现协议LLDP实现。Wherein, the stack neighbor discovery message may also be implemented through a known protocol neighbor discovery protocol LLDP.

进一步的,如图2所示,步骤12具体包括:Further, as shown in Figure 2, step 12 specifically includes:

步骤121,获取接收到的所述堆叠邻居发现消息的堆叠邻居响应消息中的硬件地址MAC;Step 121, acquiring the hardware address MAC in the stack neighbor response message of the received stack neighbor discovery message;

在步骤11中,通过已配置的堆叠端口会发送堆叠邻居发现消息,去发现该交换机的堆叠邻居,因此,该交换机的堆叠邻居在接收到堆叠邻居发现消息后,会返回堆叠邻居响应消息,而在该响应消息中就能够获取到返回堆叠邻居响应消息的堆叠邻居的MAC。若没有接收到堆叠邻居响应消息,会发出告警,提示用户确认交换机间的端口已经连接。In step 11, a stack neighbor discovery message will be sent through the configured stack port to discover the stack neighbor of the switch. Therefore, after receiving the stack neighbor discovery message, the stack neighbor of the switch will return a stack neighbor response message, and In the response message, the MAC of the stack neighbor that returns the stack neighbor response message can be obtained. If no stack neighbor response message is received, an alarm will be issued, prompting the user to confirm that the ports between the switches are connected.

步骤122,根据所述MAC,确定与所述交换机建立堆叠的堆叠邻居的数目;Step 122, according to the MAC, determine the number of stack neighbors that establish a stack with the switch;

应该了解到,堆叠系统中每个交换机有一个MAC,故通过MAC的数目就能够确定与本机的堆叠邻居的数目。It should be understood that each switch in the stacking system has a MAC, so the number of stack neighbors with the local machine can be determined by the number of MACs.

步骤123,根据所述堆叠邻居的数目,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。Step 123: Determine, according to the number of the stack neighbors, the number of pairs of protocol control links and data forwarding links of the switch corresponding to the stack neighbors.

该交换机不论有几个堆叠邻居,对应每个堆叠邻居只有一对协议控制链路和数据转发链路,因此,可根据堆叠邻居的数目,确定交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。No matter how many stack neighbors the switch has, there is only one pair of protocol control links and data forwarding links for each stack neighbor. Therefore, the protocol control link and data forwarding link of the switch corresponding to the stack neighbor can be determined according to the number of stack neighbors. The logarithm of the road.

以交换机A、交换机B和交换机C的堆叠系统为例,交换机A通过堆叠端口发送堆叠邻居发现消息。B和C在接收到堆叠邻居发现消息后向A返回堆叠邻居应答消息(携带发送该消息的交换机的MAC),A接收到5条堆叠邻居应答消息,2条携带B的MAC,3条携带C的MAC,A通过判断接收到的MAC为两种,确定其堆叠邻居有两个,从而确定有两对协议控制链路和数据转发链路。Take the stack system of switch A, switch B, and switch C as an example. Switch A sends stack neighbor discovery messages through stack ports. After receiving the stack neighbor discovery message, B and C return a stack neighbor reply message (carrying the MAC of the switch that sent the message) to A. A receives 5 stack neighbor reply messages, 2 carry B's MAC, and 3 carry C By judging that there are two types of MACs received, A determines that there are two stacking neighbors, thereby determining that there are two pairs of protocol control links and data forwarding links.

本发明实施例中,配置堆叠端口可能众多,通过堆叠端口发送的堆叠邻居发现消息,若端口连通,就能够接收到堆叠邻居返回的应答消息,而要从众多应答消息中确定是哪个堆叠邻居发送的就可通过MAC来确定,确定堆叠邻居的数目,确定交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。In this embodiment of the present invention, there may be a large number of configured stack ports. If the stack neighbor discovery message is sent through the stack port, if the port is connected, the response message returned by the stack neighbor can be received, and it is necessary to determine which stack neighbor sent the stack neighbor from the numerous response messages. It can be determined by MAC, the number of stack neighbors, and the number of pairs of protocol control links and data forwarding links of the switch corresponding to the stack neighbors.

进一步的,如图3所示,步骤13具体包括:Further, as shown in Figure 3, step 13 specifically includes:

步骤131,根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,获取每个堆叠邻居的端口信息;其中,所述端口信息包括端口的数目、带宽、ID和业务量;Step 131: Obtain the port information of each stacking neighbor according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch; wherein, the port information includes the number of ports, bandwidth, ID and traffic volume ;

知道了交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,可以确定每个堆叠邻居具有哪些端口,就可获取到每个堆叠邻居的端口信息如端口的数目、带宽、ID和业务量等,ID是指该端口在其所属交换机的端口号。Knowing the logarithm of the protocol control link and data forwarding link of the switch corresponding to the stack neighbor, you can determine which ports each stack neighbor has, and you can obtain the port information of each stack neighbor, such as the number of ports, bandwidth, ID and Traffic, etc., ID refers to the port number of the port on the switch to which it belongs.

步骤132,在所述堆叠邻居的端口数目大于一预设值时,根据预先设定的规则,选择所述堆叠邻居的端口中的预设数量的端口作为协议控制端口;Step 132, when the number of ports of the stack neighbor is greater than a preset value, according to a preset rule, select a preset number of ports in the ports of the stack neighbor as protocol control ports;

一般情况协议控制链路只需要一条,而数据转发链路往往不做要求。在堆叠邻居与本机连通的端口数目与协议控制链路需要数目相同时,就不存在链路分离的必要了,只有在堆叠邻居的端口数目大于一预设值时,才需要根据预先设定的规则,选择所述堆叠邻居的端口中的预设数量的端口作为协议控制端口。该预设值是根据协议控制链路的需求设置的,该预设值也就是该预设数量的值。In general, only one protocol control link is required, while the data forwarding link is often not required. When the number of ports connected between the stack neighbor and the local machine is the same as the required number of protocol control links, there is no need for link separation. Only when the number of ports in the stack neighbor is greater than a preset value, it is necessary to set the According to the rule, a preset number of ports in the ports of the stack neighbors are selected as the protocol control ports. The preset value is set according to the requirements of the protocol control link, and the preset value is also the value of the preset number.

步骤133,选择所述堆叠邻居的剩余端口作为数据转发端口;Step 133, selecting the remaining ports of the stack neighbors as data forwarding ports;

在选择了协议控制端口后,剩余的端口就能够作为数据转发端口了。她们之间可使用链路汇聚控制协议LACP调度。After the protocol control port is selected, the remaining ports can be used as data forwarding ports. They can use the link aggregation control protocol LACP scheduling between them.

步骤134,根据选择的协议控制端口和数据转发端口分离协议控制链路和数据转发链路。Step 134: Separate the protocol control link and the data forwarding link according to the selected protocol control port and data forwarding port.

选择后确定了堆叠邻居的协议控制端口和数据转发端口,就可通过对应端口的物理链路实现协议控制链路和数据转发链路,分离了协议控制链路和数据转发链路。After selection, the protocol control port and data forwarding port of the stack neighbor are determined, and the protocol control link and data forwarding link can be realized through the physical link of the corresponding port, and the protocol control link and data forwarding link can be separated.

延续上例,A确定其堆叠邻居有两个,从而确定有两对协议控制链路和数据转发链路后,也就能够确定A的五个端口A1-A5对应B的两个端口B1、B2,C的三个端口C1、C2、C3,然后获取每个堆叠邻居的端口信息。假设A和C之间端口对应关系为A1-C1,A2-C2,A3-C3,获取C的三个端口的端口信息,此时预设值为1,再根据预先设定的规则,就可以在C1、C2、C3中选择出一个端口作为协议控制端口假设是C1,剩余的两个端口C2和C3就可作为数据转发端口。C1对应A1,链路A1C1就可设置为协议控制链路,链路A2C2和A3C3设置为数据转发链路,这样,实现了协议控制链路和数据转发链路的分离。Continuing the above example, A determines that it has two stack neighbors, so after determining that there are two pairs of protocol control links and data forwarding links, it can also determine that the five ports A1-A5 of A correspond to the two ports B1 and B2 of B. , C's three ports C1, C2, C3, and then obtain the port information of each stack neighbor. Assuming that the port correspondence between A and C is A1-C1, A2-C2, A3-C3, to obtain the port information of the three ports of C, the default value is 1 at this time, and then according to the preset rules, you can Select one port among C1, C2, and C3 as the protocol control port, assuming that it is C1, and the remaining two ports, C2 and C3, can be used as data forwarding ports. C1 corresponds to A1, the link A1C1 can be set as the protocol control link, and the links A2C2 and A3C3 are set as the data forwarding link, thus realizing the separation of the protocol control link and the data forwarding link.

本发明实施例中,根据交换机对应堆叠邻居的协议控制链路和数据转发链路的对数获取每个堆叠邻居的端口信息,对每一个堆叠邻居的端口进行选择。根据预先设定的规则,选择出本机与堆叠邻居的协议控制端口和数据转发端口,分离协议控制链路和数据转发链路,实现了二者的去耦合,避免了链路间的干扰。In the embodiment of the present invention, the port information of each stack neighbor is obtained according to the logarithm of the protocol control link and the data forwarding link of the switch corresponding to the stack neighbor, and the port of each stack neighbor is selected. According to the preset rules, the protocol control port and data forwarding port of the local machine and the stack neighbor are selected, and the protocol control link and the data forwarding link are separated to realize the decoupling of the two and avoid the interference between the links.

进一步的,步骤132具体包括:Further, step 132 specifically includes:

步骤132a,根据所述端口信息中的带宽,选择所述堆叠邻居中带宽最小的端口为协议控制端口,若端口的带宽相同,则选择ID最小的端口为协议控制端口;或者Step 132a, according to the bandwidth in the port information, select the port with the smallest bandwidth among the stack neighbors as the protocol control port, and if the bandwidths of the ports are the same, select the port with the smallest ID as the protocol control port; or

步骤132b,根据所述端口信息中的业务量,选择所述堆叠邻居中业务量最多的端口为协议控制端口,若端口的业务量相同,则选择ID最小的端口为协议控制端口;或者Step 132b, according to the traffic in the port information, select the port with the most traffic in the stack neighbor as the protocol control port, and if the traffic of the ports is the same, select the port with the smallest ID as the protocol control port; or

步骤132c,根据所述端口信息中的ID,选择所述堆叠邻居中ID最小的端口为协议控制端口。Step 132c, according to the ID in the port information, select the port with the smallest ID among the stack neighbors as the protocol control port.

端口信息包括带宽、ID和业务量等,可以选择带宽最小的端口为协议控制端口,当然若出现端口的业务量相同的情况,则选择ID最小的端口为协议控制端口;可以选择业务量最多的端口为协议控制端口,当然若出现端口的业务量相同的情况,则选择ID最小的端口为协议控制端口;还可以直接选择ID最小的端口为协议控制端口。当然,预设规则并不仅限于上述的情况,还可以是上述的一种或多种标准的加权组合,也可以根据其他端口信息设置,在此不一一列举。Port information includes bandwidth, ID, and traffic. The port with the smallest bandwidth can be selected as the protocol control port. Of course, if the traffic of the ports is the same, the port with the smallest ID is selected as the protocol control port; the port with the most traffic can be selected. The port is the protocol control port. Of course, if the traffic of the ports is the same, the port with the smallest ID is selected as the protocol control port; you can also directly select the port with the smallest ID as the protocol control port. Of course, the preset rule is not limited to the above-mentioned situation, and may also be a weighted combination of one or more of the above-mentioned standards, or may be set according to other port information, which will not be listed one by one here.

还应该知道的是,在堆叠系统中交换机互为堆叠邻居,每个交换机都在对方的端口中进行选择,这样可能出现如:A可能选择B的端口B2作为协议控制端口,而A对应B2的端口是A5,但是B选择A的端口A4作为协议控制端口,就不可避免的会出现选择的冲突情况,因此,进一步的,步骤13具体还包括:It should also be known that in a stacking system, the switches are stacking neighbors of each other, and each switch selects among the other's ports, so it may appear that, for example, A may choose B's port B2 as the protocol control port, and A corresponds to B2's port. The port is A5, but B chooses A's port A4 as the protocol control port, and there will inevitably be a conflict of selection. Therefore, further, step 13 specifically includes:

步骤135,获取所述堆叠邻居的端口选定信息,其中,由所述端口选定信息可知所述堆叠邻居选定的所述交换机的协议控制端口;Step 135: Obtain the port selection information of the stacking neighbor, wherein the port selection information can know the protocol control port of the switch selected by the stacking neighbor;

步骤136,在所述交换机选定的协议控制端口与所述堆叠邻居选定的协议控制端口不是对应端口时,根据所述交换机和所述堆叠邻居的MAC大小确定协议控制链路的端口。Step 136, when the protocol control port selected by the switch and the protocol control port selected by the stacking neighbor are not corresponding ports, determine the port of the protocol control link according to the MAC size of the switch and the stacking neighbor.

通过获取本机的堆叠邻居的端口选定信息来了解该堆叠邻居选择的协议控制端口是否与本机选择的协议控制端口对应,若对应则可以直接分离链路,但若不对应,就需要对二者进行统一,可以比较本机与堆叠邻居的MAC大小来确定采用谁的选择,如以MAC小的交换机选择的链路所在端口为控制端口。当然,以MAC大小的判断也仅是一种实现方式,也可以通过其他如业务量大小等方式实现,在此不一一列举,可由工作人员根据需要进行提前的设置。By obtaining the port selection information of the stack neighbor of the local machine, we can know whether the protocol control port selected by the stack neighbor corresponds to the protocol control port selected by the local machine. The two are unified, and the MAC size of the local machine and the stack neighbor can be compared to determine which one is selected. For example, the port where the link selected by the switch with the smaller MAC address is located is the control port. Of course, judging by the MAC size is only one implementation method, and can also be implemented by other methods such as the size of the traffic, which are not listed here, and can be set in advance by the staff as needed.

由上述内容可知,在堆叠邻居与本机连通的端口数目与协议控制链路需要数目相同时,就不存在链路分离的必要了,那么此时,步骤13具体还包括:It can be seen from the above content that when the number of ports connected to the stack neighbor and the local machine is the same as the required number of protocol control links, there is no need for link separation. Then, at this time, step 13 specifically includes:

步骤137,在所述堆叠邻居的端口的数目为预设值时,选择所述端口作为协议控制端口以及数据转发端口。Step 137: When the number of ports of the stack neighbor is a preset value, select the port as a protocol control port and a data forwarding port.

由于堆叠邻居与本机连通的端口数目与协议控制链路需要数目相同,数据转发链路也就不得不与协议控制链路共用物理链路,端口即是协议控制端口也是数据转发端口。Since the number of ports that the stack neighbor communicates with the local machine is the same as the number required for the protocol control link, the data forwarding link has to share the physical link with the protocol control link, and the port is the protocol control port and the data forwarding port.

综上所述,本发明实施例的堆叠系统协议控制和转发链路分离的方法,通过了解堆叠邻居的端口的多种信息,在不增加配置难度基础上,以一定的条件自动分离协议控制链路和数据转发链路,实现协议控制链路和数据转发链路的去耦合,避免链路间的相互干扰。To sum up, the method for separating the protocol control and forwarding links of the stacking system according to the embodiment of the present invention automatically separates the protocol control chain under certain conditions without increasing the difficulty of configuration by learning various information of the ports of the stacking neighbors. It can realize the decoupling of the protocol control link and the data forwarding link, and avoid the mutual interference between the links.

如图5所示,本发明的实施例还提供了一种堆叠系统协议控制和转发链路分离的装置,应用于一交换机,所述交换机已开启堆叠模式,包括:As shown in FIG. 5 , an embodiment of the present invention further provides an apparatus for separating stacking system protocol control and forwarding links, which is applied to a switch that has enabled the stacking mode, including:

发送模块10,用于通过已配置的堆叠端口发送堆叠邻居发现消息;The sending module 10 is configured to send the stack neighbor discovery message through the configured stack port;

确定模块20,用于根据接收到的所述堆叠邻居发现消息的堆叠邻居响应消息,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数;A determination module 20, configured to determine, according to the received stack neighbor response message of the stack neighbor discovery message, the logarithm of the protocol control link and the data forwarding link of the switch corresponding to the stack neighbor;

分离模块30,用于根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路。The separation module 30 is configured to separate the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link corresponding to the stack neighbor of the switch and a preset rule.

其中,所述确定模块包括:Wherein, the determining module includes:

第一获取子模块,用于获取接收到的所述堆叠邻居发现消息的堆叠邻居响应消息中的硬件地址MAC;a first acquiring submodule, configured to acquire the hardware address MAC in the stack neighbor response message of the received stack neighbor discovery message;

第一确定子模块,用于根据所述MAC,确定与所述交换机建立堆叠的堆叠邻居的数目;a first determining submodule, configured to determine, according to the MAC, the number of stack neighbors that establish stacking with the switch;

第二确定子模块,用于根据所述堆叠邻居的数目,确定所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数。The second determining submodule is configured to determine, according to the number of the stacking neighbors, the number of pairs of protocol control links and data forwarding links of the switch corresponding to the stacking neighbors.

其中,所述分离模块包括:Wherein, the separation module includes:

第二获取子模块,用于根据所述交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,获取每个堆叠邻居的端口信息;其中,所述端口信息包括端口的数目、带宽、ID和业务量;The second obtaining sub-module is configured to obtain the port information of each stacking neighbor according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch; wherein, the port information includes the number of ports and the bandwidth , ID and business volume;

第一选择子模块,用于在所述堆叠邻居的端口数目大于一预设值时,根据预先设定的规则,选择所述堆叠邻居的端口中的预设数量的端口作为协议控制端口;a first selection submodule, configured to select a preset number of ports in the ports of the stack neighbor as protocol control ports according to a preset rule when the number of ports of the stack neighbor is greater than a preset value;

第二选择子模块,用于选择所述堆叠邻居的剩余端口作为数据转发端口;a second selection submodule, configured to select the remaining ports of the stack neighbors as data forwarding ports;

分离子模块,用于根据选择的协议控制端口和数据转发端口分离协议控制链路和数据转发链路。The separation sub-module is used for separating the protocol control link and the data forwarding link according to the selected protocol control port and data forwarding port.

其中,所述第一选择子模块包括:Wherein, the first selection submodule includes:

第一选择单元,用于根据所述端口信息中的带宽,选择所述堆叠邻居中带宽最小的端口为协议控制端口,若端口的带宽相同,则选择ID最小的端口为协议控制端口;或者A first selection unit, configured to select, according to the bandwidth in the port information, the port with the smallest bandwidth in the stack neighbor as the protocol control port, and if the bandwidths of the ports are the same, select the port with the smallest ID as the protocol control port; or

第二选择单元,用于根据所述端口信息中的业务量,选择所述堆叠邻居中业务量最多的端口为协议控制端口,若端口的业务量相同,则选择ID最小的端口为协议控制端口;或者The second selection unit is configured to select the port with the most traffic in the stack neighbors as the protocol control port according to the traffic in the port information, and if the traffic of the ports is the same, select the port with the smallest ID as the protocol control port ;or

第三选择单元,用于根据所述端口信息中的ID,选择所述堆叠邻居中ID最小的端口为协议控制端口。The third selection unit is configured to select, according to the ID in the port information, the port with the smallest ID among the stack neighbors as the protocol control port.

其中,所述分离模块还包括:Wherein, the separation module further includes:

第三获取子模块,用于获取所述堆叠邻居的端口选定信息,其中,由所述端口选定信息可知所述堆叠邻居选定的所述交换机的协议控制端口;a third acquiring submodule, configured to acquire port selection information of the stacking neighbor, wherein the port selection information can know the protocol control port of the switch selected by the stacking neighbor;

第三确定子模块,用于在所述交换机选定的协议控制端口与所述堆叠邻居选定的协议控制端口不是对应端口时,根据所述交换机和所述堆叠邻居的MAC大小确定协议控制链路的端口。A third determination submodule, configured to determine the protocol control chain according to the MAC size of the switch and the stack neighbor when the protocol control port selected by the switch and the protocol control port selected by the stack neighbor are not corresponding ports road port.

其中,所述分离模块还包括:Wherein, the separation module further includes:

第三选择子模块,用于在所述堆叠邻居的端口的数目为预设值时,选择所述端口作为协议控制端口以及数据转发端口。The third selection sub-module is configured to select the port as a protocol control port and a data forwarding port when the number of ports of the stack neighbor is a preset value.

该装置的发送模块通过已配置的堆叠端口发送堆叠邻居发现消息,去发现该交换机的堆叠邻居,在接收到返回的堆叠邻居响应消息后,确定模块就能够确定该交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,随后分离模块再根据协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,分别通过堆叠建立协议和数据转发协议处理。这样,该实施例就自动将协议控制链路和数据转发链路分开,实现二者的去耦合,避免链路间的相互干扰。The sending module of the device sends a stack neighbor discovery message through the configured stack port to discover the stack neighbor of the switch. After receiving the returned stack neighbor response message, the determination module can determine the protocol control chain of the switch corresponding to the stack neighbor. Then the separation module separates the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link and the preset rules, and establishes the protocol and data respectively through the stack. Forwarding protocol processing. In this way, this embodiment automatically separates the protocol control link and the data forwarding link, realizes the decoupling of the two, and avoids mutual interference between the links.

本发明实施例中,模块可以用软件实现,以便由各种类型的处理器执行。举例来说,一个标识的可执行代码模块可以包括计算机指令的一个或多个物理或者逻辑块,举例来说,其可以被构建为对象、过程或函数。尽管如此,所标识模块的可执行代码无需物理地位于一起,而是可以包括存储在不同位里上的不同的指令,当这些指令逻辑上结合在一起时,其构成模块并且实现该模块的规定目的。In this embodiment of the present invention, the modules may be implemented in software so as to be executed by various types of processors. For example, an identified executable code module may comprise one or more physical or logical blocks of computer instructions, which may be structured as objects, procedures, or functions, for example. Nonetheless, the executable code of the identified module need not be physically located together, but may include different instructions stored in different bits that, when logically combined, constitute the module and implement the specification of the module Purpose.

需要说明的是,该装置是应用了上述堆叠系统协议控制和转发链路分离的方法的装置,上述方法的实现方式适用于该装置,也能达到相同的技术效果。It should be noted that this device is a device that applies the above-mentioned method for stacking system protocol control and forwarding link separation, and the implementation of the above-mentioned method is applicable to this device, and the same technical effect can also be achieved.

本发明的实施例还提供了一种交换机,所述交换机已开启堆叠模式,包括如上所述的堆叠系统协议控制和转发链路分离的装置。An embodiment of the present invention also provides a switch, the switch has a stacking mode enabled, and includes the above-mentioned apparatus for stacking system protocol control and forwarding link separation.

该交换机能够通过已配置的堆叠端口发送堆叠邻居发现消息,去发现该交换机的堆叠邻居,在接收到返回的堆叠邻居响应消息后,就能够确定该交换机对应堆叠邻居的协议控制链路和数据转发链路的对数,随后再根据协议控制链路和数据转发链路的对数以及预先设置的规则分离协议控制链路和数据转发链路,分别通过堆叠建立协议和数据转发协议处理。这样,该实施例就自动将协议控制链路和数据转发链路分开,实现二者的去耦合,避免链路间的相互干扰。The switch can send a stack neighbor discovery message through the configured stack port to discover the stack neighbor of the switch. After receiving the returned stack neighbor response message, it can determine the protocol control link and data forwarding of the switch corresponding to the stack neighbor. The logarithm of the link is then separated according to the logarithm of the protocol control link and the data forwarding link and the preset rules, and the protocol control link and the data forwarding link are separately processed through the stack establishment protocol and the data forwarding protocol. In this way, this embodiment automatically separates the protocol control link and the data forwarding link, realizes the decoupling of the two, and avoids mutual interference between the links.

需要说明的是,该交换机包括了上述堆叠系统协议控制和转发链路分离的装置,上述装置的实现方法适用于该交换机,也能达到相同的技术效果。It should be noted that the switch includes the above-mentioned device for separating the stacking system protocol control and the forwarding link, and the implementation method of the above-mentioned device is applicable to the switch, and the same technical effect can also be achieved.

以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.

Claims (13)

1. A method for separating protocol control and forwarding link of a stack system, applied to a switch, wherein the switch has opened a stack mode, the method comprising:
sending a stacking neighbor discovery message through the configured stacking port;
determining pairs of protocol control links and data forwarding links of the stacking neighbors corresponding to the switch according to the received stacking neighbor response messages of the stacking neighbor discovery messages;
and separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule.
2. The method according to claim 1, wherein the determining the logarithm of the protocol control link and the data forwarding link of the stack neighbor corresponding to the switch according to the stack neighbor response message of the stack neighbor discovery message includes:
acquiring a hardware address MAC in a stacking neighbor response message of the received stacking neighbor discovery message;
determining the number of stack neighbors to establish a stack with the switch according to the MAC;
and determining the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch according to the number of the stacking neighbors.
3. The method for separating protocol control and forwarding link in a stacking system according to claim 1, wherein the separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule specifically includes:
acquiring port information of each stacking neighbor according to the logarithm of a protocol control link and a data forwarding link of the stacking neighbor corresponding to the switch; wherein the port information includes the number of ports, bandwidth, ID, and traffic volume;
when the number of the ports of the stacking neighbor is larger than a preset value, selecting a preset number of the ports of the stacking neighbor as protocol control ports according to a preset rule;
selecting the rest ports of the stacking neighbors as data forwarding ports;
and separating the protocol control link and the data forwarding link according to the selected protocol control port and the selected data forwarding port.
4. The method for protocol control and forwarding link separation in a stacking system according to claim 3, wherein the selecting a preset number of ports from the ports of the stacking neighbor as protocol control ports according to a preset rule specifically includes:
selecting the port with the minimum bandwidth in the stacking neighbor as a protocol control port according to the bandwidth in the port information, and selecting the port with the minimum ID as the protocol control port if the bandwidth of the ports is the same; or
Selecting the port with the most traffic in the stacking neighbor as a protocol control port according to the traffic in the port information, and selecting the port with the smallest ID as the protocol control port if the traffic of the ports is the same; or
And selecting the port with the smallest ID in the stacking neighbor as a protocol control port according to the ID in the port information.
5. The method for separating protocol control and forwarding link in a stacking system according to claim 3, wherein the protocol control link and the data forwarding link are separated according to a preset rule and a logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch, and specifically, the method further comprises:
acquiring port selection information of the stacking neighbor, wherein the port selection information can know a protocol control port of the switch selected by the stacking neighbor;
and when the protocol control port selected by the switch and the protocol control port selected by the stacking neighbor are not corresponding ports, determining the port of a protocol control link according to the MAC sizes of the switch and the stacking neighbor.
6. The method for separating protocol control and forwarding link in a stacking system according to claim 3, wherein the protocol control link and the data forwarding link are separated according to a preset rule and a logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch, and specifically, the method further comprises:
and when the number of the ports of the stacking neighbors is a preset value, selecting the ports as protocol control ports and data forwarding ports.
7. An apparatus for separating protocol control and forwarding links of a stack system, applied to a switch that has an open stack mode, comprising:
a sending module, configured to send a stacking neighbor discovery message through a configured stacking port;
a determining module, configured to determine pairs of protocol control links and data forwarding links of the stacking neighbors corresponding to the switch according to the received stacking neighbor response message of the stacking neighbor discovery message;
and the separation module is used for separating the protocol control link and the data forwarding link according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch and a preset rule.
8. The stacked system protocol control and forwarding link separation apparatus of claim 7, wherein the determining module comprises:
the first acquisition submodule is used for acquiring a hardware address MAC in a stacking neighbor response message of the received stacking neighbor discovery message;
the first determining submodule is used for determining the number of stacking neighbors for establishing stacking with the switch according to the MAC;
and the second determining submodule is used for determining the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch according to the number of the stacking neighbors.
9. The stacked system protocol control and forwarding link separation apparatus of claim 7, wherein the separation module comprises:
the second obtaining submodule is used for obtaining the port information of each stacking neighbor according to the logarithm of the protocol control link and the data forwarding link of the stacking neighbor corresponding to the switch; wherein the port information includes the number of ports, bandwidth, ID, and traffic volume;
the first selection submodule is used for selecting a preset number of ports in the ports of the stacking neighbors as protocol control ports according to a preset rule when the number of the ports of the stacking neighbors is larger than a preset value;
the second selection submodule is used for selecting the rest ports of the stacking neighbors as data forwarding ports;
and the separation sub-module is used for separating the protocol control link and the data forwarding link according to the selected protocol control port and the selected data forwarding port.
10. The stacked system protocol control and forwarding link decoupling apparatus of claim 9, wherein the first selection submodule comprises:
a first selecting unit, configured to select, according to the bandwidth in the port information, a port with the smallest bandwidth in the stacking neighbor as a protocol control port, and if the bandwidths of the ports are the same, select the port with the smallest ID as the protocol control port; or
A second selecting unit, configured to select, according to the traffic in the port information, a port with the largest traffic in the stacking neighbor as a protocol control port, and if the traffic of the ports is the same, select a port with the smallest ID as a protocol control port; or
And the third selecting unit is used for selecting the port with the smallest ID in the stacking neighbor as a protocol control port according to the ID in the port information.
11. The stacked system protocol control and forwarding link separation apparatus of claim 9, wherein the separation module further comprises:
a third obtaining submodule, configured to obtain port selection information of the stacking neighbor, where the port selection information indicates a protocol control port of the switch selected by the stacking neighbor;
and the third determining submodule is used for determining the port of the protocol control link according to the MAC sizes of the switch and the stacking neighbor when the protocol control port selected by the switch and the protocol control port selected by the stacking neighbor are not corresponding ports.
12. The stacked system protocol control and forwarding link separation apparatus of claim 9, wherein the separation module further comprises:
and the third selection submodule is used for selecting the ports as protocol control ports and data forwarding ports when the number of the ports of the stacking neighbors is a preset value.
13. A switch having stack mode enabled, comprising a stack system protocol control and forwarding link separation apparatus according to any of claims 7 to 12.
CN201510362338.6A 2015-06-26 2015-06-26 Method, device and switch for separating protocol control and forwarding link of stacking system Active CN106330781B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510362338.6A CN106330781B (en) 2015-06-26 2015-06-26 Method, device and switch for separating protocol control and forwarding link of stacking system
PCT/CN2016/085884 WO2016206555A1 (en) 2015-06-26 2016-06-15 Method, apparatus and switch for separating stack system protocol control and forwarding links

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510362338.6A CN106330781B (en) 2015-06-26 2015-06-26 Method, device and switch for separating protocol control and forwarding link of stacking system

Publications (2)

Publication Number Publication Date
CN106330781A CN106330781A (en) 2017-01-11
CN106330781B true CN106330781B (en) 2020-02-07

Family

ID=57586121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510362338.6A Active CN106330781B (en) 2015-06-26 2015-06-26 Method, device and switch for separating protocol control and forwarding link of stacking system

Country Status (2)

Country Link
CN (1) CN106330781B (en)
WO (1) WO2016206555A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327544A (en) * 2020-02-06 2020-06-23 深圳市信锐网科技术有限公司 Stacking system, message transmission method, device, switch and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753438A (en) * 2009-12-08 2010-06-23 中兴通讯股份有限公司 Router for realizing passage separation and transmitting method of passage separation thereof
CN102006184A (en) * 2010-11-09 2011-04-06 福建星网锐捷网络有限公司 Management method, device and network device of stack link
CN103152260A (en) * 2013-02-21 2013-06-12 中兴通讯股份有限公司 Message forwarding system, method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7855949B1 (en) * 2003-12-29 2010-12-21 At&T Intellectual Property Ii, L.P. Method and apparatus for bundling signaling messages for scaling communication networks
US7843831B2 (en) * 2006-08-22 2010-11-30 Embarq Holdings Company Llc System and method for routing data on a packet network
CN101312439B (en) * 2007-05-24 2011-04-20 中国电信股份有限公司 Flexible IP gateway protecting method
CN100596118C (en) * 2007-11-15 2010-03-24 福建星网锐捷网络有限公司 Method and switch device for message processing in switch stacking system
CN103166876B (en) * 2011-12-08 2018-05-04 中兴通讯股份有限公司 Data transmission method for uplink and device between OpenFlow network domains
CN104243319B (en) * 2013-06-06 2018-01-09 新华三技术有限公司 The method and device that a kind of neighbours have found
CN104426760A (en) * 2013-08-23 2015-03-18 中兴通讯股份有限公司 Stream mapping processing method and device
US9912612B2 (en) * 2013-10-28 2018-03-06 Brocade Communications Systems LLC Extended ethernet fabric switches
CN103888370B (en) * 2014-04-02 2017-09-15 新华三技术有限公司 A kind of method and apparatus for choosing port

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753438A (en) * 2009-12-08 2010-06-23 中兴通讯股份有限公司 Router for realizing passage separation and transmitting method of passage separation thereof
CN102006184A (en) * 2010-11-09 2011-04-06 福建星网锐捷网络有限公司 Management method, device and network device of stack link
CN103152260A (en) * 2013-02-21 2013-06-12 中兴通讯股份有限公司 Message forwarding system, method and device

Also Published As

Publication number Publication date
WO2016206555A1 (en) 2016-12-29
CN106330781A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
US10659347B2 (en) Integrated heterogeneous software-defined network
US9736278B1 (en) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
EP2985959B1 (en) Progressive mac address learning
EP2798800B1 (en) Expanding member ports of a link aggregation group between clusters
US20160134513A1 (en) Concerted Multi-Destination Forwarding in a Joint TRILL Fabric and VXLAN/IP Fabric Data Center
EP3032782B1 (en) Packet transmission method and apparatus
CN104869081B (en) MESSAGE EXCHANGE processing method, business board and internet exchange system
US11582332B2 (en) Providing efficient routing of an operations, administration and maintenance (OAM) frame received at a port of an ethernet switch
CN102761479A (en) Method for selecting link and device therefore
CN108306824B (en) Message sending method and device
CN106921527B (en) The processing method and processing device of stacking conflict
EP2728797B1 (en) Message processing method, device and system
CN104394075A (en) Message transmission method and equipment
CN106330781B (en) Method, device and switch for separating protocol control and forwarding link of stacking system
WO2021184862A1 (en) Message sending method, first network device, and network system
US8634306B2 (en) Systems and methods for implementing service operation, administration, and management for hairpinned ethernet services
CN110995744B (en) Message transmission method and device, software defined network switch and storage medium
WO2023011047A1 (en) Processing method and apparatus
CN104079451B (en) A kind of method and apparatus for finding optical module
US10616002B2 (en) Method, apparatus, and system for selecting network device
US11991068B2 (en) Multichassis link aggregation method and device
WO2022183927A1 (en) Packet transmission method and apparatus
CN103200083A (en) Appointed forwarder (AF) drifting processing method and device
US20120177055A1 (en) Switch device, network, and address learning method used for them
WO2022061561A1 (en) Packet transmission method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant