Method and apparatus for building stacking system, and device, storage medium, and program product
By automatically determining and issuing stack configuration parameters through the management device, network devices are automatically configured, solving the problem of cumbersome and high cost of building a stack system in the existing technology, and realizing efficient and stable stack system construction.
Patent Information
- Application Number
- PCT/CN2025/071873
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-04
- Filing Date
- 2025-01-10
- Publication Date
- 2025-09-11
AI Technical Summary
The process of building a stacking system in the prior art is cumbersome and labor-intensive, and is particularly inefficient in large-scale equipment assembly scenarios.
By automatically determining and issuing stack configuration parameters through the management device, network devices are automatically configured, simplifying the assembly process, improving efficiency and reducing labor costs.
This effectively simplifies the steps for building a stacking system, improves efficiency, reduces labor costs, and ensures the connectivity of communication links and system stability.
Smart Images

Figure CN2025071873_12092025_PF_FP_ABST
Abstract
Description
Method, device, equipment, storage medium and program product for building a stacking system
[0001] This application claims priority to Chinese patent application No. 202410245084.9, filed on March 4, 2024, entitled “Method, device, equipment, storage medium and program product for assembling a stacking system”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of communications, and in particular to a method, apparatus, device, storage medium, and program product for establishing a stacking system. Background Art
[0003] Stacking involves connecting multiple stack-supported member devices together using stack cables to form a stack system. The member devices in this stack are logically virtualized into a single device, which forwards data as a whole. Stacking is a widely used horizontal virtualization technology that improves reliability, expands the number of ports, increases bandwidth, and simplifies networking.
[0004] In related technologies, before setting up a stack system, technicians need to plan the stack system to determine the roles and functions of each member device within the stack system. Then, based on the roles and functions of each member device, technicians configure the stack for each member device individually, setting the stack configuration parameters for each member device. Stack configuration parameters include stack port IDs, stack device IDs, and stack priority. Stack ports are ports used for stacking. After completing the stack configuration, technicians power off all member devices and connect cables according to the stack topology. After connecting the cables, they power on all member devices again. Each member device performs stack negotiation based on its own stack configuration parameters, and then technicians check whether the stack system has been successfully established.
[0005] However, this method requires technicians to log into the serial ports of each member device one by one and configure the stack using command lines. This cumbersome process and high technical requirements make stacking a complex task. This method is particularly inefficient and labor-intensive when stacking a large number of devices. Summary of the Invention
[0006] This application provides a method, apparatus, device, storage medium, and computer program for building a stacking system, which can solve the problems of low efficiency and high cost in building a stacking system in related technologies. The technical solution is as follows:
[0007] In a first aspect, a method for forming a stacking system is provided, which is applied to a management device, and the method comprises: receiving a stacking system forming instruction triggered by an administrator, the stacking system forming instruction comprising device identifiers of a plurality of network devices, the plurality of network devices being used to form the stacking system; in response to the stacking system forming instruction, generating stacking configuration parameters corresponding to the plurality of network devices respectively based on the topological connection relationship between the plurality of network devices, the network layers at which the plurality of network devices are located, and the network layers at which the neighboring devices of each of the plurality of network devices are located, the network layers comprising an access layer, an aggregation layer or a core layer, the stacking configuration parameters being used to guide the corresponding network devices to perform the configuration required to form the stacking system; and sending the respective stacking configuration parameters to the plurality of network devices, so that the plurality of network devices are configured according to the respective stacking configuration parameters and form the stacking system.
[0008] The management device automatically determines and issues stacking configuration parameters based on the topological connection relationship between the multiple network devices, the network levels of the multiple network devices, and the network levels of the neighboring devices of each of the multiple network devices. The network devices automatically configure the parameters without the need for manual settings by technical personnel, thereby effectively simplifying the steps of building a stacking system, greatly reducing labor costs while improving the efficiency of building a stacking system.
[0009] Optionally, the management device displays a stacking system building interface, and the administrator can trigger a stacking system building instruction in the stacking system building interface.
[0010] Before the management device receives the stack system formation instruction triggered by the administrator, the multiple network devices need to register with the management device. Optionally, the management device receives registration information sent by the multiple network devices, the registration information including information describing the neighboring devices of the network devices, and determines the topological connection relationship between the multiple network devices based on the registration information sent by the multiple network devices.
[0011] Optionally, before registering the multiple network devices on the management device, the administrator can connect stacking cables to the multiple network devices according to a predetermined stacking plan, connect them to downstream and upstream devices in the network, and power on the multiple network devices to meet networking requirements. After powering on, the multiple network devices perform neighbor discovery according to relevant protocols to obtain information about their neighbor devices. Each of the multiple network devices then sends the neighbor device information to the management device.
[0012] Optionally, a large number of network devices are registered with the management device. In this case, before receiving the stack system formation instruction triggered by the administrator, the management device can also display a network device list including the device identifiers of all network devices registered with the management device. In response to the administrator selecting multiple network devices from the network device list for forming the stack system, the management device can obtain the device identifiers of the multiple network devices.
[0013] It should be noted that the above stack configuration parameters are used to guide the configuration of the corresponding network device to complete the construction of the stack system. In other words, the configuration performed by the network device is the configuration required to build the stack system.
[0014] Optionally, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port in the network device used for stacking, and the stack device identifier is used to identify the network device in the stacking system.
[0015] The stack priority is a property of a member device in the stack system. It is used during subsequent stack negotiation to determine the stack role of each member device in the stack system. Stack roles include master, backup, or slave. The master device manages the backup and slave devices. The backup device takes over all services of the master device if the master device fails, and the slave device forwards service data. The stack identifier (ID), also known as the slot number, is unique to each member device in the stack system.
[0016] Optionally, the management device determines the stacking device identifiers and stacking priorities corresponding to the multiple network devices based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices. For each of the multiple network devices, the identifier of the port of the network device used to connect to other network devices is determined as the stacking port identifier corresponding to the network device based on the topological connection relationship.
[0017] Based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices, the implementation process of determining the stacking device identifiers and stacking priorities corresponding to the multiple network devices may include the following steps (1)-(2).
[0018] (1) Based on the network layers at which the multiple network devices are located and the network layers at which the neighboring devices of each of the multiple network devices are located, determining the stacking roles corresponding to the multiple network devices, the stacking roles including a master device, a backup device or a slave device, the master device being used to manage the backup device and the slave device, the backup device being used to take over all services of the master device when the master device fails, and the slave device being used to forward service data.
[0019] Based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices, at least two first-category network devices are determined from the multiple network devices, and among the neighboring devices of the first-category network device, there is a neighboring device whose network level is higher than the network level of the multiple network devices, and two first-category network devices are selected from the at least two first-category network devices, and the stacking roles of the two first-category network devices are set to be a master device and a backup device respectively, and the stacking roles corresponding to the other network devices in the multiple network devices except the two first-category network devices are set to be slave devices.
[0020] (2) Based on the stacking roles respectively corresponding to the multiple network devices, determine the stacking device identifiers and stacking priorities respectively corresponding to the multiple network devices.
[0021] The multiple network devices are sorted based on the stacking roles respectively corresponding to the multiple network devices to obtain a sorting result of the multiple network devices, and the stacking device identifiers and stacking priorities respectively corresponding to the multiple network devices are determined based on the sorting result.
[0022] Optionally, the stacking roles include master, backup, or slave. In this case, the multiple network devices are sorted in the order of master, backup, and slave to obtain a sorting result for the multiple network devices. Starting with the first network device in the sorting result, stacking priorities are sequentially set for the multiple network devices in the sorting result in descending order of stacking priority. That is, the stacking priority of the master device is set to the highest priority in the stacking system, the stacking priority of the backup device is set to be lower than the stacking priority of the master device, and the stacking priority of the slave device is set to be lower than the stacking priority of the backup device.
[0023] Optionally, the management device sends corresponding parameter configuration scripts to the multiple network devices to instruct the multiple network devices to perform configuration by executing corresponding parameter configuration scripts, where the parameter configuration scripts include the stack configuration parameters.
[0024] Optionally, the management device determines configuration time indication information corresponding to each of the multiple network devices based on the stacking roles corresponding to the multiple network devices, where the configuration time indication information is used to indicate a time to start configuration based on the corresponding stacking configuration parameters. The management device sends the corresponding configuration time indication information to the multiple network devices, so that the multiple network devices start configuration at the corresponding time.
[0025] This application takes into account the connectivity issues of the multiple network devices. The configuration time indication information determined by the stacking role can ensure that the multiple network devices start configuration at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0026] Because the configuration time indication information indicates the time at which the corresponding network device begins configuration, determining the configuration time indication information corresponding to each of the multiple network devices based on the stacking roles corresponding to each of the multiple network devices is actually determining the time at which each of the multiple network devices begins configuration based on the stacking roles corresponding to each of the multiple network devices. The following describes the implementation process for determining the time at which each of the multiple network devices begins configuration based on the stacking roles corresponding to each of the multiple network devices. For ease of description, the time at which a network device begins configuration based on the corresponding stacking configuration parameters is referred to as the stacking configuration start time.
[0027] Optionally, based on the stacking roles corresponding to the multiple network devices, the multiple network devices are sorted to obtain a sorting result of the multiple network devices; based on the sorting result and the number of the multiple network devices, the configuration delay durations corresponding to the multiple network devices are determined; based on the configuration delay durations corresponding to the multiple network devices, the stacking configuration start times corresponding to the multiple network devices are determined.
[0028] Optionally, the number of the multiple network devices is n. In this case, based on the sorting result and the number of the multiple network devices, the implementation process of determining the configuration delay duration corresponding to the multiple network devices respectively includes: setting i=n, multiplying i by the minimum delay duration to obtain the configuration delay duration corresponding to the n+1-ith network device in the sorting result; if i is greater than 1, setting i=i-1, and returning to the above step of multiplying i by the minimum delay duration to obtain the configuration delay duration corresponding to the n+1-ith network device in the sorting result, and finally obtaining the configuration delay duration corresponding to each network device in the multiple network devices.
[0029] Since the sorting results of the multiple network devices are sorted in the order of master device, backup device, and slave device, the configuration delay duration of the master device determined by the above method is the longest among the multiple network devices. Since the neighboring devices of the master device include upstream devices, this can ensure normal communication between the network devices other than the first type of network devices in the multiple network devices and the management device, so that the network devices other than the first type of network devices in the multiple network devices can all receive the stacking configuration parameters sent by the management device in a timely manner.
[0030] After the management device sends the corresponding stacking configuration parameters to the multiple network devices, the management device also times the stacking system assembly process from the moment when the stacking configuration parameters corresponding to the multiple network devices are sent. If the stacking system assembly result is obtained before the timing ends, it is determined based on the assembly result whether the stacking system meets expectations. If the stacking system meets expectations, it is determined that the stacking system assembly is completed.
[0031] Optionally, if the stacking system establishment result is not received before the timing time expires, the step of generating stacking configuration parameters corresponding to the plurality of network devices based on the stacking topology of the plurality of network devices is re-executed.
[0032] By timing the stacking system's construction process, the management device can promptly detect whether there are any problems in the process of multiple network devices forming the stacking system, thereby avoiding the situation where multiple network devices fail to form the stacking system but the management device fails to detect the problem, effectively improving the efficiency and reliability of the stacking system.
[0033] Optionally, the parameter configuration script also includes the configuration time indication information. That is, for any one of the multiple network devices, the management device sends the stack configuration parameters corresponding to the network device and the configuration time indication information corresponding to the network device together in the same parameter configuration script to the network device. Optionally, the stack configuration parameters corresponding to the network device and the configuration time indication information corresponding to the network device may also be sent separately to the network device.
[0034] When the stacking system does not meet expectations, the management device determines at least one faulty device among the multiple network devices, regenerates the stacking configuration parameters corresponding to the at least one faulty device, and sends the corresponding regenerated stacking configuration parameters to the at least one faulty device, so that the at least one faulty device is reconfigured according to the corresponding regenerated stacking configuration parameters and joins the stacking system.
[0035] When there is a faulty device among multiple network devices, the present application does not need to regenerate the stacking configuration parameters for each network device. It is only necessary to regenerate the corresponding stacking configuration parameters for the faulty device. This can simplify the steps of building a stacking system and effectively improve the efficiency of building a stacking system.
[0036] If the number of member devices in the stacking system is less than the number of the plurality of network devices, a network device that does not belong to the stacking system among the plurality of network devices is determined as the at least one faulty device. That is, if the number of member devices is less than the number of the plurality of network devices, it indicates that a network device that has not yet joined the stacking system exists among the plurality of network devices. Therefore, the network device that does not belong to the stacking system among the plurality of network devices can be determined as the at least one faulty device.
[0037] For each of the at least one faulty device, an identifier of a port on the faulty device connected to the multiple network devices is determined as a stack port identifier corresponding to the faulty device. The stacking priority corresponding to the faulty device is set to the lowest priority in the stacking system, and the stacking device identifier corresponding to the faulty device is set to any identifier except an occupied identifier, where the occupied identifier includes the stacking device identifier of a member device in the stacking system and the stacking device identifiers in the stacking configuration parameters corresponding to other faulty devices.
[0038] That is, the stacking device ID of the faulty device only needs to be different from the stacking device IDs of the member devices in the stacking system and other faulty devices, and the stacking priority corresponding to the faulty device is the lowest priority in the stacking system.
[0039] Since the stacking device ID of the faulty device is different from the member devices and other faulty devices in the stacking system, the stacking device ID in the stacking system can uniquely identify a device, thereby ensuring the stability of the stacking system.
[0040] In a second aspect, a method for forming a stacking system is provided, which is applied to a network device, wherein the network device is one of multiple network devices used to form a stacking system, and the method includes: receiving stacking configuration parameters sent by a management device, wherein the stacking configuration parameters are generated by the management device in response to a stacking system forming instruction triggered by an administrator, based on the topological connection relationship between the multiple network devices, the network layers at which the multiple network devices are located, and the network layers at which neighboring devices of each of the multiple network devices are located, wherein the network layers include an access layer, an aggregation layer, or a core layer, and the stacking configuration parameters are used to guide the corresponding network devices to perform the configuration required to form the stacking system, and the stacking system forming instruction includes the device identifiers of the multiple network devices; configuring according to the stacking configuration parameters, and performing stacking negotiation with other network devices among the multiple network devices to form the stacking system.
[0041] The management device automatically determines and issues stacking configuration parameters based on the topological connection relationship between the multiple network devices, the network levels of the multiple network devices, and the network levels of the neighboring devices of each of the multiple network devices. The network devices automatically configure the parameters without the need for manual settings by technical personnel, thereby effectively simplifying the steps of building a stacking system, greatly reducing labor costs while improving the efficiency of building a stacking system.
[0042] Optionally, the network device receives a parameter configuration script corresponding to the network device sent by the management device, the parameter configuration script carrying stack configuration parameters corresponding to the network device. In this case, the network device loads and executes the parameter configuration script to complete the configuration of the network device.
[0043] In actual applications, before the network device is configured according to the stacking configuration parameters, the network device also receives the configuration time indication information corresponding to the network device sent by the management device. The configuration time indication information is used to indicate the stacking configuration start time of the network device. When the stacking configuration start time arrives, the network device executes the steps of configuring according to the stacking configuration parameters.
[0044] The configuration time indication information carries the configuration delay duration of the network device. In this case, after receiving the configuration time indication information, the network device determines the sum of the reception time of the configuration time indication information and the configuration delay duration as the stacking configuration start time of the network device, and then executes the steps of configuring according to the stacking configuration parameters when the stacking configuration start time arrives.
[0045] This application takes into account the connectivity issues of the multiple network devices. The configuration time indication information determined by the stacking role can ensure that the multiple network devices start configuration at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0046] Optionally, the network device is a faulty device among multiple network devices. In this case, the network device receives the stacking configuration parameters regenerated by the management device for the network device, and then reconfigures itself according to the regenerated stacking configuration parameters and joins the stacking system.
[0047] When there is a faulty device among multiple network devices, the present application does not need to regenerate the stacking configuration parameters for each network device. It is only necessary to regenerate the corresponding stacking configuration parameters for the faulty device. This can simplify the steps of building a stacking system and effectively improve the efficiency of building a stacking system.
[0048] Optionally, the network device receives a regenerated parameter configuration script corresponding to the network device sent by the management device, where the regenerated script carries the stack configuration parameters regenerated by the network device. In this case, the network device loads and executes the regenerated parameter configuration script to complete the configuration of the network device.
[0049] In a third aspect, a method for forming a stacking system is provided, which is applied to a network device, wherein the network device is one of multiple network devices used to form a stacking system, and the method includes: determining the stacking configuration parameters corresponding to the network device by interacting with at least one neighboring device, wherein the at least one neighboring device is at least one network device connected to the network device in the topological connection relationship between the multiple network devices; configuring according to the stacking configuration parameters, and performing stacking negotiation with other network devices among the multiple network devices to form the stacking system.
[0050] Since each network device that makes up the stack system can automatically determine and configure stack configuration parameters by interacting with its neighboring devices, no manual settings by technicians are required. This effectively simplifies the steps of setting up the stack system, improves the efficiency of stacking the system, and greatly reduces labor costs.
[0051] Optionally, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port in the network device used for stacking, and the stack device identifier is used to identify the network device in the stacking system.
[0052] The stack priority is a property of a member device in the stack system. It is used to determine the stack role of each member device in the stack system during subsequent stack negotiation. The stack identifier (ID), also known as the slot number, is unique to each member device in the stack system.
[0053] Optionally, the stacking priority of each member device in the stacking system is represented by a number. The smaller the number corresponding to the stacking priority, the higher the stacking priority, and the larger the number corresponding to the stacking priority, the lower the stacking priority. Optionally, the larger the number corresponding to the stacking priority, the higher the stacking priority, and the smaller the number corresponding to the stacking priority, the lower the stacking priority. For ease of description, when referring to the stacking priority later, the introduction will be based on the principle that the smaller the number corresponding to the stacking priority, the higher the stacking priority, and the larger the number corresponding to the stacking priority, the lower the stacking priority.
[0054] The network device determines the stacking priority corresponding to the network device and the stacking device identifier corresponding to the network device by interacting with the at least one neighboring device, and determines the identifier of at least one first-class port included in the network device as the stacking port identifier corresponding to the network device, where the at least one first-class port refers to a port used to connect to the at least one neighboring device.
[0055] In actual applications, the stacking system must not only be connected according to the stacking topology, but the stacking system must also be connected to downstream and upstream devices to meet networking requirements. Therefore, the administrator needs to connect the multiple network devices according to the stacking topology. After the stack is established, the administrator also needs to connect the stacking system to upstream and downstream devices according to networking requirements. In this case, the administrator selects a network device connected to the upstream device from the multiple network devices, so that the selected network device begins to exchange data with at least one neighboring device to determine its corresponding stacking configuration parameters. For ease of description, the network device selected by the administrator will be referred to as the primary device, and the network devices other than the primary device in the multiple network devices will be referred to as secondary devices.
[0056] Because the master device can exchange data with its neighboring devices, and after receiving data from the master device, the neighboring devices of the master device can also exchange data with their own neighboring devices, data exchange starts with the master device and is gradually passed down, so that each of the multiple network devices exchanges data with its own neighboring devices. The implementation method of the master device determining the corresponding stacking priority of the network device by exchanging data with at least one neighboring device is different from the implementation method of the secondary device determining the corresponding stacking priority of the network device by exchanging data with at least one neighboring device, and they will be described below.
[0057] In the first scenario, the network device is a master device. The network device sets a corresponding port priority for at least one first-class port, sends the port priority corresponding to the first-class port to which it is connected to the at least one neighboring device, and receives the port priority corresponding to the second-class port included in the at least one neighboring device, which is the port on the neighboring device used to connect to the network device. If the port priority corresponding to the second-class port included in the at least one neighboring device is lower than the port priority corresponding to the first-class port to which it is connected, the stacking priority corresponding to the network device is determined based on the port priority corresponding to the at least one first-class port. Otherwise, the stacking system establishment is determined to have failed.
[0058] It should be noted that the stacking topology of the multiple network devices includes various topologies, including chain topology, ring topology, and so on. If the stacking topology of the multiple network devices is a chain topology, the administrator may designate any one of the multiple network devices at either end of the chain as the master device. In this case, the master device has only one neighbor device in the stacking topology of the multiple network devices. If the stacking topology of the multiple network devices is a ring topology, the administrator may designate any one of the multiple network devices as the master device. In this case, the master device has two neighbor devices in the stacking topology of the multiple network devices.
[0059] If the network device has only one neighbor device, that is, the at least one neighbor device includes the first neighbor device, in this case, the network device sets the port priority corresponding to the first type port connected to the first neighbor device to the highest priority in the stacking system.
[0060] If the network device has two neighboring devices, that is, the at least one neighboring device includes a second neighboring device in addition to the first neighboring device, in this case, the network device further sets the port priority corresponding to the first-class port connected to the second neighboring device to the lowest priority in the stacking system.
[0061] Before determining the stacking priority corresponding to the network device by exchanging data with at least one neighboring device, the network device also receives a stacking system establishment instruction triggered by an administrator and, in response to the stacking system establishment instruction, executes the step of determining the stacking priority corresponding to the network device by exchanging data with at least one neighboring device. In other words, the administrator selects a network device connected to an upstream device from the multiple network devices and then triggers the stacking system establishment instruction to instruct the network device to begin determining its own stacking configuration parameters by exchanging data with at least one neighboring device.
[0062] Optionally, the network device includes an automatic stacking button, so that the administrator triggers the stacking system building instruction by pressing the automatic stacking button.
[0063] In a second scenario, the network device is a secondary device. The at least one neighbor device includes a first neighbor device. The network device receives a port priority corresponding to a second-class port included in the first neighbor device and sent by the first neighbor device, where the second-class port is a port for connection to the network device. Based on the port priority corresponding to the second-class port included in the first neighbor device, the network device determines a port priority corresponding to a first-class port included in the network device connected to the first neighbor device. Based on the port priority corresponding to the first-class port connected to the first neighbor device, the network device determines a stacking priority corresponding to the network device.
[0064] The secondary devices include intermediate devices and the last device. The last device is the device among the multiple network devices that determines its stack configuration parameters last. The intermediate device is the device other than the last device and the primary device. The intermediate device has two neighboring devices. However, for the last device, the number of neighboring devices varies depending on the stack topology. That is, if the topology is a chain, the last device has one neighbor; if the topology is a ring, the last device has two neighbors. Regardless of whether the network device is an intermediate device or the last device, it has at least one neighboring device.
[0065] Optionally, after determining the port priority corresponding to the first type port connected to the first neighboring device and included in the network device, the network device further sends the port priority corresponding to the first type port connected to the first neighboring device to the first neighboring device.
[0066] When the network device is an intermediate device, or the last device with two neighboring devices, the implementation method of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first type port to which the first neighboring device is connected is different from the implementation method of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first type port to which the first neighboring device is connected when the network device is the last device with one neighboring device. They will be introduced separately below.
[0067] If the network device is the last device with one neighbor device, the network device determines the port priority corresponding to the first type port to which the first neighbor device is connected as the stacking priority corresponding to the network device.
[0068] If the network device is an intermediate device, or the last device with two neighbor devices, the at least one neighbor device also includes a second neighbor device. In this case, the network device determines the port priority corresponding to the first-class port connected to the second neighbor device included in the network device, and determines the stacking priority corresponding to the network device based on the port priority corresponding to the first-class port connected to the first neighbor device and the port priority corresponding to the first-class port connected to the second neighbor device.
[0069] If the port priority corresponding to the second type port included in the first neighbor device received by the network device from the first neighbor device is not the lowest priority in the stack system, the network device determines itself as an intermediate device, and the network device determines the port priority corresponding to the first type port to which the second neighbor device is connected based on the port priority corresponding to the second type port included in the first neighbor device.
[0070] If the network device receives from the first neighbor device a signal indicating that the port priority corresponding to the second type port included in the first neighbor device is the lowest priority in the stack system, the network device determines that it is the last device with two neighbor devices. In this case, the network device receives from the second neighbor device a signal indicating that the second type port included in the second neighbor device is the lowest priority in the stack system, and determines, based on the port priority corresponding to the second type port included in the second neighbor device, the port priority corresponding to the first type port connected to the second neighbor device.
[0071] In actual applications, a network device performs neighbor discovery by periodically sending Link Layer Discovery Protocol (LLDP) messages to its neighbor devices. In this case, the network device can exchange data with at least one neighbor device through LLDP messages to determine the stacking configuration parameters corresponding to the network device.
[0072] Optionally, the LLDP message sent by the network device to the at least one neighboring device carries the port priority corresponding to the first type port to which the corresponding neighboring device is connected.
[0073] In actual applications, the network device also includes a stacking indicator light, the display status of which is used to indicate the current stacking status of the network device, wherein the display status includes a first display status and a second display status, and the stacking status indicated by the first display status is different from the stacking status indicated by the second display status.
[0074] Optionally, the stacking situation includes at least one of the following: the network device is determining its own corresponding stacking configuration parameters, the network device is being configured according to its own corresponding stacking configuration parameters, the network device is negotiating stacking with other network devices among the multiple network devices, the stacking system is completed, and the stacking system fails to be established.
[0075] Since the network devices include stacking indicators, administrators can visually determine the stacking status of the network devices through the stacking indicators, so that administrators can promptly discover and troubleshoot problems that arise during the stacking system construction process, thereby improving the efficiency of stacking system construction.
[0076] In a fourth aspect, a device for assembling a stacking system is provided, wherein the device for assembling a stacking system has the function of implementing the method for assembling a stacking system in the first aspect. The device for assembling a stacking system includes at least one module, which is used to implement the method for assembling a stacking system provided in the first aspect.
[0077] In a fifth aspect, a device for assembling a stacking system is provided, wherein the device for assembling a stacking system has the function of implementing the method for assembling a stacking system in the second aspect. The device for assembling a stacking system includes at least one module, which is used to implement the method for assembling a stacking system provided in the second aspect.
[0078] In a sixth aspect, a device for assembling a stacking system is provided, wherein the device for assembling a stacking system has the function of implementing the method for assembling a stacking system in the third aspect. The device for assembling a stacking system includes at least one module, which is used to implement the method for assembling a stacking system provided in the third aspect.
[0079] In a seventh aspect, a management device is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program for executing the method for establishing a stacking system provided in the first aspect. The processor is configured to execute the computer program stored in the memory to implement the method for establishing a stacking system provided in the first aspect.
[0080] Optionally, the management device may further include a communication bus, which is used to establish a connection between the processor and the memory.
[0081] In an eighth aspect, a network device is provided, comprising a processor and a memory, the memory being configured to store a computer program for executing the method for establishing a stacking system provided in the second aspect, or a computer program for executing the method for establishing a stacking system provided in the third aspect. The processor is configured to execute the computer program stored in the memory to implement the method for establishing a stacking system described in the second aspect, or the method for establishing a stacking system described in the third aspect.
[0082] Optionally, the network device may further include a communication bus, which is used to establish a connection between the processor and the memory.
[0083] In the ninth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer or a processor, the computer or the processor executes the steps of the method for assembling a stacking system described in the first aspect, or executes the steps of the method for assembling a stacking system described in the second aspect, or executes the steps of the method for assembling a stacking system described in the third aspect.
[0084] In a tenth aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on a computer or a processor, the computer or processor is caused to execute the steps of the method for assembling a stacking system described in the first aspect, or the steps of the method for assembling a stacking system described in the second aspect, or the steps of the method for assembling a stacking system described in the third aspect. In other words, a computer program is provided. When the computer program is executed on a computer or a processor, the computer or processor is caused to execute the steps of the method for assembling a stacking system described in the first aspect, or the steps of the method for assembling a stacking system described in the second aspect, or the steps of the method for assembling a stacking system described in the third aspect.
[0085] The technical effects obtained in the above-mentioned fourth to tenth aspects are similar to the technical effects obtained by the corresponding technical means in the first to third aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] FIG1 is a schematic diagram of a stacking system provided in an embodiment of the present application;
[0087] FIG2 is a schematic diagram of another stacking system provided in an embodiment of the present application;
[0088] FIG3 is a schematic diagram of another stacking system provided in an embodiment of the present application;
[0089] 4 is a schematic diagram of an implementation environment involved in a first method for building a stacking system according to an embodiment of the present application;
[0090] 5 is a schematic diagram of an implementation environment involved in a second method for building a stacking system provided in an embodiment of the present application;
[0091] FIG6 is a schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0092] 7 is a flowchart of a first method for building a stacking system provided in an embodiment of the present application;
[0093] FIG8 is a schematic diagram of a stacking topology provided in an embodiment of the present application;
[0094] FIG9 is a schematic diagram of a stacking topology connected to an upstream device and a downstream device according to an embodiment of the present application;
[0095] FIG10 is a flow chart of a second method for building a stacking system provided in an embodiment of the present application;
[0096] FIG11 is a schematic diagram of a chain topology structure provided in an embodiment of the present application;
[0097] FIG12 is a schematic diagram of a ring topology structure provided in an embodiment of the present application;
[0098] FIG13 is a schematic structural diagram of an apparatus for building a stacking system according to an embodiment of the present application;
[0099] FIG14 is a schematic structural diagram of another apparatus for forming a stacking system according to an embodiment of the present application;
[0100] FIG15 is a schematic structural diagram of another device for assembling a stacking system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0101] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0102] To facilitate understanding, before explaining in detail the method for assembling a stacking system provided in an embodiment of the present application, the terms, application scenarios, and implementation environment involved in the embodiment of the present application are first introduced.
[0103] First, the nouns involved in the embodiments of the present application are introduced.
[0104] Network Architecture: In networking scenarios, to meet the communication needs of organizations and enterprises of varying sizes, the network architecture typically includes multiple network layers, with each network device typically distributed across these layers. These layers include an access layer and a core layer. In some embodiments, these layers also include a convergence layer. These layers play different roles and functions within the network.
[0105] Among them, the access layer is the network layer closest to the user in the network networking. Its main task is to connect user devices (such as computers, mobile phones, printers, etc.) to the network and provide an interface for users to access the network. The access layer is usually deployed on each floor, each office or each user area to provide connection to the local network. The core layer is the highest-level network layer in the network networking. It is responsible for processing large amounts of data traffic and undertaking important tasks of the network, including high-speed data transmission, routing decisions and cross-network communications. In the case where the network architecture includes a convergence layer, the convergence layer is located between the access layer and the core layer, and is responsible for aggregating data traffic from different access layers to the core layer. The main task of the convergence layer is to realize data forwarding, switching and policy control, while providing high-availability bandwidth to ensure fair sharing between various access layers and optimize network resource utilization.
[0106] The level of the network layer is determined by the order in which traffic flows from the user side to the network side. The traffic flow order refers to the order in which traffic flows through each network layer in the process of flowing from the user side to the network side.
[0107] In some embodiments, the level of the network layer that flows through first in the order in which traffic flows is set as the lowest, and the level of the network layer that flows through last in the order in which traffic flows is set as the highest, and the level of each network layer is obtained according to the order in which traffic flows. In other embodiments, the level of the network layer that flows through first in the order in which traffic flows is set as the highest, and the level of the network layer that flows through last in the order in which traffic flows is set as the lowest, and the level of each network layer is obtained according to the order in which traffic flows, and this embodiment of the application does not limit this.
[0108] For ease of description, when referring to network layer levels, the network layer levels are determined by arranging the lowest level for the network layer that traffic flows through first, and the highest level for the network layer that traffic flows through last. Therefore, in the above networking scenario, the access layer has a lower level than the aggregation layer and the core layer, and the aggregation layer has a lower level than the core layer. In other words, the network layers, from highest to lowest, are: core layer, aggregation layer, access layer.
[0109] Next, the application scenarios involved in the embodiments of this application are introduced.
[0110] Stacking involves connecting multiple stack-supported member devices together using stack cables to form a stack system. The multiple member devices in the stack are logically virtualized into a single device, which forwards data as a whole. For example, as shown in Figure 1, switches 1 and 2 are connected using stack cables to form a stack system. To the upstream and downstream devices in the stack, the stack system acts like a single switch, forwarding data.
[0111] Stacking is a widely used horizontal virtualization technology that improves reliability, expands port counts, increases bandwidth, and simplifies networking. To enhance reliability, multiple member devices in a stack system can form redundant backups. Refer to Figure 1. Switch 1 and Switch 2 form a stack system, backing up each other. If Switch 1 fails, Switch 2 takes over, ensuring normal service operation. To expand port counts, refer to Figure 2. If Switch 1's port count is insufficient to support the number of downstream devices it needs to connect, a new switch (Switch 2 in Figure 2) can be added to form a stack with Switch 1, thereby expanding the port count. To increase bandwidth, refer to Figure 3. If Switch 1's uplink bandwidth is insufficient, a new switch (Switch 2 in Figure 3) can be added to form a stack with Switch 1. Multiple physical links from the stack members can be configured as an aggregation group, increasing uplink bandwidth. In terms of simplifying networking, when multiple devices in the network form a stack system and are virtualized into a single logical device, the network architecture can be simplified. In addition, since all member devices of the stack system are logically regarded as a whole, the connections between them are regarded as internal connections. Therefore, there is no need to use loop-breaking protocols such as the Multiple Spanning Tree Protocol (MSTP) to manage these connections, thereby simplifying network configuration.
[0112] Stacking cables are generally divided into dedicated stacking cables and ordinary stacking cables. Ordinary stacking cables include optical cables, network cables, and high-speed cables. In the technology of using ordinary stacking cables to build a stacking system, technicians need to plan the stacking system before building the stacking system to determine the role and function of each member device in the stacking system. Then, based on the role and function of each member device, technicians perform stacking configuration on each member device one by one to set the stacking configuration parameters of each member device. The stacking configuration parameters include stacking port ID, stacking device ID, and stacking priority. The stacking port refers to the port used for stacking. After the stacking configuration is completed, the technicians power off all member devices and connect the cables according to the stacking topology. After connecting the cables, all member devices are powered on. Each member device performs stacking negotiation based on its own stacking configuration parameters. The technicians then check whether the stacking system is successfully built.
[0113] However, this method requires technicians to log into the serial ports of each member device and configure the stack through command lines. This cumbersome process and high technical requirements make stacking a complex task. This method is particularly inefficient and labor-intensive when stacking a large number of devices.
[0114] In the technology that uses dedicated stacking cables to establish a stack system, one end of the dedicated stacking cable has a Master tag, while the other end does not. The Master-tagged end is the master end, and the untagged end is the backup end. Users must connect the cables according to the dedicated stacking cable connection rules. Once connected, each member device automatically establishes a stack system. However, this technology requires the purchase of dedicated stacking cables, which is costly and requires that the cables be connected according to the dedicated stacking cable connection rules, making the process cumbersome.
[0115] Based on this, the embodiments of the present application provide two methods for establishing a stacking system, which can realize automatic configuration of stacking configuration parameters without the need for manual configuration or the need to purchase dedicated stacking cables for connection. In this way, the steps of establishing a stacking system can be effectively simplified, while improving the efficiency of establishing a stacking system and greatly reducing costs.
[0116] Finally, the implementation environments involved in the two methods for building a stacking system provided in the embodiments of the present application are introduced respectively.
[0117] FIG4 is a schematic diagram of an implementation environment involved in the first method for establishing a stacking system provided in an embodiment of the present application. The implementation environment includes a management device 01 and multiple network devices 02 (three network devices are schematically represented in FIG4 ). The multiple network devices are connected via stacking cables and used to establish the stacking system. The management device 01 and the multiple network devices 02 are in communication connection, and the communication connection can be a wired or wireless connection, which is not limited in the embodiment of the present application.
[0118] The management device 01 receives a stack system formation instruction triggered by an administrator and, in response to the stack system formation instruction, generates stack configuration parameters corresponding to each of the multiple network devices 02 based on the topological connection relationships between the multiple network devices, the network levels at which the multiple network devices 02 are located, and the network levels at which the neighboring devices of each of the multiple network devices 02 are located. The management device 01 then sends the corresponding stack configuration parameters to the multiple network devices 02, so that the multiple network devices 02 are configured according to the corresponding stack configuration parameters and form a stack system. Each of the multiple network devices 02 receives the stack configuration parameters sent by the management device 01, configures itself according to the stack configuration parameters, and conducts stack negotiation with other network devices in the multiple network devices 02 to form a stack system.
[0119] Optionally, the above-mentioned network device can be a router, a switch, etc. The above-mentioned management device can be an independent server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or a cloud computing service center. For example, the management device is deployed with a network control engine (iMaster network control engine, iMaster NCE) to achieve management of the above-mentioned multiple network devices.
[0120] Those skilled in the art should understand that the above-mentioned management device 01 and network device 02 are only examples. Other existing or future management devices and network devices that are applicable to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application and are included here by reference.
[0121] Figure 5 is a schematic diagram of an implementation environment involved in the second method for establishing a stacking system provided in an embodiment of the present application. The implementation environment includes multiple network devices 03 (three network devices are schematically represented in Figure 5), which are connected via stacking cables and used to establish a stacking system.
[0122] For each network device among the multiple network devices 03, the network device determines the stacking configuration parameters corresponding to the network device by interacting with at least one neighboring device of the network device. The network device is configured according to its own corresponding stacking configuration parameters, and performs stacking negotiation with other network devices among the multiple network devices 03 to form a stacking system.
[0123] Optionally, the above-mentioned network device can be a router, a switch, etc., which is not limited in the embodiments of the present application.
[0124] Those skilled in the art should understand that the above-mentioned network device 03 is only an example. Other existing or future network devices that are applicable to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application and are included here by reference.
[0125] It should be noted that the application scenarios and two implementation environments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0126] Figure 6 is a schematic diagram of the structure of a network device provided in an embodiment of the present application. Network device 600 may be a switch, router, or other network device that forwards packets. In this embodiment, network device 600 includes a main control board 610, an interface board 630, and an interface board 640. Multiple interface boards may include a switching network board (not shown in Figure 6), which is used to facilitate data exchange between the interface boards (also known as line cards or service boards).
[0127] The main control board 610 is used to perform functions such as system management, equipment maintenance, and protocol processing. Interface boards 630 and 640 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and realize the forwarding of data streams. The main control board 610 mainly includes three types of functional units: a system management and control unit, a system clock unit, and a system maintenance unit. The main control board 610, the interface board 630, and the interface board 640 are connected to the system backplane via the system bus to realize intercommunication. The interface board 630 includes one or more processors 631. The processor 631 is used to control and manage the interface board and communicate with the central processing unit on the main control board, as well as to forward data streams. The memory 632 on the interface board 630 is used to store forwarding table entries. The processor 631 forwards the data stream by searching the forwarding table entries stored in the memory 632.
[0128] The interface board 630 includes one or more network interfaces 633 for receiving data streams or other information sent by terminal devices, authentication servers or other devices, and processing these data streams or data according to the instructions of the processor 631. The specific implementation process will not be described in detail here.
[0129] It is understood that, as shown in FIG6 , the embodiment of the present application includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operations on the interface board 640 are basically similar to those on the interface board 630 and will not be described in detail for the sake of brevity. In addition, it is understood that the processors 631 and / or 641 in the interface board 630 in FIG6 can be dedicated hardware or chips, such as a network processor or an application specific integrated circuit (ASIC) to implement the above functions. This implementation method is what is commonly referred to as the forwarding plane using dedicated hardware or chip processing. Of course, the processors 631 and / or 641 can also be general-purpose processors, such as a general-purpose CPU, to implement the functions described above.
[0130] Additionally, it should be noted that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The greater the data processing capabilities of the network device, the more interface boards are provided. In the case of multiple interface boards, these boards can communicate with each other through one or more switching fabric boards. When there are multiple boards, they can collectively implement load sharing and redundant backup. In a centralized forwarding architecture, the network device may not require a switching fabric board; the interface board handles the service data processing function for the entire system. In a distributed forwarding architecture, the network device includes multiple interface boards, and data exchange between these boards can be achieved through the switching fabric board, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of network devices with a centralized architecture. The specific architecture to be adopted depends on the specific network deployment scenario and is not limited here.
[0131] In some embodiments, the memory 632 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc including (compact disc read-only memory (CD-ROM), a compact disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 632 may exist independently and be connected to the processor 631 via a communication bus. The memory 632 may also be integrated with the processor 631.
[0132] In some embodiments, the network interface 633 can be a device using any transceiver type for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The network interface 633 includes a wired network interface and may also include a wireless network interface. Among them, the wired network interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless network interface can be a WLAN interface, a cellular network communication interface, or a combination thereof. When the network device acts as any network device in the domain, the network interface 633 is used to forward data packets to other network devices. When the network device acts as a head node in the domain, the network interface 633 can also be used to communicate with terminal devices, such as receiving business traffic sent by terminal devices.
[0133] In some embodiments, the network device may include multiple processors, each of which may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0134] In some embodiments, the memory 632 is used to store a computer program for executing the solution of the present application. The processor 631 can execute the computer program stored in the memory 632 to implement the method for establishing a stacking system provided in the embodiment of FIG. 7 below, or the method for establishing a stacking system provided in the embodiment of FIG. 10 below. For specific implementations, please refer to the detailed description of the embodiments shown in FIG. 7 or FIG. 10 , which will not be repeated here.
[0135] Next, two methods for assembling a stacking system provided in the embodiments of the present application are explained in detail.
[0136] Figure 7 is a flow chart of a first method for building a stacking system according to an embodiment of the present application. Optionally, the method shown in Figure 7 is applied to the implementation environment shown in Figure 4. Referring to Figure 7, the method includes the following steps.
[0137] Step 701: A management device receives a stack system building instruction triggered by an administrator. The stack system building instruction includes device identifiers of multiple network devices. The multiple network devices are used to build a stack system.
[0138] In some embodiments, the management device displays a stacking system assembly interface, and the administrator can trigger a stacking system assembly instruction in the stacking system assembly interface. For example, the stacking system assembly instruction can be triggered by the administrator through voice, click, sliding, etc., which is not limited in the embodiments of the present application.
[0139] In actual applications, before a management device receives a stack system formation instruction triggered by an administrator, the multiple network devices must register with the management device. For example, the management device receives registration information sent by the multiple network devices, which includes information describing the network device's neighbor devices. Based on the registration information sent by the multiple network devices and according to a relevant algorithm, the management device determines the topological connection relationship between the multiple network devices. For ease of description, this topological connection relationship between the multiple network devices will be referred to as the stack topology of the multiple network devices.
[0140] Optionally, before registering the multiple network devices on the management device, the administrator can connect stacking cables to the multiple network devices according to a predetermined stacking plan, connect them to downstream and upstream devices in the network, and power on the multiple network devices to meet networking requirements. After powering on, the multiple network devices perform neighbor discovery according to relevant protocols to obtain information about their neighbor devices. Each of the multiple network devices then sends the neighbor device information to the management device.
[0141] Optionally, the registration information also includes a device serial number. After receiving the device serial numbers of the multiple network devices, the management device determines the Internet Protocol (IP) address and the device identification of the network device for each of the multiple network devices based on the device serial number of the network device.
[0142] The device identifier of the network device is used to uniquely identify the network device, and the device identifier can be information such as the media access control (MAC) address, IP address, name, number, device serial number, etc. of the network device, or a combination of such information.
[0143] In actual applications, a large number of network devices are registered with the management device. In this case, before receiving a stack system formation instruction triggered by an administrator, the management device can also display a network device list containing the device identifiers of all network devices registered with the management device. In response to the administrator selecting multiple network devices from the network device list for forming a stack system, the management device can obtain the device identifiers of the multiple network devices.
[0144] For example, the administrator triggers the selection of the multiple network devices through a voice, click, or sliding action, and the selection operation is used to select multiple network devices from the network devices registered on the management device for forming a stack system. Typically, the network device list also includes descriptive information corresponding to the network devices registered on the management device, where the descriptive information includes device identifiers of the network devices. The administrator can select the multiple network devices from the network device list based on the descriptive information corresponding to the network devices registered on the management device.
[0145] Step 702: The management device responds to the stacking system assembly instruction and generates stacking configuration parameters corresponding to the multiple network devices based on the topological connection relationship between the multiple network devices, the network layer at which the multiple network devices are located, and the network layer at which the neighboring devices of each of the multiple network devices are located. The network layer includes an access layer, an aggregation layer, or a core layer. The stacking configuration parameters are used to guide the corresponding network devices to perform the configuration required to assemble the stacking system.
[0146] It should be noted that the above stack configuration parameters are used to guide the configuration of the corresponding network device to complete the construction of the stack system. In other words, the configuration performed by the network device is the configuration required to build the stack system.
[0147] In some embodiments, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port in the network device used for stacking, and the stack device identifier is used to identify the network device in the stacking system.
[0148] The stack priority is a property of a member device in the stack system. It is used during subsequent stack negotiation to determine the stack role of each member device in the stack system. Stack roles include master, backup, or slave. The master device manages the backup and slave devices. The backup device takes over all services of the master device if the master device fails, and the slave device forwards service data. The stack identifier (ID), also known as the slot number, is unique to each member device in the stack system.
[0149] In some embodiments, the stacking priority of each member device in the stacking system is represented by a number. A smaller number corresponding to the stacking priority indicates a higher stacking priority, and a larger number corresponding to the stacking priority indicates a lower stacking priority. Of course, in other embodiments, a larger number corresponding to the stacking priority indicates a higher stacking priority, and a smaller number corresponding to the stacking priority indicates a lower stacking priority. This embodiment of the present application is not limited to this.
[0150] In some embodiments, the management device determines the stacking device identifiers and stacking priorities corresponding to the multiple network devices based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices. For each of the multiple network devices, the identifier of the port of the network device used to connect to other network devices is determined as the stacking port identifier corresponding to the network device based on the topological connection relationship.
[0151] Based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices, the implementation process of determining the stacking device identifiers and stacking priorities corresponding to the multiple network devices may include the following steps (1)-(2).
[0152] (1) Based on the network layers at which the multiple network devices are located and the network layers at which the neighboring devices of each of the multiple network devices are located, determining the stacking roles corresponding to the multiple network devices, the stacking roles including a master device, a backup device or a slave device, the master device being used to manage the backup device and the slave device, the backup device being used to take over all services of the master device when the master device fails, and the slave device being used to forward service data.
[0153] Based on the network levels of the multiple network devices and the network levels of the neighboring devices of each of the multiple network devices, at least two first-category network devices are determined from the multiple network devices, and among the neighboring devices of the first-category network device, there is a neighboring device whose network level is higher than the network level of the multiple network devices, and two first-category network devices are selected from the at least two first-category network devices, and the stacking roles of the two first-category network devices are set to be a master device and a backup device respectively, and the stacking roles corresponding to the other network devices in the multiple network devices except the two first-category network devices are set to be slave devices.
[0154] In actual applications, a stack system must not only be connected internally according to the stack topology but also connect to downstream and upstream devices to meet networking requirements. Therefore, the administrator must connect the multiple network devices according to the stack topology and, based on networking requirements, connect the stack system to upstream and downstream devices. In this case, some of the multiple network devices may be connected to upstream and / or downstream devices. Therefore, the neighboring devices of this network device include not only other network devices in the stack system but also network devices outside the stack system.
[0155] In some embodiments, network devices outside the stacking system include network devices at a higher network level than the network level of the multiple network devices. For any one of the multiple network devices, if any of its neighboring devices has a higher network level than the network level of the multiple network devices, the network device is determined to be a first-category network device. Otherwise, the network device is not determined to be a first-category network device. After processing each of the multiple network devices in the same manner, the marked network devices are determined to be at least two first-category network devices among the multiple network devices.
[0156] It should be noted that the presence of a neighboring device of the network device having a higher network hierarchy level than the network hierarchy level of the multiple network devices means that the presence of a neighboring device of the network device having a higher network hierarchy level than the network hierarchy level of the multiple network devices. For ease of description, the subsequent description of the high and low network hierarchy levels will be described in terms of the high and low network hierarchy levels, but the two terms have the same meaning.
[0157] For example, the number of network devices is three, and the network layer at which these three network devices are located is the aggregation layer. The three network devices are network devices 1-3, respectively. The stacking topology of these three network devices is shown in Figure 8. In this stacking topology, the neighboring devices of network device 1 include network device 2 and network device 3, the neighboring devices of network device 2 include network device 1 and network device 3, and the neighboring devices of network device 3 include network device 1 and network device 2. Referring to Figure 9, the three network devices are all connected to upstream device 1, and the network layer at which upstream device 1 is located is the core layer, which is higher than the aggregation layer. Network device 1 is connected to downstream device 1, and network device 3 is connected to downstream device 3. In other words, the neighboring devices of network device 1 also include upstream device 1 and downstream device 1, the neighboring devices of network device 2 also include upstream device 1, and the neighboring devices of network device 3 also include upstream device 1 and downstream device 2. In this case, since there are network devices (i.e., upstream device 1) among the neighboring devices of network device 1, network device 2, and network device 3 whose network levels are higher than the network levels of the multiple network devices, network device 1, network device 2, and network device 3 are all first-class network devices.
[0158] It should be noted that the number of the multiple network devices may be equal to 2 or greater than 2. If the number of the multiple network devices is equal to 2, then the multiple network devices include network devices that play the stacking role of a master device and a backup device, and no network device that plays the stacking role of a slave device exists. If the number of the multiple network devices is greater than 2, then in addition to the network devices that play the stacking role of a master device and a backup device, the multiple network devices also include network devices that play the stacking role of a slave device.
[0159] In some embodiments, the management device can arbitrarily select two first-class network devices from the at least two first-class network devices and then set the stacking roles of the two first-class network devices as master and backup. In other embodiments, the management device stores the IP addresses of the multiple network devices. In this case, the management device selects two first-class network devices from the at least two first-class network devices based on the IP addresses of the at least two first-class network devices and then sets the stacking roles of the two first-class network devices as master and backup. For example, the at least two first-class network devices are sorted in descending order of their IP addresses, the first two first-class network devices in the sorted result are selected, and the stacking role corresponding to the network device with the larger IP address among the two selected first-class network devices is set as master, and the stacking role corresponding to the network device with the smaller IP address among the two selected first-class network devices is set as backup. Of course, in actual applications, the stacking role corresponding to the network device with the smaller IP address among the two selected first-class network devices can also be set as master, and the stacking role corresponding to the network device with the larger IP address among the two selected first-class network devices can be set as backup, but this embodiment of the present application is not limited to this.
[0160] In actual applications, before the management device generates stacking configuration parameters corresponding to the multiple network devices respectively in response to the stacking system assembly instruction and based on the topological connection relationship between the multiple network devices, the network levels at which the multiple network devices are located, and the network levels at which the neighboring devices of each of the multiple network devices are located, the management device can also obtain the network levels at which the multiple network devices are located and the network levels at which the neighboring devices of each of the multiple network devices are located in response to the network level configuration completion operation triggered by the administrator.
[0161] Optionally, the management device displays a network hierarchy configuration interface, which is used to configure the network hierarchy of the multiple network devices and the network hierarchy of the neighbor devices of each of the multiple network devices. The administrator configures the network hierarchy of each network device and the neighbor devices in the network hierarchy configuration interface, and then the administrator triggers a network hierarchy configuration completion operation. The management device obtains the network hierarchy of the multiple network devices and the network hierarchy of the neighbor devices of each of the multiple network devices in response to the network hierarchy configuration completion operation triggered by the administrator.
[0162] Based on the above description, the embodiments of the present application can determine the network device connected to the upstream device (i.e., the first type of network device) from the multiple network devices by using the network level at which each network device is located and the network level at which the neighboring devices of each network device are located. Of course, in actual applications, other methods can also be used to determine the network device connected to the upstream device from the multiple network devices. For example, the management device determines at least two first type of network devices from the multiple network devices based on the upstream device information of the neighboring devices of each network device in the multiple network devices, where the upstream device information indicates whether the neighboring device is an upstream device.
[0163] Optionally, for any one of the multiple network devices, if the upstream device information of a neighbor device of the network device indicates that the neighbor device is an upstream device, the network device is determined to be a first-category network device. Otherwise, the network device is not determined to be a first-category network device. Each of the multiple network devices is processed in the same manner to determine at least two first-category network devices.
[0164] Before the management device determines at least two first-category network devices from the multiple network devices based on the upstream device information of the neighbor device of each network device in the multiple network devices, the management device can also obtain the upstream device information of the neighbor device of each network device in the multiple network devices in response to the upstream device information configuration completion operation triggered by the administrator.
[0165] Optionally, the management device displays an upstream device information configuration interface, which is used to configure the upstream device information of the neighboring device of each network device in the multiple network devices. The administrator configures whether the neighboring device of each network device is an upstream device in the upstream device information configuration interface, and then the administrator triggers the upstream device information configuration completion operation. The management device responds to the upstream device information configuration completion operation triggered by the administrator and obtains the upstream device information of the neighboring device of each network device in the multiple network devices.
[0166] (2) Based on the stacking roles respectively corresponding to the multiple network devices, determine the stacking device identifiers and stacking priorities respectively corresponding to the multiple network devices.
[0167] The multiple network devices are sorted based on the stacking roles respectively corresponding to the multiple network devices to obtain a sorting result of the multiple network devices, and the stacking device identifiers and stacking priorities respectively corresponding to the multiple network devices are determined based on the sorting result.
[0168] In some embodiments, stacking roles include master, backup, or slave. In this case, the multiple network devices are sorted in the order of master, backup, and slave to obtain a sorting result for the multiple network devices. Starting with the first network device in the sorting result, stacking priorities are sequentially set for the multiple network devices in the sorting result in descending order of stacking priority. That is, the stacking priority of the master device is set to the highest priority in the stacking system, the stacking priority of the backup device is set lower than the stacking priority of the master device, and the stacking priority of the slave device is set lower than the stacking priority of the backup device.
[0169] Based on the above description, if the number of the multiple network devices is 2, then there are no slave devices in the multiple network devices; if the number of the multiple network devices is greater than 2, then there is at least one slave device in the multiple network devices. In other words, there may or may not be slave devices in the multiple network devices. In different situations, the implementation methods for sorting the multiple network devices in the order of master device, backup device, and slave device to obtain the sorting result of the multiple network devices vary, and will be described below.
[0170] If there are no slave devices among the multiple network devices, the multiple network devices can be directly sorted in the order of master device, backup device, to obtain a sorting result for the multiple network devices. If there is at least one slave device among the multiple network devices, the multiple network devices can be sorted in the order of master device, backup device, and slave device to obtain a sorting result for the multiple network devices. For the at least one slave device, the management device will further sort the at least one slave device in descending order of its IP address, or in descending order of its IP address.
[0171] Optionally, for any one of the multiple network devices, the order of the network device in the sorting result is determined as the stacking device identifier corresponding to the network device, and each network device is processed in the same manner to determine the stacking device identifier corresponding to each network device. Of course, in actual applications, for any one of the multiple network devices, a number can also be randomly assigned to the network device as the stacking device identifier corresponding to the network device, and each network device is processed in the same manner to determine the stacking device identifier corresponding to each network device, with the multiple network devices being assigned different numbers.
[0172] The above-mentioned determination of the stacking device identifiers and stacking priorities corresponding to the multiple network devices respectively according to the stacking roles corresponding to the multiple network devices is only one implementation method. In actual applications, the stacking device identifiers and stacking priorities corresponding to the multiple network devices respectively can also be determined by other methods, and the embodiments of the present application do not limit this.
[0173] Step 703: The management device sends the stack configuration parameters corresponding to each of the multiple network devices.
[0174] In some embodiments, the management device sends corresponding parameter configuration scripts to the multiple network devices to instruct the multiple network devices to perform configuration by executing corresponding parameter configuration scripts, where the parameter configuration scripts include the stack configuration parameters.
[0175] In some embodiments, the multiple network devices communicate with the management device via a network. In this case, the management device is an upstream device of the multiple network devices, or in other words, the management device communicates with the multiple network devices via the upstream devices of the multiple network devices. Furthermore, based on the above description, a first-class network device among the multiple network devices communicates directly with the upstream device, and network devices other than the first-class network device among the multiple network devices forward data via the first-class network device to achieve communication with the upstream device. That is, communication between the network devices other than the first-class network device and the management device depends on the first-class network device. However, network devices typically restart after being configured according to their corresponding stack configuration parameters to make the stack configuration parameters take effect. The parameter configuration and restart of network devices can affect data forwarding. In this case, if the first-class network device is in a configuration or restarting state, the first-class network device will be unable to forward data, thereby interrupting communication between the management device and the network devices other than the first-class network device among the multiple network devices, making it difficult for the network devices other than the first-class network device among the multiple network devices to receive the stack configuration parameters sent by the management device.
[0176] Based on this, in some embodiments, the management device determines configuration time indication information corresponding to each of the multiple network devices based on the stacking roles corresponding to the multiple network devices, where the configuration time indication information is used to indicate the time to start configuration based on the corresponding stacking configuration parameters. The management device sends the corresponding configuration time indication information to the multiple network devices so that the multiple network devices start configuration at the corresponding time.
[0177] Since the configuration time indication information is used to indicate the time when the corresponding network device starts to be configured, the configuration time indication information determined by the stacking role can ensure that the multiple network devices start to be configured at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0178] Because the configuration time indication information indicates the time at which the corresponding network device begins configuration, determining the configuration time indication information corresponding to each of the multiple network devices based on the stacking roles corresponding to each of the multiple network devices is actually determining the time at which each of the multiple network devices begins configuration based on the stacking roles corresponding to each of the multiple network devices. The following describes the implementation process for determining the time at which each of the multiple network devices begins configuration based on the stacking roles corresponding to each of the multiple network devices. For ease of description, the time at which a network device begins configuration based on the corresponding stacking configuration parameters is referred to as the stacking configuration start time.
[0179] In some embodiments, based on the stacking roles corresponding to the multiple network devices, the multiple network devices are sorted to obtain a sorting result of the multiple network devices. Based on the sorting result and the number of the multiple network devices, the configuration delay durations corresponding to the multiple network devices are determined. Based on the configuration delay durations corresponding to the multiple network devices, the stacking configuration start times corresponding to the multiple network devices are determined.
[0180] The detailed implementation method of sorting the multiple network devices based on the stacking roles corresponding to the multiple network devices to obtain the sorting results of the multiple network devices has been introduced above. For details, please refer to the relevant content above and will not be repeated here.
[0181] In some embodiments, the number of the multiple network devices is n. In this case, based on the sorting result and the number of the multiple network devices, the implementation process of determining the configuration delay durations corresponding to the multiple network devices respectively includes: setting i=n, multiplying i by the minimum delay duration to obtain the configuration delay duration corresponding to the n+1-ith network device in the sorting result; if i is greater than 1, setting i=i-1, and returning to the above step of multiplying i by the minimum delay duration to obtain the configuration delay duration corresponding to the n+1-ith network device in the sorting result, and finally obtaining the configuration delay duration corresponding to each network device in the multiple network devices.
[0182] The minimum delay time is set in advance. For example, the minimum delay time can be set to 1 minute. Of course, it can be adjusted according to different needs in different situations.
[0183] Since the sorting results of the multiple network devices are sorted in the order of master device, backup device, and slave device, the configuration delay duration of the master device determined by the above method is the longest among the multiple network devices. Since the neighboring devices of the master device include upstream devices, this can ensure normal communication between the network devices other than the first type of network devices in the multiple network devices and the management device, so that the network devices other than the first type of network devices in the multiple network devices can all receive the stacking configuration parameters sent by the management device in a timely manner.
[0184] The process of determining the stack configuration start time corresponding to each of the multiple network devices based on the configuration delay durations respectively corresponding to the multiple network devices includes: for each of the multiple network devices, determining the stack configuration start time of the network device as the sum of the time at which the stack configuration parameters corresponding to the network device are sent and the configuration delay duration. In this case, the stack configuration start time is directly carried in the configuration time indication information. After receiving the configuration time indication information, the network device can configure the network device based on the corresponding stack configuration parameters when the stack configuration start time carried in the configuration time indication information arrives.
[0185] In actual applications, for each of the multiple network devices, the configuration time indication information can also directly carry the configuration delay duration of the network device. In this case, the configuration time indication information indicates that after receiving the configuration time indication information, the network device shall determine the sum of the reception time of the configuration time indication information and the configuration delay duration as the stacking configuration start time of the network device.
[0186] In some embodiments, the parameter configuration script also includes the configuration time indication information. That is, for any one of the multiple network devices, the management device carries the stacking configuration parameters corresponding to the network device and the configuration time indication information corresponding to the network device in the same parameter configuration script and sends them to the network device. Of course, in other embodiments, the stacking configuration parameters corresponding to the network device and the configuration time indication information corresponding to the network device can also be sent to the network device separately. For example, the stacking configuration parameters corresponding to the network device are carried in the parameter configuration script, and the configuration time indication information corresponding to the network device is carried in the time configuration script. The management device sends these two scripts to the network device separately, and this embodiment of the present application is not limited to this.
[0187] In some embodiments, after the management device sends the corresponding stacking configuration parameters to the multiple network devices, the management device also times the stacking system assembly process from the moment when the stacking configuration parameters corresponding to the multiple network devices are sent. If the stacking system assembly result is obtained before the timing ends, it is determined whether the stacking system meets expectations based on the assembly result. If the stacking system meets expectations, it is determined that the stacking system assembly is completed.
[0188] In some embodiments, after the multiple network devices are configured according to their respective corresponding stacking configuration parameters and form a stacking system, the master device in the stacking system sends the stacking system formation result to the management device, and the management device can then obtain the stacking system formation result.
[0189] Optionally, if the stacking system establishment result is not received before the timing time expires, the step of generating stacking configuration parameters corresponding to the plurality of network devices based on the stacking topology of the plurality of network devices is re-executed.
[0190] It should be noted that, when the management device serves as the upstream device of the multiple network devices and establishes a separate communication link with at least one of the multiple network devices, the timing duration of the management device is the sum of the configuration delay duration of the master device and the first timing duration. The first timing duration is set in advance. For example, the first timing duration can be set to 10 minutes and can be adjusted according to different needs in different situations. When the multiple network devices respectively establish separate communication links with the management device, since the multiple network devices do not need to delay when configuring, the timing duration of the management device can be directly determined as the first timing duration.
[0191] In some embodiments, the assembly result includes a device identifier of each member device in the stacking system. If the member device in the stacking system is the same as the multiple network devices, the stacking system is determined to be consistent with expectations; otherwise, the stacking system is determined to be inconsistent with expectations. Alternatively, the assembly result also includes a stacking role of each member device in the stacking system. If the member device in the stacking system is the same as the multiple network devices, and the stacking role of each member device is consistent with the stacking role of the corresponding network device, the stacking system is determined to be consistent with expectations; otherwise, the stacking system is determined to be inconsistent with expectations.
[0192] Optionally, the management device can also determine at least one faulty device among the multiple network devices when the stacking system does not meet expectations, regenerate the stacking configuration parameters corresponding to the at least one faulty device, and send the corresponding regenerated stacking configuration parameters to the at least one faulty device, so that the at least one faulty device is reconfigured according to the corresponding regenerated stacking configuration parameters and joins the stacking system.
[0193] If the number of member devices in the stacking system is less than the number of the plurality of network devices, a network device that does not belong to the stacking system among the plurality of network devices is determined as the at least one faulty device. That is, if the number of member devices is less than the number of the plurality of network devices, it indicates that a network device that has not yet joined the stacking system exists among the plurality of network devices. Therefore, the network device that does not belong to the stacking system among the plurality of network devices can be determined as the at least one faulty device.
[0194] Optionally, the implementation process of regenerating the stacking configuration parameters corresponding to the at least one faulty device includes: for each faulty device in the at least one faulty device, determining the identifier of the port in the faulty device connected to the multiple network devices as the stacking port identifier corresponding to the faulty device; setting the stacking priority corresponding to the faulty device to the lowest priority in the stacking system; and setting the stacking device identifier corresponding to the faulty device to any identifier except an occupied identifier, the occupied identifier including the stacking device identifier of a member device in the stacking system and the stacking device identifiers in the stacking configuration parameters corresponding to other faulty devices.
[0195] That is, the stacking device ID of the faulty device only needs to be different from the stacking device IDs of the member devices in the stacking system and other faulty devices, and the stacking priority corresponding to the faulty device is the lowest priority in the stacking system.
[0196] It should be noted that the management device is capable of sending the corresponding regenerated parameter configuration script to the at least one faulty device to instruct the at least one faulty device to be configured by executing the corresponding regenerated parameter configuration script, and the regenerated parameter configuration script includes the regenerated stacking configuration parameters.
[0197] In some embodiments, if the number of member devices is less than the number of the plurality of network devices, the management device can further display first prompt information, where the first prompt information indicates that there is a faulty network device among the plurality of network devices that has not yet joined the stacking system.
[0198] If there is a faulty network device among the multiple network devices that has not yet joined the stacking system, it indicates that there may be a problem with the physical link of the faulty device. Therefore, in some embodiments, the first prompt information is also used to instruct the administrator to check the physical link of the faulty device.
[0199] Step 704: The network device receives the stacking configuration parameters corresponding to the network device sent by the management device, configures itself according to the stacking configuration parameters, and negotiates with other network devices in the multiple network devices to form a stacking system. The network device is one of the multiple network devices used to form a stacking system.
[0200] In some embodiments, the network device receives a parameter configuration script corresponding to the network device sent by the management device, the parameter configuration script carrying stack configuration parameters corresponding to the network device. In this case, the network device loads and executes the parameter configuration script to complete the configuration of the network device.
[0201] In actual applications, before the network device is configured according to the stacking configuration parameters, the network device also receives the configuration time indication information corresponding to the network device sent by the management device. The configuration time indication information is used to indicate the stacking configuration start time of the network device. When the stacking configuration start time arrives, the network device executes the steps of configuring according to the stacking configuration parameters.
[0202] In some embodiments, the configuration time indication information carries the configuration delay duration of the network device. In this case, after receiving the configuration time indication information, the network device determines the sum of the reception time of the configuration time indication information and the configuration delay duration as the stacking configuration start time of the network device, and then when the stacking configuration start time arrives, executes the steps of configuring according to the stacking configuration parameters.
[0203] In some embodiments, the network device is a faulty device among multiple network devices. In this case, the network device receives the stacking configuration parameters regenerated by the management device for the network device, and then reconfigures itself according to the regenerated stacking configuration parameters and joins the stacking system.
[0204] Optionally, the network device receives a regenerated parameter configuration script corresponding to the network device sent by the management device, where the regenerated script carries the stack configuration parameters regenerated by the network device. In this case, the network device loads and executes the regenerated parameter configuration script to complete the configuration of the network device.
[0205] In actual applications, after the multiple network devices are configured according to their respective corresponding stacking configuration parameters and form a stacking system, if the network device is the main device in the stacking system, in this case, the network device also sends the formation result of the stacking system to the management device, and then the management device can obtain the formation result of the stacking system.
[0206] The management device automatically determines and issues stacking configuration parameters based on the topological connection relationship between the multiple network devices, the network levels at which the multiple network devices are located, and the network levels at which the neighboring devices of each of the multiple network devices are located. The stacking configuration parameters are automatically configured by the network devices without the need for manual settings by technicians, thereby effectively simplifying the steps of establishing a stacking system, improving the efficiency of establishing a stacking system, and greatly reducing labor costs. In addition, the embodiment of the present application also takes into account the connectivity issues of the multiple network devices. The configuration time indication information determined by the stacking role can ensure that the multiple network devices start configuration at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0207] Figure 10 is a flow chart of a second method for building a stacking system according to an embodiment of the present application. Optionally, the method shown in Figure 10 is applied to the implementation environment shown in Figure 5. Referring to Figure 10, the method includes the following steps.
[0208] Step 1001: A network device determines stacking configuration parameters corresponding to the network device by interacting with at least one neighboring device. The network device is one of multiple network devices used to form a stacking system, and the at least one neighboring device is at least one network device connected to the network device in a topological connection relationship between the multiple network devices.
[0209] In some embodiments, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port in the network device used for stacking, and the stack device identifier is used to identify the network device in the stacking system.
[0210] The stack priority is a property of a member device in the stack system. It is used to determine the stack role of each member device in the stack system during subsequent stack negotiation. The stack identifier (ID), also known as the slot number, is unique to each member device in the stack system.
[0211] In some embodiments, the stacking priority of each member device in the stacking system is represented by a number. The smaller the number corresponding to the stacking priority, the higher the stacking priority, and the larger the number corresponding to the stacking priority, the lower the stacking priority. Of course, in other embodiments, the larger the number corresponding to the stacking priority, the higher the stacking priority, and the smaller the number corresponding to the stacking priority, the lower the stacking priority. The embodiments of the present application do not limit this. For ease of description, when referring to the stacking priority later, it is based on the principle that the smaller the number corresponding to the stacking priority, the higher the stacking priority, and the larger the number corresponding to the stacking priority, the lower the stacking priority.
[0212] In some embodiments, the network device determines the stacking priority corresponding to the network device and the stacking device identifier corresponding to the network device by interacting with the at least one neighboring device, and determines the identifier of at least one first-class port included in the network device as the stacking port identifier corresponding to the network device, where the at least one first-class port refers to a port used to connect to the at least one neighboring device.
[0213] In actual applications, the stacking system must not only be connected according to the stacking topology, but the stacking system must also be connected to downstream and upstream devices to meet networking requirements. Therefore, the administrator needs to connect the multiple network devices according to the stacking topology. After the stack is established, the administrator also needs to connect the stacking system to upstream and downstream devices according to networking requirements. In this case, the administrator selects a network device connected to the upstream device from the multiple network devices, so that the selected network device begins to exchange data with at least one neighboring device to determine its corresponding stacking configuration parameters. For ease of description, the network device selected by the administrator will be referred to as the primary device, and the network devices other than the primary device in the multiple network devices will be referred to as secondary devices.
[0214] Because the master device can exchange data with its neighboring devices, and after receiving data from the master device, the neighboring devices of the master device can also exchange data with their own neighboring devices, data exchange starts with the master device and is gradually passed down, so that each of the multiple network devices exchanges data with its own neighboring devices. The implementation method of the master device determining the corresponding stacking priority of the network device by exchanging data with at least one neighboring device is different from the implementation method of the secondary device determining the corresponding stacking priority of the network device by exchanging data with at least one neighboring device, and they will be described below.
[0215] In the first scenario, the network device is a master device. The network device sets a corresponding port priority for at least one first-class port, sends the port priority corresponding to the first-class port to which it is connected to the at least one neighboring device, and receives the port priority corresponding to the second-class port included in the at least one neighboring device, which is the port on the neighboring device used to connect to the network device. If the port priority corresponding to the second-class port included in the at least one neighboring device is lower than the port priority corresponding to the first-class port to which it is connected, the stacking priority corresponding to the network device is determined based on the port priority corresponding to the at least one first-class port. Otherwise, the stacking system establishment is determined to have failed.
[0216] It should be noted that the stacking topology of the multiple network devices includes multiple topologies, including chain topologies, ring topologies, and the like. If the stacking topology of the multiple network devices is a chain topology, the administrator determines any one of the multiple network devices located at both ends of the chain as the master device. At this time, in the stacking topology of the multiple network devices, the master device has only one neighboring device. For example, please refer to Figure 11, which is a schematic diagram of a chain topology provided in an embodiment of the present application. The chain topology includes four network devices, namely device 1-device 4, and the administrator can determine device 1 as the master device. If the stacking topology of the multiple network devices is a ring topology, the administrator determines any one of the multiple network devices as the master device. At this time, in the stacking topology of the multiple network devices, the master device has two neighboring devices. For example, please refer to Figure 12, which is a schematic diagram of a ring topology provided in an embodiment of the present application. The ring topology includes four network devices, namely device 1-device 4, and the administrator can determine device 1 as the master device.
[0217] Optionally, if the network device has only one neighbor device, that is, the at least one neighbor device includes the first neighbor device, in this case, the network device sets the port priority corresponding to the first type port connected to the first neighbor device to the highest priority in the stacking system.
[0218] For example, the number corresponding to the highest priority in the stacking system is 10. In this case, the network device sets the port priority corresponding to the first type port connected to the first neighbor device to 10.
[0219] Optionally, if the network device has two neighboring devices, that is, the at least one neighboring device includes a second neighboring device in addition to the first neighboring device, in this case, the network device further sets the port priority corresponding to the first-class port connected to the second neighboring device to the lowest priority in the stacking system.
[0220] For example, the number corresponding to the lowest priority in the stacking system is 100. In this case, the network device sets the port priority corresponding to the first type port connected to the first neighbor device to 100.
[0221] In some embodiments, the network device stores a maximum stacking number, which is an upper limit on the number of member devices in the stacking system. In this case, the network device can determine the number corresponding to the lowest priority based on the step size, the number corresponding to the highest priority in the stacking system, and the maximum stacking number.
[0222] The step length is set in advance, for example, the step length can be set to 5, and can be adjusted according to different requirements in different situations.
[0223] For example, the number corresponding to the lowest priority is equal to 2m*n+a, where m is the step size, n is the maximum stack size, and a is the number corresponding to the highest priority in the stacking system. For example, if the step size is 5, the maximum stack size is 9, and the number corresponding to the highest priority in the stacking system is 10, the number corresponding to the lowest priority is 2*5*9+10=100.
[0224] In some embodiments, each port of the network device has a corresponding port number. When the main device includes two neighboring devices, it is possible to determine which of the two neighboring devices is the first neighboring device and which is the second neighboring device based on the port numbers corresponding to the first type ports to which the two neighboring devices are respectively connected.
[0225] Optionally, the network device may determine the neighbor device with the largest port number of the first-class port connected to the two neighbor devices as the first neighbor device, and determine the other neighbor device of the two neighbor devices as the second neighbor device. Of course, in actual applications, the first neighbor device and the second neighbor device of the two neighbor devices may also be determined in other ways, such as determining the neighbor device with the smallest port number of the first-class port connected to the two neighbor devices as the first neighbor device, or determining any one of the two neighbor devices as the first neighbor device and determining the other of the two neighbor devices as the second neighbor device. This embodiment of the present application is not limited to this.
[0226] In practical applications, to ensure stack system stability, when a network device has a sufficient number of service ports, multiple stack cables are typically connected between the network device and its neighboring devices. This allows for increased bandwidth and inter-link backup, improving stack system stability. Therefore, for any neighboring device of the network device, the first-class port connected to the neighboring device includes at least one physical port, and the port number corresponding to the first-class port can be the sum of the numbers of the at least one physical port.
[0227] To sum up, when the main device has one neighbor device, the port priority corresponding to the first-class port connected to the neighbor device can be set to the highest priority in the stacking system; when the main device has two neighbor devices, the port priority corresponding to the first-class port connected to one of the two neighbor devices can be set to the highest priority in the stacking system, and the port priority corresponding to the first-class port connected to the other of the two neighbor devices can be set to the lowest priority in the stacking system.
[0228] In some embodiments, before determining the stacking priority corresponding to the network device by exchanging data with at least one neighboring device, the network device further receives a stacking system establishment instruction triggered by an administrator and, in response to the stacking system establishment instruction, executes the step of determining the stacking priority corresponding to the network device by exchanging data with at least one neighboring device. In other words, the administrator selects a network device connected to an upstream device from the multiple network devices and then triggers the stacking system establishment instruction to instruct the network device to begin determining its own stacking configuration parameters by exchanging data with at least one neighboring device.
[0229] Optionally, the network device includes an automatic stacking button, so that the administrator triggers the stacking system formation instruction by pressing the automatic stacking button. Of course, in actual applications, the administrator can also trigger the stacking system formation instruction in other ways, and the embodiments of the present application are not limited to this.
[0230] In a second scenario, the network device is a secondary device. The at least one neighbor device includes a first neighbor device. The network device receives a port priority corresponding to a second-class port included in the first neighbor device and sent by the first neighbor device, where the second-class port is a port for connection to the network device. Based on the port priority corresponding to the second-class port included in the first neighbor device, the network device determines a port priority corresponding to a first-class port included in the network device connected to the first neighbor device. Based on the port priority corresponding to the first-class port connected to the first neighbor device, the network device determines a stacking priority corresponding to the network device.
[0231] The secondary devices include intermediate devices and the last device. The last device is the device among the multiple network devices that determines its stack configuration parameters last. The intermediate device is the device other than the last device and the primary device. The intermediate device has two neighboring devices. However, for the last device, the number of neighboring devices varies depending on the stack topology. That is, if the topology is a chain, the last device has one neighbor; if the topology is a ring, the last device has two neighbors. Regardless of whether the network device is an intermediate device or the last device, it has at least one neighboring device.
[0232] Optionally, the network device adds the number corresponding to the port priority corresponding to the second type port included in the first neighboring device to the step size to obtain the number corresponding to the port priority corresponding to the first type port included in the network device connected to the first neighboring device.
[0233] In some embodiments, after determining the port priority corresponding to the first type port connected to the first neighboring device, the network device further sends the port priority corresponding to the first type port connected to the first neighboring device to the first neighboring device.
[0234] When the network device is an intermediate device, or the last device with two neighboring devices, the implementation method of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first type port to which the first neighboring device is connected is different from the implementation method of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first type port to which the first neighboring device is connected when the network device is the last device with one neighboring device. They will be introduced separately below.
[0235] It should be noted that before the network device determines the port priority corresponding to the first-class port to which the first neighbor device is connected as the stacking priority corresponding to the network device, the network device performs neighbor discovery using relevant technologies to determine the number of its neighbor devices. For example, for any one of the multiple network devices, if the number of neighbor devices is one and the network device has not received a stacking system formation instruction, the network device is the last device with one neighbor device. If the number of network devices is two, the network device is an intermediate device or the last device with two neighbor devices.
[0236] If the network device is the last device with one neighbor device, the network device determines the port priority corresponding to the first type port to which the first neighbor device is connected as the stacking priority corresponding to the network device.
[0237] If the network device is an intermediate device, or the last device with two neighbor devices, the at least one neighbor device also includes a second neighbor device. In this case, the network device determines the port priority corresponding to the first-class port connected to the second neighbor device included in the network device, and determines the stacking priority corresponding to the network device based on the port priority corresponding to the first-class port connected to the first neighbor device and the port priority corresponding to the first-class port connected to the second neighbor device.
[0238] If the port priority corresponding to the second type port included in the first neighbor device received by the network device from the first neighbor device is not the lowest priority in the stack system, the network device determines itself as an intermediate device, and the network device determines the port priority corresponding to the first type port to which the second neighbor device is connected based on the port priority corresponding to the second type port included in the first neighbor device.
[0239] For example, the network device adds the number corresponding to the port priority corresponding to the second type port included in the first neighboring device to 2 times the step size to obtain the number corresponding to the port priority corresponding to the first type port connected to the second neighboring device.
[0240] If the network device receives from the first neighbor device a signal indicating that the port priority corresponding to the second type port included in the first neighbor device is the lowest priority in the stack system, the network device determines that it is the last device with two neighbor devices. In this case, the network device receives from the second neighbor device a signal indicating that the second type port included in the second neighbor device is the lowest priority in the stack system, and determines, based on the port priority corresponding to the second type port included in the second neighbor device, the port priority corresponding to the first type port connected to the second neighbor device.
[0241] Optionally, the network device adds the number corresponding to the port priority corresponding to the second type port included in the second neighboring device to the step size to obtain the number corresponding to the port priority corresponding to the first type port connected to the second neighboring device.
[0242] In some embodiments, regardless of whether the network device is an intermediate device or the last device with two neighboring devices, after determining the port priority corresponding to the first class port connected to the second neighboring device included in the network device, the network device can also send the port priority corresponding to the first class port connected to the second neighboring device to the second neighboring device. For the second neighboring device corresponding to any secondary device, if the second neighboring device is an intermediate device, then after receiving the port priority corresponding to the first class port connected to the second neighboring device sent by the secondary device, the second neighboring device can use the secondary device as its own first neighboring device, and the second neighboring device uses the port priority corresponding to the first class port connected to the second neighboring device sent by the secondary device as the port priority corresponding to the second class port included in the first neighboring device sent by its own first neighboring device, and perform the subsequent steps of determining the port priority corresponding to the first class port connected to the first neighboring device included in the network device based on the port priority corresponding to the second class port included in the first neighboring device, and determining the stacking priority corresponding to the network device based on the port priority corresponding to the first class port connected to the first neighboring device.
[0243] In some embodiments, the network device uses the port priority corresponding to the first class port connected to the first neighbor device and the port priority corresponding to the first class port connected to the second neighbor device, and the port priority with the lowest priority as the stacking priority corresponding to the network device. Of course, in actual applications, the stacking priority corresponding to the network device can also be determined in other ways. For example, the port priority corresponding to the first class port connected to the first neighbor device and the port priority corresponding to the first class port connected to the second neighbor device are used as the stacking priority corresponding to the network device. For another example, the port priority corresponding to the first class port connected to the first neighbor device and the port priority corresponding to the first class port connected to the second neighbor device, any one of the port priorities is used as the stacking priority corresponding to the network device, and the embodiments of the present application do not limit this.
[0244] It should be noted that if the network device is an intermediate device, the network device can also send the port priority corresponding to the first class port connected to the second neighbor device to the second neighbor device after determining the port priority corresponding to the first class port to which the second neighbor device is connected, and then receive the port priority corresponding to the second class port included in the second neighbor device sent by the second neighbor device. If the port priority corresponding to the second class port included in the second neighbor device is lower than the port priority corresponding to the first class port connected to the second neighbor device, the above-mentioned execution is based on the port priority corresponding to the first class port connected to the first neighbor device and the port priority corresponding to the first class port connected to the second neighbor device, to determine the stacking priority corresponding to the network device.
[0245] In actual applications, a network device performs neighbor discovery by periodically sending Link Layer Discovery Protocol (LLDP) messages to its neighbor devices. In this case, the network device can exchange data with at least one neighbor device through LLDP messages to determine the stacking configuration parameters corresponding to the network device.
[0246] Optionally, the LLDP message sent by the network device to the at least one neighboring device carries the port priority corresponding to the first type port to which the corresponding neighboring device is connected.
[0247] In LLDP messages, data is encapsulated in a type / length / value (TLV) format. In some embodiments, the LLDP message sent by the network device includes an extended TLV that carries the port priority corresponding to the first-class port to which the corresponding neighboring device is connected. The extended TLV in the LLDP message is defined as "AutoStack," with a length of 1 byte and a value that is a number corresponding to the port priority corresponding to the first-class port to which the corresponding neighboring device is connected.
[0248] In some embodiments, the primary device and the secondary device determine the stacking device identifier corresponding to the network device in different implementations, which will be introduced separately below.
[0249] In the first case, the network device is a master device and directly sets its corresponding stacking device ID to 1.
[0250] Optionally, after determining the stacking device identifier corresponding to itself, the network device further sends its own stacking device identifier to at least one neighboring device of the network device.
[0251] In the second case, the network device is a secondary device. If the port priority corresponding to the second type port included in the first neighbor device sent by the first neighbor device is not the lowest priority in the stacking system, the network device determines its own corresponding stacking device identifier based on the port priority corresponding to the second type port included in the first neighbor device sent by the first neighbor device.
[0252] If the port priority corresponding to the second type port included in the first neighbor device sent by the first neighbor device is the lowest priority in the stacking system, the network device determines the value of the stacking device identifier corresponding to itself as the maximum stacking quantity.
[0253] Optionally, the network device divides a number corresponding to the port priority corresponding to the second-category port included in the first neighbor device by 2 times the step length and then adds 1 to obtain the stacking device identifier corresponding to the network device.
[0254] In other embodiments, a network device receives a stacking device identifier corresponding to a first neighbor device sent by a first neighbor device. If the value of the stacking device identifier corresponding to the first neighbor device sent by the first neighbor device is less than the maximum stacking quantity, the network device adds 1 to the value of the stacking device identifier corresponding to the first neighbor device to obtain the stacking device identifier corresponding to the network device.
[0255] Optionally, in the case that the network device is an intermediate device, after determining its corresponding stacking device identifier, the network device further sends its own stacking device identifier to the second neighboring device.
[0256] It should be noted that, when the network device sends the stacking device identifier corresponding to the network device to the neighboring device, the network device sends a corresponding LLDP message to the at least one neighboring device. The LLDP message may also carry the stacking device identifier corresponding to the network device.
[0257] In actual applications, the network device also includes a stacking indicator light, the display status of which is used to indicate the current stacking status of the network device, wherein the display status includes a first display status and a second display status, and the stacking status indicated by the first display status is different from the stacking status indicated by the second display status.
[0258] In some embodiments, the stacking situation includes at least one of the following: the network device is determining its own corresponding stacking configuration parameters, the network device is being configured according to its own corresponding stacking configuration parameters, the network device is negotiating stacking with other network devices among the multiple network devices, the stacking system is completed, and the stacking system fails to be established.
[0259] Step 1002: The network device is configured according to the stack configuration parameters corresponding to the network device, and stack negotiation is performed with other network devices in the plurality of network devices to form a stack system.
[0260] It should be noted that when a stacking system is assembled using the method for assembling a stacking system provided in an embodiment of the present application, multiple network devices can be started with empty configurations, that is, the configurations of the multiple network devices are all set to empty, so as to avoid the problem of the original configuration becoming invalid due to changes in the stacking ID.
[0261] Next, the method for assembling a stacking system provided in the embodiment of the present application will be introduced again by giving examples.
[0262] Refer to Figure 12, which shows four network devices, Device 1 through Device 4. Each device has ports 1 through 6, and the stacking topology of these four devices is a ring. Device 1's neighbors are Device 2 and Device 4, Device 2's neighbors are Device 1 and Device 3, Device 3's neighbors are Device 2 and Device 4, and Device 4's neighbors are Device 3 and Device 1. Each network device is connected to its neighbors via two stacking cables. The administrator selects Device 1 as the master device and triggers the stacking system formation command by pressing the automatic stacking button. Device 1 sets the corresponding port priority for the first-class ports connected to Device 2 and the first-class ports connected to Device 4. Since the first-class ports connected to Device 2 include Port 1 and Port 2, and the first-class ports connected to Device 4 include Physical Port 4 and Physical Port 5, the port number corresponding to the first-class ports connected to Device 2 is 1 + 2 = 3, and the port number corresponding to the first-class ports connected to Device 4 is 4 + 5 = 9. Because the port number corresponding to the first-class port connected to device 2 is the smallest, device 2 is determined as the first neighbor device. The port priority corresponding to the first-class port connected to device 2 on device 1 is set to 10, the highest priority in the stack system. The port priority corresponding to the first-class port connected to device 4 on device 1 is set to 100, the highest priority in the stack system. Device 1 sends the port priority corresponding to the first-class port connected to device 2 to device 2 and sends the port priority corresponding to the first-class port connected to device 4 to device 4.
[0263] Device 2 receives the port priority (i.e., 10) corresponding to the first-class port connected to device 2, sent by device 1, and sets the port priority corresponding to the first-class port connected to device 1 (i.e., physical port 4 and physical port 5 of device 2) on device 2 to 15. It also sets the port priority corresponding to the first-class port connected to device 3 (i.e., physical port 1 and physical port 2 of device 2) to 20. Device 2 then sends the port priority (i.e., 15) corresponding to the first-class port connected to device 1 to device 1, and then sends the port priority (i.e., 20) corresponding to the first-class port connected to device 3 to device 3. Since device 2 can also receive the stacking device identifier (i.e., 1) corresponding to device 1, device 2 determines that its own stacking device identifier is 2 based on the stacking device identifier corresponding to device 1, and then sends the stacking device identifier corresponding to device 2 to device 3.
[0264] Device 4 receives the port priority (i.e., 100) corresponding to the first-class port connected to device 4, sent by device 1, and sets the port priority corresponding to the first-class port connected to device 1 (i.e., physical port 1 and physical port 2 of device 4) on device 4 to 105. Device 4 then sends the port priority (i.e., 105) corresponding to the first-class port connected to device 1 to device 1. Because the port priority (i.e., 105) corresponding to the first-class port connected to device 4, received by device 4 from device 1, is the lowest priority in the stack system, device 4 determines that it is the last device with two neighboring devices.
[0265] At this point, device 1 receives the port priority corresponding to the first-class port connected to device 1 in device 2 (i.e., 15), and the port priority corresponding to the first-class port connected to device 1 in device 4 (i.e., 105), sent by device 2. Since the port priority corresponding to the first-class port connected to device 1 in device 2 is lower than the port priority corresponding to the first-class port connected to device 2 in device 1, and the port priority corresponding to the first-class port connected to device 1 in device 4 is lower than the port priority corresponding to the first-class port connected to device 4 in device 1, the number corresponding to the stacking priority of device 1 is determined to be 10, and the identifiers of the first-class ports connected to devices 2 and 4 in device 1 (i.e., physical ports 1, 2, 4, and 5 in device 1) are determined as the stacking port identifiers corresponding to device 1. Device 1 also determines its own stacking device identifier to be 1, and sends its stacking device identifier to device 2.
[0266] For device 3, it receives the port priority (i.e., 20) corresponding to the first-class ports (physical port 1 and physical port 2) of device 2 to which device 3 is connected, sent by device 2. Device 3 sets the port priority corresponding to the first-class ports (i.e., physical port 4 and physical port 5 of device 3) of device 3 to which device 2 is connected, and sets the port priority corresponding to the first-class ports (i.e., physical port 1 and physical port 2 of device 3) to 30. Device 3 sends the port priority (i.e., 25) corresponding to the first-class ports to which device 2 is connected to device 2, and sends the port priority (i.e., 30) corresponding to the first-class ports to which device 4 is connected to device 4. Device 3 also receives the stacking device identifier (i.e., 2) corresponding to device 2. Based on the stacking device identifier corresponding to device 1, device 2 determines that its own stacking device identifier is 3.
[0267] At this time, device 2 receives the port priority corresponding to the first-class port connected to device 2 in device 3 sent by device 3 (i.e., 25). Since the port priority corresponding to the first-class port connected to device 2 in device 3 is lower than the port priority corresponding to the first-class port connected to device 3 in device 2, the number corresponding to the stacking priority corresponding to device 2 is determined to be 15, and the identifier of the first-class port connected to device 1 and device 3 in device 2 (i.e., physical ports 1, 2, 4, and 5 in device 2) is determined as the stacking port identifier corresponding to device 2.
[0268] Device 4 receives the port priority (i.e., 30) corresponding to the first-class port connected to device 4 in device 3, sent by device 3. Device 4 sets the port priority (i.e., 35) corresponding to the first-class port connected to device 3 in device 4, and determines the number corresponding to the stacking priority of device 4 to be 35. Device 4 can also send the port priority (i.e., 35) corresponding to the first-class port connected to device 3 in device 4 to device 3. The identifiers of the first-class ports connected to device 1 and device 3 in device 4 (i.e., physical ports 1, 2, 4, and 5 in device 4) are determined as the stacking port identifiers corresponding to device 4. Since device 4 can also receive the stacking device identifier (i.e., 3) corresponding to device 3, device 2 determines its own stacking device identifier to be 4 based on the stacking device identifier corresponding to device 1.
[0269] Device 3 receives the port priority (i.e., 35) corresponding to the first-class port connected to device 3 in device 4, sent by device 4. Because the port priority corresponding to the first-class port connected to device 3 in device 4 is lower than the port priority corresponding to the first-class port connected to device 3 in device 2, the number corresponding to the stacking priority of device 3 is determined to be 25, and the identifiers of the first-class ports connected to device 2 and device 4 in device 3 (i.e., physical ports 1, 2, 4, and 5 in device 3) are determined as the stacking port identifiers corresponding to device 3.
[0270] Since each network device that makes up the stack system can automatically determine and configure stack configuration parameters by interacting with its neighboring devices, no manual settings by technicians are required. This effectively simplifies the steps of setting up the stack system, improves the efficiency of stacking the system, and greatly reduces labor costs.
[0271] Figure 13 is a schematic diagram of the structure of an apparatus for establishing a stacking system provided in an embodiment of the present application. The apparatus for establishing a stacking system can be implemented by software, hardware, or a combination of both to serve as part or all of the aforementioned management device. Referring to Figure 13 , the apparatus includes: a first receiving module 1301, a first generating module 1302, and a first sending module 1303.
[0272] The first receiving module 1301 is configured to receive a stack system building instruction triggered by an administrator, the stack system building instruction including device identifiers of multiple network devices used to build the stack system. Detailed implementation procedures are described in detail in the above embodiments and will not be repeated here.
[0273] The first generation module 1302 is configured to generate, in response to a stack system formation instruction, stack configuration parameters corresponding to each of the plurality of network devices based on the topological connection relationships between the plurality of network devices, the network layers at which the plurality of network devices are located, and the network layers at which the neighboring devices of each of the plurality of network devices are located, wherein the network layers include an access layer, an aggregation layer, or a core layer. The stack configuration parameters are used to guide the corresponding network devices to perform the configuration required to form the stack system. The detailed implementation process is referred to the corresponding content in the above-mentioned embodiments and is not repeated here.
[0274] The first sending module 1303 is configured to send corresponding stacking configuration parameters to multiple network devices, so that the multiple network devices are configured according to the corresponding stacking configuration parameters and form a stacking system. The detailed implementation process is referred to the corresponding content of the above embodiments and will not be repeated here.
[0275] Optionally, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port used for stacking in a network device, and the stack device identifier is used to identify a network device in a stacking system.
[0276] Optionally, the first generating module 1302 is specifically configured to:
[0277] Determining stacking device identifiers and stacking priorities corresponding to the multiple network devices respectively based on the network layers at which the multiple network devices are located and the network layers at which neighboring devices of each of the multiple network devices are located;
[0278] For each of the multiple network devices, according to the topological connection relationship, an identifier of a port of the network device used for connecting with other network devices is determined as a stack port identifier corresponding to the network device.
[0279] Optionally, the first generating module 1302 is specifically configured to:
[0280] Determining stacking roles corresponding to the multiple network devices based on the network layers of the multiple network devices and the network layers of neighboring devices of each of the multiple network devices, the stacking roles including a master device, a backup device, or a slave device. The master device is used to manage the backup device and the slave device. The backup device is used to take over all services of the master device when the master device fails. The slave device is used to forward service data.
[0281] Based on stacking roles respectively corresponding to the plurality of network devices, stacking device identifiers and stacking priorities respectively corresponding to the plurality of network devices are determined.
[0282] Optionally, the device further comprises:
[0283] A first determining module is configured to determine configuration time indication information corresponding to each of the plurality of network devices based on stacking roles corresponding to the plurality of network devices, the configuration time indication information being used to indicate a time to start configuration based on corresponding stacking configuration parameters;
[0284] The second sending module is used to send corresponding configuration time indication information to multiple network devices, so that the multiple network devices start configuration according to the corresponding time.
[0285] Optionally, the first sending module 1303 is specifically configured to:
[0286] Sending respective corresponding parameter configuration scripts to a plurality of network devices so that the plurality of network devices are configured by executing the respective corresponding parameter configuration scripts, wherein the parameter configuration scripts include stacking configuration parameters.
[0287] Optionally, the device further comprises:
[0288] A timing module, configured to time the stacking system building process starting from the moment when stacking configuration parameters corresponding to the plurality of network devices are sent;
[0289] A second determining module is configured to, if a stack system establishment result is obtained before the timing time expires, determine whether the stack system meets expectations based on the establishment result;
[0290] The third determining module is configured to determine that the stacking system is completed if the stacking system meets expectations.
[0291] Optionally, the device further comprises:
[0292] a fourth determining module, configured to determine at least one faulty device among the plurality of network devices if the stacking system does not meet expectations;
[0293] A second generating module is used to regenerate stack configuration parameters corresponding to at least one faulty device;
[0294] The third sending module is configured to send the corresponding regenerated stacking configuration parameters to at least one faulty device, so that the at least one faulty device is reconfigured according to the corresponding regenerated stacking configuration parameters and joins the stacking system.
[0295] Optionally, the device further comprises:
[0296] A second receiving module is configured to receive registration information respectively sent by a plurality of network devices, where the registration information includes information describing neighbor devices of the network device;
[0297] The fifth determining module is configured to determine a topological connection relationship between the plurality of network devices based on the registration information respectively sent by the plurality of network devices.
[0298] In an embodiment of the present application, the management device automatically determines and issues stacking configuration parameters based on the topological connection relationship between the multiple network devices, the network level at which the multiple network devices are located, and the network level at which the neighboring devices of each of the multiple network devices are located. The stacking configuration parameters are automatically configured by the network devices without the need for manual settings by technical personnel, thereby effectively simplifying the steps of establishing a stacking system, while improving the efficiency of establishing a stacking system and greatly reducing labor costs. In addition, the embodiment of the present application also takes into account the connectivity issues of the multiple network devices. The configuration time indication information determined by the stacking role can ensure that the multiple network devices start configuration at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0299] It should be noted that the apparatus for assembling a stacking system provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the assembly of the stacking system. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for assembling a stacking system provided in the above embodiment and the method embodiment for assembling a stacking system are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0300] FIG14 is a schematic diagram of the structure of a stacking system apparatus provided in an embodiment of the present application. The stacking system apparatus can be implemented as part or all of the above-mentioned network devices by software, hardware, or a combination of both. Referring to FIG14 , the apparatus includes: a first receiving module 1401 and a first configuration module 1402.
[0301] The first receiving module 1401 is configured to receive stack configuration parameters sent by the management device. The detailed implementation process is referred to the corresponding content of each of the above embodiments and will not be repeated here.
[0302] The first configuration module 1402 is configured to perform configuration according to stack configuration parameters and perform stack negotiation with other network devices in the plurality of network devices to form a stack system. The detailed implementation process is referred to the corresponding content of each embodiment above and will not be repeated here.
[0303] Optionally, the first receiving module 1401 is specifically configured to:
[0304] receiving a parameter configuration script sent by a management device, where the parameter configuration script includes stack configuration parameters;
[0305] The first configuration module 1402 is specifically configured to:
[0306] Load and execute the parameter configuration script to complete the configuration of the network device.
[0307] Optionally, the device further comprises:
[0308] A second receiving module is used to receive configuration time indication information sent by the management device, where the configuration time indication information is used to indicate the time to start configuration based on the received stack configuration parameters;
[0309] The execution module is configured to execute the steps of configuring according to the stack configuration parameters when the time indicated by the configuration time indication information arrives.
[0310] Optionally, the device further comprises:
[0311] a third receiving module, configured to receive stack configuration parameters regenerated by the management device for the network device if a network device fails;
[0312] The second configuration module is configured to reconfigure the network device according to the stack configuration parameters regenerated by the management device for the network device and add the network device to the stack system.
[0313] In an embodiment of the present application, the management device automatically determines and issues stacking configuration parameters based on the topological connection relationship between the multiple network devices, the network level at which the multiple network devices are located, and the network level at which the neighboring devices of each of the multiple network devices are located. The stacking configuration parameters are automatically configured by the network devices without the need for manual settings by technical personnel, thereby effectively simplifying the steps of establishing a stacking system, while improving the efficiency of establishing a stacking system and greatly reducing labor costs. In addition, the embodiment of the present application also takes into account the connectivity issues of the multiple network devices. The configuration time indication information determined by the stacking role can ensure that the multiple network devices start configuration at the corresponding time, thereby ensuring the connectivity of the communication link, so that the multiple network devices can all receive the stacking configuration parameters sent by the management device.
[0314] It should be noted that the apparatus for assembling a stacking system provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the assembly of the stacking system. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for assembling a stacking system provided in the above embodiment and the method embodiment for assembling a stacking system are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0315] FIG15 is a schematic diagram of a stacking system apparatus provided in an embodiment of the present application. The stacking system apparatus can be implemented as part or all of the aforementioned network devices by software, hardware, or a combination of both. Referring to FIGDD , the apparatus includes: a determination module 1501 and a configuration module 1502.
[0316] Determination module 1501 is configured to determine stacking configuration parameters corresponding to the network device by exchanging data with at least one neighboring device. The at least one neighboring device is at least one network device connected to the network device in a topological connection relationship between multiple network devices. The detailed implementation process is described in the corresponding embodiments above and is not further described here.
[0317] The configuration module 1502 is configured to perform configuration according to the stack configuration parameters and to perform stack negotiation with other network devices in the plurality of network devices to form a stack system. The detailed implementation process is referred to the corresponding content of each embodiment above and will not be repeated here.
[0318] Optionally, the stack configuration parameters include a stack port identifier, a stack device identifier, and a stack priority, wherein the stack port identifier indicates a port used for stacking in a network device, and the stack device identifier is used to identify a network device in a stacking system.
[0319] Optionally, the determining module 1501 is specifically configured to:
[0320] Determine the stacking priority corresponding to the network device by interacting with at least one neighboring device;
[0321] Determine the stacking device ID corresponding to the network device;
[0322] An identifier of at least one first-class port included in the network device is determined as a stack port identifier corresponding to the network device, where the first-class port refers to a port used for connecting to at least one neighboring device.
[0323] Optionally, the determining module 1501 is specifically configured to:
[0324] Setting a corresponding port priority for at least one first-class port;
[0325] Sending, to at least one neighboring device, a port priority corresponding to the first-class port to which each device is connected;
[0326] receiving a port priority corresponding to a second-class port respectively included in the at least one neighboring device and sent by the at least one neighboring device, where the second-class port refers to a port in the neighboring device used for connecting to the network device;
[0327] If the port priorities corresponding to the second-class ports included in at least one neighboring device are lower than the port priorities corresponding to the first-class ports to which they are connected, the stacking priority corresponding to the network device is determined based on the port priority corresponding to the at least one first-class port.
[0328] Optionally, the at least one neighbor device includes a first neighbor device;
[0329] The determination module 1501 is specifically configured to:
[0330] The port priority corresponding to the first type port connected to the first neighbor device is set to the highest priority in the stack system.
[0331] Optionally, the at least one neighboring device further includes a second neighboring device; and the determining module 1501 is specifically configured to:
[0332] The port priority corresponding to the first-class port connected to the second neighbor device is set to the lowest priority in the stack system.
[0333] Optionally, the device is characterized in that it further comprises:
[0334] A first receiving module is configured to receive a stack system building instruction triggered by an administrator;
[0335] The first execution module is configured to respond to a stacking system building instruction and execute a step of determining a stacking priority corresponding to a network device by interacting with at least one neighboring device.
[0336] Optionally, the at least one neighbor device includes a first neighbor device;
[0337] The determination module 1501 is specifically configured to:
[0338] receiving a port priority corresponding to a second-class port included in the first neighboring device and sent by the first neighboring device, where the second-class port is a port for connecting to a network device;
[0339] Determine, based on the port priority corresponding to the second type port included in the first neighboring device, the port priority corresponding to the first type port included in the network device and connected to the first neighboring device;
[0340] The stacking priority corresponding to the network device is determined based on the port priority corresponding to the first type port to which the first neighbor device is connected.
[0341] Optionally, the at least one neighbor device further includes a second neighbor device;
[0342] The determination module 1501 is specifically configured to:
[0343] Determine a port priority corresponding to a first-class port connected to a second neighboring device and included in the network device;
[0344] The stacking priority corresponding to the network device is determined based on the port priority corresponding to the first type port to which the first neighbor device is connected and the port priority corresponding to the first type port to which the second neighbor device is connected.
[0345] Optionally, the determining module 1501 is specifically configured to:
[0346] Determine, based on the port priority corresponding to the second type port included in the first neighboring device, the port priority corresponding to the first type port to which the second neighboring device is connected;
[0347] The device also includes:
[0348] A sending module, configured to send, to the second neighboring device, a port priority corresponding to the first type port to which the second neighboring device is connected;
[0349] A second receiving module receives a port priority corresponding to a second type of port included in the second neighboring device and sent by the second neighboring device;
[0350] The second execution module is used to execute the step of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first class port connected to the first neighbor device and the port priority corresponding to the first class port connected to the second neighbor device if the port priority corresponding to the second class port included in the second neighbor device is lower than the port priority corresponding to the first class port connected to the second neighbor device.
[0351] Optionally, the determining module 1501 is specifically configured to:
[0352] receiving a port priority corresponding to a second type of port included in the second neighboring device and sent by the second neighboring device;
[0353] Based on the port priority corresponding to the second type port included in the second neighboring device, the port priority corresponding to the first type port connected to the second neighboring device is determined.
[0354] Optionally, the network device includes a stacking indicator light, and a display state of the stacking indicator light is used to indicate a current stacking state of the network device, wherein the display state includes a first display state and a second display state, and the stacking state indicated by the first display state is different from the stacking state indicated by the second display state;
[0355] The stacking situation includes at least one of the following: the network device is determining its own corresponding stacking configuration parameters, the network device is being configured according to its own corresponding stacking configuration parameters, the network device is negotiating stacking with other network devices among multiple network devices, the stacking system is completed, and the stacking system fails to be established.
[0356] In the embodiment of the present application, since each network device that constitutes the stacking system can automatically determine and configure the stacking configuration parameters by interacting with data from its own neighboring devices, there is no need for manual settings by technical personnel, thereby effectively simplifying the steps of constituting the stacking system, while improving the efficiency of constituting the stacking system and greatly reducing labor costs.
[0357] It should be noted that the apparatus for assembling a stacking system provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the assembly of the stacking system. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for assembling a stacking system provided in the above embodiment and the method embodiment for assembling a stacking system are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0358] Since each network device that makes up the stack system can automatically determine and configure stack configuration parameters by interacting with its neighboring devices, no manual settings by technicians are required. This effectively simplifies the steps of setting up the stack system, improves the efficiency of stacking the system, and greatly reduces labor costs.
[0359] An embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program. When the computer program runs on a computer or a processor, the computer or processor executes the steps of the method for assembling a stacking system described in the above embodiment.
[0360] The present application also provides a computer program product comprising computer instructions. When the computer instructions are executed on a computer or processor, the computer or processor executes the steps of the method for assembling a stacking system described in the above embodiment. Alternatively, the present application also provides a computer program product. When the computer program is executed on a computer or processor, the computer or processor executes the steps of the method for assembling a stacking system described in the above embodiment.
[0361] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0362] It should be understood that the "plurality" mentioned herein refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0363] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the topological connection relationship between the multiple network devices involved in the embodiments of this application, the network level at which the multiple network devices are located, and the network level at which the neighboring devices of each network device in the multiple network devices are located are all obtained with full authorization.
[0364] The above description is an embodiment provided for this application and is not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application should be included in the scope of protection of this application.
Claims
1. A method for building a stacking system, characterized in that: Applied to managing devices, the method includes: receiving a stacking system building instruction triggered by an administrator, wherein the stacking system building instruction includes device identifiers of a plurality of network devices, and the plurality of network devices are used to build the stacking system; In response to the stacking system establishment instruction, generating stacking configuration parameters corresponding to the multiple network devices respectively based on the topological connection relationship between the multiple network devices, the network layers at which the multiple network devices are located, and the network layers at which neighboring devices of each of the multiple network devices are located, the network layers including the access layer, the aggregation layer, or the core layer, the stacking configuration parameters being used to guide the corresponding network devices to perform configurations required for establishing the stacking system; The stacking configuration parameters corresponding to each of the plurality of network devices are sent to the plurality of network devices, so that the plurality of network devices are configured according to the stacking configuration parameters corresponding to each of the plurality of network devices and form the stacking system.
2. The method according to claim 1, wherein The stacking configuration parameters include a stacking port identifier, a stacking device identifier, and a stacking priority, wherein the stacking port identifier indicates a port in the network device used for stacking, and the stacking device identifier is used to identify the network device in the stacking system.
3. The method according to claim 2, wherein The generating stacking configuration parameters corresponding to the plurality of network devices respectively based on the topological connection relationship between the plurality of network devices, the network levels at which the plurality of network devices are located, and the network levels at which neighboring devices of each of the plurality of network devices are located includes: Determining stacking device identifiers and stacking priorities corresponding to the multiple network devices respectively based on the network levels of the multiple network devices and the network levels of neighboring devices of each of the multiple network devices; For each of the multiple network devices, according to the topological connection relationship, an identifier of a port of the network device used for connecting with other network devices is determined as a stack port identifier corresponding to the network device.
4. The method according to claim 3, wherein The determining, based on the network levels of the multiple network devices and the network levels of neighboring devices of each of the multiple network devices, stacking device identifiers and stacking priorities corresponding to the multiple network devices respectively includes: Determining, based on the network layers at which the multiple network devices are located and the network layers at which neighbor devices of each of the multiple network devices are located, stacking roles corresponding to the multiple network devices, the stacking roles including a master device, a backup device, or a slave device, the master device being used to manage the backup device and the slave device, the backup device being used to take over all services of the master device when the master device fails, and the slave device being used to forward service data; Based on the stacking roles respectively corresponding to the multiple network devices, stacking device identifiers and stacking priorities respectively corresponding to the multiple network devices are determined.
5. The method according to claim 4, wherein The method further comprises: Determining, based on the stacking roles respectively corresponding to the multiple network devices, configuration time indication information respectively corresponding to the multiple network devices, the configuration time indication information being used to indicate a time to start configuration based on corresponding stacking configuration parameters; The configuration time indication information corresponding to each of the plurality of network devices is sent to the plurality of network devices, so that the plurality of network devices start configuration according to the respective corresponding times.
6. The method according to any one of claims 1 to 5, wherein: The sending the stack configuration parameters corresponding to each of the plurality of network devices includes: Sending respective corresponding parameter configuration scripts to the plurality of network devices, so that the plurality of network devices are configured by executing the respective corresponding parameter configuration scripts, wherein the parameter configuration scripts include the stacking configuration parameters.
7. The method according to any one of claims 1 to 6, wherein: After sending the stack configuration parameters corresponding to the plurality of network devices, the method further includes: Starting from the moment when the stack configuration parameters corresponding to the plurality of network devices are sent, timing the process of establishing the stack system; If the stacking system assembly result is obtained before the timing time expires, determining whether the stacking system meets expectations based on the assembly result; If the stacking system meets expectations, it is determined that the stacking system is completed.
8. The method according to claim 7, wherein The method further comprises: If the stacking system does not meet expectations, determining at least one faulty device among the plurality of network devices; Regenerating stack configuration parameters corresponding to the at least one faulty device; The corresponding regenerated stacking configuration parameters are sent to the at least one faulty device, so that the at least one faulty device is reconfigured according to the corresponding regenerated stacking configuration parameters and joins the stacking system.
9. The method according to any one of claims 1 to 8, wherein Before receiving the stack system establishment instruction triggered by the administrator, the method further includes: receiving registration information respectively sent by the plurality of network devices, the registration information including information for describing neighbor devices of the network device; Based on the registration information respectively sent by the multiple network devices, a topological connection relationship between the multiple network devices is determined.
10. A method for building a stacking system, characterized in that: Applied to a network device, the network device being one of a plurality of network devices used to form a stacking system, the method comprising: Receive stack configuration parameters sent by the management device; The stacking system is configured according to the stacking configuration parameters and stacking negotiation is performed with other network devices in the plurality of network devices to form the stacking system.
11. The method according to claim 10, wherein The receiving stack configuration parameters sent by the management device includes: receiving a parameter configuration script sent by the management device, wherein the parameter configuration script includes the stack configuration parameters; The configuring according to the stack configuration parameters includes: The parameter configuration script is loaded and executed to complete the configuration of the network device.
12. The method according to claim 10 or 11, wherein: Before configuring according to the stack configuration parameters, the method further includes: receiving configuration time indication information sent by the management device, where the configuration time indication information is used to indicate a time to start configuration based on the received stack configuration parameters; When the time indicated by the configuration time indication information arrives, a step of configuring according to the stack configuration parameters is executed.
13. The method according to any one of claims 10 to 12, wherein: The method further comprises: If the network device fails, receiving stack configuration parameters regenerated by the management device for the network device; The network device is reconfigured according to the stack configuration parameters regenerated by the management device for the network device and joins the stack system.
14. A method for building a stacking system, characterized in that: Applied to a network device, the network device being one of a plurality of network devices used to form a stacking system, the method comprising: Determining stacking configuration parameters corresponding to the network device by interacting with at least one neighboring device, where the at least one neighboring device is at least one network device connected to the network device in a topological connection relationship between the multiple network devices; The stacking system is configured according to the stacking configuration parameters and stacking negotiation is performed with other network devices in the plurality of network devices to form the stacking system.
15. The method according to claim 14, wherein The stacking configuration parameters include a stacking port identifier, a stacking device identifier, and a stacking priority, wherein the stacking port identifier indicates a port in the network device used for stacking, and the stacking device identifier is used to identify the network device in the stacking system.
16. The method according to claim 15, wherein The determining the stacking configuration parameters corresponding to the network device by interacting with at least one neighboring device includes: Determining a stacking priority corresponding to the network device by interacting with the at least one neighboring device; Determine a stacking device identifier corresponding to the network device; An identifier of at least one first-type port included in the network device is determined as a stack port identifier corresponding to the network device, where the first-type port refers to a port used for connecting to the at least one neighboring device.
17. The method according to claim 16, wherein The determining the stacking priority corresponding to the network device by interacting with the at least one neighboring device includes: Setting a corresponding port priority for each of the at least one first-class ports; Sending, to the at least one neighboring device, a port priority corresponding to the first-class port to which each of the neighboring devices is connected; receiving a port priority corresponding to a second-class port respectively included in the at least one neighboring device and sent by the at least one neighboring device, where the second-class port refers to a port in the neighboring device used to connect to the network device; If the port priorities corresponding to the second-class ports included in each of the at least one neighboring device are lower than the port priorities corresponding to the first-class ports to which they are connected, the stacking priority corresponding to the network device is determined based on the port priority corresponding to the at least one first-class port.
18. The method of claim 17, wherein the at least one neighbor device comprises a first neighbor device; The step of setting a corresponding port priority for the at least one first-class port includes: The port priority corresponding to the first type port connected to the first neighbor device is set to the highest priority in the stacking system.
19. The method according to claim 18, wherein the at least one neighboring device further comprises a second neighboring device; the method further comprising: The port priority corresponding to the first-class port connected to the second neighbor device is set to the lowest priority in the stacking system.
20. The method according to any one of claims 17 to 19, wherein: Before determining the stacking priority corresponding to the network device by interacting with at least one neighboring device, the method further includes: Receive stack system establishment instructions triggered by the administrator; In response to the stacking system building instruction, a step of determining a stacking priority corresponding to the network device by interacting with at least one neighboring device is executed.
21. The method according to claim 16, wherein The at least one neighbor device includes a first neighbor device; Determining the stacking priority corresponding to the network device by interacting with at least one neighboring device includes: receiving a port priority corresponding to a second-class port included in the first neighboring device and sent by the first neighboring device, where the second-class port is a port used to connect to the network device; Determine, based on the port priority corresponding to the second type port included in the first neighboring device, the port priority corresponding to the first type port included in the network device and connected to the first neighboring device; The stacking priority corresponding to the network device is determined based on the port priority corresponding to the first type port to which the first neighbor device is connected.
22. The method according to claim 21, wherein The at least one neighbor device further includes a second neighbor device; The determining, based on the port priority corresponding to the first type port to which the first neighbor device is connected, the stacking priority corresponding to the network device includes: Determine a port priority corresponding to a first-class port included in the network device and connected to the second neighboring device; The stacking priority corresponding to the network device is determined based on the port priority corresponding to the first type port to which the first neighbor device is connected and the port priority corresponding to the first type port to which the second neighbor device is connected.
23. The method according to claim 22, wherein The determining the port priority corresponding to the first type port connected to the second neighboring device and included in the network device includes: Determine, based on the port priority corresponding to the second type port included in the first neighboring device, the port priority corresponding to the first type port to which the second neighboring device is connected; The method further comprises: Sending, to the second neighboring device, a port priority corresponding to the first type port to which the second neighboring device is connected; receiving a port priority corresponding to a second type of port included in the second neighboring device and sent by the second neighboring device; If the port priority corresponding to the second-class port included in the second neighbor device is lower than the port priority corresponding to the first-class port to which the second neighbor device is connected, a step of determining the stacking priority corresponding to the network device based on the port priority corresponding to the first-class port to which the first neighbor device is connected and the port priority corresponding to the first-class port to which the second neighbor device is connected is performed.
24. The method of claim 22, wherein: The determining the port priority corresponding to the first type port connected to the second neighboring device and included in the network device includes: receiving a port priority corresponding to a second type of port included in the second neighboring device and sent by the second neighboring device; The port priority corresponding to the first type port connected to the second neighboring device is determined based on the port priority corresponding to the second type port included in the second neighboring device.
25. The method according to any one of claims 14 to 24, wherein: The network device includes a stacking indicator light, wherein a display state of the stacking indicator light is used to indicate a current stacking state of the network device, wherein the display state includes a first display state and a second display state, and the stacking state indicated by the first display state is different from the stacking state indicated by the second display state; The stacking situation includes at least one of the following: the network device is determining its own corresponding stacking configuration parameters, the network device is being configured according to its own corresponding stacking configuration parameters, the network device is negotiating stacking with other network devices among the multiple network devices, the stacking system is completed, and the stacking system fails to be established.
26. A device for building a stacking system, characterized in that: Applied to management equipment, the apparatus comprises: A first receiving module is configured to receive a stacking system building instruction triggered by an administrator, wherein the stacking system building instruction includes device identifiers of multiple network devices, and the multiple network devices are used to build the stacking system; A first generating module is configured to generate, in response to the stacking system forming instruction, stacking configuration parameters corresponding to the plurality of network devices respectively based on the topological connection relationship between the plurality of network devices, the network layers at which the plurality of network devices are located, and the network layers at which neighboring devices of each of the plurality of network devices are located, wherein the network layers include an access layer, an aggregation layer, or a core layer, and the stacking configuration parameters are used to guide the corresponding network devices to perform configurations required for forming the stacking system; The first sending module is configured to send the stacking configuration parameters corresponding to each of the plurality of network devices, so that the plurality of network devices are configured according to the stacking configuration parameters corresponding to each of the plurality of network devices and form the stacking system.
27. A device for building a stacking system, characterized in that: Applied to a network device, the network device being one of a plurality of network devices used to form a stacking system, the apparatus comprises: A first receiving module, configured to receive stack configuration parameters sent by a management device; The first configuration module is configured to perform configuration according to the stack configuration parameters and perform stack negotiation with other network devices in the plurality of network devices to form the stack system.
28. A device for building a stacking system, characterized in that: Applied to a network device, the network device being one of a plurality of network devices used to form a stacking system, the apparatus comprises: a determination module, configured to determine a stacking configuration parameter corresponding to the network device by interacting with at least one neighboring device, where the at least one neighboring device is at least one network device connected to the network device in a topological connection relationship between the multiple network devices; The configuration module is configured to perform configuration according to the stack configuration parameters and perform stack negotiation with other network devices in the plurality of network devices to form the stack system.
29. A management device, characterized in that: The management device includes a memory and a processor, the memory is used to store a computer program, and the processor is configured to execute the computer program stored in the memory to implement the steps of the method according to any one of claims 1 to 9.
30. A network device, characterized in that: The network device includes a memory and a processor, the memory is used to store a computer program, and the processor is configured to execute the computer program stored in the memory to implement the steps of the method according to any one of claims 10 to 13, or to implement the steps of the method according to any one of claims 14 to 25.
31. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program. When the computer program runs on a computer or a processor, the computer or the processor executes the method according to any one of claims 1 to 9, or the method according to any one of claims 10 to 13, or the method according to any one of claims 14 to 25.
32. A computer program product, characterized in that The computer program product contains computer instructions, and when the computer instructions are executed by a computer or a processor, the steps of the method according to any one of claims 1 to 9 are performed, or the steps of the method according to any one of claims 10 to 13 are performed, or the steps of the method according to any one of claims 14 to 25 are performed.
Citation Information
Patent Citations
Stacking configuration method and device
CN107426031A
Device stack establishment method and device
CN108206786A
Equipment management method and device, electronic equipment and storage medium
CN114124803A
Switch stacking method and system
CN114448918A
Stacking-port configuration using zero-touch provisioning
US20210211351A1