A network topology management method, management device, and storage medium

By using the serial management protocol between the switch and the management workstation to encapsulate LLDP, identify the message frame header switching mode, and obtain network topology information, the problem of insufficient security of the existing SNMP method is solved, and safe and reliable network topology management is achieved.

CN115865694BActive Publication Date: 2025-08-05北京东土军悦科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211451181.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-08-05
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

The existing SNMP-based network topology management method has low security problems because it is a network-based protocol, and cannot be applied to occasions with high security requirements.

Method used

The serial port management protocol is used to encapsulate LLDP, and by identifying the message frame header, switching to the serial port management mode, obtaining network topology information, ensuring the safe and reliable interaction mode between the switch and the management workstation.

Benefits of technology

It improves the security of network topology management, is suitable for occasions with high security requirements, enhances the diversity of interaction modes between management workstations and core switches, and realizes simple and feasible network topology management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865694B_ABST
    Figure CN115865694B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a network topology management method, management device and storage medium, which belongs to the field of computer network technology. Network topology management includes: in response to the frame header of the message message to be received from the management workstation being the first preset character, switching the interaction mode between the core switch and the management workstation from the default mode to the serial port management mode based on the serial port management protocol interaction; in the serial port management mode, receiving a complete frame of message message from the management workstation based on the serial port management protocol, and obtaining the network topology information about the network structure corresponding to the received message message based on LLDP; and generating and sending a response message to the management workstation based on the network topology information, so that the management workstation performs network topology management about the network structure. The serial port-based network topology management of the embodiment of the present invention is safe and reliable, and is particularly suitable for occasions with high security requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer networks, and in particular to a network topology management method, a management device and a storage medium. Background Art

[0002] Typically, switches manage other switches based on configured network ports. For example, a switch can manage the network topology of other switches using the Simple Network Management Protocol (SNMP) through configured network ports. However, because SNMP is a network-based protocol, and networks themselves have many insecurity factors, this SNMP-based network topology management method is less secure and is not suitable for applications with high security requirements. Summary of the Invention

[0003] The purpose of the embodiments of the present invention is to provide a network topology management method, a management device, and a storage medium, which are used to at least partially solve the above-mentioned technical problems.

[0004] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a network topology management method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, and the network topology management method is applied to the core switch, comprising: in response to a frame header of a message message to be received from the management workstation being a first preset character, switching the interaction mode between the core switch and the management workstation from a default mode to a serial port management mode based on a serial port management protocol interaction, wherein the serial port management protocol encapsulates a link layer discovery protocol LLDP, and wherein the first preset character is used to indicate that the message message to be received is a message based on the serial port management protocol; in the serial port management mode, receiving a complete frame of a message message from the management workstation based on the serial port management protocol, and obtaining network topology information about the network structure corresponding to the received message message based on LLDP; and generating and sending a response message based on the network topology information to the management workstation, so that the management workstation performs network topology management on the network structure.

[0005] Optionally, the network topology management method further includes: when the frame header of the message message is a character other than the first preset character, maintaining the interaction mode between the core switch and the management workstation in the default mode.

[0006] Optionally, after switching to the serial port management mode, the network topology management method further includes: if a complete message frame is not received within a preset time, exiting the serial port management mode.

[0007] Optionally, the network topology management method also includes: determining whether the frame tail of the message message is a second preset character; if so, setting the frame tail of the message message as a receiving reminder flag to continue receiving the next frame message sent by the management workstation, wherein the second preset character is used to indicate that the core switch has received a complete frame message.

[0008] Optionally, before obtaining the network topology information, the network topology management method also includes verifying the received message message to determine whether the message message is legal, which includes: parsing the message message to obtain the checksum, message sequence number and message type of the message message; when the checksum, message sequence number and message type of the message message all meet the corresponding format agreed upon by the serial port management protocol, it is determined that the message message is a legal message; otherwise, the message message is cleared and the buffer storing the message message is cleared.

[0009] Optionally, the message packets include LLDP configuration message packets, LLDP local information query message packets, LLDP remote information query message packets and LLDP port traffic query message packets; and the response packets include LLDP configuration response packets, LLDP local information query response packets, LLDP remote information query response packets and LLDP port traffic query response packets.

