CN107547276B - Automatic stacking method, device, equipment and machine readable storage medium - Google Patents

Automatic stacking method, device, equipment and machine readable storage medium Download PDF

Info

Publication number
CN107547276B
CN107547276B CN201710734053.XA CN201710734053A CN107547276B CN 107547276 B CN107547276 B CN 107547276B CN 201710734053 A CN201710734053 A CN 201710734053A CN 107547276 B CN107547276 B CN 107547276B
Authority
CN
China
Prior art keywords
stacking
equipment
target
port
priority
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
CN201710734053.XA
Other languages
Chinese (zh)
Other versions
CN107547276A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710734053.XA priority Critical patent/CN107547276B/en
Publication of CN107547276A publication Critical patent/CN107547276A/en
Application granted granted Critical
Publication of CN107547276B publication Critical patent/CN107547276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses an automatic stacking method, an automatic stacking device, automatic stacking equipment and a machine-readable storage medium, wherein the method comprises the following steps of: in the initialization process, establishing wireless connection with target equipment, determining a stacking port connected with the target equipment, and negotiating stacking parameters; writing the stacking port and the stacking parameters into a stacking configuration to complete an initialization process; forming a stacking system with the target device based on the stacking configuration. According to the technical scheme, the stacking parameters can be acquired and set in the equipment starting process, so that the equipment can be automatically stacked after being powered on and started, the equipment does not need to be restarted to switch to the stacking mode, the device can be automatically stacked after being powered on and started under the condition that no manual configuration is needed, and the equipment stacking application can be greatly conveniently deployed.

Description

