Switch management method and related equipment
By generating switch topology structures and enabling automatic fault replacement, the problems of complex configuration, topology visualization, and fault replacement in switch management are solved, realizing unified monitoring and efficient management of switches, reducing operation and maintenance costs, and enhancing network stability.
Patent Information
- Application Number
- CN202511364273.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-05
AI Technical Summary
Existing switch management methods suffer from problems such as complex configuration management, difficulty in topology visualization, fragmented management of downstream devices, and complex remote fault replacement. In particular, existing technologies cannot achieve unified management and efficient management of all network devices.
By receiving multiple discovery messages sent from the switches, the switch topology is generated, configuration information is obtained, the faulty switch is automatically identified, and its configuration information is sent to the replacement switch. The replacement switch can directly access the cluster and inherit the configuration information.
It enables unified monitoring and status management of switches, automatic fault replacement, shortens network downtime, improves management efficiency, reduces operation and maintenance costs, and enhances network stability.
Smart Images

Figure CN121078005A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of switches, in particular to a switch management method and related equipment. BACKGROUND
[0002] In the current network deployment and operation scene, the switch as the core device of network communication, its management efficiency directly affects the stability of the network and the operation cost. However, the existing switch management mode has many pain points:
[0003] Configuration management is complex: in the traditional network, the network devices need to be managed by the network management system, the network management system hardware configuration requirement is high, the development cycle is long, the deployment is complex, and the operation personnel requirement is also high. In addition, the managed device needs to support the simple network management protocol (SNMP, Simple Network Management Protocol) function, and it is impossible to realize the unified management of all network devices through an economical, simple and fast way.
[0004] Topology visualization is difficult: the number of switches in the existing network is large, and the level is complex (such as access layer, aggregation layer and core layer), the administrator needs to record or piece together the topology relationship through third-party tools, it is difficult to master the connection state of the whole network in real time and accurately, and it needs to check the device connection one by one when troubleshooting, which is time-consuming and laborious.
[0005] The management of the lower connected devices is scattered: for the lower connected multiple switches (such as the access layer switch), it needs to log in the device respectively for management, and it is impossible to realize centralized monitoring, configuration and state query, and the management cost is high.
[0006] Remote fault replacement is complex: when the device fails to replace, the new device needs to be manually configured, and it is impossible to automatically inherit the original device parameters, which prolongs the network interruption time.
[0007] The core reason of the above problems is that: the existing switch lacks a function of unified management of all network devices, and it is only a managed network element of the network management system, and it is impossible to manage all network devices as a management device. Although some high-end switches have the function of stacking or cluster management, they can only manage the devices of the same level, and it is impossible to manage more low-end access switches in the network, resulting in low efficiency of switch management. SUMMARY
[0008] The present application provides a switch management method and related equipment, which can solve the problem of low efficiency of switch management.
[0009] In a first aspect, the present application provides a switch management method, which comprises:
[0010] receive a plurality of discovery messages sent by the slave switches; the discovery messages carry device information of the slave switches and connection relationships with other switches;
[0011] generate a switch topology according to all the discovery messages, and obtain configuration information of all the slave switches based on the switch topology; the switch topology has a plurality of nodes corresponding to a plurality of switches in a switch cluster one by one, edges between the nodes are connection relationships between corresponding two switches, and the switch cluster is composed of a master switch and all the slave switches;
[0012] determine a faulty switch from all the slave switches, and issue configuration information of the faulty switch to a replacement switch corresponding to the faulty switch;
[0013] receive a notification message sent by the replacement switch, take the replacement switch as a slave switch, and update the switch topology; the notification message is sent by the replacement switch after the replacement switch applies the received configuration information.
[0014] Optionally, the switch topology is generated according to all the discovery messages, and the generating includes:
[0015] parsing each discovery message to obtain device information and connection relationships of each slave switch;
[0016] recording the device information of all the slave switches, generating a corresponding node for each slave switch, generating edges between the nodes according to the connection relationships of the slave switches with other switches, and obtaining the switch topology.
[0017] Optionally, the configuration information of all the slave switches is obtained based on the switch topology, and the obtaining includes:
[0018] sending a configuration request message to each slave switch, the configuration request message being used to indicate that configuration information needs to be obtained;
[0019] receiving a request response message sent by each slave switch; the request response message is sent by the slave switch after the slave switch receives the configuration request message, and carries configuration information of the slave switch.
[0020] Optionally, the faulty switch is determined from all the slave switches, and the determining includes:
[0021] determining an offline switch from all the slave switches;
[0022] determining whether the offline switch meets a preset fault condition, and if so, taking the offline switch as the faulty switch.
[0023] Optionally, the discovery message is cyclically sent by the slave switch;
[0024] determining the offline switch from all the slave switches, and the determining includes:
[0025] determining whether there is a slave switch that has not sent a discovery packet after a time period greater than a preset time period since the last time the slave switch sent a discovery packet;
[0026] If yes, the slave switch is regarded as an offline switch.
[0027] Optionally, the preset failure condition is that a number of times of not sending a response packet for indicating being online is greater than or equal to a preset response number of times.
[0028] Optionally, the determining whether the offline switch satisfies the preset failure condition comprises:
[0029] sending a query request packet for querying whether the offline switch is online to the offline switch;
[0030] When a response packet sent by the offline switch is received within a preset query time period, the offline switch does not satisfy the preset failure condition.
[0031] When the response packet sent by the offline switch is not received within the preset query time period, the number of times of not sending the response packet is increased by 1, and it is determined whether the number of times of not sending the response packet is greater than or equal to the preset response number of times.
[0032] If yes, the offline switch is regarded as satisfying the preset failure condition.
[0033] Otherwise, the step of sending the query request packet for querying whether the offline switch is online to the offline switch is returned.
[0034] Optionally, before the step of receiving the notification packet sent by the replacement switch, taking the replacement switch as a slave switch, and updating the switch topology structure, the switch management method further comprises:
[0035] When the notification packet sent by the replacement switch is not received within a preset replacement time period, a configuration and delivery number of times is increased by 1, and it is determined whether the configuration and delivery number of times is greater than or equal to a preset configuration and delivery number of times.
[0036] If yes, a new slave switch is selected as a replacement switch of the faulty switch, and the step of delivering the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch is returned.
[0037] Otherwise, the step of delivering the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch is returned.
[0038] Optionally, the switch management method further comprises:
[0039] receiving a state notification packet sent by each slave switch in a timing cycle; the state notification packet carries state information of the slave switch;
[0040] Visualize all state information, realize the state monitoring of all slave switches.
[0041] In a second aspect, the present application provides a master switch, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the switch management method when executing the computer program.
[0042] The above scheme of the present application has the following advantages:
[0043] In the embodiments of the present application, the discovery packets sent by the plurality of slave switches are received, then the switch topology is generated according to all the discovery packets, the configuration information of all the slave switches is obtained based on the switch topology, the faulty switch is determined from all the slave switches, the configuration information of the faulty switch is issued to the replacement switch corresponding to the faulty switch, finally the notification packet sent by the replacement switch is received, the replacement switch is taken as a slave switch, and the switch topology is updated. Wherein, the device information of the slave switch is obtained through the discovery packet and the switch topology is generated, which can comprehensively discover the slave switches in the cluster, facilitate the unified monitoring, configuration and state management of the switches, automatically determine the faulty switch and replace it, the replacement switch can be directly connected to the cluster and inherit the configuration information, shorten the network interruption time, and effectively improve the switch management efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0045] Figure 1 The flow chart of the switch management method provided by an embodiment of the present application;
[0046] Figure 2 The switch service networking schematic diagram provided by an embodiment of the present application;
[0047] Figure 3 The specific structure of the master switch provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0049] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0050] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0051] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0052] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0053] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0054] In view of the low efficiency of the existing switch management, the embodiment of the present application provides a switch management method, which comprises the following steps: receiving discovery packets sent by a plurality of slave switches; generating a switch topology according to all the discovery packets; obtaining configuration information of all the slave switches based on the switch topology; determining a faulty switch from all the slave switches; issuing the configuration information of the faulty switch to a replacement switch corresponding to the faulty switch; receiving a notification packet sent by the replacement switch; taking the replacement switch as a slave switch; and updating the switch topology. In the method, the device information of the slave switches is obtained through the discovery packets, and the switch topology is generated, so that the slave switches in the cluster can be comprehensively discovered, the unified monitoring, configuration and state management of the switches are facilitated, the faulty switch is automatically determined and replaced, the replacement switch can be directly connected to the cluster and inherit the configuration information, the network interruption time is shortened, and the efficiency of the switch management is effectively improved.
[0055] Next, the switch management method provided by the present application is exemplarily described.
[0056] The switch management method provided by the present application is applied to a master switch, which is a switch for managing other switches in a switch cluster and is preset by a user. The other switches managed in the same switch cluster are slave switches.
[0057] As shown in Figure 1 The switch management method provided by the present application comprises the following steps:
[0058] Step 11: receiving discovery packets sent by a plurality of slave switches.
[0059] The discovery packet carries the device information (such as device model, role, media access control (MAC) address, Internet protocol (IP), etc.) of the slave switch and the connection relationship with other switches, and is a layer 2 broadcast packet (destination MAC: FF: FF: FF: FF: FF: FF, protocol number 0x1616) for announcing its own information and is sent at a regular time. The carried fields include device model, role (master switch Server / slave switch Client), MAC address, IP address, connection port, etc.
[0060] Specifically, the slave switch sends the discovery packet at a regular time after starting. The master switch and the other slave switches in the switch cluster can all receive the discovery packet.
[0061] It should be noted that the master switch also periodically broadcasts discovery messages carrying its own device information to the slave switches. If the slave switch receives the discovery message sent by the master switch, the device information of the master switch is added or updated, the connection relationship is recorded, and then the message is sent out from other ports except the receiving port. If the slave switch receives the discovery message sent by other slave switches, the device information of the other slave switches is added or updated, the connection relationship is recorded, and if the message carries the address of the master switch, the message is forwarded to the master switch and then discarded, and if it does not carry the address, it is directly discarded.
[0062] Step 12: generating a switch topology according to all the discovery messages, and obtaining configuration information of all the slave switches based on the switch topology.
[0063] The plurality of nodes in the switch topology correspond to the plurality of switches in the switch cluster one by one, the edges between the nodes are the connection relationships between the corresponding two switches, and the switch cluster is composed of the master switch and all the slave switches. The configuration information includes running configuration, configuration parameters and the like.
[0064] In some embodiments of the present application, the step of generating a switch topology according to all the discovery messages, and obtaining configuration information of all the slave switches based on the switch topology includes:
[0065] First, parse each discovery message to obtain the device information and connection relationship of each slave switch.
[0066] For example, the master switch can use a command parsing tool such as cmd-parser to parse the discovery message to obtain the device information and connection relationship of the slave switch in the discovery message.
[0067] Second, record the device information of all the slave switches, and generate a corresponding node for each slave switch, generate edges between the nodes according to the connection relationship of the slave switch with other switches, and obtain the switch topology.
[0068] Specifically, if there is a connection relationship between two switches (between slave switches, between the master switch and a slave switch), an edge is generated between the corresponding two nodes, and if there is no connection relationship, no edge is generated.
[0069] For example, after generating the switch topology, the master switch sends a unicast message to each slave switch to request detailed information (such as device version number, device location information, etc.) of the slave switch. After receiving the message, the slave switch sends its own detailed information to the master switch.
[0070] Third, send a configuration request message to each slave switch to indicate that configuration information needs to be obtained.
[0071] The fourth step is to receive the request response message sent by each slave switch.
[0072] The request response message is sent by the slave switch after receiving the configuration request message, and carries the configuration information of the slave switch. The message is an IP unicast message (source IP: Client IP, destination IP: Server IP), the transmission protocol is User Datagram Protocol (UDP), and the carrying field includes: request ID corresponding to the request, processing result (success / failure), response data (information response / configuration file content / device status / configuration download verification result, etc.).
[0073] For example, after generating the switch topology structure, in order to facilitate user management, a graphical topology diagram can be generated on the web interface of the master switch, displayed in the NetPanel graphical interface, and supports clicking on the device to view detailed information. The device state (online / offline) can be distinguished by color.
[0074] The following will be exemplarily described in conjunction with a specific example.
[0075] The switch service networking of the present application is as shown in Figure 2 The master switch Server (product model: Swich-A) and 10 slave switches Client1 to Client10 (product models: Swich-B to Swich-K), PC is a user device, IP-1 to IP-17 are IP addresses on the switch, and E0 / 0 / 1 to E0 / 0 / 20 are port numbers on the switch. The device information is shown in Table 1:
[0076] Table 1
[0077] The connection port information of all slave switches recorded to the master switch is shown in Table 2:
[0078] Table 2
[0079] The information list of other devices recorded by each level of slave switch is shown in Table 3:
[0080] Table 3
[0081] After generating the switch topology structure, if the port and other device information of the slave switch changes, a notification message carrying the update information is sent to the master switch, and the master switch updates the switch topology structure after receiving it.
[0082] The notification message is an IP unicast message (destination IP: IP address of the Server), which has two uses. One is that when new devices are added, the Notify message is used to send the device information of the new devices to the Server, so that the Server can quickly obtain the device information and the topology connection relationship of the entire network. The other is that when the Client device finds that the device information has changed, the Server is notified to request the device information again, so as to quickly update the device information and the topology connection relationship of the network. If the Server does not send a request message for information within a sending interval after receiving the Notify message, the Client needs to send the Notify message again.
[0083] The request message is an IP unicast message (source IP: Server IP, destination IP: Client IP), and the transmission protocol is UDP. The carried fields include: message type (information query / configuration request / status request, etc.), request ID, and parameters (such as configuration file name, status query item).
[0084] Step 13: determining the faulty switch from all slave switches and sending the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch.
[0085] The replacement switch is a standby switch pre-set in the switch cluster.
[0086] In some embodiments of the present application, the step of determining the faulty switch from all slave switches and sending the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch includes:
[0087] Step 1: determining the offline switch from all slave switches.
[0088] Specifically, it is determined whether there is a slave switch that has not sent a discovery message after a time interval greater than a preset time interval since the last time the discovery message was sent. If yes, the slave switch is regarded as an offline switch; otherwise, the slave switch is considered to be operating normally.
[0089] Step 2: determining whether the offline switch meets a preset fault condition. If yes, the offline switch is regarded as a faulty switch.
[0090] The preset fault condition is that the number of times of not sending a response message for indicating online is greater than or equal to a preset response number.
[0091] Specifically, an inquiry request message for inquiring whether the offline switch is online is sent to the offline switch.
[0092] When the response message sent by the offline switch is received within the preset inquiry time period, the offline switch does not satisfy the preset fault condition.
[0093] When the response message sent by the offline switch is not received within the preset inquiry time period, the number of times of not sending the response message is added by 1, and it is judged whether the number of times of not sending the response message is greater than or equal to the preset response number.
[0094] If yes, it is considered that the offline switch satisfies the preset fault condition.
[0095] Otherwise, the step of sending the inquiry request message for inquiring whether online to the offline switch is returned.
[0096] The third step is to send the configuration information of the fault switch to the replacement switch corresponding to the fault switch.
[0097] For example, after the replacement switch receives the configuration information of the fault switch, the configuration information is applied to the replacement switch, and if the configuration is successful, a notification message is sent to the master switch.
[0098] It should be noted that in order to ensure the normal operation of the replacement switch, after this step, when the notification message sent by the replacement switch is not received within the preset replacement time period, the configuration delivery number is added by 1, and it is judged whether the configuration delivery number is greater than or equal to the preset configuration delivery number; if yes, a new slave switch is selected as the replacement switch of the fault switch, and the step of sending the configuration information of the fault switch to the replacement switch corresponding to the fault switch is returned; otherwise, the step of sending the configuration information of the fault switch to the replacement switch corresponding to the fault switch is returned.
[0099] Step 14, receiving the notification message sent by the replacement switch, taking the replacement switch as a slave switch, and updating the switch topology.
[0100] The above notification message is sent by the replacement switch after applying the received configuration information.
[0101] Specifically, in the switch topology, the node corresponding to the fault switch is marked as fault, and the node corresponding to the replacement switch is suggested, and the edge is generated according to the connection relationship carried in the message sent by the replacement switch, so as to realize the update of the switch topology.
[0102] It should be noted that in order to realize the state monitoring of the slave switch, the method of the application further includes: receiving the state notification message sent by each slave switch in a timing cycle, and the state notification message carries the state information (such as memory usage, port flow, etc.) of the slave switch; visualizing all the state information to realize the state monitoring of all the slave switches.
[0103] In some embodiments of this application, if there is no direct connection between the slave switch and the master switch, the packets of the slave switch are forwarded through an intermediate slave switch to realize communication between the slave switch and the master switch.
[0104] It is worth mentioning that by discovering the device information of the slave switches and generating the switch topology by acquiring the slave switches from the discovery packets, the slave switches in the cluster can be fully discovered, which facilitates unified monitoring, configuration and status management of the switches, automatically identifies and replaces faulty switches, and the replaced switches can be directly connected to the cluster and inherit configuration information, shortening network downtime and effectively improving switch management efficiency.
[0105] The method described in this application has the following beneficial effects:
[0106] Improve management efficiency: Automatic topology generation eliminates the need for manual recording, batch configuration distribution reduces manual operations by more than 90%, and fault replacement time is shortened from hours to minutes;
[0107] Reduced operation and maintenance costs: No need to deploy additional third-party management tools, built-in functions reduce hardware investment; unified management reduces administrator training costs;
[0108] Enhance network stability: Configure backup and verification to avoid human error, and configure the distribution process to support rollback to reduce the risk of failure;
[0109] Rapid fault recovery: Automatic configuration inheritance after device replacement reduces network interruption time from hours to minutes;
[0110] Highly scalable: Supports multi-level cascading, can manage thousands of switches, and is suitable for small to large network scenarios.
[0111] like Figure 3 As shown, an embodiment of this application provides a main switch, wherein the main switch D10 of this embodiment includes: at least one processor D100 ( Figure 3 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on at least one processor D100. When the processor D100 executes the computer program D102, it implements the steps in any of the above-described method embodiments.
[0112] Specifically, the processor D100 executes the computer program D102 to receive a plurality of discovery packets sent by the slave switches, generate a switch topology structure according to all the discovery packets, obtain configuration information of all the slave switches based on the switch topology structure, determine the faulty switch from all the slave switches, and issue the configuration information of the faulty switch to a replacement switch corresponding to the faulty switch. Finally, the processor D100 receives a notification packet sent by the replacement switch, takes the replacement switch as a slave switch, and updates the switch topology structure. The device information of the slave switches is obtained through the discovery packet, and the switch topology structure is generated, which can comprehensively discover the slave switches in the cluster, facilitate unified monitoring, configuration and state management of the switches, automatically determine the faulty switch and replace it, and the replacement switch can be directly connected to the cluster and inherit the configuration information, thereby shortening the network interruption time and effectively improving the switch management efficiency.
[0113] The processor D100 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0114] The memory D101 can be an internal storage unit of the master switch D10 in some embodiments, such as a hard disk or a memory of the master switch D10. The memory D101 can also be an external storage device of the master switch D10 in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory D101 can include both the internal storage unit and the external storage device of the master switch D10. The memory D101 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program codes of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.
[0115] In the above embodiments, the description of each embodiment is focused on, and the part not described or recorded in a certain embodiment can be referred to the relevant description of other embodiments.
[0116] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0117] The above is the preferred embodiment of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. A switch management method applied to a master switch, characterized by, The application relates to a method for managing a switch cluster, comprising the following steps: receiving a plurality of discovery messages sent by slave switches; the discovery messages carry device information of the slave switches and connection relationships with other switches; generating a switch topology according to all the discovery messages and obtaining configuration information of all the slave switches based on the switch topology; the plurality of nodes in the switch topology correspond to a plurality of switches in the switch cluster one by one, and the edges between the nodes are the connection relationships between the corresponding two switches; the switch cluster is composed of a master switch and all the slave switches; determining a faulty switch from all the slave switches and issuing configuration information of the faulty switch to a replacement switch corresponding to the faulty switch; receiving a notification message sent by the replacement switch, taking the replacement switch as a slave switch and updating the switch topology; the notification message is sent by the replacement switch after the replacement switch applies the received configuration information.
2. The switch management method of claim 1, wherein, The step of generating the switch topology according to all the discovery messages comprises the following steps: analyzing each discovery message to obtain the device information and the connection relationship of each slave switch; recording the device information of all the slave switches, generating a corresponding node for each slave switch, generating edges between the nodes according to the connection relationship of the slave switches with other switches and obtaining the switch topology.
3. The switch management method of claim 1, wherein, The step of obtaining the configuration information of all the slave switches based on the switch topology comprises the following steps: sending a configuration request message to each slave switch, the configuration request message being used to indicate that the configuration information needs to be obtained; receiving a request response message sent by each slave switch; the request response message is sent by the slave switch after the slave switch receives the configuration request message and carries the configuration information of the slave switch.
4. The switch management method of claim 1, wherein, The step of determining the faulty switch from all the slave switches comprises the following steps: determining an offline switch from all the slave switches; judging whether the offline switch meets a preset fault condition; if yes, the offline switch is taken as the faulty switch.
5. The switch management method according to claim 4, wherein, The discovery message is cyclically sent by the slave switch. The step of determining the offline switch from all the slave switches comprises the following steps: judging whether there is a slave switch which has not sent a discovery message after a time period greater than a preset time period since the last time the discovery message is sent; if yes, the slave switch is taken as the offline switch.
6. The switch management method according to claim 5, wherein, The preset fault condition is that the number of times of not sending a response message for indicating that the slave switch is online is greater than or equal to a preset response number.
7. The switch management method according to claim 6, wherein, The step of judging whether the offline switch meets the preset fault condition comprises the following steps: sending an inquiry request message to the offline switch, the inquiry request message being used to inquire whether the offline switch is online; when a response message sent by the offline switch is received within a preset inquiry time period, the offline switch does not meet the preset fault condition; when the response message sent by the offline switch is not received within the preset inquiry time period, the number of times of not sending the response message is increased by 1, and it is judged whether the number of times of not sending the response message is greater than or equal to the preset response number; if yes, it is considered that the offline switch meets the preset fault condition; otherwise, the step of sending the inquiry request message to the offline switch is returned.
8. The switch management method of claim 1, wherein, Before the step of receiving the notification message sent by the replacement switch, taking the replacement switch as a slave switch, and updating the switch topology, the switch management method further comprises: When the notification message sent by the replacement switch is not received within a preset replacement time period, the number of configuration and distribution times is increased by one, and it is determined whether the number of configuration and distribution times is greater than or equal to a preset number of configuration and distribution times; If yes, a new slave switch is selected as the replacement switch of the faulty switch, and the step of distributing the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch is returned to; Otherwise, the step of distributing the configuration information of the faulty switch to the replacement switch corresponding to the faulty switch is returned to.
9. The switch management method of claim 1, wherein, The switch management method further comprises: Receiving a state notification message sent by each slave switch in a timing cycle; the state notification message carries state information of the slave switch; Visualizing all the state information to realize state monitoring of all the slave switches.
10. A master switch comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the switch management method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method of managing all stacked slave switches through master switch
CN105471601A
Automated configuration of network device
US20160182407A1