WO2016180081A1 - Configuration information synchronization method, primary device and standby device - Google Patents

Configuration information synchronization method, primary device and standby device Download PDF

Info

Publication number
WO2016180081A1
WO2016180081A1 PCT/CN2016/076732 CN2016076732W WO2016180081A1 WO 2016180081 A1 WO2016180081 A1 WO 2016180081A1 CN 2016076732 W CN2016076732 W CN 2016076732W WO 2016180081 A1 WO2016180081 A1 WO 2016180081A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration information
executed
unit
master device
standby
Prior art date
Application number
PCT/CN2016/076732
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 WO2016180081A1 publication Critical patent/WO2016180081A1/en

Links

Images

Definitions

  • configuration refers to turning on/off a certain function, or setting a certain parameter of a certain function, and the like.
  • switch stacking system Take the switch stacking system as an example.
  • Control access control list ACL
  • configuration information information indicating how the stack system is configured is referred to as configuration information.
  • Configuration The information can be divided into batch configuration information and single configuration information.
  • the single configuration information is used to indicate how to configure one device in the stack system
  • the batch configuration information is used to indicate how to configure two or more devices in the stack system. .
  • the embodiment of the invention discloses a method for synchronizing configuration information, including:
  • the master device and the standby device respectively save the obtained configuration information to be executed in the respective configuration information sets.
  • An embodiment of the present invention further discloses a master device, including a determining unit, a sending unit, and a first saving unit, where
  • the second storage unit is configured to save the received configuration information to be executed to the configuration information set of the device.
  • FIG. 3 is a schematic structural diagram of a standby device according to an embodiment of the present invention.
  • the master device broadcasts the to-be-executed configuration information to the standby device and each of the slave devices, namely switches 2, 3, and 4.
  • the device When used as a master device, the device also includes a parsing unit configured to: receive and parse configuration information.

Abstract

Disclosed is a configuration information synchronization method, comprising: a primary device respectively determining whether each piece of parsed single configuration information can be executed by a corresponding device; the primary device combining the determined single configuration information which can be executed into configuration information to be executed, and broadcasting same to a standby device and each slave device; and the primary device and the standby device respectively saving the obtained configuration information to be executed in respective configuration information sets. By means of the technical solution, the load of a primary device and a standby device is reduced while realizing configuration synchronization, thereby saving bandwidth resources of a stack system.

Description