Automatic stacking method, device, equipment and machine readable storage medium
Technical Field
The present invention relates to the field of device virtualization, and in particular, to an automatic stacking method, apparatus, device, and machine-readable storage medium.
Background
The device virtualization technology can optimize the architecture and improve the system operation efficiency, and the device stacking belongs to the N:1 integrated virtualization technology, and the core idea is to connect a plurality of devices together and virtualize the devices into one device after necessary configuration. In short, the virtualization technology can be used for integrating hardware resources and software processing capacity of a plurality of devices, and realizing cooperative work, unified management and uninterrupted maintenance of the plurality of devices. For example, in a three-layer device architecture system, a plurality of devices in a middle layer are stacked, and then the upper layer device and the lower layer device in the layer regard the stacked plurality of devices as one device.
At present, the realization of equipment stacking is complex, corresponding configuration is generally required to be manually carried out on each equipment to be stacked, and the stacking mode can be used only after each equipment to be stacked is restarted, so that the operation is complex, and when the configuration is wrong, the required stacking cannot be formed.
Disclosure of Invention
To at least partially address the above issues, the present invention provides an automated stacking method, apparatus, device and machine-readable storage medium.
According to an aspect of the present invention, there is provided an automatic stacking method applied to a device to be stacked having a wireless function, including the steps of:
in the initialization process, establishing wireless connection with target equipment, determining a stacking port connected with the target equipment, and negotiating stacking parameters;
writing the stacking port and the stacking parameters into a stacking configuration to complete an initialization process;
forming a stacking system with the target device based on the stacking configuration.
Optionally, the determining a stack port connected to the target device includes:
step A, selecting a first physical port in an UP state, and enabling the first physical port to execute DOWN/UP state switching;
step B, sending a wireless query instruction to the target equipment so that the target equipment detects a physical port of the opposite terminal equipment with DOWN/UP state switching in preset time;
and step C, when receiving a stacking port determination notice sent by the target equipment, determining that the first physical port is the stacking port of the equipment.
Optionally, after step C, the method further includes repeating steps a to C until all physical ports in the UP state are traversed.
Optionally, the establishing a wireless connection with the target device includes:
scanning based on the wireless functionality;
and when the device model of the scanned device is consistent with that of the device, taking the scanned device as a target device, and establishing wireless connection with the target device.
Optionally, the negotiating stack parameters includes:
negotiating the priority of a stacking system with the target device, wherein the device initiating the wireless connection request is used as a master device in the stacking system, the priority of the master device is an initial priority, and the master device is allocated as the priority of a slave device in the stacking system based on the initial priority;
and negotiating a member number of a stacking system with the target device, wherein the member number of the device initiating the wireless connection request is an initial number, and the master device allocates the member number of the slave device based on the initial number.
According to another aspect of the present invention, there is provided an automatic stacking apparatus for a device to be stacked having a wireless function, including:
the negotiation unit is used for establishing wireless connection with target equipment in an initialization process, determining a stacking port connected with the target equipment and negotiating stacking parameters;
the configuration unit is used for writing the stacking port and the stacking parameters into a stacking configuration to complete an initialization process;
a stacking unit to form a stacking system with the target device based on the stacking configuration.
Optionally, the negotiation unit is configured to perform the following steps: step A, selecting a first physical port in an UP state, and enabling the first physical port to execute DOWN/UP state switching; step B, sending a wireless query instruction to the target equipment so that the target equipment detects a physical port of the opposite terminal equipment with DOWN/UP state switching in preset time; and step C, when receiving a stacking port determination notice sent by the target equipment, determining that the first physical port is the stacking port of the equipment.
Optionally, the negotiation unit is configured to, after performing step C, repeatedly perform steps a to C until all physical ports in the UP state are traversed.
Optionally, the negotiation unit is configured to perform scanning based on the wireless function, and when the device model of the scanned device is consistent with the device model of the device, take the scanned device as a target device, and establish a wireless connection with the target device.
Optionally, the negotiating unit is configured to negotiate a priority of a stacking system with the target device, where a device initiating the wireless connection request serves as a master device in the stacking system, the priority of the master device is an initial priority, and the master device allocates priorities serving as slave devices in the stacking system based on the initial priority; and a member number for negotiating a stacking system with the target device, wherein the member number of the device initiating the wireless connection request is an initial number, and the master device assigns the member number of the slave device based on the initial number.
In accordance with yet another aspect of the present invention, there is provided an automatic stacking apparatus comprising a wireless module, a processor for controlling the wireless module, and a machine-readable storage medium, the wireless module being connected to the processor through a communication interface; the communication interface is an asynchronous serial communication interface or a serial peripheral interface or a universal serial bus; the machine-readable storage medium stores machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing the method steps as described in any of the above.
According to yet another aspect of the invention, there is provided a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing the method steps as described in any of the above.
As can be seen from the above, in the technical solution of the present invention, before the device enters the stacking mode, device initialization is performed once, specifically, a wireless connection is established with the target device to be stacked, a stacking port connected to the target device is determined, stacking parameters are negotiated, and then a stacking configuration is written, so that a stacking system is formed with the target device based on the stacking configuration. According to the technical scheme, the stacking parameters can be acquired and set in the equipment starting process, so that the equipment can be automatically stacked after being powered on and started, the equipment does not need to be restarted to switch to the stacking mode, the device can be automatically stacked after being powered on and started under the condition that no manual configuration is needed, and the equipment stacking application can be greatly conveniently deployed.
Drawings
FIG. 1 shows a flow diagram of an automated stacking method according to one embodiment of the invention;
fig. 2 is an interactive flowchart of two devices to be stacked forming a device stack in a stacking system using bluetooth module connection to achieve device stacking according to an embodiment of the present invention;
FIG. 3 shows a schematic structural diagram of an automated stacking apparatus according to an embodiment of the invention;
fig. 4 shows a schematic structural diagram of hardware of an automatic stacking apparatus according to an embodiment of the present invention.
Detailed Description
The inventors first analyzed a prior art device stack, which mainly involved:
1. mode of operation
In an IT architecture with virtualization technology, a device supports two modes of operation:
independent operation mode: the device in this mode can only operate as a stand-alone device and cannot be stacked with other devices.
Stacking mode: a device in this mode may be interconnected with other devices to form a stack.
2. Character
Each device in the stack is referred to as a member device. Member equipment is divided into two roles according to different functions:
a master device: responsible for managing and controlling the entire stack.
The slave device: and the backup device is used as the main device to operate while processing the service and forwarding the message. When the master equipment fails, the system can automatically select a new master equipment from the slave equipment to take over the original master equipment. Only one master device can exist in a stack at the same time, and other member devices are all slave devices.
3. Stack port
The stack Port in virtualization technology refers to a logical interface dedicated to connection between stack member devices, and two stack ports, namely Port1 and Port2, can be configured on each member device. It needs to bind to a physical port before it can take effect.
4. Stacked physical port
And the physical port is bound with the stacking port and is used for connecting the stacking member devices. The stack physical port may be a stack-specific port, an electrical port, or an optical port. The stacked physical ports between the two devices are directly connected through cables.
5. Member number
To identify the member device for management thereof. The stack must guarantee the uniqueness of all device member numbers.
6. Member priority
The method is used for determining the roles of the member devices in the role election process, and the higher the priority is, the higher the probability that the member devices are selected as the master devices is.
Among them, the member number, the member priority, and the stack port are basic parameters for forming a stack.
Based on the above, the inventor finds, through analysis, that in the prior art, the restarting of stacking is completed because the manual configuration on each device to be stacked requires that the device be in a starting state, and at this time, the device is in an independent operation mode, and the switching of the mode requires that the device be restarted. It is possible to solve the problem if the configuration process is not required to be performed after the device is operated. Based on this, the inventor further thinks that if the device can automatically acquire and configure various stacking parameters in the starting process, the time complexity and the possibility of misoperation caused by manual operation are reduced, and the device does not need to be restarted.
To this end, the present application example discloses an automatic stacking method, apparatus, device and machine-readable storage medium, so as to solve the problems in the prior art that the configuration steps of device stacking are complex and the device needs to be restarted. In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flow chart illustrating an automatic stacking method applied to a device to be stacked having a wireless function according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S110, in the initialization process, establishing a wireless connection with the target device, determining a stacking port connected with the target device, and negotiating stacking parameters.
It should be noted that the stack port may include a logical port, because the logical port is bound to the physical port and then becomes valid according to the above description. Before the initialization of the devices, cables need to be inserted between the devices to be stacked, which are to form the stacking system, correspondingly.
The negotiated stacking parameters include the member number and member priority, etc. described above.
Step S120, writing the stack port and the stack parameter into the stack configuration, and completing the initialization process.
The stacking configuration may take the form of a configuration file that is stored at a designated location in the device to be stacked. The initialization process may be completed during the start-up process of the device to be stacked.
Step S130, forming a stacking system with the target device based on the stacking configuration.
The starting process of the device to be stacked comprises an initialization process and a stacking process, so that the device to be stacked and the target device directly enter a stacking mode after being started without mode switching.
As can be seen, in the method shown in fig. 1, before the device enters the stacking mode, device initialization is performed once, specifically, a wireless connection is established with a target device to be stacked, a stacking port connected to the target device is determined, stacking parameters are negotiated, and then a stacking configuration is written, so that a stacking system is formed with the target device based on the stacking configuration. According to the technical scheme, the stacking parameters can be acquired and set in the equipment starting process, so that the equipment can be automatically stacked after being powered on and started, the equipment does not need to be restarted to switch to the stacking mode, the device can be automatically stacked after being powered on and started under the condition that no manual configuration is needed, and the equipment stacking application can be greatly conveniently deployed.
In an embodiment of the present invention, in the method, determining a stack port connected to the target device includes:
step A, selecting the first physical port in the UP state, and enabling the first physical port to execute DOWN/UP state switching.
And step B, sending a wireless query instruction to the target equipment so that the target equipment detects the physical port of the opposite terminal equipment with the DOWN/UP state switching in the preset time.
And step C, when a stacking port determination notice sent by the target equipment is received, determining that the first physical port is the stacking port of the equipment.
In this embodiment, the first physical port is caused to perform DOWN/UP state switching, resulting in a link disconnection and reconnection, which aims to determine the physical port connected to the target device through the cable, and if the switching can be detected by the target device, it indicates that the physical port is connected to a physical port on the target device through the cable, and after the connected physical port is determined, the binding between the first port and the logical stack port can be validated. In other embodiments, another stacking port determination method may also be adopted, for example, a stacking port list is preset in the device to be stacked, that is, a physical port that can be used as a device stack is selected in advance, so that on one hand, the initialization process can be accelerated, but on the other hand, a stacking error is also easily generated when the preselected physical port is in a DOWN state, or a cable is inserted incorrectly into the physical port due to negligence of a worker, and the like.
If the device to be stacked can be connected to the target device by a plurality of cables, in one embodiment of the present invention, the method further comprises: after step C, the method further comprises repeating steps a through C until all physical ports in the UP state are traversed.
In this way, all physical ports correctly connected to other target devices to be stacked can be set as stacking ports, and of course, the physical ports and the logical stacking ports need to be bound in the process. The logical stack port may be pre-configured here.
In an embodiment of the present invention, the method for establishing a wireless connection with a target device includes: scanning based on the wireless functionality; and when the device model of the scanned device is consistent with that of the device, taking the scanned device as a target device, and establishing wireless connection with the target device.
Generally, the models of the devices forming the stacking system are consistent to ensure that stacking of the devices does not create compatibility issues, but may not be limiting in other embodiments of the invention. In embodiments of the present invention, the wireless connection includes, but is not limited to, a bluetooth connection, an infrared connection, a WiFi connection. Considering the device requirements, signal stability and other factors of each wireless connection mode, a bluetooth connection may be preferred as the wireless connection mode. For example, the device name of bluetooth may be named device model + device serial number, which further facilitates discovery, matching, and searching of stacked devices. There may be one or more target devices, but only one target device is generally present at the same time when the wireless connection establishment is completed.
It is also mentioned in the foregoing that the stacking system needs to be provided with one master device, and the other devices in the stacking system act as slave devices. In an embodiment of the present invention, in the method, negotiating the stacking parameter includes: negotiating the priority of the stacking system with a target device, wherein a device initiating a wireless connection request is used as a master device in the stacking system, the priority of the master device is an initial priority, and the master device is allocated as the priority of a slave device in the stacking system based on the initial priority; and negotiating a member number of the stacking system with the target device, wherein the member number of the device initiating the wireless connection request is an initial number, and the master device allocates the member number of the slave device based on the initial number.
For example, if the initial priority is 1, the priority of the slave device may be 2, and the priority of the slave device is assigned by the master device, so that the priority of each slave device may be sequentially increased by 1 to ensure that the priority is not repeatedly set. This has the advantage that when a problem occurs in the master device, since the priorities of the slave devices are not repeated, one slave device can be selected as a new master device according to the priorities of the slave devices, thereby ensuring the stability of stacking. To ensure that the member numbers of the respective devices are not duplicated, the setting manner of the priority is similar.
The following description is made with reference to a specific embodiment, and as shown in fig. 2, an interactive flowchart of forming device stacking by two devices to be stacked in a stacking system that realizes device stacking by using bluetooth module connection is shown. Wherein. The CPU controls the bluetooth module to perform data interaction in each device to be stacked, so the interaction between the CPU and the bluetooth module is also shown in fig. 2. Specifically, each stacked device may be formed by a device in the prior art and a bluetooth module in communication connection, or may be implemented by integrating a bluetooth module in a device. In this embodiment, the bluetooth module in each device to be stacked may be an independent bluetooth microsystem, and is automatically started when the device to be stacked is powered on.
Firstly, in step 1, a CPU of a device A sends a Scan _ Connect command (scanning instruction) to a Bluetooth module to inform the Bluetooth module to search and Connect devices with the same model;
after the Bluetooth module of the device A finishes searching connection (the device B is searched), a connection Report confirmation message Connect _ Report is returned to a CPU of the device A;
the CPU of the device A receives the connection report message and confirms that the connection is completed, namely the device A is connected with the device B through Bluetooth, and the processes of searching and connecting the target device are also completed.
Then, in step 2, the connected physical port is searched and the stack port is set. Specifically, device a searches for a physical port supporting stacking in the UP state, and performs DOWN/UP state switching on the physical port, resulting in a process of disconnection and reconnection of a link; then the CPU of the device A sends a Port inquiry message (Inquire _ Port) to the Bluetooth module;
the Bluetooth module sends an Inquire _ Port to a Bluetooth module of the device B through Bluetooth;
the Bluetooth module of the device B receives the message and forwards the message to the CPU of the device B;
after receiving the message, the device B confirms whether a DOWN/UP state switching occurs to a physical Port recently, if the DOWN/UP state switching occurs to the physical Port, the Port is selected as a stacking physical Port, and the result is replied to the device A (Port _ Report) through a Bluetooth module;
the CPU of the device A receives the response message Port _ Report of the device B through the Bluetooth module, if the DOWN/UP state switching is confirmed in the message of the device B, the physical Port and the device B are connected, and the physical Port is selected as the stacking Port of the device A.
If there are other physical ports of the UP, repeat the above steps, find all physical ports of the connected cables, and set these physical ports as the stack ports of the device A.
Then in step 3, negotiating the member priority, specifically:
the method comprises the following steps that a device A which initiatively initiates Bluetooth connection serves as a stacked master device, a connected device B serves as a slave device, the master device sets the priority of the device to be 1 (high priority), the priority of the device B is set to be 2 (sub-optimal priority), and the device A and the device B are sent to the device B through a Bluetooth module;
after receiving the Priority setting message (Set _ number _ Priority), the device B sets the Priority of the device and sends a message acknowledgement (Set _ Ack) to the device a through the bluetooth module.
In the following step 4, the member number is negotiated, specifically:
the device A sets the member number of the device to be 1, the member number of the device B to be 2, and the member number is sent to the device B through a Bluetooth module;
after receiving the Set Member number message (Set _ Member _ ID), the device B sets the number of the device, and sends a message acknowledgement (Set _ Ack) to the device a through the bluetooth module.
Finally, in step 5, the stacking parameters and the stacking ports are written into the stacking configuration (for example, configuration file), that is, through the above steps, the devices a and B complete the setting of the member numbers, the member priorities and the stacking ports and write the setting into the configuration file of their respective devices, and the devices can automatically form the stack after being started.
Fig. 3 is a schematic structural diagram of an automatic stacking apparatus according to an embodiment of the present invention, which can be applied to a device to be stacked having a wireless function. As shown in fig. 3, the automatic stacking apparatus 300 includes:
the negotiation unit 310 is configured to establish a wireless connection with a target device, determine a stacking port connected with the target device, and negotiate stacking parameters during an initialization process.
The configuration unit 320 is configured to write the stack port and the stack parameter into the stack configuration, and complete the initialization process.
A stacking unit 330 for forming a stacking system with the target device based on the stacking configuration.
As can be seen, the apparatus shown in fig. 3 performs device initialization once before the device enters the stacking mode through mutual cooperation of the units, specifically, establishes a wireless connection with a target device to be stacked, determines a stacking port connected to the target device, negotiates stacking parameters, writes stacking configuration, and forms a stacking system with the target device based on the stacking configuration. According to the technical scheme, the stacking parameters can be acquired and set in the equipment starting process, so that the equipment can be automatically stacked after being powered on and started, the equipment does not need to be restarted to switch to the stacking mode, the device can be automatically stacked after being powered on and started under the condition that no manual configuration is needed, and the equipment stacking application can be greatly conveniently deployed.
In an embodiment of the present invention, in the above apparatus, the negotiation unit 310 is configured to perform the following steps: step A, selecting a first physical port in an UP state, and enabling the first physical port to execute DOWN/UP state switching; step B, sending a wireless query instruction to the target equipment so that the target equipment detects a physical port of the opposite terminal equipment with DOWN/UP state switching in preset time; and step C, when a stacking port determination notice sent by the target equipment is received, determining that the first physical port is the stacking port of the equipment.
In an embodiment of the present invention, in the above apparatus, the negotiation unit 310 is configured to, after performing step C, repeatedly perform steps a to C until all physical ports in the UP state are traversed.
In an embodiment of the present invention, in the above apparatus, the negotiating unit 310 is configured to perform scanning based on a wireless function, and when the device model of the scanned device is consistent with the device model of the own device, take the scanned device as a target device, and establish a wireless connection with the target device.
In an embodiment of the present invention, in the above apparatus, the negotiating unit 310 is configured to negotiate a priority of the stacked system with the target device, where a device initiating the wireless connection request serves as a master device in the stacked system, a priority of the master device is an initial priority, and the master device allocates priorities as slave devices in the stacked system based on the initial priorities; and a member number for negotiating a stacking system with the target device, wherein the member number of the device that initiated the wireless connection request is an initial number, and the master device assigns the member number of the slave device based on the initial number.
The carrier-level automatic stacking apparatus 300 provided by the present invention may be implemented by software, or may be implemented by hardware, or by a combination of hardware and software. For example, in the case of a software implementation, machine-executable instructions in the non-volatile memory 450 corresponding to the automatic stacking apparatus 300 may be read into the volatile memory 440 for execution by the processor 410.
From a hardware level, as shown in fig. 4, which is a schematic structural diagram of an automatic stacking apparatus 400 according to an embodiment of the present invention, except for the processor 410, the internal bus 420, the wireless module 430, the volatile memory 440, and the non-volatile memory 450 shown in fig. 4, other hardware may be included according to actual functions of the automatic stacking apparatus 400, which is not described again.
The internal bus 420 may be a universal serial bus, and the processor 420 and the wireless module 430 are connected through the internal bus 420. In other embodiments, the processor and the wireless module may also be connected via other communication interfaces, such as an asynchronous serial communication interface or a serial peripheral interface, so that the processor may control the wireless module.
In various embodiments, the non-volatile memory 450 may be: a storage drive (e.g., hard disk drive), a solid state drive, any type of storage disk (e.g., compact disk, DVD, etc.), or similar storage medium, or a combination thereof. The volatile memory 440 may be: RAM (random Access Memory).
Further, the non-volatile memory 450 and the volatile memory 440 serve as machine-readable storage media on which corresponding machine-executable instructions of the automatic stacking apparatus 300 that are executed by the processor 410 may be stored.
For the device embodiment, since it basically corresponds to the method embodiment, the relevant points may be referred to the partial description of the method embodiment, and will not be repeated here. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
In summary, according to the technical solution of the present invention, before the device enters the stacking mode, a device initialization is performed, specifically, a wireless connection is established with a target device to be stacked, a stacking port connected to the target device is determined, stacking parameters are negotiated, and then a stacking configuration is written, so as to form a stacking system with the target device based on the stacking configuration. According to the technical scheme, the stacking parameters can be acquired and set in the equipment starting process, so that the equipment can be automatically stacked after being powered on and started, the equipment does not need to be restarted to switch to the stacking mode, the device can be automatically stacked after being powered on and started under the condition that no manual configuration is needed, and the equipment stacking application can be greatly conveniently deployed.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An automatic stacking method is applied to equipment to be stacked with a wireless function, and is characterized by comprising the following steps:
in the initialization process, establishing wireless connection with target equipment, determining a stacking port connected with the target equipment, and negotiating stacking parameters;
writing the stacking port and the stacking parameters into a stacking configuration to complete an initialization process;
forming a stacking system with the target device based on the stacking configuration; wherein the determining a stack port to which the target device is connected comprises:
step A, selecting a first physical port in an UP state, and enabling the first physical port to execute DOWN/UP state switching;
step B, sending a wireless query instruction to the target equipment so that the target equipment detects a physical port of the opposite terminal equipment with DOWN/UP state switching in preset time;
and step C, when receiving a stacking port determination notice sent by the target equipment, determining that the first physical port is the stacking port of the equipment.
2. The method of claim 1, wherein after step C, the method further comprises repeating steps a-C until all physical ports in an UP state are traversed.
3. The method of claim 1, wherein establishing the wireless connection with the target device comprises:
scanning based on the wireless functionality;
and when the device model of the scanned device is consistent with that of the device, taking the scanned device as a target device, and establishing wireless connection with the target device.
4. The method of claim 1, wherein negotiating the stack parameters comprises:
negotiating the priority of a stacking system with the target device, wherein the device initiating the wireless connection request is used as a master device in the stacking system, the priority of the master device is an initial priority, and the master device is allocated as the priority of a slave device in the stacking system based on the initial priority;
and negotiating a member number of a stacking system with the target device, wherein the member number of the device initiating the wireless connection request is an initial number, and the master device allocates the member number of the slave device based on the initial number.
5. An automatic stacking device is applied to equipment to be stacked with wireless function, and is characterized in that the device comprises:
the negotiation unit is used for establishing wireless connection with target equipment in an initialization process, determining a stacking port connected with the target equipment and negotiating stacking parameters;
the configuration unit is used for writing the stacking port and the stacking parameters into a stacking configuration to complete an initialization process;
a stacking unit to form a stacking system with the target device based on the stacking configuration; wherein the negotiation unit is configured to perform the following steps: step A, selecting a first physical port in an UP state, and enabling the first physical port to execute DOWN/UP state switching; step B, sending a wireless query instruction to the target equipment so that the target equipment detects a physical port of the opposite terminal equipment with DOWN/UP state switching in preset time; and step C, when receiving a stacking port determination notice sent by the target equipment, determining that the first physical port is the stacking port of the equipment.
6. The apparatus of claim 5,
and the negotiation unit is further configured to repeatedly execute the steps a to C after executing the step C until all physical ports in the UP state are traversed.
7. The apparatus of claim 5,
and the negotiation unit is used for scanning based on the wireless function, taking the scanned equipment as target equipment and establishing wireless connection with the target equipment when the equipment model of the scanned equipment is consistent with that of the equipment.
8. The apparatus of claim 5,
the negotiation unit is configured to negotiate a priority of a stacking system with the target device, where a device that initiates a wireless connection request serves as a master device in the stacking system, the priority of the master device is an initial priority, and the master device is assigned as a slave device in the stacking system based on the initial priority; and a member number for negotiating a stacking system with the target device, wherein the member number of the device initiating the wireless connection request is an initial number, and the master device assigns the member number of the slave device based on the initial number.
9. An automatic stacking apparatus comprising a wireless module, a processor for controlling the wireless module, and a machine-readable storage medium, the wireless module being connected to the processor via a communication interface; the communication interface is an asynchronous serial communication interface or a serial peripheral interface or a universal serial bus; the machine-readable storage medium stores machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 4.
10. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 4.
CN201710734053.XA 2017-08-24 2017-08-24 Automatic stacking method, device, equipment and machine readable storage medium Active CN107547276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710734053.XA CN107547276B (en) 2017-08-24 2017-08-24 Automatic stacking method, device, equipment and machine readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710734053.XA CN107547276B (en) 2017-08-24 2017-08-24 Automatic stacking method, device, equipment and machine readable storage medium

