Nothing Special   »   [go: up one dir, main page]

CN100581272C - Stacked switchboard system and keep-alive method of stacked switchboard system - Google Patents

Stacked switchboard system and keep-alive method of stacked switchboard system Download PDF

Info

Publication number
CN100581272C
CN100581272C CN200710178400A CN200710178400A CN100581272C CN 100581272 C CN100581272 C CN 100581272C CN 200710178400 A CN200710178400 A CN 200710178400A CN 200710178400 A CN200710178400 A CN 200710178400A CN 100581272 C CN100581272 C CN 100581272C
Authority
CN
China
Prior art keywords
switch
state
port
stack
slave
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
CN200710178400A
Other languages
Chinese (zh)
Other versions
CN101159883A (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.)
Ruijie Networks Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN200710178400A priority Critical patent/CN100581272C/en
Publication of CN101159883A publication Critical patent/CN101159883A/en
Application granted granted Critical
Publication of CN100581272C publication Critical patent/CN100581272C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a slave system and a slave system keep-alive method. The slave system keep-alive method includes: a subordinate switch detects the state of the subordinate switch stacking port; the subordinate switch judges whether the stacking port state changes; when the subordinate switch stacking port state changes from connected to cut-off, the subordinate switch detected change is the subordinate switch stacking port type in cut-off state; if the subordinate stacking port in cut-off state is far stacking port, the subordinate switch sends out cut-off message to a master switch. The invention has the advantages of realizing stacking equipment keep-alive method by detecting the switch stacking port state in the stacking switch system, and notifying stacking connection lost and resumed information to other switches in the stacking system, by sending out message and delivering stacking port, when the switch detects the stacking port cut-off or connected.

Description