[0010] In a second aspect, an embodiment of the present invention provides a network topology management method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, and the network topology management method is applied to the management workstation, including: sending a message message to be received to the core switch, so that when the core switch determines that the frame header of the message message is a first preset character, the interaction mode between the core switch and the management workstation is switched from a default mode to a serial port management mode based on a serial port management protocol interaction; and in the serial port management mode, the core switch receives a complete frame of message message from the management workstation based on the serial port management protocol, and obtains network topology information about the network structure corresponding to the received message based on LLDP, wherein the serial port management protocol encapsulates the link layer discovery protocol LLDP, and the first preset character is used to characterize that the message message to be received is a message based on the serial port management protocol; receiving a response message generated based on the network topology information and sent by the core switch, so as to realize network topology management of the network structure.

[0011] In a third aspect, an embodiment of the present invention provides a network topology management device, which is applied to the core switch and includes: a memory storing a program that can be run on a processor; and the processor, which is configured to implement the network topology management method described in the first aspect when executing the program.

[0012] In a fourth aspect, an embodiment of the present invention provides a network topology management device, which is applied to the management workstation and includes: a memory storing a program that can be run on a processor; and the processor, which is configured to implement the network topology management method described in the second aspect when executing the program.

[0013] In a fifth aspect, an embodiment of the present invention provides a core switch, wherein the core switch includes the network topology management device described in the third aspect.

[0014] In a sixth aspect, an embodiment of the present invention provides a management workstation, which includes the network topology management device described in the fourth aspect.

[0015] In the seventh aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores instructions, and the instructions are used to enable the machine to execute the network topology management method applied to the core switch described in the first aspect of this application or the network topology management method applied to the management workstation described in the second aspect.

[0016] Through the above technical solution, the embodiment of the present invention performs network topology management based on a serial port. By identifying the message frame header, it enters the serial port management mode for network topology management and then obtains network topology information through the LLDP protocol. Compared with traditional topology management methods using network ports, the network topology management method of the present invention is more secure and reliable, and is particularly suitable for applications requiring high security.