Publications (2)

Publication Number Publication Date
CN107547276A CN107547276A (en) 2018-01-05
CN107547276B true CN107547276B (en) 2021-06-29

Family

ID=60959024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710734053.XA Active CN107547276B (en) 2017-08-24 2017-08-24 Automatic stacking method, device, equipment and machine readable storage medium

Country Status (1)

Country Link
CN (1) CN107547276B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429644B (en) * 2018-02-28 2021-08-06 新华三技术有限公司 Network equipment management method and device and server
CN109831330B (en) * 2019-01-30 2021-08-24 新华三技术有限公司 Stack configuration method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183992A (en) * 2007-12-28 2008-05-21 中兴通讯股份有限公司 Equipment management method in stacked system
CN101227393A (en) * 2008-01-08 2008-07-23 中兴通讯股份有限公司 Method and apparatus for anti-error connecting of switch stack
CN101478492A (en) * 2009-02-10 2009-07-08 杭州华三通信技术有限公司 Method and apparatus for stacking member port detection
CN101674198A (en) * 2009-10-23 2010-03-17 杭州华三通信技术有限公司 Method and device for realizing stacking
CN103701631A (en) * 2013-12-05 2014-04-02 杭州华三通信技术有限公司 Automatic stack configuration deploy method and equipment used in stack system
CN106878190A (en) * 2016-12-30 2017-06-20 新华三技术有限公司 Automatic stacking method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183992A (en) * 2007-12-28 2008-05-21 中兴通讯股份有限公司 Equipment management method in stacked system
CN101227393A (en) * 2008-01-08 2008-07-23 中兴通讯股份有限公司 Method and apparatus for anti-error connecting of switch stack
CN101478492A (en) * 2009-02-10 2009-07-08 杭州华三通信技术有限公司 Method and apparatus for stacking member port detection
CN101674198A (en) * 2009-10-23 2010-03-17 杭州华三通信技术有限公司 Method and device for realizing stacking
CN103701631A (en) * 2013-12-05 2014-04-02 杭州华三通信技术有限公司 Automatic stack configuration deploy method and equipment used in stack system
CN106878190A (en) * 2016-12-30 2017-06-20 新华三技术有限公司 Automatic stacking method and device