Stack switch system and keep-alive method thereof
Technical Field
The present invention relates to switch technology, and more particularly, to a stack switch system and a keep-alive (keepalive) method for the stack switch system.
Background
In a large network, a stack switch is usually adopted to meet the requirement of the large network on the port number. The stacking port of the switch is connected with the stacking port of another switch through a special connecting cable or a common cable provided by a manufacturer, so that the number of the ports of the whole equipment is expanded. Typically only stackable switches are provided with stack ports, such as the near stack port "up" and the far stack port "down" shown in fig. 1. When a plurality of switches are connected together in a stacked manner, they function as one switch to be managed as one switch. The stackable switch can conveniently realize the expansion of the network, is the most ideal choice when a network is newly built, not only increases the user port number capable of being managed in a unified way, but also can manage a plurality of switches in a unified way, and provides convenience for users.
Generally, when a plurality of switches are stacked together, the switches are divided into master switches and slave switches according to the functions of the switches in the stack. In order to manage a plurality of switches under stacking, information interaction between the master switch and the slave switch is required to be performed through a stacking port by using certain specific types of messages, so that the master switch manages the slave switches. The master switch needs to run various protocols and directly receive the management information of the user, and the master switch analyzes the management information and informs the slave switch of the management information. The slave switch mainly receives the information transmitted by the master switch and informs the master switch of the information of the slave switch. The slave switch does not run the protocol nor directly accepts the user's management.
The information exchanged between the master switch and the slave switch generally includes management messages and data messages. The management message is a message of information interaction between the master switch and the slave switch. For example, a slave switch needs to be configured in a stack, after the master switch encapsulates relevant configuration information into a specific message, the message is sent from the CPU of the master switch to the slave switch through the stack port, the slave switch receives the message, re-decapsulates the message, converts the message into relevant configuration information, and sets the information to the slave switch. The data message refers to a data exchange message in a stacking mode, and refers to all messages except a non-management message. The management messages and the data messages share CPU resources. In addition, these data packets are sent and received through other ports that are not stack ports when the data packets are forwarded inside the stack sub-device, and the data packets also need to pass through the stack ports when the data packets are forwarded between the sub-devices.
As shown in FIG. 2, the stack switch is composed of two switches, a master switch and a slave switch. Both the master and slave switches have 20 ports and 1 stacking port. In fig. 2, the dotted line represents a data packet, and the solid line represents a management packet, and as can be seen from fig. 2, both the management packet and the data packet between the master switch and the slave switch need to pass through the stacking port; and the respective CPUs of the master switch and the slave switch are also required to simultaneously process the data messages from the ports and the data messages and the management messages from the stack ports.
Since the sum of the bandwidths of the user ports generally exceeds the bandwidth of the stack ports, as shown in fig. 2, the slave switch has 20 ports, the maximum bandwidth of each port is 100Mbps, and the bandwidth of the stack port connected with the master switch is 1000 Mbps. When all ports on the slave switch send messages to the master switch at the rate of 100Mbps, the rate of data messages sent to the stack port reaches 24 Mbps by 100Mbps, which is 2400Mbps in total, and far exceeds the bandwidth of the stack port.
Therefore, in the system shown in fig. 2, because the management messages and the data messages processed by the master switch and the slave switch share the CPU resources of the device, and the data message rate of the stack port between the master switch and the slave switch exceeds the bandwidth of the stack port between the master switch and the slave switch, the management messages between the master switch and the slave switch may be discarded due to insufficient bandwidth, thereby causing the accidental discarding of the management messages under a large flow rate.
In the prior art, a keep-alive (keepalive) message adopted by a keep-alive method for ensuring that devices in a stack switch can confirm whether to work normally is a specific type of management message, and a master switch communicates with a slave switch through the keepalive management message to ensure that the master switch and the slave switch know whether the current operation of a counterpart is normal in real time. And when one slave switch is abnormal in operation, the master switch actively stops sending Keepalive messages, so that the master switch considers that the slave switch fails because no Keepalive message of the slave switch is received within a limited time, the master device also stops sending the Keepalive messages to all other slave devices, and the other slave devices cannot receive the Keepalive messages of the master device within the limited time to recognize that the system fails. Therefore, all the devices in the stack reset themselves due to the fact that the Keepalive messages are not received in time, and the whole system is reset.
Therefore, in the system in fig. 2, if the master switch and the slave switch lose the management message due to insufficient CPU resources or insufficient stack port bandwidth, the master switch and the slave switch may fail to receive Keepalive messages for a period of time and mistakenly assume that the other switch fails, thereby causing a false alarm failure.
Disclosure of Invention
To solve the above technical problem, an object of the present invention is to provide a keep-alive method for a stack switch system.
The invention aims to provide a keep-alive method of a main switch.
It is another object of the present invention to provide a master switch in a stack switch system.
It is yet another object of the present invention to provide a slave switch in a stack switch system.
The invention identifies the running state of the switch by detecting the state of the stacking port of the switch without using the existing keep-alive (keepalive) message.
In order to achieve the above object, the present invention provides a keep-alive method for a stack switch system, wherein the keep-alive method for the stack switch system comprises: the slave switch detects the slave switch stacking port state; the slave switch judges whether the stacking port state of the slave switch changes or not; when the judging result is that the stacking port state of the slave switch is changed from connection to disconnection, the slave switch detects the type of the stacking port of the slave switch changed to the disconnection state; if the detection result is that the stacking port of the slave switch which is changed into the disconnection state is a far stacking port, the slave switch sends a disconnection message to the master switch; the main switch detects whether a disconnection message is received; if the detection result is that the master switch receives the disconnection message, the master switch sets the state of the slave switch which is recorded in the system state registration table and is farther than the far stacking port corresponding to the disconnection message as lost, and sets the states of the far stacking port corresponding to the disconnection message and the slave switch stacking port which is farther than the far stacking port corresponding to the disconnection message in the system state registration table as disconnected; the main switch detects whether a main switch timer is started or not; and if the detection result is that the main switch timer is not started, the main switch starts the main switch timer. The invention provides a stack exchanger system, which comprises a master exchanger and a slave exchanger, wherein the master exchanger and the slave exchanger are connected with each other through a stack port to form the stack exchanger system, and the master exchanger comprises: a main switch detection unit for detecting a disconnection state or a connection state of a stacking port of the main switch and outputting the same to the main switch control unit;
the main exchanger timer is used for counting the main exchanger reset time set by the main exchanger control unit and outputting a main exchanger reset signal to the main exchanger control unit when the counting reaches the main exchanger reset time;
a master switch storage unit for storing a system state registry for recording: a master switch stacking port state, a slave switch stacking port state and a slave switch state;
the master switch communication unit is used for transmitting the reset message to the stacking port of the slave switch through the stacking port of the master switch; forwarding the disconnection message and the connection message received by the stacking port of the main switch to a control unit of the main switch;
the master switch control unit is used for setting the reset time of the master switch, controlling the starting or canceling of a timer of the master switch and setting the stacking port state of the master switch, the stacking port state of the slave switch and the state of the slave switch recorded by the system state registration table; generating a reset message according to the reset signal of the main switch, and resetting the main switch after outputting the reset message to the communication unit of the main switch;
the slave switch includes:
a slave switch detecting unit for detecting a disconnection state or a connection state of a stacking port of the slave switch and outputting to the slave switch control unit;
a slave switch timer for counting according to a slave switch reset time set by the slave switch control unit and outputting a slave switch reset signal to the slave switch control unit when the count reaches the slave switch reset time;
the slave switch storage unit is used for storing a slave switch state registration table of the slave switch, and the slave switch state registration table is used for recording the type of a slave switch stacking port, the slave switch stacking port state and the state before the slave switch stacking port is closed; the slave switch communication unit forwards the received reset message to the control unit of the slave switch; and transmitting the connection disconnection message and the connection message generated by the slave switch control unit to the master switch.
The invention has the advantages that the running condition of each switch in the stacking switch system is identified by the modes of sending the message and transferring the state of the stacking port, so as to realize the keep-alive (Keepalive) method of the stacking equipment. Compared with the stack switch system using the keep-alive messages, the switch in the stack switch system of the invention does not need to process a large amount of keep-alive messages any more and improves the detection efficiency, thereby being particularly suitable for the switch cluster adopting the stack mode to carry out centralized management.
In addition, when the stacking switch system of the invention has a fault caused by the problem of non-stacking port connection, the switch can achieve the same effect as the disconnection of the stacking port by actively closing the stacking port.
Drawings
The drawings are only for purposes of illustrating and explaining the present invention and are not to be construed as limiting the scope of the present invention. Wherein,
FIG. 1 is a physical connection diagram of stacking ports of a switchboard
FIG. 2 is a diagram illustrating the forwarding of management messages and data messages between stack switches.
FIG. 3 is a system diagram of a stack switch;
FIG. 4 is a system diagram of another stack switch;
FIG. 5 is a flow chart illustrating the detection of a stack port disconnect by the stack switch system of FIGS. 3 and 4;
fig. 6 is a flow chart illustrating a method for connection detection of the master switch in fig. 3 and 4;
fig. 7 is a schematic diagram of the stacked master/slave switch structure of fig. 3 and 4.
Detailed Description
In order to more clearly understand the technical features, objects, and effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings. Wherein like parts are given like reference numerals.
FIGS. 3 and 4 are schematic diagrams showing the system structure of the stack switches, wherein the difference between FIGS. 3 and 4 is the location of the master switch in the system stack.
In fig. 3, the switch S4 is a master switch, and the switches S1, S2, S3, S5, and S6 are slave switches connected to the master switch S4. A, B, C, D, E, H, I, J respectively represent the stacking ports of the slave switches S1, S2, S3, S5, S6. The stacking port of the slave exchanger connected with the master exchanger and the stacking port of the slave exchanger close to the master exchanger connected with the slave exchanger are close stacking ports of the slave exchanger. Stack ports a, C, E, H, J in fig. 3 are near stack ports from switches S1, S2, S3, S5, and S6, respectively. The stack port of the slave switch to which the slave switch farther from the master switch is connected is the far stack port of the slave switch. The stack port B, D, I in FIG. 3 is the far stack port from switches S2, S3, S5, respectively.
Similarly, in fig. 4, the near stack ports of the slave switches S2 ', S3', S4 ', S5', S6 'are B', D ', F', H ', J'; the far stacking ports from switches S2 ', S3', S4 ', S5' are C ', E', G ', I'.
In the stack switch systems shown in fig. 3 and 4, a switch farther than a stack port represents a slave switch farther than the stack port from the master switch, and a stack port farther than the stack port represents a far stack port on the slave switch and a stack port of the slave switch farther than the far stack port of the slave switch from the master switch.
In fig. 3, the slave switches farther than the stack port E are slave switches S2, S1. The stack ports farther than the stack port E have a far stack port D, and a stack port B, C, A on the slave switches S2, S1 farther from the master switch than the switch S3. For stack port G on the master switch, the devices farther than stack port G are switches S5, S6, and the stack ports farther than stack port G are stack ports H, I, J of switches S5 and S6.
FIG. 7 is a schematic diagram showing the structure of a master/slave switch of the stack switch system of FIGS. 3 and 4, the master/slave switch being provided with a timer, a port detection unit, a storage unit, a control unit, and a communication unit.
The main exchange comprises: and the port detection unit of the main switch detects the disconnection state or the connection state of the stacking port of the main switch and outputs the disconnection state or the connection state to the control unit of the main switch.
And the master switch timer counts the master switch reset time set by the master switch control unit, and outputs a master switch reset signal to the master switch control unit when the count of the master switch timer reaches the master switch reset time.
A master switch storage unit for storing a system state registry in which: the state of the stacking port of the main exchanger, the number of the stacking ports of the main exchanger and the state before the stacking port of the main exchanger is closed; slave switch stack port state and slave switch state.
The main switch communication unit transmits the reset message to the slave switch stacking port through the main switch stacking port; and forwarding the disconnection message and the connection message received by the stacking port of the main switch to the control unit of the main switch.
And a master switch control unit for setting the master switch reset time and controlling the start of the master switch timer or canceling the counting of the master switch reset time. And the main switch control unit generates a reset message according to the main switch reset signal and outputs the reset message to the main switch stacking port to reset the main switch. The master switch control unit modifies the state of a slave switch stacking port and/or the state of a slave switch in a system state registration table according to the disconnection message or the connection message forwarded by the master switch communication unit; the main switch control unit modifies the state of the main switch stacking port recorded by the system state registration table according to the disconnection state and the connection state of the main switch stacking port detected by the main switch port detection unit; the control unit of the main switch controls the closing of the stacking port of the main switch according to the number of the stacking ports of the main switch in the system state registration table and the disconnection state of the stacking port of the main switch detected by the port detection unit of the main switch, and records the state before the closing of the stacking port of the main switch in the system state registration table, or controls the non-closing of the stacking port of the main switch according to the connection state of the stacking port of the main switch detected by the port detection unit of the main switch, the number of the stacking ports of the main switch recorded in the system state registration table and the state before the closing of the stacking port of the main switch.
In addition, the master switch can also select a setting display unit. The display unit is used for displaying the control interface and the content recorded in the system state registration table read by the main exchange control unit.
The slave switch includes: and the port detection unit is used for detecting the disconnection state and the recovery connection state of the slave switch stacking port.
And the slave switch control unit is used for setting the reset time of the slave switch and controlling the start or cancel of the counting of the reset time of the slave switch by the slave switch timer. The slave switch control unit controls the slave switch to reset according to the reset message forwarded by the slave switch communication unit or the count value of the slave switch timer for resetting the slave switch; the slave switch control unit generates a disconnection message and a connection message according to the disconnection state and the connection recovery state of the slave switch stacking port detected by the slave switch port detection unit and sets the state of the slave switch stacking port in the equipment state registration table; the slave switch control unit closes/does not close the far stack port of the slave switch and starts or cancels the counting of the slave switch reset time by the slave switch timer according to the disconnection state and the connection restoration state of the near stack port in the slave switch in the present device state registration table.
The slave switch stores its own device state registration table in a storage unit. The equipment state registration table is used for recording the states of a near stacking port and a far stacking port of the slave switch;
the communication unit of the slave switch forwards the reset message received from the stacking port of the slave switch to the control unit of the slave switch; and transmitting the disconnection message and the connection message generated by the slave switch control unit to the stacking port of the master switch through the stacking port of the slave switch.
The details of the stack switch system and its keep-alive method in the present invention are described in the following with reference to fig. 3-6 by several embodiments:
implementation mode one
Please refer to fig. 3, fig. 5, and fig. 6. After all the switches S1-S6 in fig. 3 are started, the switch port detection units detect the operating states of the ports of the device by using the existing detection method. Since the embodiments of the present invention mainly relate to the operating state of the switch stack port, only the operating state of the stack port detected by the port detection unit will be described in the embodiments of the present invention. The working state of the stacking port detected by the port detection unit is mainly divided into a connection (link up) and a disconnection (link down). Wherein: the connection indicates that the switch stack is in a connected state, and the message can be forwarded. And disconnection (Linkdown) which indicates that the stacking port of the switch is in a disconnected state and the message cannot be forwarded.
When the stack port B of the slave switch S2 is disconnected due to a failure, the port detection unit of the slave switch S2 detects the disconnection state of the stack port B and outputs the same to the control unit of the slave switch S2, and the control unit of the slave switch S2 compares the disconnection state of the received stack port B with the state of the stack port B recorded in the own device state registration table, and determines whether or not the state of the stack port B has changed. If the state of the stack port B recorded in the own apparatus state registry read by the control unit is connected, the control unit compares the received state of the stack port B with the state of the stack port B recorded in the own apparatus state registry, and determines that the state of the stack port B is changed from connected to disconnected. The control unit of the master switch S2 determines that the type of the stack port B is a far stack port based on the stack port type recorded in the present apparatus state registration table, and the control unit of the slave switch S2 sets the state of the stack port B in the present apparatus state registration table to off. The control unit of the slave switch S2 generates a stack port B disconnection message according to the disconnection state of the far stack port B recorded in the present device state registration table and outputs the same to the communication unit, which transmits the stack port B disconnection message to the stack port F of the master switch S4 through the near stack port C in the existing connection-oriented manner.
The connection between the stacking port A and the stacking port B is disconnected due to the disconnection of the stacking port B. The port detection unit of the slave switch S1 detects the disconnection state of the stack port a and outputs to the control unit of the slave switch S1. The control unit of the slave switch S1 compares the received disconnection state of the stack port a with the state of the stack port a recorded in the own device state registry of the slave switch S1. When the control unit of the slave switch S1 determines that the state of the stack port a has changed from connection to disconnection, the control unit of the slave switch S1 determines the type of the stack port a from the stack port type recorded in the present apparatus state registry. When the type of the stack port a is the near stack port and the stack port a is the only stack port of the slave switch S1, the control unit of the slave switch S1 sets the state of the stack port a recorded in the own device state registration table to off, starts a timer according to the off state of the near stack port a recorded in the own device state registration table, and counts the reset time of the slave switch S1 set by the control unit of the slave switch S1 by the timer of the slave switch S1.
The communication unit of the master switch S4 receives the stack port B disconnection packet through the stack port F and forwards the disconnection packet to the control unit of the master switch S4. The control unit of the master switch S4 sets the state of the stack port B corresponding to the stack port B disconnection message recorded in the system state registry to disconnected, sets the state of the slave switch S1 farther than the stack port B in the system state registry to lost, and sets the state of the stack port a farther than the stack port B in the system state registry to disconnected.
When the control unit of the master switch S4 receives the stack port B disconnection message, it determines whether the timer of the master switch S4 is started. If the timer of the master switch S4 is not started, the control unit of the master switch S4 starts the master switch S4 timer to count the master switch S4 reset time set by the control unit of the master switch S4.
The control unit of the master switch S4 may also read the states of the slave switches and stack ports recorded in the system state registry and transmit to the display unit so that the user is notified of the state of the stack switch system through the display unit.
Before the count of the slave switch S1 timer reaches its reset time and the count of the master switch S4 timer reaches its reset time, if the failure of the stack port B of the slave switch S2 is eliminated, the port detection unit of the slave switch S2 detects that the stack port B state is the connected state and outputs to the slave switch S2 control unit. The control unit of the slave switch S2 compares the received connection state of the stack port B with the state of the stack port B recorded in the own apparatus state registration table, and determines that the state of the stack port B has changed from disconnected to connected. The control unit of the slave switch S2 determines that the stack port B is a far stack port based on the type of stack port recorded in the present apparatus state registry. The control unit of the slave S2 generates a stack port B connection message from the connection state of the stack port B recorded in the own device state registration table and outputs the message to the communication unit. The communication unit of the slave switch S2 transmits the stack port B connection packet to the stack port F of the master switch S4 via the near stack port C.
Since the connection of the stacking port B is restored, the connection between the stacking port a and the stacking port B is restored. The port detection unit of the slave switch S1 detects the connection state of the stack port a and outputs to the slave switch S1 control unit. The slave S1 control unit compares the received connection state of stack port a with the state of stack port a recorded in the own apparatus state registration table, and determines that the state of stack port a has changed from disconnected to connected. The slave switch S1 control unit judges that the stack port a is a near stack port and the stack port a is the only stack port from the switch S1 according to the stack port type recorded by the present apparatus state registration table, and the control unit of the slave switch S1 sets the state of the stack port a in the present apparatus state registration table to connected and cancels the count of the timer of the slave switch S1 according to the connected state of the near stack port a. The control unit of the slave switch S1 generates a stack port a connection packet according to the connection state of the stack port a in the present device state registration table and outputs the packet to the communication unit, and the communication unit of the slave switch S1 transmits the stack port a connection packet to the stack port F of the master switch S4 through the stack port a.
The communication unit of the master switch S4 forwards the stack port a connection packet and the stack port B connection packet received via the stack port F to the master switch S4 control unit. The master switch S4 control unit sets the states of stack port a and stack port B recorded in the system state registry to be connected.
The master switch S4 detects the states of all stack ports in the system state registration table, and determines whether or not all of the stack ports recorded in the system state registration table are in the connected state. If the control unit of the master switch S4 detects that the stack ports recorded in the system status register are all in the connected state, the control unit of the master switch S4 sets the states of all the slave switches in the system status register to normal and cancels the timer of the master switch S4.
The master switch S4 control unit reads the states of the slave switches and stack ports recorded in the system state registration table and transmits to the display unit. The user knows that the system failure has been eliminated through the state of the stack port and the switch displayed on the display unit of the main switch S4.
Since the slave switch S2 is disconnected only from the far stack port B, the near stack port C of the slave switch S2 and the stack port D of the slave switch S3 remain connected. The slave switch S2 may still forward or receive messages through the near stack port C.
If the failure of the stack port B is not cleared, the timer of the slave switch S1 counts that the reset time of the slave switch S1 has reached before the connection is restored from the stack port a of the switch S1, the timer of the slave switch S1 generates a reset signal and outputs the reset signal to the control unit of the slave switch S1, and the control unit of the slave switch S1 resets the slave switch S1.
If the slave switch S1 recorded in the system status register is still in the lost state before the count of the master switch S4 timer reaches the reset time of the master switch S4, the timer of the master switch S4 generates a reset signal and outputs the reset signal to the master switch S4 control unit. The master switch S4 control unit generates a reset message according to the reset signal and outputs to the master switch S4 communication unit. The reset message is transmitted by the master switch S4 communication unit through stack port F or G to stack port C of the slave switch S2, stack port E of the slave switch S3, stack port H of the slave switch S5, and stack port J of the slave switch S6, respectively. After the master switch S4 sends the reset message, the master switch S4 control unit controls the master switch S4 to reset. After the slave switches S2, S3, S5, and S6 receive the reset message from the master switch, the switch control units reset the device, so that all switches of the stack switch system in fig. 3 can be reset.
In this embodiment, keep-alive (keepalive) messages are not sent between the switches to identify the operating conditions of other switches. When the stack port B of the slave switch S2 fails, the slave switch S2 detects the disconnection state of the stack port B and sends a message to the master switch S4, so that the master switch S4 recognizes the operation state of the slave switch S2. Since the stack port B is interconnected with the stack port a, the disconnection state of the stack port B is transmitted to the slave switch S1 through the stack port a, and the slave switch S1 identifies the operation status of the slave switch S2 through the detected disconnection state of the stack port a, that is, through the manner of message transmission and stack port status transmission, it is ensured that other switches of the stack switch system can identify the operation status of other switches. In addition, the reset of the whole system can be realized under the condition that the fault is not eliminated so as to recover the interconnection of the stacking ports among the switches in the system.
Note that this embodiment can be applied also when the stack port between the slave switches S5 'and S6' in fig. 4 is disconnected.
Second embodiment
Please refer to fig. 3, fig. 5, and fig. 6. Assuming that the stack port E of the slave switch S3 is disconnected due to a failure, the port detection unit of the slave switch S3 detects the disconnection state of the stack port E and outputs the same to the control unit of the slave switch S3, the control unit of the slave switch S3 compares the received disconnection state of the stack port E with the state of the stack port E recorded in the own device state registration table, and determines that the state of the stack port E changes from connection to disconnection. The control unit of the slave switch S3 determines that the stack port E is a near stack port and the slave switch S3 is further provided with a far stack port D according to the stack port type recorded in the own apparatus state registration table, and the control unit of the slave switch S3 closes (shut down) the far stack port D, records the connection state before the far stack port D is closed in the own apparatus state registration table, and sets the state of the stack port E, D recorded in the own apparatus state registration table to off. The control unit of the slave switch S3 starts a timer according to the disconnection state of the near stack port E recorded by the present device state registration table to count the reset time of the slave switch S3 set by the control unit of the slave switch S3.
Shutdown (Shutdown) is to force the stack port of the master/slave switch to be in a disconnected state. That is, regardless of whether the stack port is currently in a physically connected state (Linkup), once the stack port is closed, the stack port is necessarily in a disconnected state.
Since the stacking port D is closed, the connection between the stacking port C and the stacking port D is disconnected. The port detection unit of the slave switch S2 detects that the state of the stack port C is the disconnected state and outputs the state to the control unit of the slave switch S2, and the control unit of the slave switch S2 compares the received disconnected state of the stack port C with the state of the stack port C recorded in the own apparatus state registry, and determines that the state of the stack port C has changed from the connected state to the disconnected state. The control unit of the slave switch S2 determines that the stack port C is a near stack port and the slave switch S2 is further provided with a far stack port B according to the stack port type recorded by the own device state registration table, and the control unit of the slave switch S2 closes the far stack port B, records the connection state before the far stack port B is closed in the own device state registration table, and sets the state of the stack port C, B recorded by the own device state registration table to off. The control unit of the slave switch S2 starts the slave switch S2 timer to count the reset time of the slave switch S2 set by the control unit of the slave switch S2 according to the disconnection state of the near stack port C recorded by the present device state registry.
Since the stack port B is closed, the port detection unit of the slave switch S1 detects the disconnection state of the stack port a and outputs it to the control unit of the slave switch S1, the control unit of the slave switch S1 compares the received disconnection state of the stack port a with the state of the stack port a recorded in the own apparatus state registration table, and determines that the state of the stack port a changes from connection to disconnection. The slave switch S1 control unit determines that the stack port a is a near stack port and that the stack port a is the only stack port from the slave switch S1, based on the stack port type recorded by the present device state registry. The control unit of the slave S1 sets the state of the stack port a recorded in the own device state registry to off. The control unit of the slave switch S1 starts the slave switch S1 timer to count the reset time of the slave switch S1 set by the control unit of the slave switch S1 according to the disconnection state of the near stack port a recorded by the present device state registry.
The port detection unit of the master switch S4 detects the disconnection state of the stack port F and outputs the detected disconnection state to the control unit of the master switch S4, and the control unit of the master switch S4 compares the received disconnection state of the stack port F with the state of the stack port F recorded in the system state registration table, and determines that the state of the stack port F is disconnected from the connection state. The control unit of the master switch S4 sets the state of the stack port F in the system state registry to disconnected, the state of the slave switches (S3-S1) farther than the stack port F in the system state registry to lost, and the state of the slave switch stack ports (stack ports a-E) farther than the stack port F in the system state registry to disconnected. That is, the control unit of the master switch S4 sets the state of the stack ports a-F in the system state registry to disconnected, and sets the states of the slave switches S1 to S3 to lost.
When the control unit of the master switch S4 detects that the stack port F is disconnected, the master switch determines that the master switch timer is not started, and the master switch S4 starts the timer to count the master switch S4 reset time set by the control unit of the master switch S4.
Before the timer counts of the switches S1, S2, S3, S4 reach the respective reset times, if the connection between the slave switch S3 and the master switch S4 is not restored, the timers of the slave switches S1, S2, S3, S4 generate respective reset signals and output the respective reset signals to the respective control units. The control units of the switches S1, S2, and S3 reset the own device (own switch), respectively. The control unit of the master switch S4 generates and outputs a reset message to the communication unit, which is sent by the communication unit of the master switch S4 to the slave switches S5, S6 through the stacking port G.
If the connection is restored from stack port E of the switch S3 before the reset time of all the switches of the stack switch system has expired. The port detection unit of the slave switch S3 detects the connection state of the stack port E and outputs to the control unit of the slave switch S3. The slave S3 control unit compares the received connection state of the stack port E with the state of the stack port E recorded in the own device state registration table, and determines that the state of the stack port E has changed from disconnected to connected. The control unit of the slave switch S3 determines that the stack port E is a near stack port and the slave switch S3 is provided with a far stack port D according to the stack port type recorded in the present apparatus state registration table, and the control unit of the slave switch S3 performs non-closing control (no Shutdown) for the far stack port D according to the connection state before the far stack port D is closed, which is recorded in the present apparatus state registration table. Non-shutdown (shutdowny) is a state in which the stack port that was closed (shutdowny) is restored to the state before being closed (shutdowny). Since the state before the stack port is closed, recorded in the own device state registry of the slave switch S3, is the connection state, the non-closing control of the stack port D by the slave switch S3 is to restore the far stack port D to the connection state.
The control unit of the slave switch S3 sets the state of the stack port E, D recorded in the present device state registry to connected and cancels the slave switch S3 timer count according to the connection state of the near stack port E. The slave S3 control unit generates a stack port E connection packet and a stack port D connection packet based on the connection state of the stack port E, D in the present device state registration table and outputs them to the communication unit. The slave switch S3 transmits a stack port E connection packet and a stack port D connection packet to the master switch S4 stack port F via the stack port E.
The connection between the stacking port C and the stacking port D is restored because the stacking port D is restored. The port detection unit of the slave switch S2 detects the connection state of the stack port C and outputs to the slave switch S2 control unit. The control unit of the slave switch S2 compares the received connection state of the stack port C with the state of the stack port C recorded in the own apparatus state registration table, and determines that the state of the stack port C has changed from disconnected to connected.
The control unit of the slave switch S3 determines that the stack port C is a near stack port and the slave switch S2 is also provided with a far stack port B according to the stack port type recorded by the present apparatus state registry. The control unit of the slave switch S2 performs non-closing control for the far stack port B according to the connection state before closing of the far stack port B recorded in the present device state registration table. The control unit of the slave switch S2 sets the state of the stack port C, B in the present device state registration table to connected and cancels the count of the slave switch S2 timer according to the connection state of the near stack port C in the present device state registration table.
The control unit of the slave S2 generates a stack port B connection message and a stack port C connection message according to the connection state of the stack port B, C in the present device state registration table and outputs them to the communication unit. The slave S2 sends the stack port B connection packet and the stack port C connection packet to the master S4 stack port F through the stack port C via the stack port C.
The slave switch S1 port detects the connection state of the stack port a and outputs to the slave switch S1 control unit. The slave S1 control unit compares the received connection state of stack port a with the state of stack port a recorded in the own apparatus state registration table, and determines that the state of stack port a has changed from disconnected to connected. The control unit of the slave switch S1 determines from the stack port type recorded in the present device state registry that stack port a is a near stack port and that stack port a is the only far stack port of the slave switch S1. The control unit of the slave switch S1 sets the state of the stack port a in the own device state registry to connected and cancels the count of the slave switch S1 timer according to the connection state of the near stack port a recorded by the own device state registry.
The control unit of the slave S1 records the connection state of the near stack port a from the own device state registration table, generates a stack port a connection message, and outputs the message to the communication unit. The stack port a connection message is transmitted to the master switch S4 through the stack port a by the communication unit of the slave switch S1.
And the communication unit of the master switch S4 forwards the stack port a connection packet, the stack port B connection packet, and the stack port C connection packet received through the stack port F to the control unit of the master switch S4. The control unit of the master switch S4 sets the state of the stack port A, B, C recorded in the system state registry to connected.
The port detection unit of the master switch S4 detects the connection state of the stack port F and outputs to the master switch S4 control unit. The control unit of the master switch S4 compares the received connection state of the stack port F with the state of the stack port F recorded in the system state registration table, and determines that the state of the stack port F has changed from disconnected to connected.
The following embodiments can also be obtained by those skilled in the art according to the content of the present embodiments:
the master switch S4 detects that the disconnected state of the stack port F is output to the control unit of the master switch S4, the control unit of the master switch S4 sets the states of the stack ports a-F recorded in the system state registration table to disconnected, and sets the states of the slave switches S3-S1 to lost, the control unit of the master switch S4 judges that another stack port G is provided to the master switch S4 according to the number of stack ports recorded in the system state registration table, the control unit of the master switch S4 closes the stack port G, records the connected state before closing the stack port G, disconnects the stack port G, H, I, J in the state recorded in the system state registration table, and loses the states recorded in the system state registration table by the slave switches S5 and S6. The control unit of the master switch S4 determines whether the master switch S4 timer has started. When the master switch S4 timer is not started, the master switch S4 control unit starts the master switch S4 timer to count according to the stack port F disconnection state recorded by the system state registry.
If the master switch S4 control unit closes the stack port G, the slave switch S5 may close the far stack port I, record the connection state of the stack port I before closing, set the state of the stack port H, I recorded by the present device state registration table to off, and start the slave switch S5 timer to count in accordance with the embodiment of the slave switch S2 in the present embodiment.
Since the far stack port I is closed, the slave switch S6 can set the state of the near stack port J recorded in the device state registry to off and start the slave switch S6 timer for counting according to the embodiment of the slave switch S1 in the present embodiment.
The port detection unit of the master switch S4 detects the connection state of the stack port F and outputs to the master switch S4 control unit. The control unit of the master switch S4 compares the received connection state of the stack port F with the state of the stack port F recorded in the system state registration table, and determines that the state of the stack port F has changed from the disconnected state to the connected state. The control unit of the master switch S4 determines that the master switch S4 is provided with another stack port G according to the number of stack ports recorded in the system status register table, and the control unit of the master switch S4 performs non-closing control of the stack port G according to the connection state of the stack port G before closing recorded in the system status register table and sets the state of the stack port F, G in the system status register table as connection.
Since the stack port G is restored to the connection, the slave switch S5 may perform non-shutdown control on the far stack port I, set the state of the stack port H, I in the device state registry to be connected, cancel the timer of the slave switch S5, generate the stack port H connection packet and the stack port I connection packet, and send the packets to the stack port G of the master switch S4 according to the embodiment of the slave switch S2 in this embodiment.
Since the stack port I is restored to the connection state after the shutdown control, the slave switch S6 may set the state of the stack port J in the device state registration table to be connected, cancel the timer of the slave switch S6, generate a stack port J connection message, and send the stack port J connection message to the stack port G of the master switch S4 according to the embodiment of the slave switch S1 in this embodiment.
When the connection between the slave switch S3 and the master switch S4 fails to be restored before the timer counts of the switches S1, S2, S3, S4, S5, and S6 reach the respective reset times, the timers of the switches S1, S2, S3, S4, S5, and S6 generate respective reset signals and output the respective reset signals to the respective control units. The control units of the slave switches S1, S2, S3, S5, and S6 reset the own device (own switch), respectively. The control unit of the master switch S4 generates a reset message and outputs it to the communication unit. However, since the stack port F is disconnected and the stack port G is closed, the communication unit of the master switch S4 cannot transmit the reset message to the slave switches S1, S2, S3, S5, and S6 through the stack port F, G. The control unit of the master switch S4 resets the master switch S4 after generating the reset message.
In the system of FIG. 3, another preferred embodiment is that, because the stack port F is disconnected and the stack port G is closed, the state of all the slave switches S1, S2, S3, S5 and S6 in the system state registry of the master switch S4 is lost. The master switch S4 may not generate any more reset messages according to the disconnection status of the stack ports F and G in the system status registry or the loss status of all the slave switches S1, S2, S3, S5, S6.
After the control unit of the master switch S4 receives the connection messages sent by all the slave switches through the communication unit, the control unit of the master switch S4 sets the state of the stack port A, B, C, D, E, H, I, J in the system state registry to be connected. When the control unit of the master switch S4 determines that the stack ports a to J recorded by the system state registry are all in the connected state, the control unit of the master switch S4 sets the states of all the slave switches S1, S2, S3, S5, S6 recorded by the system state registry to normal and cancels the counting of the timer of the master switch S4.
In the above-described aspect of the present embodiment, the shutdown/non-shutdown control of each switch stack port is performed to transfer the disconnection/connection state of the stack port to the adjacent switch, so that each switch in the stack switch system can recognize the operation state of the adjacent switch.
It should be noted that, if the master switch S1 ' in fig. 4 fails or the connection between the master switch S1 ' and the slave switch S2 ' is broken, the keep-alive of the stack switch system in fig. 4 can be realized according to the method described in this embodiment.
Third embodiment
In the system of fig. 3, when the port detection unit of each switch detects that the operation state of the device has failed, the control unit of each switch closes the stack port of the device of each switch and records the state before the closed stack port is closed again in the device state registration table or the system state registration table. For example: the port detection unit of the master switch S4 detects that the master switch has failed, the control unit of the master switch S4 closes the stack port F, G, records the connection state or disconnection before the stack port F, G was closed in the system state registry, and sets the state of the stack port F, G recorded in the system state registry to disconnected. The master switch S4 starts the timer of the master switch S4 to count when the first master switch stack port is closed. The timer of the slave switch can be started to count when the near stack port is closed for other slave switches in the system. The embodiment can realize the keep-alive of the stack switch system according to the method disclosed by the second embodiment.
The present embodiment can detect the operating state of the switch by using the prior art. However, different from the prior art, when the invention detects that the self running state of the switch is failed, the switch transmits the failure information by actively closing the stacking port. In the prior art, when the switch detects that the running state of the switch is failed, the keepalive message is sent.
Embodiment IV
Referring to fig. 4 to 6, assuming that the stack port I ' of the slave switch S5 ' in fig. 4 is disconnected due to a fault, the port detecting unit of the slave switch S5 ' detects the disconnection state of the stack port I ' and outputs it to the control unit of the slave switch S5 '. The slave switch S5 'control unit compares the disconnection state of the stack port I' received with the state of the stack port I 'in the own device state registration table, and determines that the state of the stack port I' has changed from connection to disconnection. The control unit of the slave switch S5 'determines that the stack port I' is a far stack port based on the stack port type recorded in the present apparatus state registry. The control unit of the slave switch S5 'sets the state of the stack port I' recorded in the present device state registration table to off. The slave switch S5 ' control unit generates a stack port I ' disconnection message according to the disconnection state of the stack port I ' in the present device state registration table and outputs the same to the communication unit, and the communication unit transmits the stack port I ' disconnection message to the stack port A ' of the master switch S1 ' via the near stack port H '.
The port detection unit of the slave switch S6 ' detects the stack port J ' open state and outputs to the slave switch S6 ' control unit. The control unit of the slave switch S6 'compares the received disconnection state of the stack port J' with the state of the stack port J 'in the own apparatus state registration table, and determines that the state of the stack port J' has changed from connection to disconnection. The control unit of the slave switch S6 ' determines that the stack port J ' is a near stack port and the stack port J ' is the only stack port from the switch S6 ' based on the stack port type recorded by the present device state registration table, and the control unit of the slave switch S6 ' sets the state of the stack port J ' recorded by the present device state registration table to off and starts a timer for counting based on the off state of the near stack port J '.
The communication unit of the master switch S1 ' receives the stack port I ' disconnection packet sent from the switch S5 ' through the stack port a ', and forwards the disconnection packet to the control unit of the master switch S1 '. The control unit of the master switch S1 'sets the states of the stack ports J', I 'recorded in the system state registry to disconnected, and the state of the slave switch S6' to lost.
If the stack port G 'of the slave switch S4' is also disconnected. The port detection unit of the slave switch S4 ' detects the stack port G ' open state and outputs to the slave switch S4 ' control unit. The slave switch S4 'control unit compares the received disconnection state of the stack port G' with the state of the stack port G 'recorded in the own apparatus state registration table, and determines that the state of the stack port G' has changed from the connection state to the disconnection state. The control unit of the slave switch S4 'determines that the stack port G' is a far stack port based on the stack port type recorded in the present device state registry, and the slave switch S4 'sets the state of the stack port G' in the present device state registry to off. The slave switch S4 'control unit generates a stack port G' disconnection message according to the disconnection state of the stack port G 'in the present device state registration table and outputs the same to the communication unit, and the slave switch S4' communication unit transmits the stack port G 'disconnection message to the master switch S1' stack port A 'through the near stack port H'.
The connection between the slave switch S4 'and the slave switch S5' is disconnected. The port detection unit of the slave switch S5 ' detects the stack port H ' open state and outputs to the slave switch S5 ' control unit. The slave switch S5 'control unit determines that the stacking port H' is a near stacking port according to the stacking port type recorded in the present apparatus state registry and the slave switch S5 'is also provided with a far stacking port I'. The control unit of the switch S5 ' closes the stack port I ', records the disconnection state record before the closing of the remote stack port I ' in the own device state registration table, and sets the states of the stack ports H ' and I ' recorded in the own device state registration table to disconnection. The slave switch S5 ' starts the slave switch S5 ' timer to count according to the disconnection state of the near stack port H ' in the present device state registry.
The control unit of the master switch S1 ' sets the state of the stack port G ' recorded in the system state registry to disconnected, and the state of the slave switch S5 ' to lost. When the control unit of the master switch S1 'receives the stack port H' disconnection message from the switch S4 ', the control unit of the master switch S1' determines whether the timer is started (the timer of the master switch is not started indicating that the stack port of the master switch S1 'is not disconnected and the disconnection message sent from the switch is not received), since the master switch S1' has started the timer. Thus, after the master switch S1 ' receives the disconnect message from the switch S4 ', the control unit of the master switch S1 ' will no longer start the timer. To avoid the master switch repeatedly and frequently resetting the slave switches in the device and the system.
If the stack port G ' is restored before the timers of the slave switches S5 ', S6 ' and the master switch S1 ' time out, the port detecting unit of the slave switch S4 ' detects the connection state of the stack port G ' and outputs it to the control unit of the slave switch S4 ', the control unit of the slave switch S4 ' compares the received connection state of the stack port G ' with the state of the stack port G ' in the own device state registration table, and determines that the state of the stack port G ' is changed from disconnection to connection. The control unit of the slave switch S5 'determines that the stack port G' is a far stack port according to the stack port type recorded by the device state registration table, the control unit of the slave switch S4 'sets the state of the stack port G' recorded by the device state registration table to be connected, the control unit of the slave switch S4 'generates a stack port G' connection message according to the connection state of the stack port G 'recorded by the device state registration table and outputs the stack port G' connection message to the communication unit, and the communication unit of the slave switch S4 'transmits the stack port G' connection message to the master switch S1 'through the stack port F'.
The connection state of the stacking port G ' is recovered, and the connection between the stacking port H ' and the stacking port G ' is recovered. The slave switch S5 ' detects the connection state of the stack port H ' and outputs it to the control unit of the slave switch S5 ', and the control unit of the slave switch S5 ' compares the received connection state of the stack port H ' with the disconnection state of the stack port H ' recorded in the own apparatus state registration table, and determines that the state of the stack port H ' is changed from disconnection to connection. The control unit of the slave switch S5 'determines that the stacking port H' is a near stacking port according to the stacking port type recorded in the present apparatus state registry and the slave switch S5 'is also provided with a far stacking port I'. The control unit of the slave switch S5 'performs non-closing control of the far stack port I' according to the disconnection state before the stack port I 'recorded in the present device state registry is closed, and the far stack port I' is still in the disconnection state.
The control unit of the slave switch S5 'sets the state of the stack port H' recorded in the own device state registry to connected and cancels the slave switch S5 'timer in accordance with the connected state of the near stack port H' recorded in the own device state registry. The control unit of the slave switch S5 ' generates a stack port H ' connection message according to the connection state of the stack port H ' in the present device state registration table, and the communication unit transmits the stack port H ' connection message to the stack port A ' of the master switch S1 ' through the stack port H '.
The control unit of the master switch S1 ' sets the states of the stack ports G ', H ' recorded in the system state registry to connection according to the received stack port G ' connection message and stack port H ' connection message. The master switch S1 ' detects the states of the stack ports a ' to J ' in the state registry. Since the state of the stack ports I ', J ' in the system state registry is still in the disconnected state, the timer of the master switch S1 ' continues to count. When the timers of the master switch S1 'and the slave switch S6' time out, the switches in the stack switch system are reset, and the specific reset method is described in the first embodiment and the second embodiment.
If the connection is restored from the switch S5 'stack port I' before the timers of the slave switch S6 'and the master switch S1' time out, the port detecting unit of the slave switch S5 'detects the stack port I' connection state and outputs to the control unit of the slave switch S5. The slave switch S5 compares the received connection state of the stack port I ' with the connection state of the stack port I ' recorded in the own device state registration table, and determines that the state of the stack port I ' has changed from disconnected to connected. The control unit of the slave switch S5 'determines that the stack port I' is a far stack port from the own device state registry, and the control unit of the slave switch S5 'sets the state of the stack port I' recorded in the own device state registry as connected. The control unit of the slave switch S5 'generates a stack port I' connection message according to the connection state of the stack port I 'in the present device state registration table and outputs the same to the communication unit, and the slave switch S5 transmits the stack port I' connection message to the master switch S1 'through the stack port H'.
The slave switch S6 ' detects that the connection state of the stack port J ' is restored, the slave switch S6 ' determines that the stack port J ' is a near stack port and the stack port J ' is the only stack port of the slave switch S6 ' according to the stack port type recorded in the present device state registration table, and the control unit of the slave switch S6 ' sets the state of the near stack port J ' in the present device state registration table to be connected and cancels the timer according to the connection state of the near stack port J '. The slave switch S6 'control unit generates a stack port J' connection message according to the connection state of the present device state registration table recording the stack port J 'and outputs it to the communication unit, and the communication unit of the slave switch S6 transmits the stack port J' connection message to the master switch S1 'through the stack port J'.
The control unit of the master switch S1 ' sets the states of the stack ports I ', J ' in the system state registry as connections. When the control unit of the master switch S1 'determines that the state of the stack ports a' -J 'in the system state registration table is the connection state, the control unit of the master switch S1' sets the states of all the slave switches S2 '-S5' in the system state registration table to the normal state and cancels the timer.
The method has the advantages that the keep-alive (Keepalive) method of the stacking equipment is realized by detecting the state of the stacking port of each switch in the stacking switch system, and after the switch detects that the stacking port is disconnected or connected, the stacking connection loss and recovery information is notified to other switches in the stacking system by sending messages and transmitting the state of the stacking port.
Compared with the stack switch system using the keep-alive messages, the switch in the stack switch system of the invention does not need to process a large amount of keep-alive messages any more and improves the detection efficiency, thereby being particularly suitable for the switch cluster adopting the stack mode to carry out centralized management.
In addition, when the stacking switch system of the invention has a fault caused by the problem of non-stacking port connection, the switch can achieve the same effect as the disconnection of the stacking port by actively closing the stacking port.
It should be noted that although there is a time difference between the start times of the timers between the switches (including between the slave switch and between the slave switch and the master switch) in the above-described embodiments of the present invention, it is fully contemplated by those skilled in the art that the time difference is very slight, and the time difference is not enough to affect the reset of the stack switch system according to the embodiments disclosed herein.
The above description is only an exemplary embodiment of the present invention, and is not intended to limit the scope of the present invention. Any equivalent changes and modifications that can be made by one skilled in the art without departing from the spirit and principles of the invention should fall within the protection scope of the invention.

