CN114124803B - Device management method and device, electronic device and storage medium - Google Patents

Device management method and device, electronic device and storage medium Download PDF

Info

Publication number
CN114124803B
CN114124803B CN202111393177.9A CN202111393177A CN114124803B CN 114124803 B CN114124803 B CN 114124803B CN 202111393177 A CN202111393177 A CN 202111393177A CN 114124803 B CN114124803 B CN 114124803B
Authority
CN
China
Prior art keywords
management address
dynamic management
address
master device
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111393177.9A
Other languages
Chinese (zh)
Other versions
CN114124803A (en
Inventor
李晓文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202111393177.9A priority Critical patent/CN114124803B/en
Publication of CN114124803A publication Critical patent/CN114124803A/en
Application granted granted Critical
Publication of CN114124803B publication Critical patent/CN114124803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/583Stackable routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The application provides a device management method, a device, electronic equipment and a storage medium, and relates to the technical field of communication. According to the method, after the master device and the slave device are split, the slave device becomes the master device, and the slave device obtains a dynamic management address different from the management address of the original master device, so that the problem that an administrator cannot manage due to conflict between the slave device and the management address of the original master device after the slave device becomes the master device can be avoided.

Description

Device management method and device, electronic device and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a device management method, an apparatus, an electronic device, and a storage medium.
Background
Network devices have created a variety of virtualization techniques to accommodate the needs of big data applications. The router stacking technology is one of virtualization technologies, and the main idea is to connect two or more devices through a physical link to perform stacking parameter configuration, virtualize the router as a distributed router, wherein one device is elected as a master device, and the other devices are all slave devices. The stacking technology can simplify equipment management, simplify network planning and improve the reliability and processing capacity of network center equipment. After the plurality of devices are virtualized into one device, a user directly manages the main device in the stacking device, so that unified management of all member devices in the stacking device can be facilitated, for example, when a network is planned, an IP address and a routing protocol can be deployed only for the main device, the control planes of all the devices are centrally managed by the main device, and the slave device is only responsible for message forwarding of a data plane, so that network operation is simplified.
The network management addresses of the member devices in the stacking device are all addresses of the management interfaces of the main device, under the condition that some abnormality occurs, the main device and the slave device can split, at the moment, the slave device can be switched to the main device and load configuration files, after the configuration loading of the management interfaces is completed, the multiple routers in the split state in the local area network conflict with each other due to the fact that the management addresses are the same (because the management addresses of the original main device are still used after the slave device is switched to the main device), and therefore a network administrator cannot remotely manage the split routers through the management addresses.
Disclosure of Invention
An embodiment of the application aims to provide a device management method, a device, electronic equipment and a storage medium, which are used for solving the problem that management addresses in a network conflict after master and slave devices are split, and an administrator cannot remotely manage the split devices through the management addresses in the prior art.
In a first aspect, an embodiment of the present application provides a device management method, where the method includes:
when the role of a slave device in the stacking device is changed into a master device, acquiring a dynamic management address, wherein the dynamic management address is different from the management address of the original master device in the stacking device;
and reporting the dynamic management address.
In the implementation process, after the master device and the slave device are split, the slave device becomes the master device, and the slave device obtains a dynamic management address different from the management address of the original master device, so that the problem that an administrator cannot manage due to conflict between the slave device and the management address of the original master device after the slave device becomes the master device can be avoided.
Optionally, the acquiring the dynamic management address includes:
acquiring the identification of the slave device, the synchronous management address of the original master device, the mask length and the total device number in the stacking device;
calculating a new mask length of the dynamic management address according to the mask length and the total equipment number;
performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address;
and a host part for generating the dynamic management address according to the identification of the slave device, wherein the dynamic management address comprises the network part and the host part.
In the implementation process, the new mask length is obtained through the total equipment number and the mask length, so that the network segment different from the network segment of the original management address can be calculated, and the problem of network address conflict is avoided.
Optionally, the calculating to obtain a new mask length of the dynamic management address according to the mask length and the total device number includes:
calculating according to the total equipment number to obtain an expanded mask length;
and adding the expanded mask length and the mask length to obtain a sum value as a new mask length of the dynamic management address.
In the implementation process, the length of the expansion mask is obtained through the total equipment number, so that a proper amount of network addresses can be divided for each slave equipment according to actual conditions, and the division of the sub-network under the original management address is realized.
Optionally, the acquiring the dynamic management address includes:
and acquiring a pre-configured dynamic management address which is not started, and starting the dynamic management address, wherein each slave device in the stacking device is configured with a corresponding dynamic management address and is initially configured to be in a non-started state.
In the implementation process, the dynamic management address is configured for each slave device in advance, and when the dynamic management address is needed to be used, the dynamic management address is directly started, so that the device can quickly obtain the dynamic management address.
Optionally, before the step of obtaining the dynamic management address, the method further includes:
and when the slave device detects abnormal communication between the slave device and the original master device, switching the roles to be the master device. This ensures that the administrator can still manage the slave device remotely after it becomes the master device.
Optionally, the communication anomaly includes: the primary master device fails and/or a communication link between the secondary device and the primary master device fails.
Optionally, when the original master device fails, the switching role is a master device, including:
and the slave device performs master device election with other slave devices in the stacking device, and when the slave device is elected as the master device, the role is switched to be the master device. By negotiating and electing the master devices, the situation that a plurality of master devices are in one stacking device and an administrator cannot perform unified management can be avoided.
In a second aspect, an embodiment of the present application provides an apparatus management device, including:
the address acquisition module is used for acquiring a dynamic management address when the role of the slave device in the stacking device is changed into the master device, wherein the dynamic management address is different from the management address of the original master device in the stacking device;
and the address reporting module is used for reporting the dynamic management address.
Optionally, the address obtaining module is configured to obtain an identifier of the slave device, a management address synchronized by the original master device, a mask length, and a total number of devices in the stacked device; calculating a new mask length of the dynamic management address according to the mask length and the total equipment number; performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address; and a host part for generating the dynamic management address according to the identification of the slave device, wherein the dynamic management address comprises the network part and the host part.
Optionally, the address acquisition module is configured to calculate and obtain an extended mask length according to the total number of devices; and adding the expanded mask length and the mask length to obtain a sum value as a new mask length of the dynamic management address.
Optionally, the address obtaining module is configured to obtain a preconfigured dynamic management address that is not enabled, and enable the dynamic management address, where each slave device in the stacked device is configured with a corresponding dynamic management address and is initially configured to be in an inactive state.
Optionally, the apparatus further comprises:
and the role switching module is used for switching roles as the master equipment when the slave equipment detects communication abnormality between the slave equipment and the original master equipment.
Optionally, the communication anomaly includes: the primary master device fails and/or a communication link between the secondary device and the primary master device fails.
Optionally, when the original master device fails, the role switching module is configured to perform master device election with the slave device and other slave devices in the stacking device, and when the slave device is elected as the master device, switch the role to be the master device.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing computer readable instructions which, when executed by the processor, perform the steps of the method as provided in the first aspect above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method as provided in the first aspect above.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for managing devices according to an embodiment of the present application;
FIG. 2 is a schematic deployment diagram of a stacking apparatus according to an embodiment of the present application;
FIG. 3 is a block diagram of a device management apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device for executing a device management method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be noted that the terms "system" and "network" in embodiments of the present application may be used interchangeably. "plurality" means two or more, and "plurality" may also be understood as "at least two" in this embodiment of the present application. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/", unless otherwise specified, generally indicates that the associated object is an "or" relationship.
Since the management addresses of all the devices in the stacking device are the management addresses of the master device, after the slave device becomes the master device, the management addresses of the master device and the master device are in conflict, and an administrator cannot manage the split slave device through the original management addresses.
Referring to fig. 1, fig. 1 is a flowchart of a device management method according to an embodiment of the present application, where the method includes the following steps:
step S110: when the role of the slave device in the stacked device becomes the master device, a dynamic management address is acquired.
The stacking device generally comprises a main device and at least one slave device, after the slave device and the main device are constructed into the stacking device, if an administrator needs to send configuration information to all devices in the stacking device or collect related information, the administrator only needs to log in the main device through a management address and send the configuration information to the main device, at this time, the main device can synchronize the configuration information to other slave devices, and during information collection, the administrator can send information collection instructions to the main device up and down, so that the main device can automatically collect related information from other slave devices and send the information to the administrator.
However, when one of the slave devices fails to communicate with the master device, the master device cannot communicate with the slave device, and an administrator cannot remotely manage the slave device, and at this time, the slave device automatically switches roles as the master device, that is, when the slave device detects that the communication between itself and the original master device is abnormal, the slave device automatically switches roles as the master device.
In some embodiments, the communication anomaly comprises: the original master device fails and/or a communication link between the slave device and the original master device fails.
For example, the slave device may send a detection message to the master device to periodically detect whether communication between the two devices is abnormal, for example, if the slave device does not receive a response message sent by the master device for the detection message within a set period of time, the slave device indicates that a communication link between the slave device and the master device is faulty, or the master device is faulty, and when the slave device and the original stacking device are split, the slave device may automatically switch the roles to the master device. This allows for the slave device to detect itself from the master and switch roles autonomously.
Alternatively, when detecting a communication abnormality with the master device, the slave device may attempt to communicate with another slave device, and if the slave device does not acquire communication with another slave device, it is determined that the communication link of the slave device has failed, and the slave device may automatically switch roles as the master device. If the slave device gets communication with the other slave devices and the other slave devices cannot communicate with the master device, the former master device is determined to have a fault at the moment, and in this case, the slave devices can negotiate with each other, that is, the slave device can perform master device election with other slave devices in the stacked device, and when the slave device is elected as the master device, the role is switched to be the master device.
When the master device is elected, the master device may be elected according to a priority configured by each slave device, the priority being configured by an administrator for each device in the stack device through the master device. For example, the stacking device is shown in fig. 2, where the stacking device includes N devices, the router a is configured as a master device (of course, the master device may be determined by the N devices through negotiation election in the initial period), and the router B-router N serves as a slave device. After determining the master device and the slave devices, each device may automatically record its own role, e.g., router a records its own role as the master device and router B-router N records its own role as the slave device.
In the running process of the stacking device, if the router A fails, the router B-router N cannot communicate with the router A, at this time, the N-1 slave devices of the router B-router N can negotiate with each other to perform master device election, the respective priorities of the routers B-router N can be exchanged with each other, then priority comparison can be performed, and the router with the high election priority is taken as the master device. In this case, if the priority of the router B is highest, the router B is selected as the master device, and the router B automatically switches the role to the master device, so that the execution subject of the method of the present application is the slave device from which the role starts to the slave device of the master device.
After the slave device becomes the master device, the management address of the slave device conflicts with the management address of the original master device, so that management by an administrator is inconvenient, and the slave device can acquire a dynamic management address which is different from the management address of the original master device, and therefore the conflict with the management address of the original master device can be avoided.
Step S120: and reporting the dynamic management address.
The slave device may report the obtained dynamic management address to the network management platform or the controller, and the like, without specific limitation. When the slave device reports the dynamic management address, the self-defined Trap information can be generated, the Trap information carries the dynamic management address and role switching event of the slave device, the slave device reports the Trap information to the network management platform after starting the simple network management protocol (Simple Network Management Protocol, SNMP) service, thus an administrator can timely find that the devices in the stacked device are split and know the dynamic management address after the devices are split, and the administrator can remotely log in the device according to the dynamic management address to collect or maintain information, so that the condition that the devices cannot be remotely managed due to management address conflict is avoided.
In the implementation process, after the master device and the slave device are split, the slave device becomes the master device, and the slave device obtains a dynamic management address different from the management address of the original master device, so that the problem that an administrator cannot manage due to conflict between the slave device and the management address of the original master device after the slave device becomes the master device can be avoided.
On the basis of the above embodiment, the slave device may directly generate a dynamic management address different from the management address of the original master device after becoming the master device. Taking the router B as a master device, the original master device is the router a, and the router a synchronizes its management address to other slave devices at first, and the router B stores the original management address, so when generating the dynamic management address, the router B may use the network address of the original management address as the network address of the dynamic management address, and then use its own host address as the host address of the dynamic management address, so as to generate the dynamic management address different from the original management address.
In other embodiments, when configuring the stacking device, in addition to configuring a management address for the master device, a dynamic management address may be configured for each slave device, but the dynamic management address of the slave device is initially configured to be in an inactive state, and after the slave device becomes the master device, the slave device may obtain a preconfigured inactive dynamic management address and activate the dynamic management address.
For example, the router B may obtain a pre-configured dynamic management address stored in the router B, and then the router B may change the dynamic management address that is not enabled to an enabled state, where after the dynamic management address that is not enabled is changed to the enabled state, the dynamic management address is indicated to be in a valid available state. The current dynamic management addresses configured by the slave devices are different from each other and are also different from the management address of the master device, so that after the slave devices become the master device, the corresponding dynamic management addresses can be directly acquired and changed into an enabling state, and then the dynamic management addresses can be directly used as the self management addresses.
In the implementation process, the dynamic management address is configured for each slave device in advance, and when the dynamic management address is needed to be used, the dynamic management address is directly started, so that the device can quickly obtain the dynamic management address.
In the above manner, the administrator needs to configure the dynamic management addresses for all the devices in advance, and if the number of the devices is large, the workload is large, so in order to reduce the configuration workload of the administrator, when the dynamic management addresses are acquired, the slave devices can also automatically generate the dynamic management addresses based on a certain rule.
The specific process comprises the following steps: the method comprises the steps of obtaining an identifier of a slave device, a synchronous management address of an original master device, a mask length and the total number of devices in a stacking device, calculating according to the mask length and the total number of devices to obtain a new mask length of a dynamic management address, performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address, a host part of the dynamic management address is generated according to the identifier of the slave device, and the dynamic management address comprises the network part and the host part.
Before the device is not a stacked device, each device is started up and operates in a single mode by default, and an administrator can create a respective identifier for each device, which is denoted as a number-ID, for example, the number-ID of the router a is 1, the number-ID of the router B is 2, and the number-ID of the nth router N is N. The administrator may then configure the devices in a stacked mode to form a stacked device, restart the devices after they are configured as stacked devices, elect one master device first by negotiating when the remaining devices become slaves, issue a configuration management address at the management interface (DC 0) of the master device, then the master device may record the total number of devices, management addresses, and mask length within the stacked device, and the master device may automatically synchronize this information to each slave device.
After each slave device operates, if a certain slave device detects that the slave device is switched to the master device, the stored related information is read and calculated to obtain a dynamic management address, and the dynamic management address is a unique IP address in the local area network.
For example, the identity of the device, i.e. the number of members-ID, the total number of devices N, the management address and the mask length M, is read first. The new mask length can then be calculated based on the mask length M and the total number of devices N, so that the dynamic management address is a subnet of the original management address with the original management address or within a local area network.
In order to avoid address collision, when calculating the new mask length, the extended mask length may be calculated according to the total number of devices, and then the extended mask length is added to the original mask length, and the obtained sum value is used as the new mask length of the dynamic management address.
Wherein, let the extension mask length be K, k=max (log 2 N), the length of the expansion mask is obtained through the total number of the devices, so that a proper amount of network addresses can be divided for each slave device according to actual conditions, and the division of the sub-network under the original management address is realized. For example, K is equal to 2, indicating that the subnet may have four network addresses. And then M+K is used as a new mask length, so that the mask length of the new network segment can be obtained, the mask address corresponding to the new mask length and the management address are subjected to AND operation, and the transportation result is used as the network part of the dynamic management address.
The method has the advantages that the Member-ID of the equipment is used as the host part of the dynamic management address, so that the network part and the host part form the dynamic management address, the obtained dynamic management address is unique, and the problem of conflict with the network address in a large network where the stacking equipment is located can be avoided.
After the dynamic management address is obtained from the equipment, the dynamic management address can be configured under the management interface of the equipment, so that an administrator can log in the equipment according to the dynamic management address to manage the equipment. And the slave device reports the dynamic management address, so that the running condition of the network device can be quickly perceived without human intervention, and the maintainability of the system is enhanced.
In addition, if the original master device in the stacking device fails and cannot communicate with other slave devices, at this time, the other slave devices in the stacking device select one master device through negotiation, if the original master device fails and recovers, it finds that there is one master device, at this time, the master device also switches roles to slave devices, changes its management address into an inactive state, and reports a corresponding role switching event, so that an administrator can know that when the stacking device is managed later, log in by using a new dynamic management address instead of using the original management address, and can still manage the device by using other management addresses when the device in the stacking device fails or communicates with the fault.
In this case, the dynamic management address can be obtained again after the other slave devices elect the master device, and the management address of the original master device is not available at this time, so that if the original master device cannot be added into the stacking device after recovery, the original master device is still the master device, and the original master device can still use the original management address at this time without recalculating the dynamic management address.
It should be noted that, if the slave device is switched to the master device, then if the communication link of the slave device is restored, the slave device can be added to the original stacking device again, at this time, the slave device can also be automatically changed from the master device to the slave device again, and change the dynamic management address to the non-enabled state, and the role switching event can be reported, so that the network management platform can continue to use the original management address to manage the device, that is, only one management address is used to manage.
Referring to fig. 3, fig. 3 is a block diagram illustrating a device management apparatus 200 according to an embodiment of the present application, where the device 200 may be a module, a program segment, or a code on an electronic device. It should be understood that the apparatus 200 corresponds to the above embodiment of the method of fig. 1, and is capable of performing the steps involved in the embodiment of the method of fig. 1, and specific functions of the apparatus 200 may be referred to in the above description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy.
Optionally, the apparatus 200 includes:
an address obtaining module 210, configured to obtain a dynamic management address when a role of a slave device in a stacked device becomes a master device, where the dynamic management address is different from a management address of an original master device in the stacked device;
and an address reporting module 220, configured to report the dynamic management address.
Optionally, the address obtaining module 210 is configured to obtain the identifier of the slave device and the management address, the mask length and the total number of devices in the stacked device that are synchronized by the original master device; calculating a new mask length of the dynamic management address according to the mask length and the total equipment number; performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address; and a host part for generating the dynamic management address according to the identification of the slave device, wherein the dynamic management address comprises the network part and the host part.
Optionally, the address obtaining module 210 is configured to calculate and obtain an extended mask length according to the total device number; and adding the expanded mask length and the mask length to obtain a sum value as a new mask length of the dynamic management address.
Optionally, the address obtaining module 210 is configured to obtain a preconfigured inactive dynamic management address, and enable the dynamic management address, where each slave device in the stacked device is configured with a corresponding dynamic management address and is initially configured in an inactive state.
Optionally, the apparatus 200 further includes:
and the role switching module is used for switching roles as the master equipment when the slave equipment detects communication abnormality between the slave equipment and the original master equipment.
Optionally, the communication anomaly includes: the primary master device fails and/or a communication link between the secondary device and the primary master device fails.
Optionally, when the original master device fails, the role switching module is configured to perform master device election with the slave device and other slave devices in the stacking device, and when the slave device is elected as the master device, switch the role to be the master device.
It should be noted that, for convenience and brevity, a person skilled in the art will clearly understand that, for the specific working procedure of the apparatus described above, reference may be made to the corresponding procedure in the foregoing method embodiment, and the description will not be repeated here.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device for executing a device management method according to an embodiment of the present application, where the electronic device may include: at least one processor 310, such as a CPU, at least one communication interface 320, at least one memory 330, and at least one communication bus 340. Wherein the communication bus 340 is used to enable direct connection communication of these components. The communication interface 320 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The memory 330 may be a high-speed RAM memory or a nonvolatile memory (non-volatile memory), such as at least one disk memory. Memory 330 may also optionally be at least one storage device located remotely from the aforementioned processor. The memory 330 has stored therein computer readable instructions which, when executed by the processor 310, perform the method process described above in fig. 1.
It will be appreciated that the configuration shown in fig. 4 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 4, or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware, software, or a combination thereof.
Embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method process performed by an electronic device in the method embodiment shown in fig. 1.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example, comprising: when the role of a slave device in the stacking device is changed into a master device, acquiring a dynamic management address, wherein the dynamic management address is different from the management address of the original master device in the stacking device; and reporting the dynamic management address.
In summary, the embodiments of the present application provide a device management method, an apparatus, an electronic device, and a storage medium, where after a master device and a slave device are split, the slave device becomes a master device, and the slave device obtains a dynamic management address different from a management address of an original master device, so that a problem that an administrator cannot manage due to collision between the slave device and the management address of the original master device after the slave device becomes the master device can be avoided.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A method of device management, the method comprising:
when the role of a slave device in the stacking device is changed into a master device, acquiring a dynamic management address, wherein the dynamic management address is different from the management address of the original master device in the stacking device;
reporting the dynamic management address;
wherein the obtaining the dynamic management address includes: acquiring the identification of the slave device, the synchronous management address of the original master device, the mask length and the total device number in the stacking device; calculating a new mask length of the dynamic management address according to the mask length and the total equipment number; performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address; and a host part for generating the dynamic management address according to the identification of the slave device, wherein the dynamic management address comprises the network part and the host part.
2. The method of claim 1, wherein calculating a new mask length for a dynamically managed address based on the mask length and the total device number comprises:
calculating according to the total equipment number to obtain an expanded mask length;
and adding the expanded mask length and the mask length to obtain a sum value as a new mask length of the dynamic management address.
3. The method of claim 1, wherein the obtaining a dynamic management address comprises:
and acquiring a pre-configured dynamic management address which is not started, and starting the dynamic management address, wherein each slave device in the stacking device is configured with a corresponding dynamic management address and is initially configured to be in a non-started state.
4. The method of claim 1, wherein prior to the obtaining the dynamic management address, further comprising:
and when the slave device detects abnormal communication between the slave device and the original master device, switching the roles to be the master device.
5. The method of claim 4, wherein the communication anomaly comprises: the primary master device fails and/or a communication link between the secondary device and the primary master device fails.
6. The method of claim 5, wherein the switching role is a master device when the original master device fails, comprising:
and the slave device performs master device election with other slave devices in the stacking device, and when the slave device is elected as the master device, the role is switched to be the master device.
7. A device management apparatus, the apparatus comprising:
the address acquisition module is used for acquiring a dynamic management address when the role of the slave device in the stacking device is changed into the master device, wherein the dynamic management address is different from the management address of the original master device in the stacking device;
the address reporting module is used for reporting the dynamic management address;
wherein the obtaining the dynamic management address includes: acquiring the identification of the slave device, the synchronous management address of the original master device, the mask length and the total device number in the stacking device; calculating a new mask length of the dynamic management address according to the mask length and the total equipment number; performing AND operation on the mask address corresponding to the new mask length and the management address, wherein an obtained operation result is used as a network part of the dynamic management address; and a host part for generating the dynamic management address according to the identification of the slave device, wherein the dynamic management address comprises the network part and the host part.
8. An electronic device comprising a processor and a memory storing computer readable instructions that, when executed by the processor, perform the method of any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, performs the method according to any of claims 1-6.
CN202111393177.9A 2021-11-23 2021-11-23 Device management method and device, electronic device and storage medium Active CN114124803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111393177.9A CN114124803B (en) 2021-11-23 2021-11-23 Device management method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111393177.9A CN114124803B (en) 2021-11-23 2021-11-23 Device management method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114124803A CN114124803A (en) 2022-03-01
CN114124803B true CN114124803B (en) 2023-10-20

Family

ID=80439823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111393177.9A Active CN114124803B (en) 2021-11-23 2021-11-23 Device management method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114124803B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250232B (en) * 2022-07-28 2024-03-15 苏州盛科通信股份有限公司 Configuration method and device of main management port and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231682A (en) * 2011-07-25 2011-11-02 杭州华三通信技术有限公司 Stacking conflict processing method and equipment
CN102355366A (en) * 2011-08-24 2012-02-15 杭州华三通信技术有限公司 Member-stacking device and method for managing member-stacking device at split stacking moment
CN106060190A (en) * 2016-07-25 2016-10-26 杭州华三通信技术有限公司 Method and device for processing IP (Internet Protocol) address conflict
CN112532501A (en) * 2019-09-18 2021-03-19 中国电信股份有限公司 Host physical address processing method and device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403474B2 (en) * 2004-01-27 2008-07-22 Hewlett-Packard Development Company, L.P. Redundant router set up

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231682A (en) * 2011-07-25 2011-11-02 杭州华三通信技术有限公司 Stacking conflict processing method and equipment
CN102355366A (en) * 2011-08-24 2012-02-15 杭州华三通信技术有限公司 Member-stacking device and method for managing member-stacking device at split stacking moment
CN106060190A (en) * 2016-07-25 2016-10-26 杭州华三通信技术有限公司 Method and device for processing IP (Internet Protocol) address conflict
CN112532501A (en) * 2019-09-18 2021-03-19 中国电信股份有限公司 Host physical address processing method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN114124803A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
US6760859B1 (en) Fault tolerant local area network connectivity
CN108632067B (en) Disaster recovery deployment method, device and system
US8032786B2 (en) Information-processing equipment and system therefor with switching control for switchover operation
CN102394914A (en) Cluster brain-split processing method and device
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
US11349706B2 (en) Two-channel-based high-availability
CN111585835B (en) Control method and device for out-of-band management system and storage medium
CN114124803B (en) Device management method and device, electronic device and storage medium
CN113515408A (en) Data disaster tolerance method, device, equipment and medium
EP2069934B1 (en) Fault-tolerant medium access control (mac) address assignment in network elements
CN112583708B (en) Connection relation control method and device and electronic equipment
CN104052799B (en) A kind of method that High Availabitity storage is realized using resource ring
CN110661599B (en) HA implementation method, device and storage medium between main node and standby node
JP4806382B2 (en) Redundant system
US20200028731A1 (en) Method of cooperative active-standby failover between logical routers based on health of attached services
CN116095145A (en) Data control method and system of VPC cluster
CN111510336B (en) Network equipment state management method and device
US10516625B2 (en) Network entities on ring networks
CN112491633B (en) Fault recovery method, system and related components of multi-node cluster
CN113794765A (en) Gate load balancing method and device based on file transmission
CN111835544B (en) Monitoring method and system of virtual router based on user mode protocol stack
CN107547257B (en) Server cluster implementation method and device
CN114328036A (en) Hardware fault detection method, system and related equipment
JP7238515B2 (en) NETWORK CONTROLLER, SYSTEM, METHOD AND PROGRAM
WO2016153511A1 (en) Ring network uplink designation

Legal Events

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