Also Published As

Publication number Publication date
CN107547276A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN114172802B (en) Container network configuration method, device, computing node, master node and storage medium
US8266261B2 (en) Server system, collective server apparatus, and MAC address management method
US9350655B2 (en) Vertical converged framework
WO2019174504A1 (en) Method and device for establishing a logical channel, and vehicle communication interface (vci)
CN102238093A (en) Service interruption prevention method and device
CN104753697A (en) Method, equipment and system for controlling provisioning of network equipment
CN107547276B (en) Automatic stacking method, device, equipment and machine readable storage medium
JP2000099277A (en) Method for remote transfer between file units
US7761580B2 (en) System and method for determining a designated connection between components of computing devices
US11309938B2 (en) File transmission/reception device and control method of file transmission/reception device
CN111212451A (en) Method and device for switching network transmission channel
CN103516735A (en) Method and apparatus for upgrading network node
CN111200877A (en) Network connection method, terminal and storage medium
CN103188098A (en) Method, system and device for disaster recovery switching
CN106850554B (en) Method and device for dual-system directional connection
JP2008186179A (en) Storage system
CN102281264B (en) Virtual universal serial bus (USB) system, equipment and method for realizing USB host remote access
CN107609197B (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
JP5921781B2 (en) Programmable controller and control method of programmable controller
CN111209125B (en) Multi-process command line implementation method
EP1684481A1 (en) System and Method for selecting an active connection
JP2001144769A (en) Device adaptable to usb and its communication control method
CN112799602B (en) Online capacity expansion method for cloud hard disk
CN115509812A (en) Data backup method and server based on Keepalive dual-computer hot standby
US20150195366A1 (en) Switching device, non-transitory computer readable medium and zoning setting method

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