Claims (19)

1. A keep-alive method for a stack switch system, the keep-alive method comprising:
the slave switch detects the slave switch stacking port state;
the slave switch judges whether the state of the slave switch stacking port changes or not;
when the judging result is that the state of the slave switch stacking port is changed from connection to disconnection, the slave switch detects the type of the slave switch stacking port changed to the disconnection state;
if the detection result is that the slave switch stacking port which is changed into the disconnection state is a far stacking port, the slave switch sends a disconnection message to the master switch;
the main exchanger detects whether the disconnection message is received or not;
if the detection result is that the master switch receives the disconnection message, the master switch sets the state of the slave switch, which is recorded by a system state registration table and is farther than the far stacking port corresponding to the disconnection message, to be lost, and sets the states of the far stacking port corresponding to the disconnection message and the slave switch stacking port, which is farther than the far stacking port corresponding to the disconnection message, in the system state registration table to be disconnected;
the master switch detects whether a master switch timer is started or not;
and if the detection result is that the main switch timer is not started, the main switch starts the main switch timer.
2. A keep-alive method for a stack switch system according to claim 1, wherein before the step of sending a disconnect message from the slave switch to the master switch port, the keep-alive method for a stack switch system further comprises the steps of:
the slave switch sets the state of the remote stack port in the device state registry to disconnected.
3. A keep-alive method for a stack switch system according to claim 1, wherein if the detection result is that the slave switch stack port that has changed to the disconnected state is a near stack port, the keep-alive method for a stack switch system further comprises the steps of:
the slave switch detects whether the slave switch is provided with the far stacking port;
and if the detection result is that the slave switch is provided with the far stacking port, the slave switch closes the far stacking port and starts a slave switch timer.
4. A stack switch system keep-alive method according to claim 3, wherein before the slave switch timer step is initiated, the stack switch system keep-alive method further comprises the steps of: the slave switch records the state of the far stacking port before closing in the local equipment state registration table, and sets the states of the near stacking port and the far stacking port in the local equipment state registration table to be disconnected.
5. A keep-alive method for a stack switch system according to claim 3, wherein if the detection result indicates that the slave switch is not provided with the far stack port, the keep-alive method for a stack switch system further comprises the steps of: the slave switch sets the state of the near stacking port in the local equipment state registration table to be disconnected; the slave switch starts the slave switch timer.
6. A keep-alive method for a stack switch system according to claim 1, wherein the keep-alive method for a stack switch system further comprises the steps of:
when the judging result is that the stacking port state of the slave switch is changed from disconnection to connection;
the slave switch detecting a type of the slave switch stack port changed to a connection state;
if the detection result is that the slave switch stack port changed to the connection state is the far stack port, the slave switch sets the state of the far stack port in the local device state registration table as connection;
and the slave switch generates a connection message according to the state of the remote stacking port recorded by the device state registration table and sends the connection message to the master switch.
7. A keep-alive method for a stack switch system according to claim 6, wherein if the detection result is that the slave switch stack port changed to the connection state is the near stack port, the keep-alive method for a stack switch system further comprises the steps of:
the slave switch detects whether the slave switch is provided with the far stacking port;
if the detection result is that the slave switch is provided with the far stacking port, the slave switch restores the far stacking port to the state before closing according to the state before closing of the far stacking port recorded by the state registration table of the slave switch;
the slave switch sets the state of the near stack port recorded by the local device state registration table as connection, and the slave switch sets the state of the far stack port recorded by the local device state registration table as the state before the far stack port is closed;
and the slave switch generates the connection message according to the state of the near stacking port and/or the connection state of the far stacking port recorded by the device state registration table and sends the connection message to the master switch.
8. A keep-alive method for a stack switch system according to claim 7, wherein if the detection result indicates that the slave switch is not provided with the far stack port, the keep-alive method for a stack switch system further comprises the steps of:
the slave switch sets the state of the near stacking port in the local equipment state registration table as connection; and the slave switch generates the connection message according to the connection state of the near stacking port recorded by the equipment state registration table and sends the connection message to the master switch.
9. A keep-alive method for a stack switch system according to claim 1, wherein the keep-alive method for a stack switch system further comprises the steps of:
the main exchanger detects whether the connection message is received;
and if the detection result is that the main switch receives the connection message, the main switch sets the state of the far stacking port and/or the near stacking port corresponding to the connection message in the system state registration table as connection.
10. A keep-alive method for a stack switch system according to claim 3, wherein the keep-alive method further comprises the steps of:
the main exchanger detects the state of a stacking port of the main exchanger;
the main exchanger judges whether the state of a stacking port of the main exchanger changes or not;
when the judging result is that the state of the main switch stacking port is changed from connection to disconnection, the main switch sets the state of the main switch stacking port which is recorded by the system state registration table and is changed into disconnection, sets the state of the slave switch stacking port which is recorded by the system state registration table and is farther than the main switch stacking port which is changed into disconnection as disconnection, and sets the state of the slave switch which is recorded by the system state registration table and is farther than the disconnected main switch stacking port as loss;
the main switch detects whether the main switch timer is started;
and if the detection result is that the main switch timer is not started, the main switch starts the main switch timer.
11. A keep-alive method for a stack switch system according to claim 10, wherein when the determination result is that the primary switch stack port status changes from connected to disconnected, the keep-alive method for a stack switch system further comprises the steps of:
the main exchanger detects whether the main exchanger is provided with another main exchanger stacking port;
when the main exchanger is also provided with another main exchanger stacking port, the main exchanger closes the other main exchanger stacking port;
the master switch records the state before the closed master switch stack port in the system state registration table and sets the state of the closed master switch stack port in the system state registration table to be disconnected, sets the state of the slave switch stack port farther than the closed master switch stack port in the system state registration table to be disconnected, and sets the state of the slave switch farther than the closed master switch stack port in the system state registration table to be lost.
12. A keep-alive method for a stack switch system according to claim 10, wherein when the master switch determines that the status of the stack port of the master switch changes from disconnected to connected, the keep-alive method further comprises the steps of:
the master switch sets the state of the master switch stack port that becomes connected in the system state registry as a connection.
13. A keep-alive method for a stack switch system according to claim 12, wherein when the master switch determines that the master switch stack port status changes from disconnected to connected, the keep-alive method further comprises the steps of:
the main exchanger detects whether the main exchanger is provided with another main exchanger stacking port;
if the detection result is that the main switch is also provided with another main switch stacking port, the main switch restores the closed main switch stacking port to the state before closing according to the state before closing of the other main switch stacking port recorded by the system state registration table;
and the master switch sets the state of the stacking port of the other master switch recorded by the system state registry as the state before closing.
14. A stack switch system keep-alive method according to claim 1, 2, 4, 5, 8, 9, 11, 13, further comprising the steps of:
the master switch detects the states of the master switch stacking port and the slave switch stacking port in the system state registration table;
when the master switch stack port and the slave switch stack port in the system state registration table are both in a connected state, the master switch sets the state of the slave switch in the system state registration table to normal and cancels the master switch timer.
15. A keep-alive method for a stack switch system according to claim 1, 2, 5, 8, 9, 11 or 13, wherein the slave switch starts a slave switch timer according to the disconnection state of the near stack port; the slave switch closes the slave switch timer according to the connection state of the near stacking port.
16. A stack switch system comprising a master switch and a slave switch, the master switch and the slave switch being interconnected through a stack port to form a stack switch system, the master switch comprising:
a main switch detecting unit for detecting a disconnection state or a connection state of the stacking port of the main switch and outputting the same to a main switch control unit;
the master switch timer is used for counting the master switch reset time set by the master switch control unit and outputting a master switch reset signal to the master switch control unit when the counting reaches the master switch reset time;
a master switch storage unit for storing a system state registry for recording: a master switch stacking port state, a slave switch stacking port state and a slave switch state;
a master switch communication unit, configured to transmit a reset message to the stacking port of the slave switch through the stacking port of the master switch; forwarding a disconnection message and a connection message received by the stacking port of the main switch to the main switch control unit;
the master switch control unit is used for setting the reset time of the master switch, controlling the start or cancel of the master switch timer, and setting the state of the master switch stacking port, the state of the slave switch stacking port and the state of the slave switch recorded by the system state registration table; generating the reset message according to a reset signal of the main switch, outputting the reset message to the communication unit of the main switch, and resetting the main switch;
the slave switch includes:
a slave switch detecting unit for detecting a disconnection state or a connection state of a stacking port of the slave switch and outputting to a slave switch control unit;
a slave switch timer for counting according to a slave switch reset time set by the slave switch control unit and outputting a slave switch reset signal to the slave switch control unit when the count reaches the slave switch reset time;
the slave switch storage unit is used for storing a local device state registration table of the slave switch, and the local device state registration table is used for recording the type of a slave switch stacking port, the slave switch stacking port state and the state before the slave switch stacking port is closed;
the slave switch communication unit forwards the received reset message to the slave switch control unit; transmitting a connection disconnection message and a connection message generated by the slave switch control unit to the master switch;
a slave switch control unit for setting a slave switch reset time and controlling the start or cancellation of a slave switch timer; resetting the slave switch according to the reset message or the slave switch reset signal forwarded by the slave switch communication unit; setting the state of the stacking port of the slave switch in the equipment state registration table; performing shutdown control on the stack port of the slave switch according to the stack port type of the slave switch and the disconnection state of the stack port detected by the slave switch detection unit in the present device state registration table; and performing non-closing control of the stack port of the slave switch according to the stack port type of the slave switch and the connection state of the stack port detected by the slave switch detection unit in the present device state registration table.
17. The stack switch system of claim 16, wherein the system state registry further records a number of primary switch stack ports, a pre-primary switch stack port shutdown state;
and the main switch control unit controls the stack port of the main switch to be closed or not to be closed according to the number of the stack ports of the main switch and the state of the stack port of the main switch, and records the state of the stack port of the main switch before being closed in the system state registration table.
18. The stack switch system of claim 16, wherein the master switch control unit cancels counting of the master switch reset time by the master switch timer according to the normal state of all the slave switches in the system state registry.
19. The stack switch system of claim 16,
the types of the stacking ports of the slave switch recorded by the device state registry comprise: a proximal stacking port and a distal stacking port;
the slave switch control unit starts or cancels counting of the slave switch reset time by the slave switch timer according to the state of the near stack port in the present device state registration table.
CN200710178400A 2007-11-29 2007-11-29 Stacked switchboard system and keep-alive method of stacked switchboard system Active CN100581272C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710178400A CN100581272C (en) 2007-11-29 2007-11-29 Stacked switchboard system and keep-alive method of stacked switchboard system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710178400A CN100581272C (en) 2007-11-29 2007-11-29 Stacked switchboard system and keep-alive method of stacked switchboard system