一种同步配置信息的方法、主设备和备设备Method for synchronizing configuration information, main device and standby device 技术领域Technical field
本申请涉及但不限于堆叠技术,尤指一种同步配置信息的方法、主设备和备设备。The present application relates to, but is not limited to, a stacking technology, and in particular, a method, a master device, and a standby device for synchronizing configuration information.
背景技术Background technique
众所周知,设备堆叠技术广泛应用到通信、计算机等领域。设备堆叠技术指的是,将多台功能和性能相同或相似的设备级联起来构成堆叠系统,逻辑上可看成一台设备的技术。例如,在通信领域中,将多台功能和性能相同或相似的网络设备(如交换机)通过接口(如以太网接口)相连的方式级联起来,逻辑上构成一台网络设备。在通信领域中,设备堆叠技术具有很多优点,例如,降低了设备功能和/或性能升级的复杂性,从而保证了设备具有长期市场竞争力。As we all know, device stacking technology is widely used in communications, computers and other fields. Device stacking technology refers to the cascading of multiple devices with the same or similar functions to form a stacking system, which can be regarded as a technology of one device. For example, in the field of communications, multiple network devices (such as switches) with the same or similar functions are cascaded through interfaces (such as Ethernet interfaces) to logically form a network device. In the field of communications, device stacking technology has many advantages, such as reduced complexity of device functionality and/or performance upgrades, thereby ensuring long-term market competitiveness.
从设备发挥的作用的角度,堆叠系统中的设备可以分成三种角色:负责管理整个堆叠系统的主设备、以及在主设备的管理下完成堆叠系统的业务功能如协议报文转发功能的从设备、主设备出现故障时接替主设备、主设备正常工作时发挥从设备的作用的备设备。主设备除了负责管理整个堆叠系统之外,主设备也发挥从设备的作用。通常,堆叠系统中包括一个主设备、一个备设备和两个或两个以上从设备,通过选举策略选择堆叠系统中的各设备成为哪种角色即主设备、备设备或者从设备。需要说明的是,通常堆叠系统中的设备均可以做为主设备、备设备或者从设备。本文中,在不需要区分主设备、备设备和从设备时,将它们统称为设备。From the perspective of the role of the device, the devices in the stack can be divided into three roles: the master device that manages the entire stack system, and the slave devices that implement the service functions of the stack system, such as protocol packet forwarding, under the management of the master device. When the master device fails, it takes over the master device, and when the master device works normally, it plays the role of the slave device. In addition to managing the entire stack system, the master device also acts as a slave device. Generally, a stack system includes a master device, a standby device, and two or more slave devices. The election policy selects which role the devices in the stack system are, that is, the master device, the standby device, or the slave device. It should be noted that the devices in the stacking system can be used as the master device, the standby device, or the slave device. In this document, when it is not necessary to distinguish between a master device, a standby device, and a slave device, they are collectively referred to as devices.
为了保证堆叠系统能够正常工作,需要对堆叠系统进行配置。本领域技术人员公知的是,配置是指开启/关闭某个功能,或者设置某个功能的某个参数等。以交换机堆叠系统为例来看,可以通过配置设置堆叠系统中每个交换机的端口的介质访问控制(MAC,Media Access Control)地址,设置每个交换机开启访问控制功能等等,设置用于实现访问控制功能的访问控制列表(ACL)。这里,将指示堆叠系统如何进行配置的信息称为配置信息。配置 信息可以分为批量配置信息和单一配置信息,其中,单一配置信息,用于指示如何配置堆叠系统中的一个设备,而批量配置信息用于指示如何配置堆叠系统中的两个或两个以上设备。To ensure that the stack system works properly, you need to configure the stack system. It is well known to those skilled in the art that configuration refers to turning on/off a certain function, or setting a certain parameter of a certain function, and the like. Take the switch stacking system as an example. You can configure the MAC access control (MAC) address of each switch in the stacking system, set the access control function for each switch, and so on. Control access control list (ACL). Here, information indicating how the stack system is configured is referred to as configuration information. Configuration The information can be divided into batch configuration information and single configuration information. The single configuration information is used to indicate how to configure one device in the stack system, and the batch configuration information is used to indicate how to configure two or more devices in the stack system. .
在堆叠系统出现异常之后,为了方便对其进行恢复,主设备需要保存已执行即已生效的每个配置信息到配置信息集中。当需要恢复堆叠系统(如重启堆叠系统)后对其进行重新配置时,主设备根据配置信息集中的每个配置信息对堆叠系统进行重新配置。由于当主设备出现故障时,备设备变成主设备,因此备设备也需要保存配置信息集。目前,堆叠系统中,通过同步配置使得备设备保存配置信息集。After an abnormality occurs in the stack system, in order to facilitate recovery, the master device needs to save each configuration information that has been executed and is in effect to the configuration information set. When you need to restore a stack system (such as restarting the stack system) and reconfigure it, the master device reconfigures the stack system according to each configuration information in the configuration information set. Because the standby device becomes the master device when the master device fails, the standby device also needs to save the configuration information set. Currently, in a stack system, the standby device saves the configuration information set through synchronization configuration.
同步配置大致包括:主设备接收并解析配置信息,以将配置信息解析为一个或一个以上单一配置信息,将解析出的单一配置信息分别发送给对应的设备,根据每个设备返回的单一配置信息执行成功或者失败的配置结果,保存执行成功的单一配置信息到配置信息集中,主设备同步其配置信息集到备设备。这里,主设备同步其配置信息集到备设备包括:主设备将配置信息集中新增的配置信息发送给备设备,以使备设备更新其配置信息集。可见,上述同步配置的技术方案,一方面,由于需要主设备向备设备同步配置,因此相应增加了主设备和备设备的负荷,另一方面,为了实现配置同步,需要将解析出的每个单一配置信息分别发送给对应的设备,需要每个设备返回配置结果,且主设备和备设备之间需要交互同步配置的相关信息,因此占用了堆叠系统的一部分带宽资源。The synchronization configuration generally includes: the master device receives and parses the configuration information to parse the configuration information into one or more single configuration information, and sends the parsed single configuration information to the corresponding device respectively, according to the single configuration information returned by each device. If the configuration succeeds or fails, the single configuration information of the successful execution is saved to the configuration information set, and the master synchronizes its configuration information set to the standby device. Here, the master device synchronizes its configuration information set to the standby device, and the master device sends the configuration information newly added in the configuration information set to the standby device, so that the standby device updates its configuration information set. It can be seen that, in the above technical solution of the synchronous configuration, on the one hand, since the master device needs to be synchronously configured to the standby device, the load of the master device and the standby device is increased accordingly. On the other hand, in order to implement configuration synchronization, each of the parsed devices needs to be parsed. A single configuration information is sent to the corresponding device. Each device needs to return the configuration result. The master device and the standby device need to synchronize the configuration information. Therefore, a part of the bandwidth resource of the stack system is occupied.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种同步配置信息的方法、主设备和备设备,能够实现同步配置的同时降低主设备和备设备的负荷,且能够节省堆叠系统的带宽资源。The embodiments of the present invention provide a method for synchronizing configuration information, a master device, and a backup device, which can reduce the load of the master device and the standby device while reducing the bandwidth resources of the stack system.
本发明实施例公开了一种同步配置信息的方法,包括: The embodiment of the invention discloses a method for synchronizing configuration information, including:
主设备分别确定解析出的每个单一配置信息是否可由对应的设备执行;The master device determines whether each of the parsed single configuration information can be executed by the corresponding device;
主设备将确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;The master device combines the determined executable single configuration information into the to-be-executed configuration information, and broadcasts to the standby device and each slave device;
主设备和备设备分别保存得到的待执行配置信息到各自的配置信息集中。The master device and the standby device respectively save the obtained configuration information to be executed in the respective configuration information sets.
其中,所述方法还包括:所述每个从设备得到待执行配置信息之后,所述每个从设备分别保存得到的待执行配置信息到各自的配置信息集中。The method further includes: after each of the slave devices obtains the to-be-executed configuration information, the each slave device separately saves the obtained to-be-executed configuration information to a respective configuration information set.
其中,所述每个设备分别保存所述待执行配置信息到所述配置信息集中之后,所述方法还包括:After the device saves the to-be-executed configuration information to the configuration information set, the method further includes:
所述每个设备从待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。Each device parses a single configuration information corresponding to itself from the to-be-executed configuration information, and executes the parsed single configuration information.
其中,所述主设备分别确定解析出的每个单一配置信息是否可由对应的设备执行之前,所述方法还包括:所述主设备接收并解析配置信息。Before the master device determines whether each of the parsed single configuration information can be executed by the corresponding device, the method further includes: the master device receiving and parsing the configuration information.
本发明实施例还公开了一种主设备,包括确定单元、发送单元和第一保存单元,其中,An embodiment of the present invention further discloses a master device, including a determining unit, a sending unit, and a first saving unit, where
确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行;Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到主设备的配置信息集中。The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the configuration information set of the master device.
其中,所述主设备还包括第一执行单元,设置为:从所述待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The master device further includes a first execution unit configured to: parse a single configuration information corresponding to itself from the to-be-executed configuration information, and execute the parsed single configuration information.
其中,所述主设备还包括解析单元,设置为:接收并解析配置信息。The master device further includes a parsing unit configured to: receive and parse the configuration information.
本发明实施例还公开了一种备设备,至少包括第二保存单元,设置为:保存接收到的待执行配置信息到备设备的配置信息集中。The embodiment of the present invention further discloses a standby device, which includes at least a second saving unit, configured to: save the received configuration information to be executed to the configuration information set of the standby device.
其中,所述备设备还包括第二执行单元,设置为:从接收到的待执行配 置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The standby device further includes a second execution unit, configured to: from the received to-be-configured In the information, the single configuration information corresponding to itself is parsed, and the parsed single configuration information is executed.
本发明实施例还公开了一种设备,用作主设备时,包括确定单元、发送单元和第一保存单元,其中,The embodiment of the invention further discloses a device, when used as a master device, comprising a determining unit, a sending unit and a first saving unit, wherein
确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行;Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到所述设备的配置信息集中;The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the configuration information set of the device;
用作备设备或者从设备时,至少包括第二保存单元,设置为:保存接收到的待执行配置信息到所述设备的配置信息集中。When the device is used as a standby device or a slave device, at least the second storage unit is configured to save the received configuration information to be executed to the configuration information set of the device.
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现所述同步配置信息的方法。In addition, an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, the method for implementing the synchronization configuration information when the computer executable instructions are executed.
本发明实施例的技术方案包括:主设备分别确定解析出的每个单一配置信息是否可由对应的设备执行;主设备将确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设置和每个从设备;主设备和备设备分别保存得到的待执行配置信息到各自的配置信息集中。通过本发明实施例的技术方案,一方面,备设备通过接收到的待执行配置信息更新自身的配置信息集,避免了主设备向备设备同步配置的功能,降低了主设备和备设备的负荷,另一方面,本发明实施例的技术方案以广播方式代替单播方式发送配置信息,并且避免了每个设备返回配置结果,而且避免了主设备和备设备之间需要交互同步配置的相关信息,从而节省了堆叠系统的带宽资源。The technical solution of the embodiment of the present invention includes: the primary device determines whether each of the parsed single configuration information can be executed by the corresponding device; and the primary device combines the determined executable single configuration information into the to-be-executed configuration information, and broadcasts the The standby device and the slave device respectively save the obtained configuration information to be executed to the respective configuration information set. With the technical solution of the embodiment of the present invention, on the one hand, the standby device updates its configuration information set by receiving the configuration information to be executed, thereby avoiding the function of synchronizing the configuration of the primary device to the standby device, and reducing the load of the primary device and the standby device. On the other hand, the technical solution of the embodiment of the present invention sends the configuration information in a broadcast manner instead of the unicast mode, and avoids the configuration result returned by each device, and avoids the related information that needs to be synchronized and configured between the master device and the standby device. , which saves the bandwidth resources of the stack system.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the description which follows. The objectives and other advantages of the present invention can be realized and obtained by the structure of the invention.
在阅读并理解了附图和详细描述后,可以明白其他方面。 Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, which is used together with the embodiments of the present application to explain the technical solutions of the present application, and does not constitute a limitation of the technical solutions of the present application.
图1为本发明实施例提供的同步配置信息的方法的流程图;FIG. 1 is a flowchart of a method for synchronizing configuration information according to an embodiment of the present invention;
图2为本发明实施例提供的主设备的组成结构示意图;2 is a schematic structural diagram of a structure of a master device according to an embodiment of the present invention;
图3为本发明实施例提供的备设备的组成结构示意图。FIG. 3 is a schematic structural diagram of a standby device according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
现有单一设备如现有一台交换机中,为了保证对单一设备进行正确配置,接收到配置信息后,单一设备通常执行确定配置信息是否可执行的流程,如果配置信息可执行,根据配置信息进行配置。现有确定配置信息是否可执行主要包括:检查是否存在进行配置可使用的资源(本文中将该过程简称为配置资源检查),以及检查当前的配置信息与已执行的配置信息是否满足预先设定的规则(本文中将该过程简称为配置规则检查)。下面举例来看,In a single device, such as an existing switch, in order to ensure proper configuration of a single device, after receiving the configuration information, a single device usually performs a process of determining whether the configuration information is executable. If the configuration information is executable, configuration is performed according to the configuration information. . Whether the existing configuration information is executable or not includes: checking whether there is a resource available for configuration (referred to herein as a configuration resource check), and checking whether the current configuration information and the executed configuration information meet the preset. The rule (this process is referred to as the configuration rule check in this article). Here's an example,
对于配置资源检查,假设配置信息指示建立一条ACL规则,通过配置资源检查确定是否有空闲的可用于建立ACL规则的资源;For the configuration resource check, it is assumed that the configuration information indicates that an ACL rule is established, and the resource check is configured to determine whether there are any available resources for establishing an ACL rule.
对于配置规则检查,假设配置信息指示在交换机的指定端口上支持某个新业务(如支持解析某种新协议),针对该指定端口,通过配置规则检查确定新协议与已支持的协议是否冲突即预先设定的规则是否允许同时在该指定端口上支持新协议和已支持的协议。For the configuration rule check, it is assumed that the configuration information indicates that a new service is supported on the designated port of the switch (for example, support for resolving a new protocol). For the specified port, the configuration rule checks to determine whether the new protocol conflicts with the supported protocol. Whether the pre-set rule allows new protocols and supported protocols to be supported on the specified port at the same time.
图1为本发明实施例提供的同步配置信息的方法的流程图,如图1所 示,所述方法包括以下步骤:FIG. 1 is a flowchart of a method for synchronizing configuration information according to an embodiment of the present invention, as shown in FIG. 1 The method includes the following steps:
步骤101:主设备分别确定解析出的每个单一配置信息是否可由对应的设备执行。Step 101: The master device determines whether each of the parsed single configuration information can be executed by the corresponding device.
由于堆叠系统逻辑上可以看成一台设备,因此,堆叠系统中的主设备确定单一配置信息是否可执行的具体实现,类似于现有单一设备中确定配置信息是否可执行的具体实现,是本领域技术人员根据现有单一设备中确定是否可执行的具体实现容易想到的,并不用于限定本申请的保护范围,此处不再赘述。Since the stacking system can be logically regarded as one device, the specific device in the stacking system determines whether a single configuration information is executable, and is similar to the specific implementation in the existing single device to determine whether the configuration information is executable. The technical personnel can easily think of whether the specific implementation of the existing single device is executable or not, and is not intended to limit the scope of protection of the present application, and details are not described herein again.
步骤101之前,本实施例提供的方法还包括:主设备接收并解析配置信息。其中,如何解析配置信息,属于本领域技术人员的惯用技术手段,并不用于限定本申请的保护范围,此处不再赘述。Before the step 101, the method provided by the embodiment further includes: the master device receives and parses the configuration information. The configuration information of the present invention is not limited to the scope of protection of the present application, and details are not described herein again.
步骤102:主设备将确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备。Step 102: The master device combines the determined executable single configuration information into the to-be-executed configuration information, and broadcasts to the standby device and each slave device.
其中,将单一配置信息组合成待执行配置信息的过程,是与将批量配置信息解析成一个或一个以上单一配置信息的过程相反的过程,本领域技术人员由于熟悉如何解析批量配置信息,因此容易在此基础上想到如何实现将单一配置信息组合成待执行配置信息。很明显,待执行配置信息为批量配置信息或者单一配置信息。因此,步骤102的具体实现,是本领域技术人员容易想到的,此处不再赘述。The process of combining the single configuration information into the configuration information to be executed is the reverse of the process of parsing the batch configuration information into one or more single configuration information, and those skilled in the art are familiar with how to parse the batch configuration information. On this basis, it is thought on how to combine the single configuration information into the configuration information to be executed. Obviously, the configuration information to be executed is batch configuration information or single configuration information. Therefore, the specific implementation of step 102 is easily conceivable by those skilled in the art, and details are not described herein again.
步骤103:主设备和备设备分别保存得到的待执行配置信息到各自的配置信息集中。Step 103: The master device and the standby device respectively save the obtained configuration information to be executed to the respective configuration information set.
根据步骤101可知,待执行配置信息包括的每个单一配置信息均可由对应的设备执行。因此,主设备和备设备可以直接保存待执行配置信息到各自的配置信息集中。对于主设备,与相关同步配置的技术方案相比,其不需要每个设备返回执行配置信息的配置结果即可完成更新配置信息集,从而节省了堆叠系统的网络带宽。According to step 101, each single configuration information included in the configuration information to be executed can be executed by the corresponding device. Therefore, the master device and the standby device can directly save the to-be-executed configuration information to the respective configuration information sets. For the master device, compared with the related synchronous configuration technical solution, the device does not need to return the configuration result of executing the configuration information to complete the update configuration information set, thereby saving the network bandwidth of the stack system.
可选地,Optionally,
每个从设备得到(即接收到)待执行配置信息之后,所述方法还包括: 每个从设备分别保存得到的待执行配置信息到各自的配置信息集中。这样,当主设备失效(如主设备的硬件出现故障)时,堆叠系统根据相关选举策略,选定备设备变成主设备,并选定一个从设备作为备设备。由于,选举之前的每个设备均维护有配置信息集,因此选定的备设备维护有配置信息集。这样,在主设备失效后,选定的主设备和备设备均维护有配置信息集,省掉了相关配置同步中的选定的主设备向选定的备设备同步配置信息集,降低了堆叠系统的设计复杂度。After each slave device obtains (ie, receives) the to-be-executed configuration information, the method further includes: Each slave device saves the to-be-executed configuration information to the respective configuration information set. In this way, when the master device fails (for example, the hardware of the master device fails), the stacking system selects the standby device to become the master device according to the relevant election policy, and selects a slave device as the standby device. Because each device before the election maintains a configuration information set, the selected standby device maintains a configuration information set. In this way, after the primary device fails, the selected primary device and the standby device maintain the configuration information set, and the selected primary device in the related configuration synchronization is saved to synchronize the configuration information set with the selected standby device, thereby reducing the stack. The design complexity of the system.
需要说明的是,每个设备分别保存待执行配置信息到配置信息集中之后,本实施例的方法还包括:It should be noted that after each device saves the configuration information to be executed to the configuration information set, the method in this embodiment further includes:
每个设备从待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。通过执行解析出的单一配置信息,每个设备完成了对其自身的配置。如果每个设备没有解析出与其自身对应的单一配置信息,结束当前流程。Each device parses a single configuration information corresponding to itself from the to-be-executed configuration information, and executes the parsed single configuration information. Each device completes its configuration by performing a single configuration of the parsed information. If each device does not resolve a single configuration information corresponding to itself, the current process ends.
下面结合一个实施例详细说明本申请的技术方案。The technical solution of the present application is described in detail below with reference to an embodiment.
假设堆叠系统为交换机堆叠系统,由4台交换机构成,分别为交换机1、2、3和4,其中,交换机1为主设备,交换机2为备设备,交换机3和4均为从设备,主设备接收到一条批量配置信息:Set port 1/1,2/1,3/1,4/1acl200enable。其中,1/1代表交换机1的端口1,依此类推,4/1代表交换机4的端口1,该配置信息用于指示分别在设备1、2、3和4的端口1上建立标号为200的一条ACL规则。此时,交换机4上没有建立ACL规则的相应资源。Assume that the stacking system is a switch stacking system consisting of four switches, namely switches 1, 2, 3, and 4. Switch 1 is the master device, switch 2 is the standby device, and switches 3 and 4 are slave devices. Received a batch configuration information: Set port 1/1, 2/1, 3/1, 4/1acl200enable. Wherein, 1/1 represents port 1 of switch 1, and so on, 4/1 represents port 1 of switch 4, and the configuration information is used to indicate that the label is set to 200 on port 1 of devices 1, 2, 3, and 4, respectively. An ACL rule. At this time, the corresponding resource of the ACL rule is not established on the switch 4.
根据上面的假设,主设备接收到上述批量配置信息后,解析该批量配置信息,得到下面表1所示的单一配置信息。According to the above assumption, after receiving the batch configuration information, the master device parses the batch configuration information to obtain single configuration information as shown in Table 1 below.
Set port 1/1acl 200enableSet port 1/1acl 200enable
Set port 2/1acl 200enableSet port 2/1acl 200enable
Set port 3/1acl 200enableSet port 3/1acl 200enable
Set port 4/1acl 200enableSet port 4/1acl 200enable
表1Table 1
然后,针对表1示出的每个单一配置信息,主设备分别确定每个单一配 置信息是否可由对应的设备执行。以表1中第2个表项示出的单一配置信息(Set port 2/1acl 200enable)为例来看,主设备确定该单一配置信息是否可由交换机2即备设备执行。通过配置资源检查和配置规则检查,主设备确定出该单一配置信息可执行。Then, for each single configuration information shown in Table 1, the master device determines each single match separately Whether the information can be executed by the corresponding device. Taking the single configuration information (Set port 2/1acl 200enable) shown in the second entry in Table 1 as an example, the master device determines whether the single configuration information can be executed by the switch 2 standby device. By configuring the resource check and configuration rule check, the master device determines that the single configuration information is executable.
通过上面的步骤,主设备确定出,表1中第4个表项示出的单一配置信息,由于交换机4上没有建立ACL规则的相应资源,不可执行。表1中的其它表项(即表1中除第4个表项之外的其它表项)示出的单一配置信息,均可执行。Through the above steps, the master device determines that the single configuration information shown in the fourth entry in Table 1 cannot be executed because the corresponding resource of the ACL rule is not established on the switch 4. The other configuration information shown in other entries in Table 1 (ie, other entries in Table 1 except the fourth entry) can be executed.
主设备将确定出的可执行的单一配置信息组合成待执行配置信息:Set port 1/1,2/1,3/1acl 200enable。主设备保存待执行配置信息到配置信息集中,解析与其自身对应的单一配置信息Set port 1/1acl 200enable,并执行该单一配置信息。The master device combines the determined executable single configuration information into the to-be-executed configuration information: Set port 1/1, 2/1, 3/1acl 200enable. The master device saves the to-be-executed configuration information to the configuration information set, parses the single configuration information Set port 1/1acl 200enable corresponding to itself, and executes the single configuration information.
主设备将待执行配置信息广播给备设备和每个从设备,即交换机2、3和4。The master device broadcasts the to-be-executed configuration information to the standby device and each of the slave devices, namely switches 2, 3, and 4.
交换机2接收到待执行配置信息,保存待执行配置信息到配置信息集中,解析与其自身对应的单一配置信息Set port 2/1acl 200enable,并执行该单一配置信息。The switch 2 receives the to-be-executed configuration information, saves the to-be-executed configuration information to the configuration information set, parses the single configuration information Set port 2/1acl 200enable corresponding to itself, and executes the single configuration information.
交换机3接收到待执行配置信息,保存待执行配置信息到配置信息集中,解析与其自身对应的单一配置信息Set port 3/1acl 200enable,并执行该单一配置信息。The switch 3 receives the configuration information to be executed, saves the to-be-executed configuration information to the configuration information set, parses the single configuration information Set port 3/1acl 200enable corresponding to itself, and executes the single configuration information.
交换机4接收到待执行配置信息,保存待执行配置信息到配置信息集中,解析与其自身对应的单一配置信息,没有解析得到相应的单一配置信息,不进行配置。The switch 4 receives the configuration information to be executed, saves the configuration information to be executed to the configuration information set, parses the single configuration information corresponding to itself, and does not parse the corresponding single configuration information, and does not perform configuration.
图2为本发明实施例提供的主设备的组成结构示意图,该主设备用于组成堆叠系统,如图2所示,该主设备包括确定单元、发送单元和第一保存单元,其中,2 is a schematic structural diagram of a main device according to an embodiment of the present invention. The main device is configured to form a stacking system. As shown in FIG. 2, the main device includes a determining unit, a sending unit, and a first saving unit, where
确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行; Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到主设备的配置信息集中。The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the configuration information set of the master device.
可选地,图2中的主设备还包括第一执行单元,设置为:从待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。Optionally, the master device in FIG. 2 further includes a first execution unit, configured to: parse a single configuration information corresponding to itself from the to-be-executed configuration information, and execute the parsed single configuration information.
可选地,图2中的主设备还包括解析单元,设置为:接收并解析配置信息。Optionally, the master device in FIG. 2 further includes a parsing unit configured to: receive and parse the configuration information.
图3为本发明实施例提供的备设备的组成结构示意图,该备设备用于组成堆叠系统,如图3所示,该备设备至少包括第二保存单元,设置为:保存接收到的待执行配置信息到备设备的配置信息集中。FIG. 3 is a schematic structural diagram of a backup device according to an embodiment of the present invention. The standby device is configured to form a stacking system. As shown in FIG. 3, the standby device includes at least a second saving unit, and is configured to: save the received to be executed. Configure the configuration information to the configuration information of the standby device.
可选地,图3中的备设备还包括第二执行单元,设置为:从接收到的待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。Optionally, the standby device in FIG. 3 further includes a second execution unit, configured to: parse a single configuration information corresponding to itself from the received configuration information to be executed, and execute the parsed single configuration information.
由图2和图3中的主设备和备设备组成的堆叠系统还可以包括从设备,该从设备至少包括第三保存单元,设置为:保存接收到的待执行配置信息到从设备的配置信息集中。The stack system consisting of the master device and the standby device in FIG. 2 and FIG. 3 may further include a slave device, where the slave device includes at least a third save unit, configured to: save the received configuration information of the to-be-executed configuration information to the slave device. concentrated.
该从设备还可以包括第三执行单元,设置为:从接收到的待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The slave device may further include a third execution unit configured to: parse the single configuration information corresponding to the self-executed configuration information from the received configuration information, and execute the parsed single configuration information.
由于堆叠系统中的设备可以为主设备、备设备或者从设备,因此本发明实施例还公开了一种设备。The device in the stacking system can also be a master device, a standby device, or a slave device. Therefore, an embodiment of the present invention also discloses a device.
用作主设备时,该设备包括确定单元、发送单元和第一保存单元,其中,When used as a master device, the device includes a determining unit, a sending unit, and a first saving unit, where
确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行;Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到设 备的配置信息集中。The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the setting The configuration information of the backup is centralized.
用作备设备或者从设备时,该设备至少包括第二保存单元,设置为:保存接收到的待执行配置信息到设备的配置信息集中。When the device is used as a standby device or a slave device, the device includes at least a second save unit, and is configured to: save the received configuration information to be executed to the configuration information set of the device.
用作主设备时,该设备还包括解析单元,设置为:接收并解析配置信息。When used as a master device, the device also includes a parsing unit configured to: receive and parse configuration information.
该设备还包括第一执行单元,设置为:从得到的待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The device further includes a first execution unit configured to parse a single configuration information corresponding to itself from the obtained to-be-executed configuration information, and execute the parsed single configuration information.
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现所述同步配置信息的方法。In addition, an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, the method for implementing the synchronization configuration information when the computer executable instructions are executed.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本申请不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function. This application is not limited to any specific combination of hardware and software.
虽然本申请所揭露的实施方式如上所述,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。The embodiments disclosed in the present application are as described above, but the description is only for the purpose of understanding the present application, and is not intended to limit the present application. Any modifications and changes in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the disclosure. The scope defined by the appended claims shall prevail.
工业实用性Industrial applicability
本发明实施例提供一种同步配置信息的方法、主设备和备设备,避免了主设备向备设备同步配置的功能,降低了主设备和备设备的负荷,而且,避免了主设备和备设备之间需要交互同步配置的相关信息,从而节省了堆叠系统的带宽资源。 The embodiment of the invention provides a method for synchronizing configuration information, a master device and a standby device, which avoids the function of synchronizing the configuration of the master device to the standby device, reduces the load of the master device and the standby device, and avoids the master device and the standby device. The information about the synchronization configuration needs to be exchanged, which saves the bandwidth resources of the stack system.