[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:

[0019] Figure 1 is a schematic diagram of a network structure according to an exemplary embodiment;

[0020] Figure 2 This is a flow chart of a network topology management method applied to a core switch according to an exemplary embodiment;

[0021] Figure 3 This is a flow chart of a verification message according to an exemplary embodiment;

[0022] Figure 4 is a flowchart illustrating a message processing based on a serial port management protocol according to an exemplary embodiment;

[0023] Figure 5 The present invention is a flow chart showing a network topology management method applied to a management workstation according to an exemplary embodiment. DETAILED DESCRIPTION

[0024] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.

[0025] First, some of the terms involved in the embodiments of the present invention are explained to help those skilled in the art understand the technical solutions of the present invention.

[0026] Simple Network Management Protocol (SNMP): A set of network management standards consisting of an application layer protocol, a database model, and a set of data objects. This protocol is used to monitor devices connected to the network for any conditions that require management attention.

[0027] Link Layer Discovery Protocol (LLDP): provides a standard link layer discovery method that organizes the main capabilities, management address, device identification, interface identification and other information of the local device into different TLVs (Type / Length / Value), encapsulates them in link layer discovery protocol data units, and publishes them to directly connected neighbors. After receiving this information, the neighbors save it in the form of a standard management information base for the network management system to query and judge the communication status of the link.

[0028] Example 1

[0029] An embodiment of the present invention provides a network topology management method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, and Figure 1 As shown, the network topology management method is applied to the core switch, including steps S110 to S130:

[0030] Step S110, in response to the frame header of the message message to be received from the management workstation being a first preset character, switching the interaction mode between the core switch and the management workstation from a default mode to a serial port management mode based on serial port management protocol interaction, wherein the serial port management protocol encapsulates the link layer discovery protocol LLDP, and wherein the first preset character is used to characterize that the message message to be received is a message based on the serial port management protocol.

[0031] For example, Figure 2 A schematic diagram of a network structure is shown in FIG. Figure 2 As shown, the network structure includes a management workstation, core switches, and access switches. The management workstation can be considered a user or terminal, interacting with the core switch via serial ports. The core switch can be considered the backbone of its network, connecting to access switches 1, 2, and 3 within the network via different service ports.

[0032] In step S110, the management workstation sends a message to be received to the core switch, and the core switch begins to receive the message in response to the sending of the message to be received by the management workstation. At this time, the core switch is in default mode. This default mode is also called the default mode of the serial port, and specifically refers to the command line mode here. Since the first thing received when receiving a message is the frame header of the message, in an embodiment of the present invention, when the core switch receives the frame header of the message, it is necessary to determine whether the frame header of the message is a first preset character. The first preset character represents that the message sent by the management workstation is a message based on the serial port management protocol, that is, a message for network topology management. For example, if the first preset character is 0xc2, if the frame header of the message is 0xc2, it means that the message is a message sent based on the serial port management protocol, that is, the message is a message for managing the network topology. Furthermore, when the core switch determines that the message is a message for network topology management, the core switch switches the interaction mode between it and the management workstation from the default mode (command line mode) to the serial port management mode, so that the core switch can receive a complete frame of the message based on the serial port management mode.

[0033] In the embodiment of the present invention, LLDP is encapsulated in the serial port management protocol. The purpose is to enable the core switch to obtain network topology information through LLDP when receiving a message based on the serial port management protocol.

[0034] In a preferred embodiment, when the frame header of the message message contains characters other than the first preset characters, the interaction mode between the core switch and the management workstation is maintained in the default mode.

[0035] For example, if the core switch determines that the message header contains characters other than the first preset character set, this indicates that the message is not based on the serial port management protocol. For example, the message may be based on the command line protocol or an illegal message. In this case, the interaction mode between the core switch and the management workstation remains in the default mode and does not switch to the serial port management mode. For example, if the first preset character set is 0xc2, and the message header contains 0xd5, the core switch determines that the message header does not contain the first preset character set and, therefore, maintains the interaction mode between the core switch and the management workstation in the default mode.

[0036] In this preferred embodiment, when it is determined that the message frame header is not the first preset character, the core switch maintains the current interaction mode with the management workstation. On the one hand, this prevents the erroneous switching of the interaction mode from affecting the normal communication between the core switch and the management workstation; on the other hand, it prevents illegal messages from interfering with the operation of the core switch, thereby ensuring the safe operation of the core switch.

[0037] Step S120 : In the serial port management mode, a complete message frame is received from the management workstation based on the serial port management protocol, and network topology information about the network structure corresponding to the received message frame is acquired based on LLDP.

[0038] For example, after the core switch receives the message header and enters serial port management mode, in order to understand the specific content of the network topology management to be performed by the message, the core switch needs to continue to receive a complete frame of the message for the frame header based on the serial port management protocol, and then obtain the corresponding network topology information based on the specific content contained in the message. Table 1 shows a serial port management protocol format for a management workstation and a core switch. As shown in Table 1, the message format includes the message frame header, message sequence number, message type, message length, message content, checksum, and frame trailer, and corresponding agreements are made for the number of bytes and special requirements of each content. The relevant description of the message type will be detailed in the following embodiments.

[0039] Table 1

[0040]

[0041]

[0042] In a preferred embodiment, after switching to the serial port management mode, the network topology management method further includes: if a complete message frame is not received within a preset time, exiting the serial port management mode.

[0043] For example, after the core switch switches to the serial port management mode, the core switch fails to receive a complete frame of messages within the preset time, which may include two situations: (1) After the core switch determines that the frame header is the first preset character and switches to the serial port management mode, it fails to receive a complete frame of messages related to the frame header within the preset time. In this case, there may be a communication failure between the core switch and the management workstation based on the serial port management mode. (2) After the core switch switches to the serial port management mode, the core switch can successively receive the message messages based on the serial port management protocol sent by the management workstation based on the serial port management protocol. However, when the management workstation has no subsequent network topology management needs, the management workstation no longer sends message messages; or when the management workstation has other communication needs, such as the management workstation sends a message based on the command line protocol, at this time, because the core switch is in the serial port management mode, it cannot receive a frame of messages other than those based on the serial port management protocol. Therefore, in the above two situations, the core switch may fail to receive a complete frame of messages within the preset time. Therefore, to address the above two situations, embodiments of the present invention implement a timeout mechanism. If the core switch does not receive a complete message frame within a preset timeout period, the core switch exits serial port management mode and switches to the default mode (command line mode), allowing the core switch to interact with the management workstation in other modes. It should be noted that the above preset timeout period can be flexibly set based on actual needs and is not subject to excessive restrictions.

[0044] In this preferred embodiment, by judging whether a complete frame of message is received within the preset time, the core switch can automatically exit the serial port management mode after entering the serial port management mode, avoiding the problem of being unable to exit the serial port management mode after entering the serial port management mode, and ensuring that the core switch and the management workstation can communicate effectively based on other modes.

[0045] In another preferred embodiment, it is determined whether the frame tail of the message message is a second preset character. If so, the frame tail of the message message is set as a receiving reminder flag to continue receiving the next frame message sent by the management workstation, wherein the second preset character is used to indicate that the core switch has received a complete frame message.

[0046] For example, using Table 1 above, assume the second preset character is 0xc3. If the frame tail of the received message is 0xc3, it indicates that the core switch has received a complete frame of the message. To facilitate receiving the next frame of the message, the core switch sets the frame tail as a reception reminder, for example, by clearing the frame tail or setting the frame tail to a specific character, etc., without further limitation.

[0047] In this preferred embodiment, by judging the frame tail of the received message message, the reception timing for the next frame message message is determined, which can prevent the core switch from receiving too many messages within a certain period of time and causing the core switch to be overloaded, thereby facilitating the normal operation of the core switch.

[0048] In another preferred embodiment, Figure 3 As shown, before obtaining the network topology information, the network topology management method further includes verifying the received message to determine whether the message is legal, which includes:

[0049] Step S310: parse the message to obtain the checksum, message sequence number and message type of the message.

[0050] Step S320: When the checksum, message sequence number and message type of the message message all meet the corresponding formats specified by the serial port management protocol, the message message is determined to be a legal message; otherwise, the message message is cleared and the buffer storing the message message is emptied.

[0051] For example, after receiving a complete message frame, the core switch needs to verify the message before obtaining topology management information for its network. First, the core switch parses the message frame based on the format of the serial port management protocol mentioned above to obtain the message's checksum, message sequence number, and message type. The core switch then determines whether the characters in the parsed checksum, message sequence number, and message type meet the specified format specified by the serial port management protocol. Only when all three meet the specified format will the core switch obtain network topology information based on LLDP. If any of the checksum, message sequence number, and message type do not meet the specified format, it may indicate that the message frame sent by the management workstation is incorrect. In this case, the core switch needs to clear the complete message frame and no longer obtain network topology information for this message frame. The core switch also clears the buffer storing the message frame to buffer the next received message frame, thereby preventing buffer congestion.

[0052] The following combination Figure 4 Taking the example of the serial port management protocol as an example, the message processing flow based on the serial port management protocol is further introduced.

[0053] Step S410: receiving a message message.

[0054] For example, the core switch receives a complete message frame, and then parses the message based on the serial port management protocol to obtain the checksum, message sequence number, and message type of the message.

[0055] Step S420: Determine whether the checksum is correct.

[0056] For example, the core switch determines whether the parsed checksum conforms to the format specified by the serial port management protocol, and if so, executes step S430. Otherwise, executes step S470.

[0057] Step S430: Check whether the message sequence number is correct.

[0058] For example, the core switch checks whether the parsed message sequence number conforms to the format specified by the serial port management protocol, and if so, executes step S440. Otherwise, executes step S470.

[0059] Step S440: Determine whether the message includes a message type for obtaining network topology information.

[0060] For example, the core switch determines whether the parsed message type conforms to the format specified by the serial port management protocol. If so, it indicates that the message includes a message type for obtaining network topology information, and step S450 is executed. Otherwise, step S470 is executed.

[0061] Step S450: Obtain network topology information and fill in the sending message header.

[0062] For example, the core switch obtains the corresponding network topology information based on the parsed message type. For example, if the parsed message type is a remote information query, the core switch obtains the ID, name, and port information of the connected access switch based on this message type. The core switch then encapsulates the obtained network topology information into a response message based on the format specified by the serial port management protocol.

[0063] Step S460: call the sending function interface.

[0064] For example, after the core switch encapsulates the response message, it sends the response message to the management workstation based on the serial port management protocol.

[0065] Step S470: Clear the message and clear the buffer.

[0066] For example, when the core switch determines that any one of the checksum, message sequence number, and message type does not meet the format agreed upon by the serial port management protocol, it means that the received message information is incorrect. At this time, the message is cleared and the buffer is emptied, and network topology information is no longer obtained based on the message.

[0067] In this preferred embodiment, after receiving a complete message frame and before acquiring the network topology information, the core switch further verifies the received message to ensure the legitimacy of the message, thereby further improving the security of network topology information management.

[0068] Step S130: Generate and send a response message to the management workstation based on the network topology information, so that the management workstation performs network topology management on the network structure.

[0069] For example, after the core switch obtains the corresponding network topology information, it encapsulates the obtained network topology information into a response message. The format of the response message is also the message format of the serial port management protocol. The core switch then sends the response message to the management workstation, so that the management workstation can use the response message to manage the network topology.

[0070] The response message mentioned here is actually a feedback message for the message message mentioned in the above step 110. For example, when the management workstation sends a message message for network topology management, the core switch feeds back a response message to the management workstation in response to the message message.

[0071] In a preferred embodiment, for the above-mentioned message types, the message sent by the management workstation to the core switch may include:

[0072] LLDP configuration message packets are used to obtain configuration information of access switches connected to the core switch.

[0073] LLDP local information query message is used to query the local information of the core switch, such as the core switch name and port information status of the core switch.

[0074] LLDP remote information query message is used to obtain the name, ID address, and other information of the access switch connected to the core switch.

[0075] LLDP port traffic query message is used to obtain the port traffic status of the access switch port connected to the core switch.

[0076] Correspondingly, the response messages sent by the core switch to the management workstation include: LLDP configuration response message, LLDP local information query response message, LLDP remote information query response message, and LLDP port traffic query response message.

[0077] Table 2 explains the meaning of the byte data in LLDP configuration message messages and response messages, LLDP local message query messages and response messages, and LLDP remote message query messages and corresponding messages.

[0078] Table 2

[0079]

[0080]

[0081]

[0082] Therefore, the present invention implements network topology management based on serial ports, configuring a serial port management mode based on the default serial port configuration. Furthermore, in this mode, the management workstation and the core switch interact using the serial port management protocol to obtain network information, ultimately achieving network topology management. Compared to existing SNMP-based network topology management, the present invention is more secure and reliable, making it particularly suitable for applications requiring high security.

[0083] Example 2

[0084] An embodiment of the present invention further provides a network topology management method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, and the network topology management method is applied to the management workstation, such as Figure 5 As shown, the network topology management method includes:

[0085] Step S510: Send a message message to be received to the core switch, so that when the core switch determines that the frame header of the message message is a first preset character, the interaction mode between the core switch and the management workstation is switched from the default mode to the serial port management mode based on the serial port management protocol interaction; and in the serial port management mode, the core switch receives a complete frame of the message message from the management workstation based on the serial port management protocol, and obtains the network topology information about the network structure corresponding to the received message based on LLDP, wherein the serial port management protocol encapsulates the link layer discovery protocol LLDP, and the first preset character is used to characterize that the message message to be received is a message based on the serial port management protocol.

[0086] Step S520: receiving a response message generated based on the network topology information and sent by the core switch, so as to implement network topology management of the network structure.

[0087] For more implementation details and beneficial effects of the embodiments of the present invention, please refer to the above embodiments and will not be described in detail here.

[0088] Example 3

[0089] The embodiment of the present invention provides a remote information query response message, combined with Figure 1As shown in the figure, assume that the port connecting the core switch to each access switch is a 1000M port with a cost of 100. Assume that the management workstation sends an LLDP remote information query message to the core switch. The core switch will feedback the corresponding information of each port in the form of a response message to the management workstation based on the message. The feedback response message is shown in Table 3:

[0090] Table 3

[0091]

[0092]

[0093] Furthermore, based on the information fed back in Table 3 above, the management workstation can obtain the connection status between the core switch and the access switch.

[0094] Table 4

[0095]

[0096]

[0097] As can be seen from Table 4 above, the management workstation sends a remote information query message to the core switch, and then receives a remote information query response message fed back by the core switch. Through the response message, the name, ID number and other information of each port of the core switch and the connected access switch can be obtained, thereby realizing network topology management of the network where the core switch is located.

[0098] In summary, the network topology management method of the present invention has the following advantages:

[0099] 1) Configure the serial port management mode for the serial port, implement network topology management based on the serial port, and improve the security of network topology management;