Publications (2)

Publication Number Publication Date
CN101159883A CN101159883A (en) 2008-04-09
CN100581272C true CN100581272C (en) 2010-01-13

Family

ID=39307778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710178400A Active CN100581272C (en) 2007-11-29 2007-11-29 Stacked switchboard system and keep-alive method of stacked switchboard system

Country Status (1)

Country Link
CN (1) CN100581272C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164056B (en) * 2011-03-17 2013-07-24 杭州华三通信技术有限公司 Stacked link aggregation fault detection method and stacked devices
CN102255751A (en) * 2011-06-30 2011-11-23 杭州华三通信技术有限公司 Stacking conflict resolution method and equipment
JP2016507913A (en) * 2012-10-29 2016-03-10 イカノス・コミュニケーションズ・インコーポレイテッドIkanos Communications,Inc. A mechanism to facilitate timing recovery in time division duplex systems.
CN116962325A (en) * 2022-04-20 2023-10-27 华为技术有限公司 Communication method and device

Also Published As

Publication number Publication date
CN101159883A (en) 2008-04-09

Similar Documents

Publication Publication Date Title
JP4790591B2 (en) Ring node device
US20130329547A1 (en) Communication device and method of controlling the same
WO2007092132A2 (en) System and method for detecting and recovering from virtual switch link failures
US8264954B2 (en) Method and device for operating a network and communication system comprising such device
US20070177589A1 (en) Network system and node redundancy method of network system
CN103107940B (en) For the redundant gateway system of device level looped network
CN100581272C (en) Stacked switchboard system and keep-alive method of stacked switchboard system
US20100091784A1 (en) Filtering of redundant frames in a network node
EP1675356B1 (en) Notification of failures in a trunk network
CN100566277C (en) Communications network system and the method that is used to the information that transmits
JP2008177941A (en) Network device, network redundant connection method and network redundant connection program
CN102932183A (en) Double-up link failure processing method and device
CN101848128B (en) Method, system and topological structure for realizing stabilized communication among multi-ring topologies
WO2013078997A1 (en) Method for processing fault in mrp ring network, and mrp ring network
WO2008053995A1 (en) Packet ring network system, packet transfer method and interlink node
JP5176623B2 (en) Ethernet transmission method, transmission apparatus and system
JP4287734B2 (en) Network equipment
JP5523861B2 (en) Packet relay apparatus and fault diagnosis method thereof
JP2011223172A (en) Ring-type network system, communication apparatus and failure detection method
CN103944781A (en) Method and system for preventing unilateral splitting of stacking system
KR100318966B1 (en) A system and method for automatically recovering a network by use of health check in atm exchane network
JP2002026956A (en) Automatic path selection system and its method
JP3570509B2 (en) Ethernet interface
JP2012129864A (en) Communication system and method for controlling user access device
JP2011188414A (en) Ring type switch, ring type ethernet system, method of controlling ring type switch, and method of controlling ring type ethernet system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 350015 M9511 Industrial Park, fast road, Mawei District, Fujian, Fuzhou

Patentee after: RUIJIE NETWORKS Co.,Ltd.

Address before: 350015 M9511 Industrial Park, fast road, Mawei District, Fujian, Fuzhou

Patentee before: Beijing Star-Net Ruijie Networks Co.,Ltd.

CP01 Change in the name or title of a patent holder