Claims (11)

  1. 一种同步配置信息的方法,包括:A method of synchronizing configuration information, including:
    主设备分别确定解析出的每个单一配置信息是否可由对应的设备执行;The master device determines whether each of the parsed single configuration information can be executed by the corresponding device;
    主设备将确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;The master device combines the determined executable single configuration information into the to-be-executed configuration information, and broadcasts to the standby device and each slave device;
    主设备和备设备分别保存得到的待执行配置信息到各自的配置信息集中。The master device and the standby device respectively save the obtained configuration information to be executed in the respective configuration information sets.
  2. 根据权利要求1所述的方法,所述方法还包括:所述每个从设备得到待执行配置信息之后,所述每个从设备分别保存得到的待执行配置信息到各自的配置信息集中。The method according to claim 1, further comprising: after each of the slave devices obtains configuration information to be executed, each of the slave devices separately saves the obtained configuration information to be executed to a respective configuration information set.
  3. 根据权利要求2所述的方法,所述每个设备分别保存所述待执行配置信息到所述配置信息集中之后,所述方法还包括:The method of claim 2, after each device saves the to-be-executed configuration information to the configuration information set, the method further includes:
    所述每个设备从待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。Each device parses a single configuration information corresponding to itself from the to-be-executed configuration information, and executes the parsed single configuration information.
  4. 根据权利要求1~3任一项所述的方法,所述方法还包括:所述主设备接收并解析配置信息。The method according to any one of claims 1 to 3, further comprising the master device receiving and parsing configuration information.
  5. 一种主设备,包括确定单元、发送单元和第一保存单元,其中,A master device includes a determining unit, a sending unit, and a first saving unit, wherein
    确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行;Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
    发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
    第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到主设备的配置信息集中。The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the configuration information set of the master device.
  6. 根据权利要求5所述的主设备,所述主设备还包括第一执行单元,设置为:从所述待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The master device according to claim 5, further comprising a first execution unit configured to parse a single configuration information corresponding to itself from the to-be-executed configuration information, and execute the parsed single configuration information.
  7. 根据权利要求5或6所述的主设备,所述主设备还包括解析单元,设 置为:接收并解析配置信息。The master device according to claim 5 or 6, wherein the master device further comprises a parsing unit, Set to: Receive and parse configuration information.
  8. 一种备设备,至少包括第二保存单元,设置为:保存接收到的待执行配置信息到备设备的配置信息集中。A backup device includes at least a second saving unit, configured to: save the received configuration information to be executed to a configuration information set of the standby device.
  9. 根据权利要求8所述的备设备,所述备设备还包括第二执行单元,设置为:从接收到的待执行配置信息中解析与其自身对应的单一配置信息,并执行解析出的单一配置信息。The standby device according to claim 8, further comprising: a second execution unit, configured to: parse a single configuration information corresponding to itself from the received configuration information to be executed, and execute the parsed single configuration information .
  10. 一种设备,a device,
    用作主设备时,包括确定单元、发送单元和第一保存单元,其中,When used as a master device, including a determining unit, a sending unit, and a first saving unit, wherein
    确定单元,设置为:分别确定解析出的每个单一配置信息是否可由对应的设备执行;Determining a unit, configured to: determine whether each of the parsed single configuration information can be executed by the corresponding device;
    发送单元,设置为:将确定单元确定出的可执行的单一配置信息组合成待执行配置信息,并广播给备设备和每个从设备;a sending unit, configured to: combine the executable single configuration information determined by the determining unit into the to-be-executed configuration information, and broadcast to the standby device and each of the slave devices;
    第一保存单元,设置为:保存发送单元组合得到的待执行配置信息到所述设备的配置信息集中;The first saving unit is configured to: save the to-be-executed configuration information obtained by the sending unit combination to the configuration information set of the device;
    用作备设备或者从设备时,至少包括第二保存单元,设置为:保存接收到的待执行配置信息到所述设备的配置信息集中。When the device is used as a standby device or a slave device, at least the second storage unit is configured to save the received configuration information to be executed to the configuration information set of the device.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现权利要求1-4任一项所述的方法。 A computer readable storage medium storing computer executable instructions that, when executed, implement the method of any of claims 1-4.