[0100] 2) Increased the diversity of interaction modes between management workstations and core switches to adapt to different application scenarios;

[0101] 3) The implementation process of network topology management is simple, feasible and practical.

[0102] Based on the same technical concept as the above-mentioned embodiment 1, an embodiment of the present invention provides a network topology management device, which is applied to the core switch, including: a memory, which stores a program that can be run on a processor; and the processor, which is configured to implement the network topology management method described in the above-mentioned embodiment 1 when executing the program.

[0103] Based on the same technical concept as the above-mentioned embodiment 2, the present invention implements a network topology management device, which is applied to the management workstation and includes: a memory storing a program that can be run on a processor; and the processor, which is configured to implement the network topology management method described in the above-mentioned embodiment 2 when executing the program.

[0104] An embodiment of the present invention provides a core switch, which includes the above-mentioned network topology management device applied to the core switch.

[0105] An embodiment of the present invention provides a management workstation, which includes the above-mentioned network topology management device applied to the management workstation.

[0106] Accordingly, the present invention provides an example of a machine-readable storage medium, which stores instructions for enabling a machine to execute the network topology management method applied to a core switch or the network topology management method applied to a management workstation as described above in this application.

[0107] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0108] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0109] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0111] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0112] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0113] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0114] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0115] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A network topology management method, characterized in that: A method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, wherein the network topology management method is applied to the core switch, comprising: In response to a frame header of the message message to be received from the management workstation being a first preset character, switching the interaction mode between the core switch and the management workstation from a default mode to a serial port management mode based on a serial port management protocol interaction, wherein the serial port management protocol encapsulates a link layer discovery protocol LLDP, and wherein the first preset character is used to indicate that the message message to be received is a message based on the serial port management protocol; In the serial port management mode, receiving a complete message frame from the management workstation based on the serial port management protocol, and obtaining network topology information about the network structure corresponding to the received message frame based on LLDP; and A response message is generated based on the network topology information and sent to the management workstation, so that the management workstation performs network topology management on the network structure.

