CN112787960B - Stack splitting processing method, device and equipment and storage medium - Google Patents

Stack splitting processing method, device and equipment and storage medium Download PDF

Info

Publication number
CN112787960B
CN112787960B CN202011379238.1A CN202011379238A CN112787960B CN 112787960 B CN112787960 B CN 112787960B CN 202011379238 A CN202011379238 A CN 202011379238A CN 112787960 B CN112787960 B CN 112787960B
Authority
CN
China
Prior art keywords
switch
stack
layer switch
sub
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011379238.1A
Other languages
Chinese (zh)
Other versions
CN112787960A (en
Inventor
王小军
范维庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly Technology Co Ltd
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 Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202011379238.1A priority Critical patent/CN112787960B/en
Publication of CN112787960A publication Critical patent/CN112787960A/en
Application granted granted Critical
Publication of CN112787960B publication Critical patent/CN112787960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/557Error correction, e.g. fault recovery or fault tolerance

Abstract

The embodiment of the invention discloses a processing method, a device, equipment and a storage medium for stack splitting, wherein the method comprises the following steps: when detecting that stack splitting exists in the stack switch system, closing a distributed aggregation function with a gateway device in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink; acquiring a stack splitting competition result of the stack switch system, and judging whether a sub-stack system where the three-layer switch is located successfully competes; if the fact that the sub-stacking system where the three-layer switch is located fails to compete is determined, the interface parameters of the uplink of the three-layer switch are set to be the real IP address of the three-layer switch and the real MAC address of the three-layer switch, network faults caused by stacking splitting are avoided, meanwhile, communication interruption of a connected host caused by closing the sub-stacking system where the competition fails is avoided, and stability of a network is improved.

Description

Stack splitting processing method, device and equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network transmission, in particular to a processing method, a device, equipment and a storage medium for stack splitting.
Background
With the continuous development of network technology and computer technology, switch stacking technology is widely applied to network communication and becomes an essential component in network communication.
In the stacking system, all member switches use the same IP address and MAC address, and when a stacking line between the member switches in the stacking system breaks down, the stacking is split; after the stack is split, a plurality of stacked systems having the same IP address and MAC address may be generated, causing a network failure, and thus a collision check of the IP address and the MAC address must be performed.
In the existing Multi-Active Detection (MAD) technology, a split stacking system is in a Detect state or a Recovery state, wherein the Detect state represents a normal working state of stacking, and the Recovery state represents a disabled state of stacking; the stacking systems in the Detect state compete with each other, the stacking system which successfully competes keeps the Detect state, and the stacking system which fails to compete transfers to the Recovery state; and on all member switches of the Recovery state stacking system, closing all other physical ports except the reserved port to ensure that the stacking system does not forward the service message any more, and the method can cause the interruption of the communication of the host connected with the Recovery state stacking system, thereby seriously affecting the network performance.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for processing stack splitting, so as to avoid network performance degradation caused by closing a sub-stack system with contention failure when stack splitting exists in a stack switch system.
In a first aspect, an embodiment of the present invention provides a method for processing stack splitting, which is applied to a three-layer switch in a stack switch system, and includes:
when detecting that the stack split exists in the stack switch system, closing a distributed aggregation function with gateway equipment in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink;
acquiring a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes;
and if determining that the sub-stacking system where the three-layer switch is located fails to compete, setting the interface parameter of the uplink of the three-layer switch as the real IP address of the three-layer switch and the real MAC address of the three-layer switch.
In a second aspect, an embodiment of the present invention provides a processing apparatus for stack splitting, including:
a distributed aggregation shutdown module, configured to, when it is detected that there is a stack split in the stack switch system, shutdown a distributed aggregation function with a gateway device in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink;
a competition result obtaining module, configured to obtain a stack splitting competition result of the stack switch system, and determine whether a sub-stack system in which the three-layer switch is located successfully competes;
the first address setting module is configured to set an interface parameter of an uplink of the three-layer switch as a real IP address of the three-layer switch and a real MAC address of the three-layer switch if it is determined that contention of the sub-stacking system where the three-layer switch is located fails.
In a third aspect, an embodiment of the present invention further provides a switch device, where the switch device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the stack splitting processing method according to any embodiment of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the processing method for stack splitting according to any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, when stack splitting exists in the stack switch system, the distributed aggregation function between the uplink and the gateway equipment is closed, the stack splitting competition result of the stack switch system is obtained, whether the sub-stack system where the three-layer switch is located successfully competes is judged, and the uplink and downlink interface parameters of the three-layer switch in the sub-stack system with failed competition are reset, so that the interruption of communication of a connected host caused by closing the sub-stack system with failed competition is avoided, and the stability of a communication network is improved.
Drawings
FIG. 1A is a diagram of an application scenario of a processing method for stack splitting according to the present invention;
FIG. 1B is a flowchart of a method for processing stack splitting according to an embodiment of the present invention;
FIG. 1C is a schematic diagram of a stack split according to an embodiment of the present invention;
FIG. 1D is a schematic diagram of a stack split according to an embodiment of the present invention;
FIG. 2 is a flowchart of a processing method for stack splitting according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a processing method for stack splitting according to a third embodiment of the present invention;
fig. 4 is a block diagram of a processing apparatus for stack splitting according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a switch device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The processing method for stack splitting provided by the application can be applied to the application scenario shown in fig. 1A. In the embodiment of the present invention, all switches in the stack Switch System are three-layer switches having functions of implementing high-speed forwarding of data and continuing data forwarding when a destination MAC address in a data packet changes, that is, switches located at a third layer (i.e., a network layer) of an OSI (Open System Interconnection) network standard model, in fig. 1A, taking a stack Switch System 301 including two three-layer switches (i.e., a three-layer Switch 302 and a three-layer Switch 303) as an example, a convergence layer 300 may be in communication connection with an access layer 200, the access layer 200 is in communication connection with a device layer 100, the access layer 200 is used for enabling a user side terminal device layer 100 to request and forward a service to the stack Switch System of the convergence layer 300, and the stack Switch System is used for enabling a two-layer Switch of the access layer 200 to receive a service and retransmit a service; the convergence layer 300 may also be in communication connection with the device layer 100, and the stack switch system 301 is configured to receive and forward a request service of the user-side terminal device layer 100; the stack switch system 301 is connected to the gateway device 500 through the uplinks 401 and 402, and the uplinks 401 and 402 are bound as a link through the aggregation of the distributed link aggregation function for the communication connection between the stack switch system 301 and the gateway device 500; wherein, the Access layer 200 is formed by connecting a plurality of two-layer switches (i.e. switches located at the second layer of the OSI network standard model, that is, a data link layer) having a data forwarding function, fig. 1A illustrates that two-layer switches (i.e. two-layer switch 201 and two-layer switch 202) are connected and cooperate with each other, two three-layer switches in the stack switch system in the convergence layer 300 are formed by stacking and cooperate with each other, a Virtual Router Redundancy Protocol (VRRP) is used to configure a Virtual IP (Internet Protocol) address and a Virtual MAC (Media Access Control) address for the stack switch system, and a main three-layer switch and a standby three-layer switch are selected from the two three-layer switches, for example, the three-layer switch 302 is selected as a main three-layer switch for forwarding a data packet, and the three-layer switch 303 is selected as a standby three-layer switch for sending a received data packet to the main three-layer switch, and when a failure occurs in the main three-layer switch, the three-layer switch is updated as a main three-layer switch; the user side terminal device layer 100 is composed of four user devices, wherein the user device 101 and the user device 104 are respectively in communication connection with a main three-layer switch 302 and a standby three-layer switch 303 in the stack switch system; the user equipment 102 and the user equipment 103 in the user side terminal equipment layer 100 are in communication connection with the two-layer switch 201 and the two-layer switch 202 in the access layer 200, respectively. The gateway device 500 includes a three-layer switch with gateway functionality for receiving data uploaded by the stack switch system of the convergence layer 300.
Example one
Fig. 1B is a flowchart of a processing method for stack splitting according to an embodiment of the present invention, where this embodiment is applicable to a case where a three-layer switch in a stack switch system processes a communication service, and the method can be executed by a processing apparatus for stack splitting according to a fourth embodiment of the present invention, where the apparatus can be implemented by software and/or hardware and is integrated on the three-layer switch in the stack switch system, and the method specifically includes the following steps:
s110, when detecting that the stack split exists in the stack exchanger system, closing the distributed aggregation function of the uplink and the gateway equipment; wherein the three-layer switch and the gateway device are connected via the uplink.
Stacking means that a plurality of switches supporting stacking characteristics are connected together through stacking cables, and logically become a switch device to participate in data forwarding as a whole; in the embodiment of the invention, a plurality of three-layer switches are stacked to form a stacked switch system, so that redundant backup among the member switches of the stacked system can be realized, the reliability is improved, meanwhile, new switches are continuously added into the stacked system, the port number can be expanded, the uplink transmission bandwidth can be improved, and the requirement of increasing the number of users can be met; in the embodiment of the invention, the stack switch system is constructed by adopting the three-layer switch, so that the data forwarding speed can be increased, and the problem that each sub-stack system cannot forward data due to the reset of the MAC address parameter when the stack is split can be avoided.
The stack splitting refers to that a part of member switches are moved out in a live state in a stack system which operates stably, or a multi-point fault of a stack cable causes one stack system to be changed into a plurality of sub-stack systems. In the embodiment of the invention, taking a stacking switch system comprising a three-layer switch A, a three-layer switch B, a three-layer switch C and a three-layer switch D as an example, electing according to a preset criterion that the priority is higher before the sorting comprising ID (Identification) letters is carried out, wherein the three-layer switch A is a main switch, the three-layer switch B is a standby switch, and the three-layer switches C and D are slave switches; according to the difference of the positions of the original stack switch system after the main and standby switches are split, the stack splitting can be divided into the following two types: 1. after the stack is split, the original master-slave switch is split into the same sub-stack system, as shown in fig. 1C, that is, the three-layer switch a and the three-layer switch B are split into the same sub-stack system, the original master-slave switch identities of the three-layer switch a can be maintained, the stack topology is recalculated by the three-layer switch a, the topology information of the shifted three-layer switches C and D is deleted, and the new topology information is synchronized to the three-layer switch B; when the moved-out three-layer switches C and D detect that the stacking protocol messages are overtime, the three-layer switches C and D reset automatically and carry out election again according to preset criteria, namely the three-layer switch C becomes a main switch of the sub-stacking system where the three-layer switch C is located, and the three-layer switch D becomes a standby switch of the sub-stacking system where the three-layer switch D is located; 2. after the stack is split, the original master-slave switch is split into different sub-stack systems, as shown in fig. 1D, that is, the three-layer switch a and the three-layer switch B are split into different sub-stack systems, and the sub-stack system where the three-layer switch a is located reselects the slave switch according to a preset criterion, so that the three-layer switch D becomes the slave switch of the sub-stack switch system where the three-layer switch a is located, and the three-layer switch a recalculates topology information and synchronizes the topology information to other member switches; and the sub-stacking system where the original standby switch is located generates a standby master, and reselects the standby switch according to a preset criterion, namely the three-layer switch B is upgraded to be the master switch of the sub-stacking system where the three-layer switch B is located, the three-layer switch C becomes the standby switch of the sub-stacking system where the three-layer switch B is located, and the three-layer switch B recalculates the stacking topology and synchronizes to other member switches. Therefore, after the stacking splitting occurs, the original stacking switch system can orderly form a plurality of sub-stacking systems, and each sub-stacking system can guarantee that the main and standby switches continue to be arranged to maintain the stacking structure.
Link aggregation, which means that a plurality of ethernet physical links are bound together to form a logical link, so as to increase the link bandwidth, and meanwhile, the bound links can effectively improve the reliability of the link through mutual dynamic backup; the distributed link aggregation is based on the link aggregation of a distributed architecture, can realize the aggregation of non-continuous ports and the link aggregation of cross-equipment and cross-chip, and can improve the availability and capacity of a transmission link; in the embodiment of the invention, the distributed aggregation binding is carried out on the uplink connected with the stack switch system and the gateway equipment, so that the aggregation configuration can be protected to the maximum extent, and particularly when the link failure of the stack system causes system splitting, the distributed link aggregation can ensure that the switch cluster system maintains the existing aggregated link as much as possible, thereby reducing the data transmission loss caused by the stack splitting. After distributed link aggregation is carried out on an uplink of a stack switch system, real IP addresses and real MAC addresses of the same network segment are set for uplink interfaces of member switches and gateway equipment of the stack switch system, wherein the real IP addresses are distributed by the gateway equipment, the gateway equipment distributes a corresponding IP address for each accessed three-layer switch, namely the real IP address, and the MAC addresses are equipment attributes, namely the real MAC addresses are set when the equipment leaves a factory; then, based on a virtual routing redundancy protocol, unified virtual IP and virtual MAC are set for the stack switch system and the gateway equipment, and when the stack system works normally, the data transmission between the stack switch system and the gateway equipment adopts unified virtual IP and virtual MAC addresses so as to improve the connection reliability of the stack switch system and the gateway equipment; because each sub-stacking system after stacking splitting has the same virtual IP address and virtual MAC address based on the virtual routing redundancy protocol, in order to enable each sub-stacking system to work normally, the distributed aggregation function between the uplink of the stack switch system and the gateway device needs to be released, so as to reset the interface parameters of each sub-stacking system in the following.
Optionally, in this embodiment of the present invention, after closing the distributed aggregation connection with the gateway device in the uplink, the method further includes: sending a stack split notification to the gateway device to cause the gateway device to turn off a distributed aggregation function with the three-tier switch. The aggregation links are connected in a bidirectional mode, and when distributed aggregation setting is performed at the switch end, distributed aggregation setting is also required to be performed on the gateway equipment, so that when the stacking switch system has stacking splitting, the gateway equipment cannot acquire the state of the current stacking switch system in time, and a three-layer switch which needs to generate stacking splitting in the stacking switch system sends a stacking splitting notification to the gateway equipment, so that the gateway equipment closes the aggregation function with the current three-layer switch; the step of sending the stacking splitting notification to the gateway device includes sending a stacking splitting message through an Operation, administration and Maintenance (OAM) link, and the gateway device closes a distributed aggregation function with a current three-layer switch after receiving the stacking splitting message.
S120, obtaining a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes.
Stacking splitting competition, which means that a sub-stacking system formed after stacking classification of a stacking switch system generates competition among each other due to the existence of the same virtual IP address and the same virtual MAC address, and the sub-stacking system which succeeds in competition finally keeps a normal working state and replaces the function of the original stacking switch system before stacking splitting, and the sub-stacking system which fails in competition is converted into a forbidden state; the competition mode can be that the starting time is compared firstly, the sub-stacking system with the earlier starting completion time succeeds in competition, and the starting completion time of the stacking is considered to be the same within 20 seconds; when the starting completion time is the same, comparing the priority of the main switch in each sub-stacking system, wherein the stacking system with high priority successfully competes; and when the priorities are the same, comparing the MAC addresses of the sub-stacking systems, the sub-stacking systems with small MAC successfully compete. After the stacking splitting competition is completed, only one sub-stacking system finally succeeds in competition, and the other sub-stacking systems all fail in competition, so that a splitting competition result is obtained, and whether the sub-stacking system where the current three-layer switch is located succeeds in competition or not is judged.
S130, if the fact that the sub-stacking system where the three-layer switch is located fails to compete is determined, setting the interface parameters of the uplink of the three-layer switch as the real IP address of the three-layer switch and the real MAC address of the three-layer switch.
After the competition of the sub-stacking system is determined to fail, because the sub-stacking system which succeeds in competition uses the common virtual IP and the virtual MAC address based on the virtual routing redundancy protocol and replaces the function of the original stacking exchange system before stacking splitting, if the sub-stacking system which fails in competition still uses the common virtual IP and the virtual MAC address based on the virtual routing redundancy protocol, network failure can be caused, and the sub-stacking system which fails in competition can not work normally. Therefore, the interface parameters of the uplink of the three-layer switch are set, namely the interface parameters of the current uplink are set to be the real IP address and the real MAC address, so that the distinction between the competition success sub-stacking system and other competition failure sub-stacking systems is realized, the normal working state is kept, and the switch equipment shutdown and the reduction of the data transmission efficiency caused by the stacking splitting are avoided; the uplink interface of the three-layer switch includes a VLAN (Virtual Local Area Network) interface, and the interface parameters include an IP address and a MAC address.
According to the technical scheme provided by the embodiment of the invention, when the stack splitting exists in the stack switch system, the distributed aggregation function between the uplink and the gateway equipment is closed, the stack splitting competition result of the stack switch system is obtained, whether the sub-stack system where the three-layer switch is located successfully competes is judged, and the uplink interface parameters of the three-layer switch in the sub-stack system with failed competition are reset, so that the interruption of the communication of the connected host caused by closing the sub-stack system with failed competition is avoided, and the stability of the communication network is improved.
Example two
Fig. 2 is a flowchart of a stack splitting processing method according to a second embodiment of the present invention, which is embodied on the basis of the foregoing embodiment, and in this embodiment, after determining that a sub-stacking system where a three-layer switch is located successfully competes, uplink and downlink interface parameters are set to maintain data transmission with a gateway device, where the method specifically includes:
s210, when detecting that the stack split exists in the stack exchanger system, closing the distributed aggregation function of the uplink and the gateway equipment; wherein the three-tier switch and the gateway device are connected by the uplink.
S220, obtaining a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes.
S230, if it is determined that the sub-stack system where the three-layer switch is located successfully competes, setting an uplink interface parameter of the three-layer switch as a virtual IP address of the stack switch system and a virtual MAC address of the stack switch system.
When the success of the competition of the sub-stacking system where the three-layer switch is located is determined, the priority of the current sub-stacking system is higher than that of other sub-stacking systems, namely normal data transmission with the gateway equipment can be kept, and at the moment, uplink interface parameters of the sub-stacking system can keep a virtual IP address and a virtual MAC address which are consistent with those of the original stacking switch system; after the setting of the uplink interface parameters of the successfully contended sub-stacking system is completed, the sub-stacking system can be regarded as a new stack switch system, and the uplink of the sub-stacking system and the gateway device establish new distributed link aggregation.
S240, setting the interface parameter of the down link of the switch as the virtual IP address of the stack switch system and the virtual MAC address of the stack switch system.
After determining that the sub-stacking system where the three-layer switch is located successfully competes, setting downlink interface parameters of the three-layer switch, wherein the stack switch system transmits data by using a unified virtual IP address and a virtual MAC address when working normally, and the data uploaded by the user side terminal equipment still uses the virtual IP and the MAC address, so that the downlink interface parameters of the sub-stacking system successfully competed are set to be the virtual IP address and the virtual MAC address of the original stack switch system when the sub-stacking system successfully competes for forwarding normal data.
According to the technical scheme provided by the embodiment of the invention, when the stack switch system has stack splitting, the stack splitting competition result of the stack switch system is obtained, whether the sub-stack system of the three-layer switch successfully competes is judged, and after the sub-stack system of the three-layer switch successfully competes is determined, the uplink and downlink interface parameters are set to keep the virtual IP address and the virtual MAC address of the original stack switch system, so that the continuity of data transmission is kept, and the reliability of a network is improved.
EXAMPLE III
Fig. 3 is a flowchart of a stack splitting processing method according to a third embodiment of the present invention, which is embodied on the basis of the foregoing embodiments, and in this embodiment, after determining that contention of a sub-stacking system where a three-layer switch is located fails, a downlink interface parameter is set to maintain data transmission with a downlink connection device, where the method specifically includes:
s310, when the stacking split exists in the stacking switch system, closing the distributed aggregation function of the gateway equipment in the uplink; wherein the three-layer switch and the gateway device are connected via the uplink.
S320, obtaining the stack splitting competition result of the stack switch system, and judging whether the sub-stack system where the three-layer switch is located successfully competes.
S330, if the sub-stacking system where the three-layer switch is located fails to compete, acquiring equipment information of downlink connection, and judging whether the downlink is connected with at least one two-layer switch.
The equipment connected with the downlink comprises user terminal equipment and two-layer switch equipment, when the downlink of each sub-stacking system is connected with the user terminal equipment, namely when the two-layer switch equipment does not exist, each sub-stacking system is a different subnet, and the existence of the same virtual IP address and the same virtual MAC address can not cause conflict; if the downlink of each sub-stacking system is connected with the two-layer switch device, and each sub-stacking system belongs to the same subnet at this time, the virtual MAC address of the downlink interface of each sub-stacking system needs to be set to avoid conflict; therefore, after determining that the sub-stacking system where the three-layer switch is located fails to compete, at this time, it is necessary to determine the device information of the downlink connection, so as to perform corresponding downlink interface parameter setting.
S340, if it is determined that the downlink is not connected to the second layer switch, setting the interface parameter of the downlink of the third layer switch as the virtual IP address of the stack switch system and the virtual MAC address of the stack switch system.
The two-layer switch detects the destination MAC address information in the data packet and forwards the destination MAC address according to the destination MAC address, so that the MAC address and the corresponding port can be recorded in an address table of the two-layer switch together, and the next inspection is facilitated. In the embodiment of the present invention, when the downlink connection device does not include a two-layer switch, the sub-stack system where the three-layer switch is located and other sub-stack systems belong to different subnets, and the downlink interfaces of the sub-stack systems may have the same virtual IP address and virtual MAC address, so that the downlink interface of the three-layer switch is set to the virtual IP address and virtual MAC address of the original stack switch system, and there is no problem of mutual conflict with other sub-stack systems.
And S350, if the downlink is determined to be connected with at least one two-layer switch, setting the interface parameter of the downlink of the three-layer switch as the virtual MAC address of the stack switch system.
When the downlink connection device includes at least one two-layer switch, the sub-stack system where the current three-layer switch is located and the other sub-stack systems belong to the same subnet, and at this time, the two-layer switch device where the current sub-stack system and the other sub-stack systems are connected in downlink still uses the virtual MAC address to perform data transmission, so that the interface parameter of the downlink of the current three-layer switch is set as the virtual MAC address of the stack switch system to avoid interruption of data transmission, and the interface IP address of the downlink of the current three-layer switch is the same as the real IP address of the uplink interface.
Optionally, in this embodiment of the present invention, after setting the interface parameter of the downlink of the three-layer switch to the virtual MAC address of the stack switch system, the method further includes: and when the service to be processed is obtained through the virtual MAC address of the downlink, executing the forwarding operation of the service to be processed through the real MAC address of the uplink. After setting the interface parameters of the downlink of the three-layer switch as virtual MAC addresses, at the moment, the uplink interface parameters of the three-layer switch of the sub-stack switch system with the failed competition are real IP addresses and real MAC addresses, and the downlink interface parameters are real IP addresses and virtual MAC addresses; the three-layer switch can receive data from the virtual MAC address, but the real MAC address is adopted when the data is forwarded, so that the data can not conflict with the three-layer switch in the sub-stacking system successfully contended, the interruption of data transmission is avoided, and the stability of the system is improved.
According to the technical scheme provided by the embodiment of the invention, when the stack splitting exists in the stack switch system, the stack splitting competition result of the stack switch system is obtained, whether the competition of the sub-stack system of the three-layer switch is successful or not is judged, after the competition of the sub-stack system of the three-layer switch is determined to be failed, the equipment connected with the downlink is judged, and the interface parameter of the downlink is correspondingly set, so that the data transmission with the connected equipment is maintained, the network data transmission performance reduction caused by the fact that the sub-stack system is lost by stopping competition is avoided, and the reliability of the network is improved.
Example four
Fig. 4 is a block diagram of a processing apparatus for stack splitting according to a fourth embodiment of the present invention, where the apparatus specifically includes: a distributed aggregation closing module 410, a competition result obtaining module 420 and a first address setting module 430;
a distributed aggregation shutdown module 410, configured to, when it is detected that there is a stack split in the stack switch system, shutdown a distributed aggregation function with a gateway device in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink;
a competition result obtaining module 420, configured to obtain a stack splitting competition result of the stack switch system, and determine whether a sub-stack system where the three-layer switch is located successfully competes;
a first address setting module 430, configured to set, if it is determined that contention of the sub-stacking system where the three-layer switch is located fails, an uplink interface parameter of the three-layer switch as a real IP address of the three-layer switch and a real MAC address of the three-layer switch.
According to the technical scheme provided by the embodiment of the invention, when stack splitting exists in the stack switch system, the distributed aggregation function between the uplink and the gateway equipment is closed, the stack splitting competition result of the stack switch system is obtained, whether the sub-stack system where the three-layer switch is located successfully competes is judged, and the uplink and downlink interface parameters of the three-layer switch in the sub-stack system with the failed competition are reset, so that the interruption of communication of a connected host caused by closing the sub-stack system with the failed competition is avoided, and the stability of a communication network is improved.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
a stack splitting notification sending module, configured to send a stack splitting notification to the gateway device, so that the gateway device closes the distributed aggregation function with the three-layer switch.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
and the second address setting module is used for setting the uplink interface parameters of the three-layer switch as the virtual IP address of the stack switch system and the virtual MAC address of the stack switch system if the fact that the sub-stack system where the three-layer switch is located successfully competes is determined.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
and the third address setting module is used for setting the interface parameters of the downlink of the switch into the virtual IP address of the stack switch system and the virtual MAC address of the stack switch system.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
the device information acquisition module is used for acquiring device information connected with a downlink and judging whether the downlink is connected with at least one two-layer switch or not;
a fourth address setting module, configured to set an interface parameter of a downlink of the three-layer switch to a virtual IP address of the stack switch system and a virtual MAC address of the stack switch system if it is determined that the downlink is not connected to the two-layer switch.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
a fifth address setting module, configured to set an interface parameter of a downlink of the three-layer switch as a virtual MAC address of the stack switch system if it is determined that the downlink is connected to at least one two-layer switch.
Optionally, on the basis of the above technical solution, the stacking splitting processing apparatus further includes:
and the forwarding operation execution module is used for executing the forwarding operation of the service to be processed through the real MAC address of the uplink when the service to be processed is obtained through the virtual MAC address of the downlink.
The device can execute the processing method for stack splitting provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, reference may be made to the method provided in any embodiment of the present invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a switch device according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary switch device 12 suitable for use in implementing embodiments of the present invention. The switch device 12 shown in fig. 5 is only an example and should not bring any limitations to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the switch device 12 is in the form of a general purpose computing device. The components of switch device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples various system components including the memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Switch device 12 typically includes a variety of computer system readable media. These media may be any available media that is accessible by switch device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The switch device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Switch device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with switch device 12, and/or with any devices (e.g., network card, modem, etc.) that enable switch device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the switch device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the switch device 12 over the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with switch device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes programs stored in the memory 28 to perform various functional applications and data processing, such as implementing the stack splitting processing method provided by any of the embodiments of the present invention. Namely: when detecting that stack splitting exists in the stack switch system, closing a distributed aggregation function with a gateway device in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink; acquiring a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes; if the fact that the sub-stacking system where the three-layer switch is located fails to compete is determined, setting the interface parameters of the uplink of the three-layer switch as the real IP address of the three-layer switch and the real MAC address of the three-layer switch.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the processing method of stack splitting according to any embodiment of the present invention; the method comprises the following steps:
when detecting that stack splitting exists in the stack switch system, closing a distributed aggregation function with a gateway device in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink;
acquiring a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes;
if the fact that the sub-stacking system where the three-layer switch is located fails to compete is determined, setting the interface parameters of the uplink of the three-layer switch as the real IP address of the three-layer switch and the real MAC address of the three-layer switch.
Computer storage media for embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A processing method of stack splitting is applied to a three-layer switch in a stack switch system, and comprises the following steps:
when detecting that the stack split exists in the stack switch system, closing a distributed aggregation function with gateway equipment in an uplink; wherein the three-layer switch is connected with the gateway device through the uplink;
acquiring a stacking splitting competition result of the stacking switch system, and judging whether a sub-stacking system where the three-layer switch is located successfully competes; the form of the stack split competition comprises start completion time comparison, priority comparison of a main switch in a sub-stack system and MAC address comparison of the sub-stack system;
if the fact that the sub-stacking system where the three-layer switch is located fails to compete is determined, setting the interface parameters of the uplink of the three-layer switch as the real IP address of the three-layer switch and the real MAC address of the three-layer switch;
acquiring equipment information of downlink connection, and judging whether the downlink is connected with at least one two-layer switch or not;
and if the downlink is determined to be connected with at least one two-layer switch, setting the interface parameter of the downlink of the three-layer switch as the virtual MAC address of the stack switch system.
2. The method of claim 1, further comprising, after closing the distributed aggregated connection with the gateway device in the uplink:
sending a stack split notification to the gateway device to cause the gateway device to turn off a distributed aggregation function with the three-tier switch.
3. The method of claim 1, wherein after determining whether the sub-stacking system in which the three-layer switch is located successfully competes, the method further comprises:
and if the competition of the sub-stacking system where the three-layer switch is located is determined to be successful, setting the interface parameter of the uplink of the three-layer switch as the virtual IP address of the stacking switch system and the virtual MAC address of the stacking switch system.
4. The method of claim 3, wherein after determining that the sub-stacking system in which the three-layer switch is located successfully competes, further comprising:
setting interface parameters of a downlink of the switch to a virtual IP address of the system of stack switches and a virtual MAC address of the system of stack switches.
5. The method of claim 1, after determining whether the downlink is connected to at least one layer two switch, further comprising:
and if the downlink is not connected with the two-layer switch, setting the interface parameters of the downlink of the three-layer switch as the virtual IP address of the stack switch system and the virtual MAC address of the stack switch system.
6. The method of claim 1, wherein after setting the interface parameter of the downlink of the three-layer switch to the virtual MAC address of the stack switch system, further comprising:
and when the service to be processed is obtained through the virtual MAC address of the downlink, executing forwarding operation of the service to be processed through the real MAC address of the uplink.
7. A stack splitting processing apparatus, comprising:
a distributed aggregation closing module, configured to close a distributed aggregation function with a gateway device in an uplink when it is detected that a stack split exists in the stack switch system; wherein the three-layer switch is connected with the gateway device through the uplink;
a competition result obtaining module, configured to obtain a stack splitting competition result of the stack switch system, and determine whether a sub-stack system in which the three-layer switch is located successfully competes; the form of the stack split competition comprises start completion time comparison, priority comparison of a main switch in a sub-stack system and MAC address comparison of the sub-stack system;
a first address setting module, configured to set an interface parameter of an uplink of the three-layer switch as a real IP address of the three-layer switch and a real MAC address of the three-layer switch if it is determined that contention of a sub-stacking system in which the three-layer switch is located fails;
the device information acquisition module is used for acquiring device information connected with a downlink and judging whether the downlink is connected with at least one two-layer switch or not;
a fifth address setting module, configured to set an interface parameter of a downlink of the three-layer switch as a virtual MAC address of the stack switch system if it is determined that the downlink is connected to at least one two-layer switch.
8. A switch device, characterized in that the switch device comprises:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of processing stack splitting as recited in any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of stack splitting as claimed in any one of claims 1 to 6.
CN202011379238.1A 2020-11-30 2020-11-30 Stack splitting processing method, device and equipment and storage medium Active CN112787960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011379238.1A CN112787960B (en) 2020-11-30 2020-11-30 Stack splitting processing method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011379238.1A CN112787960B (en) 2020-11-30 2020-11-30 Stack splitting processing method, device and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112787960A CN112787960A (en) 2021-05-11
CN112787960B true CN112787960B (en) 2022-11-04

Family

ID=75750570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011379238.1A Active CN112787960B (en) 2020-11-30 2020-11-30 Stack splitting processing method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112787960B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396385B (en) * 2021-05-19 2023-07-21 中国移动通信集团浙江有限公司 Method and device for quickly recovering service of stack switch and computing equipment
CN115604174A (en) * 2021-07-07 2023-01-13 中兴通讯股份有限公司(Cn) Cross-device link aggregation route calculation method, switch, system and storage medium
CN113452616B (en) * 2021-07-13 2022-04-19 烽火通信科技股份有限公司 Three-four address router and method and device for managing down-hanging equipment thereof
CN115102897B (en) * 2022-06-06 2024-01-05 上海华信长安网络科技有限公司 Stacking splitting protection method based on link aggregation
CN115348156A (en) * 2022-07-01 2022-11-15 超聚变数字技术有限公司 Method, equipment and storage medium for processing double-master fault

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231682A (en) * 2011-07-25 2011-11-02 杭州华三通信技术有限公司 Stacking conflict processing method and equipment
CN102916857A (en) * 2012-11-09 2013-02-06 迈普通信技术股份有限公司 Stacking and splitting quick detection method and device
CN106060190A (en) * 2016-07-25 2016-10-26 杭州华三通信技术有限公司 Method and device for processing IP (Internet Protocol) address conflict

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442484B (en) * 2008-12-05 2012-09-05 杭州华三通信技术有限公司 Method, system and equipment for detecting stacking multi-Active

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231682A (en) * 2011-07-25 2011-11-02 杭州华三通信技术有限公司 Stacking conflict processing method and equipment
CN102916857A (en) * 2012-11-09 2013-02-06 迈普通信技术股份有限公司 Stacking and splitting quick detection method and device
CN106060190A (en) * 2016-07-25 2016-10-26 杭州华三通信技术有限公司 Method and device for processing IP (Internet Protocol) address conflict

Also Published As

Publication number Publication date
CN112787960A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN112787960B (en) Stack splitting processing method, device and equipment and storage medium
CN110912780B (en) High-availability cluster detection method, system and controlled terminal
US9219641B2 (en) Performing failover in a redundancy group
CN111865779B (en) Route synchronization method and cross-device link aggregation group
US8467383B2 (en) Stateful switching between reliable transport modules for communicating with an external peer without losing the transport layer connection
US20080215910A1 (en) High-Availability Networking with Intelligent Failover
US9385944B2 (en) Communication system, path switching method and communication device
KR20070033866A (en) Recording medium recording information processing apparatus, communication load balancing method and communication load balancing program
CN108337161B (en) Method for smoothly switching three-layer data flow of MLAG interface fault
US7804768B2 (en) Method for redundant linking lines and wide area network node device
CN110868278B (en) Method for dual-computer redundancy of communication front-end processor of rail transit comprehensive monitoring system
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN101262407B (en) A method for virtual router to establish tunnel
US20230111966A1 (en) Ethernet storage system, and information notification method and related apparatus thereof
CN111787349A (en) Data caching method, device, equipment and medium
CN114371912A (en) Virtual network management method of data center and data center system
US6973024B1 (en) Method for modem element switchover using multicast groups
CN113839862A (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
CN106533771B (en) Network equipment and control information transmission method
CN102868616A (en) Method for establishing virtual MAC (Media Access Control) address table item in network as well as router and system
CN114884878A (en) MAC address synchronization method for multi-switch chip stacking in hardware learning mode
US20220311702A1 (en) Efficient propagation of fault routing notifications
CN112217718A (en) Service processing method, device, equipment and storage medium
EP3627766B1 (en) Method and system for switching between active bng and standby bng
CN117596284B (en) Method, device, computer equipment and storage medium for data transmission

Legal Events

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