PCT/CN2016/076732 2015-05-08 2016-03-18 Configuration information synchronization method, primary device and standby device WO2016180081A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510234432.3 2015-05-08
CN201510234432.3A CN106209690A (en) 2015-05-08 2015-05-08 A kind of synchronize the method for configuration information, main equipment and standby equipment

Publications (1)

Publication Number Publication Date
WO2016180081A1 true WO2016180081A1 (en) 2016-11-17

Family

ID=57247764

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076732 WO2016180081A1 (en) 2015-05-08 2016-03-18 Configuration information synchronization method, primary device and standby device

Country Status (2)

Country Link
CN (1) CN106209690A (en)
WO (1) WO2016180081A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110881008A (en) * 2018-09-05 2020-03-13 瑞昱半导体股份有限公司 Method for synchronously forwarding database

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789304B (en) * 2016-12-29 2019-12-06 杭州迪普科技股份有限公司 Network equipment configuration synchronization method and device
CN107332695A (en) * 2017-06-15 2017-11-07 迈普通信技术股份有限公司 A kind of method and device for disposing double layer network
CN107888434B (en) * 2017-12-29 2021-02-26 杭州迪普科技股份有限公司 Network equipment configuration synchronization method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090276549A1 (en) * 2008-05-01 2009-11-05 Nokia Corporation Access for host stacks
CN102724030A (en) * 2012-06-29 2012-10-10 杭州迪普科技有限公司 Stacking system with high reliability
CN102904705A (en) * 2012-11-05 2013-01-30 迈普通信技术股份有限公司 Method and equipment for synchronizing batch of stacking systems
CN102932190A (en) * 2012-11-22 2013-02-13 杭州迪普科技有限公司 Method and device for solving single point of failure of equipment section

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090276549A1 (en) * 2008-05-01 2009-11-05 Nokia Corporation Access for host stacks
CN102724030A (en) * 2012-06-29 2012-10-10 杭州迪普科技有限公司 Stacking system with high reliability
CN102904705A (en) * 2012-11-05 2013-01-30 迈普通信技术股份有限公司 Method and equipment for synchronizing batch of stacking systems
CN102932190A (en) * 2012-11-22 2013-02-13 杭州迪普科技有限公司 Method and device for solving single point of failure of equipment section

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110881008A (en) * 2018-09-05 2020-03-13 瑞昱半导体股份有限公司 Method for synchronously forwarding database
CN110881008B (en) * 2018-09-05 2022-02-18 瑞昱半导体股份有限公司 Method for synchronously forwarding database