2. The network topology management method according to claim 1, wherein: The network topology management method further includes: When the frame header of the message message contains characters other than the first preset characters, the interaction mode between the core switch and the management workstation is maintained as the default mode.

3. The network topology management method according to claim 1, wherein: After switching to the serial port management mode, the network topology management method further includes: If a complete message frame is not received within the preset time, the serial port management mode is exited.

4. The network topology management method according to claim 1, wherein: The network topology management method further includes: Determine whether the frame tail of the message message is a second preset character. If so, set the frame tail of the message message as a reception reminder flag to continue receiving the next frame message sent by the management workstation, wherein the second preset character is used to indicate that the core switch has received a complete frame message.

5. The network topology management method according to claim 1, wherein: Before obtaining the network topology information, the network topology management method further includes verifying the received message to determine whether the message is legal, which includes: Parsing the message to obtain a checksum, a message sequence number, and a message type of the message; When the checksum, message sequence number and message type of the message message all meet the corresponding formats agreed upon by the serial port management protocol, the message message is determined to be a legal message; otherwise, the message message is cleared and the buffer storing the message message is emptied.

6. The network topology management method according to claim 1, wherein: The message packets include LLDP configuration message packets, LLDP local information query message packets, LLDP remote information query message packets and LLDP port traffic query message packets; as well as The response messages include an LLDP configuration response message, an LLDP local information query response message, an LLDP remote information query response message, and an LLDP port traffic query response message.

