WO2018205728A1 - 用于处理堆叠分裂的方法、计算机设备及计算机可读存储介质 - Google Patents
用于处理堆叠分裂的方法、计算机设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2018205728A1 WO2018205728A1 PCT/CN2018/078387 CN2018078387W WO2018205728A1 WO 2018205728 A1 WO2018205728 A1 WO 2018205728A1 CN 2018078387 W CN2018078387 W CN 2018078387W WO 2018205728 A1 WO2018205728 A1 WO 2018205728A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- stacking
- stack
- packet
- duration
- parameter information
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0631—Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- the present disclosure relates to the field of communications technologies, and more particularly to a method, computer device, and computer readable storage medium for processing stack splitting.
- the stacking technology connects multiple network devices together through a stacking link to form a stacking system.
- the stacking system elects a master device and several slave devices through roles, thereby virtualizing multiple network devices into one network device for management.
- the slave devices When a fault occurs on the stack link between the master device and the slave device, the slave devices that cannot communicate with the master device but communicate with each other will select a new master device from the role election. In this case, the network will select a new master device. There will be two or even multiple master devices with the same configuration. This process is called stack splitting. After a stack is split, for a network device other than the stack system, multiple master devices appear on the network, causing network configuration conflicts and traffic forwarding confusion.
- embodiments of the present disclosure provide a method for processing a stack split, and a computer device and computer readable storage medium associated therewith.
- a method for processing stack splitting is provided.
- the method is performed by the first master device, and includes the steps of: after detecting the occurrence of the stack splitting, encapsulating an Internet Protocol (IP) packet, where the IP packet carries the current primary device The first system parameter information of the first stacking system newly formed by the stack splitting; and sending the IP packet to each stacking device by using a routing sub-interface, the stacking device including splitting due to the stacking a first stacking device that is split from the first stacking system.
- IP Internet Protocol
- a method for processing stack splitting is also provided.
- the method is performed by a first stacking device in a second stacking system newly formed by the stack splitting and includes the step of: receiving, by a routing sub-interface, a first master of a first stacking system newly formed by the stack splitting An IP packet sent by the device, where the IP packet carries the first system parameter information of the first stacking system; the IP packet is analyzed; and the analysis result of the IP packet is the When the second stack system needs to be retired, all service ports of the second stack system are closed.
- a computer apparatus comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the program A method for processing stack splitting as described above.
- a computer readable storage medium storing a computer program that, when executed by a processor of a computer device, implements stack splitting as described above Methods.
- FIG. 1 is a schematic flow chart of a processing method for stack splitting in an embodiment
- FIG. 2 is a schematic flow chart of a processing method for stack splitting in another embodiment
- FIG. 3 is a schematic diagram of a topology model of a stacking system in an application example
- FIG. 4 is a schematic diagram showing the principle of using IP packet communication in a stacking system in an application example.
- FIG. 1 is a schematic flowchart of a processing method for processing a stack split in an embodiment. This embodiment is mainly described by taking a related process of sending an IP packet by a master device as an example.
- the method in this embodiment is performed by a first master device that is a master device of the first stacking system that is newly formed due to stack splitting. As shown in Figure 1, the method includes:
- Step S101 The first master device encapsulates the IP packet, and the IP packet carries the first system parameter information of the first stack system where the first master device is currently located.
- Step S102 The first master device sends the IP packet to each stack device through a routing sub-interface, where the stacking device includes a first stack that is split and stacked with the first stacking system due to the stack splitting. device.
- the routing sub-interface is configured in each stacking device of the stacking system.
- the first main device encapsulation carries the first system parameter of the first stacking system.
- the IP packet can be sent to the split stack device (that is, the first stack device) by using the routing sub-interface.
- the first stacking device may analyze whether it needs backoff based on the IP packet. Therefore, when stack splitting occurs, the normal operation of the stack system can be restored as soon as possible, and the reliability of the stack system is improved.
- the first master device may be the master device of the original stacking system (hereinafter, the third stacking system) in which the stack splitting occurs (so after the first stacking system is formed due to stack splitting, the first master device is in the first
- the main device may continue to be the primary device in a stacking system, or may be selected from the first stacking system by role election, direct designation, or the like (in the case where the primary device of the original stacking system is not in the first stacking system) device.
- the first system parameter information can be set in combination with actual technical needs.
- the first system parameter information may include at least one of a first number and a first duration, where the first number is the number of stacked devices in the first stacking system, the first duration The time is the duration that the first master device becomes the master device.
- the first master device may send the IP packet to each first stacking device that is split with the first stacking system, and may also be configured to each stacking device in the first stacking system in which it is located. send. It can be understood that the original stacking system is composed of a set of stacked devices in the current first stacking system and a set of the first stacked devices.
- the first master device may also send the IP packet to each first stack device that is split with the first stacking system, and does not need to send to each stack in the first stacking system where the first stacking system is located. Equipment to improve processing performance.
- the first master device needs to know the IP address of each first stacking device. Therefore, in an embodiment, after the first master device detects that the IP packet is encapsulated, the first master device may further perform the following steps: acquiring each first splitting from the first stack system The device chassis number (device ID) of the stacking device; and the mapping table of the device chassis number and the IP address, obtain the IP addresses of the first stacking devices.
- the encapsulated IP packet carries the IP address of each first stack device. Based on the IP address carried in the IP packet, the IP packet can be sent to each of the first stacking devices that are separated from the first stacking system.
- the first master device may further perform the following steps: configuring a routing sub-interface of the first master device, and configuring the routing sub-interface of the first master device An IP address of the first master device, and a device chassis number and an IP address of each stack device in the third stacking system where the first master device is located, where the third stacking system is Each of the stacking devices is configured with a routing sub-interface, and a corresponding IP address is configured on the routing sub-interface; and the device chassis number and the IP address of each stacking device in the third stacking system are generated.
- the corresponding table of the device chassis number and the IP address of each stack device in the third stacking system are generated.
- the routing function of the first master device can be implemented, and the device chassis number and IP address of the other stacking devices can be obtained, and a correspondence table is established according to the configuration, so that when the stacking split occurs in the third stacking system, The device chassis number of the first stacking device in which the first stacking system is split, and the IP address of the first stacking device is found from the corresponding table to send the encapsulated IP packet to the first stacking device.
- each of the stacking devices in the third stacking system may also enable the routing protocol on the configured routing sub-interface after configuring its respective routing sub-interface, and The configured routing subinterface is connected to the intermediate routing device network. Therefore, if the stacking split occurs in the third stacking system, each stacking device can receive and/or send the IP packet through the respective routing sub-interface and the intermediate routing device.
- the stacking device of the third stacking system may also configure a virtual private network (VPN) to which the routing sub-interface joins.
- VPN virtual private network
- the stacking link can also obtain the stacks in the third stacking system through the stacking link.
- the correspondence table may further include a name of a VPN joined by a routing sub-interface of each stacking device in the third stacking system. The name of the VPN to which the routing sub-interface of each stack device in the third stack is added should be the same. Therefore, when an IP packet is sent, it can be transmitted through a VPN to improve the security of information transmission.
- the routing protocol is a Layer 3 routing protocol.
- the routing protocol may be selected from, but not limited to, a group consisting of an Open Shortest Path First Protocol (OSPF), a Routing Information Protocol (RIP), and an intermediate system.
- OSPF Open Shortest Path First Protocol
- RIP Routing Information Protocol
- ISIS Intermediate System-to-Intermediate System Protocol
- EBGP External Border Gateway Protocol
- the first master device not only sends the IP packet to the stacking device through the routing sub-interface, but also receives the second stacking system newly formed by the stack splitting by using the routing sub-interface.
- the IP packet sent by the master device, and the IP packet sent by the master device of the second stacking system includes the second system parameter information of the second stacking system.
- the first master device analyzes the IP packet sent by the master device of the second stacking system, and closes the IP packet when the analysis result of the IP packet is that the first stacking system needs to be backed off. All service ports of the first stacking system.
- FIG. 2 a schematic flowchart of a method for processing a stack split in another embodiment is shown in FIG. 2 , which is an example of a process in which a stack device receives an IP packet.
- the method in this embodiment is performed by a first stacking device in a second stacking system newly formed by the stack splitting.
- the method in this embodiment includes:
- Step S201 The IP packet sent by the first master device of the first stack system newly formed by the stack splitting is received by the routing sub-interface, where the IP packet carries the first system parameter information of the first stacking system.
- Step S202 Perform analysis on the IP packet.
- Step S203 When the analysis result of the IP packet is that the second stack system needs to be backed off, all the service ports of the second stacking system are closed.
- a routing sub-interface is configured in each stacking device of the stacking system.
- a stack split occurs, a first stacking system and a second stacking system are formed.
- the first master device is the master device of the first stacking system.
- the stacking device (the first stacking device) in the second stacking system can receive the IP packet sent by the first master device, where the IP packet carries the first system of the first stacking system where the first master device is currently located. Parameter information), and by analyzing the IP packet, it is concluded that the second stack system in which it is located needs to be retired. When the second stacking system needs to be backed off, the second stacking system is caused to shut down all of its own service ports.
- the method before the step of analyzing the IP packet, the method further includes the step of: acquiring second system parameter information of the second stacking system where the first stacking device is located.
- the step of analyzing the IP packet may include: determining, according to the first system parameter information and the second system parameter information, whether the second stack system where the current stacking device is located needs to be backed off.
- the first system parameter information and the second system parameter information may be set according to actual technical needs.
- the type and quantity of the first system parameter information and the second system parameter information should generally be the same.
- the first system parameter information can include at least one of a first number, a first duration.
- the first number is the number of stacked devices in the first stacking system
- the first duration is a duration in which the first master device becomes the master device.
- the second system parameter information may include at least one of a second number and a second duration.
- the second number is the number of the stacking devices in the second stacking system where the current stacking device is located, and the second duration is the duration in which the current stacking device becomes the master device.
- the IP packet is analyzed in the foregoing step S202 to determine that the current first stacking device is located in the second
- the corresponding analysis methods also have certain differences.
- the second system parameter information when the first system parameter information includes the first number and the second system parameter information includes the second number, when the second number is less than the first number, it may be determined that the second stacking system needs to be backed off.
- the second stack system may be determined to be retracted when the second duration is less than the first duration.
- the first number and the second number may be compared first. If the second number is less than the first number, it may be directly determined that the second stack system needs to be backed off, and if the first number is the same as the second number, the first duration and the second duration are further compared; if the second duration is less than For the first duration, it is determined that the second stacking system needs to be retracted.
- the subsequent process is performed only by the master device in the second stacking system, and the other stacking devices (slave devices) do not perform the subsequent processing. That is, in the above step S202, when the first stack device is the master device, the subsequent process of analyzing the IP packet is performed.
- the first stacking device that is the master device of the second stacking system, before shutting down all its own service ports,
- the other stacking devices in the second stacking system send broadcast messages that close all of the service ports, so that all service ports of the second stacking system can be shut down.
- the master device in the second stacking system closes all the service ports, the other devices in the second stacking system are closed, and then all the service ports are closed, so that the master device does not close all the service ports first.
- the possibility of re-electing a new master device from other slave devices in the second stack system that have not been closed to the service port further improves the reliability of the stack system.
- the manner in which the routing device configures the routing sub-interface, the IP address, and the VPN in the second embodiment, the manner in which the corresponding table is generated, and the manner in which the stacking is performed after the splitting is performed is similar to that in the first embodiment, and details are not described herein again.
- the number of stacking devices included in the stacking system is variable. It can be a simple stacking system with only two stacking devices or a complex stacking system with multiple stacking devices.
- Figure 3 shows a stacking device with four stacking devices.
- Stacking system in the solution of the embodiment of the present disclosure, in order to meet the maximum maintenance of the traffic forwarding capacity after the splitting and the uninterrupted requirements of the existing services, the number of devices in the newly formed stacking system may be adopted in the backoff mechanism after the splitting of the stack. And the duration of becoming the master device is used as the basis for backoff. Those skilled in the art will appreciate that other retraction mechanisms may be employed in other embodiments.
- the stacking system shown in FIG. 3 is an original stacking system before stack splitting has occurred.
- the embodiments of the present disclosure refer to the third stacking system.
- the stacking device in the third stacking system includes: device 0, device 1, device 2, and device 3, where device 0 is a master device, and devices 1, 2, and 3 are slave devices.
- each stacking device in the third stacking system obtains the device chassis number and the IP address of each stacking device in the third stacking system in the stacking link, that is, all other member devices need to be obtained through the stacking link.
- Equipment chassis number and IP address In the case that the routing sub-interface is added to the VPN, the VPN name of the routing sub-interface of each stacking device in the third stacking system is obtained.
- device 0 needs to obtain the device chassis number, IP address, and added VPN name of device 1, device 2, and device 3 through the stack link.
- Device 1 needs to obtain the stack link.
- Device 2 needs to obtain the device chassis of device 0, device 1, and device 3 through the stack link. Number, IP address, and added VPN name.
- Device 3 needs to obtain the device chassis number, IP address, and added VPN name of device 0, device 1, and device 2 through the stack link.
- the manner of obtaining information through the stacking link is not specifically limited in this embodiment.
- each stacking device After obtaining the device chassis number, IP address, and VPN name of all other stacking devices, each stacking device can generate the device chassis number, IP address, and VPN name of all the stacking devices in the third stacking system based on the obtained information. Correspondence table. That is, in each stacking device (including device 0, device 1, device 2, device 3), such a correspondence table is generated. It can be understood that, in the case that the routing sub-interface is not added to the VPN, the correspondence table does not include the VPN name.
- the device chassis number, the IP address, and the added VPN name of the other devices 1, 2, and 3 in the third stack can be obtained only by the device 0 as the master device, based on the obtained information and the device.
- the device chassis number, the IP address, and the added VPN name of the device are generated.
- the device chassis number, IP address, and VPN name of all the stack devices in the third stack are generated. Then, the corresponding table is sent to the device. Three other devices in the stack 1, 2, 3.
- each stacking device may be connected to an intermediate routing device (also referred to as an intermediate device or an intermediate network, not shown in FIG. 3) and enabled.
- Layer routing protocol also known as Layer 3 protocol.
- the required Layer 3 routing protocol can be selected based on a technical application, including but not limited to OSPF protocol, RIP protocol, ISIS protocol, EBGP protocol. Therefore, because a routing sub-interface is used, after a certain (or some) stacking device is split, the newly formed stacking system after the split does not have the information of the routing sub-interface of the split device.
- a Layer 3 routing protocol is enabled, and each stack device can communicate through a Layer 3 routing protocol. Therefore, after the split occurs, the newly formed stack system and the split device can also communicate interactively through the Layer 3 routing protocol.
- the routing sub-interfaces of device 0 and device 1 are named 0/0/1/1. 1 and 1/1/0/2.1, respectively.
- the IP addresses of the two sub-interfaces need to be the same, but the IP addresses of the sub-interfaces do not need to be in the same network segment.
- the IP address of the sub-interface 0/0/10/1.1 is 10.18.1.1/24.
- the IP address of interface 1/1/0/2.1 is configured as 10.18.2.1/24 and is associated with VPN1.
- stack splitting will occur.
- device 1 and device 2 are split, and thus the device is originally included due to the occurrence of stack splitting. 0.
- the third stacking system of the device 1, the device 2, and the device 3 becomes a stacking system including only the device 0 and the device 3, and is assumed to be the stacking system A.
- the split device 1 and the device 2 elect a new master device by role election, which is assumed to be the device 1, thereby forming a new stack system including the device 1 and the device 2, which is assumed to be the stack system B. As shown in FIG.
- device 0 and device 1 are both OSPF neighbors of the intermediate device, so device 0 and device 1 can communicate interactively through the intermediate device (in this case, FIG. 4
- the stacking link shown is broken). It can be understood that a newly formed system due to stack splitting may include only one device, which naturally becomes the master device of the stack system in which it resides.
- the master device in the stacking system A and the stacking system B can initiate the detection mechanism after the stack splitting.
- the monitoring of the stack split can be performed in any feasible manner. For example, when a stack link with a stack device is detected to be faulty, a split split can be considered. Of course, in other embodiments, monitoring can also be performed in other ways.
- the master device in the stacking system A and B that is, the first master device, is configured to obtain the device chassis number of each first stacking device that is stacked and split with the stacking system (the first stacking system)
- the IP address of each first stacking device is obtained from the corresponding table of the device chassis number and the IP address stored in the device. It can be understood that when the primary device (the first primary device) is the device 0, the first stacking system is the stacking system A, and the corresponding first stacking device includes the device 1 and the device 2. When the primary device (the first primary device) is the device 1, the first stacking system is the stacking system B, and the corresponding first stacking device includes the device 0 and the device 3.
- the following examples are all taken as an example of the master device 0.
- the master device 0 encapsulates the IP packet, and the IP packet carries the first system parameter information of the stack system A where the master device 0 is currently located.
- the first system parameter information includes the number of stacked devices in the stacking system A (ie, the first number, which is 2 in this example), and the first duration in which the primary device 0 becomes the primary device, and also carries the device 1, the device 2 IP address.
- the IP packet can also carry the VPN name.
- the type of the encapsulated IP packet is not specifically limited, and the type of the encapsulated IP packet includes, but is not limited to, a PING packet, a User Datagram Protocol (UDP) packet, Bidirectional Forwarding Detection (BFD) packets.
- a PING packet a User Datagram Protocol (UDP) packet
- UDP User Datagram Protocol
- BFD Bidirectional Forwarding Detection
- the encapsulated IP packet is then sent to the device 1 and the device 2 through the routing sub-interface of the primary device 0.
- the IP packet can be sent to the device 1 and the device 2 via the intermediate routing device (FIG. 4), for example, as shown in FIG.
- the IP packet of device 0 can be sent to device 1 via the intermediate routing device.
- the IP packet can be sent through a socket to communicate with other devices.
- the IP address and VPN name corresponding to the acquired device 1 and device 2 are used as the destination IP address and VPN information of the socket, and the IP address of the device 0 itself is used as the source IP address of the socket.
- the intermediate routing device is not specifically limited, as long as it can configure a routing sub-interface and a Layer 3 routing protocol, and the Layer 3 routing protocol includes but is not limited to OSPF, RIP, ISIS, and EBGP.
- the IP address of the device 1 and device 2 is carried in the IP packet. Therefore, both device 1 and device 2 receive the IP packet. After receiving the IP packet, the device 2 does not process the IP packet because it is not the master device. Device 1 is the master device and performs subsequent processing.
- the device 1 obtains the second system parameter information of the stack system B in which the device 1 is located, including the number of stacked devices in the stack system B (ie, the second number, which is 2 in this example), and the device 1 becomes the second of the master device. duration.
- the device 1 performs analysis based on the first system parameter information and the second system parameter information to determine whether the split stack system in which it is located needs to be retracted.
- the backoff here means to close all the service ports of the stack system.
- the device 1 can first compare the first number with the second number. If the second number is smaller than the first number, it can be determined that the stack system B in which it is located needs to be retired to meet the maximum maintenance requirement of the traffic forwarding capacity after the split splitting. . If the first number is the same as the second number, the first duration is further compared with the second duration. If the second duration is less than the first duration, it may be determined that the stack system B in which it is located needs to be retracted. Meet the requirements of existing business as uninterrupted as possible. In actual technical applications, based on the importance of the uninterrupted demand for existing services and the need for maximum maintenance of traffic forwarding capacity, it is possible to first compare the first number with the second number, or first The duration is compared to the second duration.
- device 0 since device 0 is already the master device when device 0 and device 1 are in the same stacking system, device 0 becomes the master device for a longer duration, and therefore, according to the backoff rule.
- Device 1 should be backed up and all its service ports will be shut down; device 0 does not need to be backed up and does not need to close its own service port.
- the device 1 When the device 1 determines that the stack system B in which it is located needs to be retired, the device 1 sends a message for closing all service ports to each stack device in the stack system B.
- the message may be sent in the form of a broadcast message. In the example shown in FIG. 3, device 1 sends the message to device 2. After receiving the message, device 2 will shut down all its service ports.
- the specific manner of sending the message may be performed based on a stack link or based on an IP address.
- the device 1 shuts down all of its own service ports, thereby implementing the backoff of the stack system B in which it is located.
- the device 2 after the primary device 0 encapsulates the IP packet and sends it to the device 1 and the device 2, the device 2 does not process the IP packet, and the device 1 analyzes the IP packet and performs the backoff process when the backoff is required.
- the device 1 since it is the master device in stack system B that exists after the split, it performs the same process as device 0, and after it encapsulates its own IP packet, it sends it to device 0 and device 3.
- the device 3 is not the master device, so it will not be processed after receiving, and the device 0 is the master device, so the analysis will be performed after receiving, and the above-mentioned backoff process is performed when the backoff is required.
- each master device it will encapsulate the IP packets to be sent to the split stack devices, and also receive the IP packets sent by other master devices after the split, and the stacking system that they are in. Whether it is necessary to retreat to make a judgment.
- a computer apparatus comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the embodiments as described above Any of the stacking processing methods.
- the above computer device may be part of one of the stacked devices in the stacking system, or may be the stacked device itself.
- the program may be stored in a non-transitory computer readable storage.
- the program may be stored in a storage medium of the computer device and executed by at least one of the computer devices to implement a flow comprising the embodiments as described above.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本公开提供一种用于处理堆叠分裂的方法及计算机设备和计算机可读存储介质。该方法包括:第一主设备在监测到发生所述堆叠分裂时,封装IP报文,所述IP报文携带第一主设备当前所在的、因所述堆叠分裂而新形成的第一堆叠系统的第一系统参数信息;所述第一主设备将所述IP报文通过路由子接口向各堆叠设备发送,所述堆叠设备包括因所述堆叠分裂而与所述第一堆叠系统相分裂的第一堆叠设备。
Description
本公开涉及通信技术领域,特别涉及用于处理堆叠分裂的方法、计算机设备及计算机可读存储介质。
随着网络的快速发展,网络的部署越来越复杂,对网络设备的业务转发容量、端口密度的要求也越来越高,为了满足这些需求随之产生了堆叠技术。,堆叠技术是通过堆叠链路将多台网络设备连接在一起形成堆叠系统,堆叠系统通过角色选举产生一台主设备及若干台从设备,从而将多台网络设备虚拟成一台网络设备进行管理。
当主设备与从设备间的堆叠链路产生故障时,这些无法与主设备通信但彼此之间的通信正常的从设备,会通过角色选举从中再选出一台新的主设备,此时网络中便会出现两台甚至多台配置一样的主设备,这个过程称为堆叠分裂。堆叠分裂后,对于堆叠系统以外的网络设备来说,网络中出现了多台主设备,从而出现网络配置冲突,导致流量转发混乱。
发明内容
基于此,本公开的实施例提供一种用于处理堆叠分裂的方法、以及与之相关的计算机设备及计算机可读存储介质。
在本公开的一个实施例中,提供了一种用于处理堆叠分裂的方法。所述方法由第一主设备执行,并且包括步骤:在监测到发生所述堆叠分裂之后,封装因特网协议(Internet Protocol,IP)报文,所述IP报文携带所述第一主设备当前所在的、因所述堆叠分裂而新形成的第一堆叠系统的第一系统参数信息;以及将所述IP报文通过路由子接口向各堆叠设备发送,所述堆叠设备包括因所述堆叠分裂而与所述第一堆叠系统相分裂的第一堆叠设备。
在本公开的另一实施例中,还提供了一种用于处理堆叠分裂的方法。所述 方法由因所述堆叠分裂而新形成的第二堆叠系统中的第一堆叠设备执行并且包括步骤:通过路由子接口接收因所述堆叠分裂而新形成的第一堆叠系统的第一主设备所发送的IP报文,所述IP报文携带所述第一堆叠系统的第一系统参数信息;对所述IP报文进行分析;以及在对所述IP报文的分析结果为所述第二堆叠系统需要退避时,关闭所述第二堆叠系统的所有业务端口。
在本公开的另一实施例中,还提供了一种计算机设备,其包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上所述的用于处理堆叠分裂的方法。
在本公开的另一实施例中,还提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序在被计算机设备的处理器执行时实现如上所述的用于处理堆叠分裂的方法。
图1是一个实施例中的用于堆叠分裂的处理方法的流程示意图;
图2是另一个实施例中的用于堆叠分裂的处理方法的流程示意图;
图3是一个应用示例中的堆叠系统的拓扑模型示意图;
图4是一个应用示例中堆叠系统采用IP报文通信的原理示意图。
为使本公开的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本公开进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本公开,并不限定本公开的保护范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述实施例的目的,不是旨在于限制本公开。本文所使用的术语“或/及”包括一个或多个相关的所列项目的任意的和所有的组合。此外,除非上下文明确指示,否则本文所使用的“第一”、“第二”、“第三”以及其它序数用语不代表次序或顺序,而仅仅是为了表述的方便或概念之间的区分。
图1示出了一个实施例中的用于处理堆叠分裂的处理方法的流程示意图,该实施例主要是以主设备发出IP报文的相关过程为例进行说明。
该实施例中的方法由第一主设备执行,该第一主设备是因堆叠分裂而新形成的第一堆叠系统的主设备。如图1所示,该方法包括:
步骤S101:第一主设备在监测到发生堆叠分裂时,封装IP报文,所述IP报文携带所述第一主设备当前所在的第一堆叠系统的第一系统参数信息;
步骤S102:所述第一主设备将所述IP报文通过路由子接口向各堆叠设备发送,所述堆叠设备包括因所述堆叠分裂而与所述第一堆叠系统相堆叠分裂的第一堆叠设备。
基于如上所述的实施例的方案,在堆叠系统的各堆叠设备中配置有路由子接口,在监测到发生堆叠分裂后,第一主设备封装携带了所述第一堆叠系统的第一系统参数信息的IP报文后,可以通过所述路由子接口将所述IP报文发送给分裂出去的各堆叠设备(即,第一堆叠设备)。第一堆叠设备接收到所述IP报文之后,可以基于该IP报文对自己是否需要退避进行分析。从而在发生堆叠分裂时,可尽快恢复堆叠系统的正常运行,提高了堆叠系统的可靠性。
上述第一主设备既可以是发生了所述堆叠分裂的原堆叠系统(下文中的第三堆叠系统)的主设备(因此在因堆叠分裂而形成第一堆叠系统后,第一主设备在第一堆叠系统中继续作为主设备),也可以是(在原堆叠系统的主设备不在第一堆叠系统中的情况下)通过角色选举、直接指定等方式从所述第一堆叠系统中选出的主设备。
上述第一系统参数信息,可以结合实际技术需要进行设置。在一个实施方式中,该第一系统参数信息可以包括第一数目、第一持续时间中的至少一种,其中,第一数目为所述第一堆叠系统中的堆叠设备的数量,第一持续时间为所述第一主设备成为主设备的持续时间。
在一实施方式中,第一主设备可以将所述IP报文向与第一堆叠系统相分裂的各第一堆叠设备发送,同时,也可以向自身所在的第一堆叠系统中的各堆叠设备发送。可以理解的是,原堆叠系统由当前第一堆叠系统中的堆叠设备的集合与所述第一堆叠设备的集合所组成。
在一实施方式中,第一主设备也可以仅将所述IP报文发送给与第一堆叠系统相分裂的各第一堆叠设备,而无需发送给自身所在的第一堆叠系统中的各堆叠设备,以提高处理性能。
因此,为了能够在发生堆叠分裂时将IP报文只发送给各第一堆叠设备,所述第一主设备需要知晓各第一堆叠设备的IP地址。因此,在一个实施方式中,所述第一主设备在监测到发生堆叠分裂之后,封装所述IP报文之前,还可以实施如下步骤:获取与所述第一堆叠系统相分裂的各第一堆叠设备的设备机框号(设备ID);以及,从设备机框号与IP地址的对应表,获取各第一堆叠设备的IP地址。
此时,上述封装的IP报文携带各第一堆叠设备的IP地址。基于IP报文中携带的IP地址,可以仅将该IP报文发送给与第一堆叠系统相分裂的各第一堆叠设备。
在一实施方式中,第一主设备在监测到发生堆叠分裂之前,还可以实施如下步骤:配置所述第一主设备的路由子接口,并在所述第一主设备的路由子接口上配置所述第一主设备的IP地址;通过堆叠链路获得所述第一主设备所在的第三堆叠系统中的各堆叠设备的设备机框号和IP地址,其中所述第三堆叠系统中的各堆叠设备各自配置有路由子接口,且在各自的路由子接口上配置有相应的IP地址;以及根据所述第三堆叠系统中的各堆叠设备的设备机框号和IP地址,生成包含所述第三堆叠系统中的各堆叠设备的设备机框号和IP地址的所述对应表。从而可以据此实现第一主设备的路由功能,而且可以获得其他的各堆叠设备的设备机框号和IP地址,并据此建立对应表,便于在第三堆叠系统发生堆叠分裂时,基于与第一堆叠系统相分裂的第一堆叠设备的设备机框号,从对应表找到第一堆叠设备的IP地址,以向第一堆叠设备发送封装的IP报文。
在一实施方式中,第三堆叠系统中的包括第一主设备在内的各堆叠设备在配置其各自的路由子接口之后,还可以在已配置的路由子接口启用路由协议,并通过所述已配置的路由子接口与中间路由设备网络连接。从而,如果第三堆叠系统发生堆叠分裂,各堆叠设备可通过各自的路由子接口以及所述中间路由设备来接收或/及发送所述IP报文。
在一实施方式中,第三堆叠系统中的包括第一主设备在内的各堆叠设备在配置路由子接口的IP地址时,还可以配置路由子接口加入的虚拟专用网(Virtual Private Network,VPN)的名称。第三堆叠系统中的各堆叠设备在通过堆叠链路获得第三堆叠系统中的其他各堆叠设备的设备机框号和IP地址时,还可以通过堆叠链路获得第三堆叠系统中的各堆叠设备的路由子接口加入的VPN的名称。此时,上述对应表还可以包括所述第三堆叠系统中的各堆叠设备的路由子接口加入的VPN的名称。其中,第三堆叠系统中的各堆叠设备的路由子接口加入的VPN的名称应当相同。从而,在发送IP报文时,可以通过VPN进行传输,以提高信息传输的安全性。
在一实施方式中,所述路由协议是三层路由协议。其中,所述路由协议可以选自,但不局限于由以下协议组成的组:开放最短路径优先协议(Open Shortest Path First Protocol,OSPF)、路由信息协议(Routing Information Protocol,RIP)、中间系统到中间系统协议(Intermediate System-to-Intermediate System Protocol,ISIS)以及外部边界网关协议(External Border Gateway Protocol,EBGP)。
在一实施方式中,第一主设备除将IP报文通过所述路由子接口向各堆叠设备发送外,还通过所述路由子接口接收因所述堆叠分裂而新形成的第二堆叠系统的主设备发送的IP报文,所述第二堆叠系统的主设备发送的IP报文包括所述第二堆叠系统的第二系统参数信息。然后,所述第一主设备对所述第二堆叠系统的主设备发送的IP报文进行分析,并在对该IP报文的分析结果为所述第一堆叠系统需要退避时,关闭所述第一堆叠系统的所有业务端口。
相对应地,图2中示出了另一个实施例中的用于处理堆叠分裂的方法的流程示意图,该实施例是以堆叠设备接收IP报文的相关处理过程为例进行说明。该实施例中的方法由因所述堆叠分裂而新形成的第二堆叠系统中的第一堆叠设备执行。如图2所示,该实施例中的方法包括:
步骤S201:通过路由子接口接收因堆叠分裂而新形成的第一堆叠系统的第一主设备所发送的IP报文,所述IP报文携带所述第一堆叠系统的第一系统参 数信息;
步骤S202:对所述IP报文进行分析;
步骤S203:在对所述IP报文的分析结果为第二堆叠系统需要退避时,关闭第二堆叠系统的所有业务端口。
本实施例中,在堆叠系统的各堆叠设备中配置有路由子接口,在发生堆叠分裂时,形成了第一堆叠系统和第二堆叠系统,第一主设备是第一堆叠系统的主设备。第二堆叠系统中的堆叠设备(第一堆叠设备)可以接收由所述第一主设备发送的IP报文(该IP报文携带了第一主设备当前所在的第一堆叠系统的第一系统参数信息),并通过对所述IP报文进行分析得出自身所在的第二堆叠系统是否需要退避的结论。当所述第二堆叠系统需要退避时,使所述第二堆叠系统关闭自身的所有业务端口。从而在发生堆叠分裂时,可尽快恢复堆叠系统的正常运行,提高了堆叠系统的可靠性。在一实施方式中中,在对所述IP报文进行分析的步骤之前,所述方法还包括步骤:获取第一堆叠设备所在的第二堆叠系统的第二系统参数信息。此时,对所述IP报文进行分析的步骤可以包括:根据所述第一系统参数信息和所述第二系统参数信息,确定当前堆叠设备所在的第二堆叠系统是否需要退避。
上述第一系统参数信息和第二系统参数信息,可以结合实际技术需要进行设置。其中,第一系统参数信息和第二系统参数信息所包含的种类和数量一般应当相同。例如,在一个示例中,该第一系统参数信息可以包括第一数目、第一持续时间中的至少一种。其中,第一数目为所述第一堆叠系统中的堆叠设备的数量,第一持续时间为所述第一主设备成为主设备的持续时间。相对应地,第二系统参数信息可以包括第二数目和第二持续时间中的至少一种。其中,第二数目为当前堆叠设备所在的第二堆叠系统中的堆叠设备的数量,第二持续时间为当前堆叠设备成为主设备的持续时间。
在此情况下,基于第一系统参数信息和第二系统参数信息中具体包含的信息的不同,在上述步骤S202中对所述IP报文进行分析,以确定当前第一堆叠设备所在的第二堆叠系统是否需要退避时,对应的分析方式也有一定的差异性。
在一实施方式中,在第一系统参数信息包括第一数目,第二系统参数信息 包括第二数目时,可以在第二数目小于第一数目时,确定第二堆叠系统需要退避。
在一实施方式中,在第一系统参数信息包括第一持续时间,第二系统参数信息包括第二持续时间时,可以在第二持续时间小于第一持续时间时,确定第二堆叠系统需要退避。
在一实施方式中,在第一系统参数信息包括第一数目和第一持续时间,第二系统参数信息包括第二数目和第二持续时间时,可以先对第一数目与第二数目进行比较,如果第二数目小于第一数目,则可以直接确定第二堆叠系统需要退避,如果第一数目与第二数目相同,则进一步比较第一持续时间和第二持续时间;如果第二持续时间小于第一持续时间,确定第二堆叠系统需要退避。
在一实施方式中,在收到所述IP报文之后,仅由第二堆叠系统中的主设备执行后续的过程,而其他的堆叠设备(从设备)不执行后续的处理过程。即在上述步骤S202中,在第一堆叠设备为主设备时,才进行后续的对IP报文进行分析等过程。
在此情况下,在对所述IP报文的分析结果为第二堆叠系统需要退避时,作为所述第二堆叠系统的主设备的第一堆叠设备在关闭其自身的所有业务端口之前,向所述第二堆叠系统中的其他各堆叠设备发送关闭各自的所有业务端口的广播消息,从而可以关闭所述第二堆叠系统的所有业务端口。
从而,该第二堆叠系统中的主设备在控制所在的第二堆叠系统中的其他从设备关闭所有业务端口之后,再关闭自身的所有业务端口,以避免主设备先关闭所有业务端口后,该第二堆叠系统中尚未关闭业务端口的其他从设备重新选举出一个新的主设备的可能性,以进一步提高堆叠系统的可靠性。
第二实施例中各堆叠设备配置路由子接口、IP地址和VPN的方式、生成所述对应表的方式、发生堆叠分裂后进行通信的方式与第一实施例中类似,在此不再赘述。
基于如上所述的各实施例,以下结合具体的应用示例进行详细举例说明。
堆叠系统中包含的堆叠设备的数量是不定的,可以是只有两台堆叠设备的 简单堆叠系统,也可以是有多台堆叠设备的复杂堆叠系统,图3所示是一种有四台堆叠设备的堆叠系统。在本公开的实施例的方案中,为了满足堆叠分裂后流量转发容量的最大保持以及已有业务尽量不中断的要求,在堆叠分裂后的退避机制上,可以以新形成的堆叠系统的设备数量以及成为主设备的持续时间作为退避的依据。本领域技术人员可以理解,在其他实施例中,也可以采用其他的退避机制。
图3所示的堆叠系统,是尚未发生堆叠分裂之前的原始的堆叠系统,为了与堆叠分裂之后的系统相区分,本公开的各实施例中称之为第三堆叠系统。如图3所示,该第三堆叠系统中的堆叠设备包括:设备0、设备1、设备2、设备3,其中,设备0是主设备,设备1、2、3是从设备。
首先,需要在该第三堆叠系统的各个堆叠设备上配置路由子接口,并在路由子接口上配置IP地址。同时还可以配置路由子接口加入的VPN名称。
然后,第三堆叠系统中的每个堆叠设备,通过堆叠链路获得所在的第三堆叠系统中的各堆叠设备的设备机框号和IP地址,即需要通过堆叠链路获得所有其他成员设备的设备机框号和IP地址。在路由子接口加入VPN的情况下,还通过堆叠链路获得所在的第三堆叠系统中的各堆叠设备的路由子接口加入的VPN名称。以图3所示为例,设备0需要通过堆叠链路获得设备1、设备2、设备3这三个设备的设备机框号、IP地址以及加入的VPN名称,设备1需要通过堆叠链路获得设备0、设备2、设备3这三个设备的设备机框号、IP地址以及加入的VPN名称,设备2需要通过堆叠链路获得设备0、设备1、设备3这三个设备的设备机框号、IP地址以及加入的VPN名称,设备3需要通过堆叠链路获得设备0、设备1、设备2这三个设备的设备机框号、IP地址以及加入的VPN名称。通过堆叠链路获取信息的方式,本实施例不做具体限定。
各堆叠设备在获得所有其他堆叠设备的设备机框号、IP地址以及VPN名称之后,即可基于获得的信息生成该第三堆叠系统中的所有堆叠设备的设备机框号、IP地址、VPN名称的对应表。即,在每个堆叠设备(包括设备0、设备1、设备2、设备3)中,都会生成这样的一个对应表。可以理解的是,在路由子接口没有加入VPN的情况下,该对应表中不包含VPN名称。
作为一个实例,可以仅由作为主设备的设备0通过堆叠链路获得第三堆叠中的其他设备1、2、3的设备机框号、IP地址以及加入的VPN名称,基于获得的信息以及设备0自己的设备机框号、IP地址以及加入的VPN名称,生成该第三堆叠系统中的所有堆叠设备的设备机框号、IP地址、VPN名称的对应表,再将该对应表发送给第三堆叠中的其他设备1、2、3。
随后,各堆叠设备(包括设备0、设备1、设备2、设备3)的路由子接口可与中间路由设备(也可称为中间设备或中间网络,图3中未示出)连接并启用三层路由协议(也可称之为三层协议)。这里,可以基于技术应用来选择所需的三层路由协议,该三层路由协议包括但不限于OSPF协议、RIP协议、ISIS协议、EBGP协议。因此,由于使用了路由子接口,所以在某台(或某几台)堆叠设备分裂出去后,分裂之后的新形成的堆叠系统不会再有分裂出去的设备的路由子接口的信息,但是由于启用了三层路由协议,各堆叠设备之间均可以通过三层路由协议进行通信。因此,在发生分裂之后,新形成的堆叠系统与分裂出去的设备也可以通过三层路由协议进行交互通信。
以图3中的设备0与设备1为例,如图4所示,假设设备0、设备1的路由子接口分别命名为0/1/0/1.1及1/1/0/2.1。这两个路由子接口加入的VPN需要相同,但是其配置的IP地址不需要在同一网段中,例如路由子接口0/1/0/1.1的IP地址配置为10.18.1.1/24,路由子接口1/1/0/2.1的IP地址配置为10.18.2.1/24,且均关联在VPN1。从图4中可以看出,设备0及设备1分别同步设备机框号、IP地址及VPN名称后,对应表中均存在两条表项:0,10.18.1.1/24,VPN1;1,10.18.2.1/24,VPN1。中间设备的两个路由子接口(如图4中所示,分别是0/1/0/1.1,0/1/0/2.1,IP地址分别是10.18.1.2/24,10.18.2.2/24,均关联到VPN1中)分别跟设备0与设备1的路由子接口相连。在设备0、设备1及中间设备的路由子接口上启用三层路由协议,例如OSPF协议。OSPF协议运行起来且稳定后,在堆叠系统上及中间设备上均能看到两个OSPF邻居。
当该第三堆叠系统中有堆叠链路发生故障时,将会发生堆叠分裂,在图3所示的实例中,假设设备1、设备2被分裂出去,从而由于堆叠分裂的发生,原 来包含设备0、设备1、设备2、设备3的第三堆叠系统变成只包含设备0、设备3的堆叠系统,假设记为堆叠系统A。被分裂出去的设备1、设备2通过角色选举选出一个新的主设备,假设为设备1,从而形成一个新的包含设备1、设备2的堆叠系统,假设记为堆叠系统B。结合图4所示,在设备0与设备1成为主设备之后,设备0和设备1均是中间设备的OSPF邻居,所以设备0与设备1可以通过中间设备进行交互通信(此时图4中所示的堆叠链路断开)。可以理解的是,因堆叠分裂而新形成的系统中可以只包括一台设备,该设备自然地成为自身所在堆叠系统的主设备。
在监测到发生堆叠分裂时,该堆叠系统A、堆叠系统B中的主设备即可启动堆叠分裂后的检测机制。对堆叠分裂的监测可以以任何可行的方式进行,例如在监测到与某个堆叠设备的堆叠链路发生故障时,即可认为发生了堆叠分裂。当然,在其他实施例中,也可以采用其他的方式进行监测。
随后,堆叠分裂后的堆叠系统A、B中的主设备(即第一主设备),获取与自身所在的堆叠系统(第一堆叠系统)发生堆叠分裂的各第一堆叠设备的设备机框号;并从自身存储的设备机框号与IP地址的对应表,获取各第一堆叠设备的IP地址。可以理解的是,在该主设备(第一主设备)为设备0时,第一堆叠系统为堆叠系统A,对应的第一堆叠设备包括设备1、设备2。在该主设备(第一主设备)为设备1时,第一堆叠系统为堆叠系统B,对应的第一堆叠设备包括设备0、设备3。为便于说明,下述示例中均是以主设备0为例进行说明。
随后,该主设备0封装IP报文,该IP报文携带该主设备0当前所在的堆叠系统A的第一系统参数信息。第一系统参数信息包括该堆叠系统A中的堆叠设备的数量(即第一数目,在该示例中为2)、以及该主设备0成为主设备的第一持续时间,还携带设备1、设备2的IP地址。在对应表中包含VPN名称时,该IP报文还可以携带VPN名称。在本实施例的方案中,对封装的IP报文的类型不做具体限定,封装的IP报文的类型包括但不限于PING报文、用户数据包协议(User Datagram Protocol,UDP)报文、双向转发检测(Bidirectional Forwarding Detection,BFD)报文等。
封装的IP报文随后通过主设备0的路由子接口向设备1、设备2发送,该 IP报文可以经由中间路由设备(图4)发送至设备1、设备2,例如,图4所示的设备0的IP报文可以经由中间路由设备发送至设备1。在一个应用示例中,该IP报文可以通过socket发送,以达到与其他设备进行通信的目的。例如,将获取的设备1、设备2对应的IP地址和VPN名称,作为socket发包的目的IP地址及VPN信息,而设备0自身的IP地址作为socket发包的源IP地址。如图4所示,设备0向设备1通过socket发送IP报文时,将自己的路由子接口的IP地址10.18.1.1作为源IP地址,设备1的路由子接口的IP地址10.18.2.1及VPN名VPN1作为socket发包的目的IP地址及VPN信息。在本公开实施例的方案中,对该中间路由设备没有具体限定,只要其可以配置路由子接口以及三层路由协议即可,三层路由协议包括但不限于OSPF、RIP、ISIS、EBGP。
由于IP报文中携带设备1、设备2的IP地址,因此,设备1、设备2都会接收到该IP报文。在接收到该IP报文之后,设备2由于不是主设备,因此不对该IP报文进行处理。设备1是主设备,执行后续的处理过程。
设备1获取自身所在的堆叠系统B的第二系统参数信息,包括该堆叠系统B中的堆叠设备的数量(即第二数目,在该示例中为2)、以及设备1成为主设备的第二持续时间。
然后,设备1基于第一系统参数信息和第二系统参数信息进行分析,确定自己所在的分裂后的堆叠系统是否需要退避。这里的退避指关闭自己所在堆叠系统的所有业务端口。
设备1首先可将第一数目与第二数目进行比对,如果第二数目小于第一数目,则可以判定自己所在的堆叠系统B需要退避,以满足堆叠分裂后流量转发容量的最大保持的需求。如果第一数目与第二数目相同,则进一步将第一持续时间与第二持续时间进行比对,如果第二持续时间小于第一持续时间,则可以判定自己所在的堆叠系统B需要退避,以满足已有业务尽量不中断的要求。在实际技术应用中,可以基于对已有业务尽量不中断的需求和对流量转发容量的最大保持的需求的重要程度,选择先将第一数目与第二数目进行比对,还是先将第一持续时间与第二持续时间进行比对。
在上述结合图3、图4的示例中,由于在设备0与设备1处于同一个堆叠系 统时设备0就已经是主设备,所以设备0成为主设备的持续时间更长,因此,根据退避规则,设备1应该退避,将关闭自己的所有业务端口;设备0无需退避,无需关闭自己的业务端口。
设备1在确定自身所在的堆叠系统B需要退避时,先向堆叠系统B中的各堆叠设备发送关闭所有业务端口的消息,该消息可以是以广播消息的形式发送。在图3所示的示例中,设备1向设备2发送该消息。设备2接收到该消息后,会关闭自己的所有业务端口。具体的发送该消息的方式,可以是基于堆叠链路进行,也可以基于IP地址进行。
在发送了该广播消息之后,设备1关闭自己的所有业务端口,从而实现自己所在的堆叠系统B的退避。
上述示例中,是以主设备0封装IP报文发送给设备1、设备2之后,设备2不处理IP报文、设备1对该IP报文进行分析并在需要退避时执行退避的过程为例进行说明。对于设备1而言,由于其是分裂后存在的堆叠系统B中的主设备,因此,其会执行与设备0同样的处理过程,在封装自己的IP报文之后,发送给设备0、设备3,设备3不是主设备,因此接收之后不会进行处理,而设备0是主设备,因此接收后会进行分析,在需要退避时执行上述的退避过程。即,对于每一个主设备而言,其自己会封装IP报文发送给分裂出去的各堆叠设备,同时也会接收分裂之后的其他主设备发送过来的IP报文,并对自己所在的堆叠系统是否需要退避进行判断。
在另一个实施例中,还提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如上述各实施例中的任意一种堆叠分裂后的处理方法。
本领域技术人员可以理解,上述计算机设备可以是堆叠系统中的一个堆叠设备的一部分,或者可以是堆叠设备自身。
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成的,所述程序可存储于一非易失性的计算机可读存储介质中,如本公开实施例中,该程序可存储于计算机设 备的存储介质中,并被该计算机设备中的至少一个处理器执行,以实现包括如上述各实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本公开的几种实施方式,其描述较为详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干变形和改进,这些都属于本公开的保护范围。因此,本公开专利的保护范围应以所附权利要求为准。
Claims (20)
- 一种用于处理堆叠分裂的方法,由第一主设备执行,并且包括步骤:在监测到发生所述堆叠分裂之后,封装因特网协议IP报文,所述IP报文携带所述第一主设备当前所在的、因所述堆叠分裂而新形成的第一堆叠系统的第一系统参数信息;以及将所述IP报文通过路由子接口向各堆叠设备发送,所述堆叠设备包括因所述堆叠分裂而与所述第一堆叠系统相分裂的第一堆叠设备。
- 根据权利要求1所述的方法,其中,在所述第一主设备监测到发生所述堆叠分裂之后,封装IP报文之前,所述方法还包括步骤:获取与所述第一堆叠系统相分裂的各所述第一堆叠设备的设备机框号;以及从设备机框号与IP地址的对应表,获取各所述第一堆叠设备的IP地址;并且其中,所述IP报文携带各所述第一堆叠设备的IP地址。
- 根据权利要求2所述的方法,其中,在所述第一主设备监测到发生所述堆叠分裂之前,所述方法还包括步骤:配置所述第一主设备的路由子接口,并在所述第一主设备的路由子接口上配置所述第一主设备的IP地址;通过堆叠链路获得所述第一主设备所在的第三堆叠系统中的各堆叠设备的设备机框号和IP地址,其中所述第三堆叠系统中的各堆叠设备各自配置有路由子接口,且在各自的路由子接口上配置有相应的IP地址;以及根据所述第三堆叠系统中的各堆叠设备的设备机框号和IP地址,生成包含所述第三堆叠系统中的各堆叠设备的设备机框号和IP地址的所述对应表。
- 根据权利要求3所述的方法,其中,所述配置所述第一主设备的路由子接口,并在所述第一主设备的路由子接 口上配置所述第一主设备的IP地址的步骤还包括:在所述第一主设备的路由子接口上配置该路由子接口加入的虚拟专用网VPN的名称;所述通过堆叠链路获得所述第三堆叠系统中的各堆叠设备的设备机框号和IP地址的步骤还包括:通过所述堆叠链路获得所述第三堆叠系统中的各堆叠设备的路由子接口加入的VPN的名称;并且所述对应表还包含所述第三堆叠系统中的各堆叠设备的路由子接口加入的VPN的名称。
- 根据权利要求3或4所述的方法,其中,在所述第一主设备监测到发生所述堆叠分裂之前,所述方法还包括步骤:在所述第一主设备的已配置的路由子接口启用路由协议,并通过所述第一主设备的该已配置的路由子接口与中间路由设备网络连接,所述中间路由设备分别与所述第三堆叠系统中的各堆叠设备的路由子接口网络连接。
- 根据权利要求1至5中任意一项所述的方法,其中,所述第一系统参数信息包括第一数目、第一持续时间中的至少一种,所述第一数目为所述第一堆叠系统中的堆叠设备的数量,所述第一持续时间为所述第一主设备成为主设备的持续时间。
- 根据权利要求1至6中任意一项所述的方法,还包括步骤:通过路由子接口接收因所述堆叠分裂而新形成的第二堆叠系统的主设备发送的IP报文,所述第二堆叠系统的主设备发送的IP报文包括所述第二堆叠系统的第二系统参数信息;对所述第二堆叠系统的主设备发送的IP报文进行分析;以及在对所述IP报文的分析结果为所述第一堆叠系统需要退避时,关闭所述第一堆叠系统的所有业务端口。
- 根据权利要求1至7中任意一项所述的方法,其中,所述路由协议是三层路由协议。
- 根据权利要求1至8中任意一项所述的方法,其中,所述路由协议选自由以下协议组成的组:开放最短路径优先协议OSPF、路由信息协议RIP、中间系统到中间系统协议ISIS以及外部边界网关协议EBGP。
- 根据权利要求1至9中任意一项所述的方法,其中,所述第一主设备是发生所述堆叠分裂的第三堆叠系统的主设备。
- 根据权利要求1至9中任意一项所述的方法,其中,所述第一主设备是在形成所述第一堆叠系统时,从所述第一堆叠系统中选出的主设备。
- 一种用于处理堆叠分裂的方法,由因所述堆叠分裂而新形成的第二堆叠系统中的第一堆叠设备执行,并且包括步骤:通过路由子接口接收因所述堆叠分裂而新形成的第一堆叠系统的第一主设备所发送的IP报文,所述IP报文携带所述第一堆叠系统的第一系统参数信息;对所述IP报文进行分析;以及在对所述IP报文的分析结果为所述第二堆叠系统需要退避时,关闭所述第二堆叠系统的所有业务端口。
- 根据权利要求12所述的方法,其中,在所述第一堆叠设备为所述第二堆叠系统的主设备时,执行对所述IP报文进行分析的步骤。
- 根据权利要求13所述的方法,其中,在对所述IP报文的分析结果为所述第二堆叠系统需要退避时,所述第一堆 叠设备在关闭所述第一堆叠设备的所有业务端口之前,向所述第二堆叠系统中的其他各堆叠设备发送关闭各自的所有业务端口的广播消息,从而关闭所述第二堆叠系统的所有业务端口。
- 根据权利要求13或14所述的方法,其中,在所述对所述IP报文进行分析的步骤之前,所述方法还包括步骤:获取所述第二堆叠系统的第二系统参数信息;并且,所述对所述IP报文进行分析的步骤包括:根据所述第一系统参数信息和所述第二系统参数信息,确定所述第二堆叠系统是否需要退避。
- 根据权利要求15所述的方法,其中,所述第一系统参数信息包括第一数目,所述第一数目为所述第一堆叠系统中的堆叠设备的数量,并且所述第二系统参数信息包括第二数目,所述第二数目为所述第二堆叠系统中的堆叠设备的数量,并且,所述根据所述第一系统参数信息和所述第二系统参数信息,确定所述第二堆叠系统是否需要退避的步骤包括:在所述第二数目小于所述第一数目时,确定所述第二堆叠系统需要退避。
- 根据权利要求16所述的方法,其中,所述第一系统参数信息还包括第一持续时间,所述第一持续时间为所述第一主设备成为主设备的持续时间,并且所述第二系统参数信息还包括第二持续时间,所述第二持续时间为所述第一堆叠设备成为主设备的持续时间,并且所述根据所述第一系统参数信息和所述第二系统参数信息,确定所述第二堆叠系统是否需要退避的步骤还包括:在所述第二数目等于所述第一数目时,若所述第二持续时间小于所述第一持续时间,确定所述第二堆叠系统需要退避。
- 根据权利要求15所述的方法,其中,所述第一系统参数信息包括第一持续时间,所述第一持续时间为所述第一主设备成为主设备的持续时间,并且所述第二系统参数信息包括第二持续时间,所述第二持续时间为所述第一堆叠设备成为主设备的持续时间,并且,所述根据所述第一系统参数信息和所述第二系统参数信息,确定所述第二堆叠系统是否需要退避的步骤包括:在所述第二持续时间小于所述第一持续时间时,确定所述第二堆叠系统需要退避。
- 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1至18任意一项所述的方法。
- 一种计算机可读存储介质,存储有计算机程序,所述计算机程序在被计算机设备的处理器执行时实现根据权利要求1至18中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710331387.2A CN108880843A (zh) | 2017-05-11 | 2017-05-11 | 堆叠分裂后的处理方法及计算机设备 |
CN201710331387.2 | 2017-05-11 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018205728A1 true WO2018205728A1 (zh) | 2018-11-15 |
Family
ID=64104239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/078387 WO2018205728A1 (zh) | 2017-05-11 | 2018-03-08 | 用于处理堆叠分裂的方法、计算机设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108880843A (zh) |
WO (1) | WO2018205728A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112217658A (zh) * | 2019-07-11 | 2021-01-12 | 华为技术有限公司 | 一种堆叠分裂处理方法及装置 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102355366A (zh) * | 2011-08-24 | 2012-02-15 | 杭州华三通信技术有限公司 | 堆叠分裂时管理堆叠成员设备的方法和堆叠成员设备 |
CN105763462A (zh) * | 2016-01-20 | 2016-07-13 | 杭州华三通信技术有限公司 | 一种处理堆叠分裂的方法及交换机 |
CN106060190A (zh) * | 2016-07-25 | 2016-10-26 | 杭州华三通信技术有限公司 | 一种ip地址冲突的处理方法及装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102404172A (zh) * | 2011-12-21 | 2012-04-04 | 迈普通信技术股份有限公司 | 一种多激活检测方法和设备 |
CN102916857B (zh) * | 2012-11-09 | 2015-04-15 | 迈普通信技术股份有限公司 | 一种堆叠分裂的快速检测方法和装置 |
US9671841B2 (en) * | 2014-05-12 | 2017-06-06 | Dell Products L.P. | System and method for temperature management of information handling systems |
CN105656645B (zh) * | 2014-11-12 | 2019-08-06 | 新华三技术有限公司 | 堆叠系统的故障处理的决策方法和装置 |
-
2017
- 2017-05-11 CN CN201710331387.2A patent/CN108880843A/zh active Pending
-
2018
- 2018-03-08 WO PCT/CN2018/078387 patent/WO2018205728A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102355366A (zh) * | 2011-08-24 | 2012-02-15 | 杭州华三通信技术有限公司 | 堆叠分裂时管理堆叠成员设备的方法和堆叠成员设备 |
CN105763462A (zh) * | 2016-01-20 | 2016-07-13 | 杭州华三通信技术有限公司 | 一种处理堆叠分裂的方法及交换机 |
CN106060190A (zh) * | 2016-07-25 | 2016-10-26 | 杭州华三通信技术有限公司 | 一种ip地址冲突的处理方法及装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112217658A (zh) * | 2019-07-11 | 2021-01-12 | 华为技术有限公司 | 一种堆叠分裂处理方法及装置 |
CN112217658B (zh) * | 2019-07-11 | 2024-03-19 | 华为技术有限公司 | 一种堆叠分裂处理方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN108880843A (zh) | 2018-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111886833B (zh) | 重定向控制信道消息的方法和用于实现该方法的设备 | |
US11349687B2 (en) | Packet processing method, device, and system | |
WO2019105066A1 (zh) | 处理路由的方法和装置、以及数据传输的方法和装置 | |
US9742693B2 (en) | Dynamic service insertion in a fabric switch | |
US20200396162A1 (en) | Service function chain sfc-based communication method, and apparatus | |
WO2018040529A1 (zh) | 一种报文处理方法、设备及系统 | |
US10361954B2 (en) | Method and apparatus for processing modified packet | |
WO2015184739A1 (zh) | 故障检测方法及装置 | |
EP3808031A1 (en) | Robust node failure detection mechanism for sdn controller cluster | |
WO2017186122A1 (zh) | 流量调度 | |
US11601335B2 (en) | Methods and systems for neighbor-acknowledged graceful insertion/removal protocol | |
CN113225252B (zh) | 双向转发检测bfd会话的建立方法、处理方法以及相关设备 | |
CN112910704B (zh) | 一种支持动态自适应网络配置的局域网系统、方法和装置 | |
WO2022083563A1 (zh) | 链路检测方法、链路检测装置、终端设备和存储介质 | |
JP2022160653A (ja) | パケット処理方法およびゲートウェイ・デバイス | |
EP3032782B1 (en) | Packet transmission method and apparatus | |
WO2019155477A1 (en) | A method for seamless migration of session authentication to a different stateful diameter authenticating peer | |
US8675669B2 (en) | Policy homomorphic network extension | |
WO2018205728A1 (zh) | 用于处理堆叠分裂的方法、计算机设备及计算机可读存储介质 | |
US20220294734A1 (en) | Method for Configuring Media Access Control Address Aging Time and Apparatus | |
WO2015135312A1 (zh) | 一种实现sdn网络通信管理的方法及装置 | |
WO2018077124A1 (zh) | 一种业务告警处理方法、装置及系统 | |
WO2022078338A1 (zh) | 路径确定方法及装置、计算机存储介质 | |
CN105703997A (zh) | 一种隧道控制方法及装置 | |
CN107231309A (zh) | 获取sdn全网视图的方法、控制器及目的交换节点 |
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: 18798309 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: 18798309 Country of ref document: EP Kind code of ref document: A1 |