Also Published As

Publication number Publication date
CN106209690A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN105426439B (en) Metadata processing method and device
WO2016180081A1 (en) Configuration information synchronization method, primary device and standby device
US8769155B2 (en) Techniques for synchronizing application object instances
US9444611B2 (en) Network system and method of synchronizing path information
EP3316555B1 (en) Mac address synchronization method, device and system
EP2916488A1 (en) Method and system for upgrading software of distributed communication device
WO2021057438A1 (en) Main/standby switching method and apparatus, bras device, and storage medium
US20210243283A1 (en) Message transmission method, message transmission device, network side device and storage medium
CN109218232B (en) Method, equipment and system for realizing Mux machine
CN112615778A (en) Message forwarding method, device, router, storage medium and system
WO2022062662A1 (en) Data transmission method and system, network device, and storage medium
US20180262287A1 (en) Time synchronization packet processing method and device
US10841160B2 (en) System and method for processing messages during a reboot of a network device
WO2012048574A1 (en) Method and system for realizing router full protection
WO2016150307A1 (en) Firewall dual-machine hot spare method, device and system
CN109271433A (en) A kind of company-data synchronous method
US20140204953A1 (en) Communication System and Network Relay Device
CN110972170A (en) Base station configuration method and base station
WO2015101100A1 (en) Network device and service processing method in network
WO2016074497A1 (en) Method for dividing work in stack system, master device, slave device, and system
WO2017117955A1 (en) Route synchronizing method, device and communication system
CN115022261B (en) Multicast table item synchronization method, equipment and medium based on stacking environment
CN102983997A (en) Method and device for migrating master services
CN107179912B (en) Hot upgrading method for distributed architecture software defined network controller
CN104065499A (en) Main control board, main/standby system and information backup method and 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: 16791931

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

Country of ref document: EP

Kind code of ref document: A1