7. A network topology management method, characterized in that: A method for performing network topology management on a network structure including a management workstation, at least one core switch interacting with the management workstation, and at least one access switch connected to the core switch, wherein the network topology management method is applied to the management workstation, comprising: Sending a message message to be received to the core switch, so that when the core switch determines that the frame header of the message message is a first preset character, the core switch switches the interaction mode between the core switch and the management workstation from a default mode to a serial port management mode based on serial port management protocol interaction; and in the serial port management mode, the core switch receives a complete frame of the message message from the management workstation based on the serial port management protocol, and obtains network topology information about the network structure corresponding to the received message based on LLDP, wherein the serial port management protocol encapsulates the link layer discovery protocol LLDP, and the first preset character is used to indicate that the message message to be received is a message based on the serial port management protocol; A response message generated based on the network topology information and sent by the core switch is received to implement network topology management of the network structure.

8. A network topology management device, characterized in that: The network topology management device is applied to a core switch, and includes: a memory storing a program capable of being executed on the processor; and The processor is configured to implement the network topology management method according to any one of claims 1 to 6 when executing the program.

9. A network topology management device, characterized in that: The network topology management device is applied to a management workstation and includes: a memory storing a program capable of being executed on the processor; and The processor is configured to implement the network topology management method according to claim 7 when executing the program.

10. A core switch, characterized in that: The core switch includes the network topology management device according to claim 8 above.

11. A management workstation, characterized in that: The management workstation includes the network topology management device according to claim 9.

12. A machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the network topology management method applied to a core switch as described in any one of claims 1 to 6 of the present application or the network topology management method applied to a management workstation as described in claim 7.

Citation Information

Patent Citations

  • Intelligent substation network topology step-by-step sniffing method based on LLDP protocol

    CN111030296A

  • Network topology generation method, system and device and computer storage medium

    CN112953774A