Network topological graph drawing method and system of switch equipment
By obtaining the media access control address of the switch device and resolving the topology request and response messages, the problems of coverage blind spots and network loops of multi-hop devices are solved, and the complete drawing of the network topology map of the switch device is realized, improving the completeness and accuracy of topology discovery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CLOUDNINE INFORMATION TECH CO LTD
- Filing Date
- 2025-11-27
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies have blind spots in multi-hop device coverage, lack effective forwarding control, are prone to causing network loops, resulting in incomplete topology structures and missing devices during network fluctuations, affecting the integrity of topology discovery.
By obtaining the media access control addresses of the directly connected neighbors of the switch devices, a set of devices to be queried is established, topology discovery requests are traversed and sent, topology request and response messages are parsed, a set of link topology information is constructed, and closed-loop supplementary lookup is achieved to ensure the integrity of topology discovery.
It eliminates coverage blind spots in multi-hop networks, avoids incomplete topology structures, ensures the integrity and accuracy of topology discovery, and improves the efficiency of network operation and maintenance.
Smart Images

Figure CN121887652A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to a method and system for drawing network topology diagrams of switching devices. Background Technology
[0002] With the rapid development of computer network technology, the scale of local area networks (LANs) continues to expand. As the core node for network data forwarding and device connection, switches are becoming increasingly complex in terms of deployment quantity and connection relationships. Whether it's daily network resource scheduling, device status monitoring, or fault node location and link fault troubleshooting, an accurate and complete network topology diagram is the core basis for maintenance personnel to carry out their work.
[0003] The current mainstream network topology discovery and mapping technology revolves around three stages: "device information collection - connection relationship identification - data integration and visualization". First, it collects basic configurations such as switch device identifiers and interface status through the SNMP protocol. Then, it obtains the MAC addresses of proxy devices and directly connected neighbors by using ARP cache scanning to initially identify direct connections. Finally, it relies on the neighbor discovery function of the LLDP basic protocol to collect simple connection information between devices.
[0004] However, existing technologies have blind spots in multi-hop device coverage and lack effective forwarding control, which can easily lead to network loops and incomplete topology. At the same time, due to the lack of a closed-loop supplementary inspection mechanism for unresponsive devices, devices are easily missed during network fluctuations, thus affecting the integrity of topology discovery. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for drawing network topology diagrams of switching devices, which can solve the technical problems of blind spots in multi-hop device coverage, lack of effective forwarding control, easy occurrence of network loops and incomplete topology structure in the prior art; at the same time, due to the lack of a closed-loop supplementary checking mechanism for unresponsive devices, devices are easily missed during network fluctuations, thus affecting the integrity of topology discovery.
[0006] A first aspect of this invention provides a method for drawing a network topology diagram of a switching device, comprising: S1: Obtain the media access control address of the switch device's directly connected neighbor.
[0007] S2: Add the corresponding information of media access control address and shortest path hop count to the set of devices to be queried.
[0008] S3: Traverse the nodes in the set of devices to be queried and send a topology discovery request.
[0009] S4: Add the node information corresponding to the topology discovery request to the query device status set.
[0010] S5: Parse the topology request message sent by the switch device through the target device.
[0011] S6: Based on the first parsing result of the topology request message, parse the topology response message sent by the target device through the proxy device.
[0012] S7: Based on the second parsing result of the topology response message, update the set of devices to be queried and the set of device statuses to be queried.
[0013] S8: When there is no node to be queried in the set of devices to be queried, search for the status node in the set of device status with the status identifier of the first preset value.
[0014] S9: Add the status node to the set of devices to be queried, and return to step S3.
[0015] S10: Based on the second parsing result, establish a set of link topology information and transmit it to the network end to draw the network topology diagram of the switch device.
[0016] A second aspect of this invention provides a network topology diagram drawing system for a switching device, comprising: a processor and a memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the network topology drawing method for the switching device as described in the first aspect.
[0017] A third aspect of the present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the network topology drawing method for a switching device as described in the first aspect.
[0018] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this embodiment of the invention, by traversing the set of devices to be queried and sending topology discovery requests, coverage blind spots in multi-hop networks are systematically eliminated; by establishing a parsing mechanism for topology request and response messages, the problem of incomplete topology structure caused by network loops is effectively avoided; and unresponsive state nodes are added back to the set of devices to be queried for supplementary query, forming a closed-loop mechanism, thereby ensuring the integrity of topology discovery. Attached Figure Description
[0019] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0020] Figure 1 This is a flowchart illustrating a method for drawing a network topology diagram of a switch device according to an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of a network topology drawing system for a switch device provided in an embodiment of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] The method for drawing network topology diagrams of switching devices provided in this invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0024] Reference manual attached Figure 1 The diagram illustrates a flowchart of a method for drawing a network topology diagram of a switching device according to an embodiment of the present invention.
[0025] This invention provides a method for drawing a network topology diagram of a switching device, which may include the following steps: S1: Obtain the media access control address of the switch device's directly connected neighbor.
[0026] Switches are the core network devices for building local area networks (LANs), primarily operating at Layer 2 (Data Link Layer) and Layer 3 (Network Layer) of the Open Systems Interconnection (OSI) reference model. Their function is to efficiently and accurately forward data frames / packets between ports based on Media Access Control (MAC) addresses, connecting multiple network nodes (such as computers, servers, printers, and other switches) to form a unified network. Switches are widely used in various scenarios requiring high-speed internal interconnection, such as enterprise office networks, data centers, campus networks, and the industrial internet. Obtaining network topology information is particularly important for network maintenance.
[0027] The Media Access Control Address (MAC) operates at the data link layer of the OSI model. It is a globally unique identifier that is embedded in the hardware of a network device at the factory, which is equivalent to the device's "physical ID card" in the network. Its core function is to accurately identify the sending and receiving devices within the local area network, and to support network devices such as switches to efficiently forward data frames based on this address, ensuring that the data is accurately delivered to the target device.
[0028] S2: Add the corresponding information of media access control address and shortest path hop count to the set of devices to be queried.
[0029] It should be noted that the correspondence between the media access control address and the shortest path hop count is as follows:<mac,hop> The device is added to the set of devices to be queried in the form of (hop=1).
[0030] In this embodiment of the invention, the media access control address of the proxy device's direct neighbor is compared with the shortest path hop number (hop=1).<mac,hop> The structured format added to the set of devices to be queried has multiple technical advantages: on the one hand, it provides a unified...<mac,hop> The format provides a standardized benchmark for the storage, traversal, and updating of device information in the subsequent topology discovery process, ensuring that the agent device has consistent management logic for various types of devices to be queried (including initial directly connected devices and subsequently discovered multi-hop devices), reducing the complexity of data processing; on the other hand, clearly marking hop=1 can accurately distinguish between directly connected devices and non-directly connected devices, providing an initial benchmark for the calculation of hop counts of subsequent multi-hop devices, and avoiding confusion of hop count information.
[0031] S3: Traverse the nodes in the set of devices to be queried and send a topology discovery request.
[0032] In this embodiment of the invention, by traversing all devices in the set to be queried...<mac,hop> The formatted nodes are stored and topology discovery requests are sent, which not only achieves systematic coverage of all devices to be queried, avoiding incomplete topology information due to missing nodes, but also allows topology discovery requests to accurately associate device identity and network location based on the media access control address and shortest path hop count associated with the node, thus improving the targeting of the request.
[0033] S4: Add the node information corresponding to the topology discovery request to the query device status set.
[0034] In one possible implementation, S4 specifically includes: S401: Remove the node corresponding to the topology discovery request from the set of devices to be queried.
[0035] S402: Add node information to the query device status set.
[0036] It should be noted that node information is based on<mac,hop,0> The data is added to the query device status set in the form of [data type].
[0037] In this embodiment of the invention, the node corresponding to the topology discovery request is first deleted from the set of devices to be queried, and then...<mac,hop,0> The structured format, combined with the phased operation of querying the device status set, not only realizes the state transition from "device to be queried" to "device that has initiated a request and is awaiting a response," avoiding repeated topology requests to the same node, and ensuring the information purity and logical distinction of the two core sets, but also relies on...<mac,hop,0> The format fully preserves the device's unique identifier, network location, and "no response received" status flag (0), allowing the agent device to clearly track the processing progress of each node that has initiated a request.
[0038] Optionally, after S4 and before S5, it also includes: Determine if the device receiving the topology discovery request is the target device. If yes, proceed to step S5; otherwise, determine if the shortest path hop count in the topology request message is greater than a second preset value. If yes, assemble the topology request message, update the target device information, add the receiving device's information to the forwarding path, and send the topology request message. Otherwise, do not process the topology request message.
[0039] Those skilled in the art can set the size of the second preset value according to actual needs, and the present invention does not limit this.
[0040] S5: Parse the topology request message sent by the switch device through the target device.
[0041] Optionally, the topology request message specifically includes: the media access control address of the proxy device, the media access control address of the target device, the shortest path hop count, and the forwarding path of the request message, wherein the forwarding path of the request message includes the device media access control address and the packet receiving interface name.
[0042] The target device is the device that receives the request information; it is the object being requested.
[0043] Among them, the topology request message is sent by the agent device to request and obtain the device's neighbor information.
[0044] In this embodiment of the invention, parsing the topology request message sent by the switch (proxy device) by the target device allows for the accurate extraction of key information carried in the message, such as the proxy device's media access control address, its own (target device) identifier, shortest path hop count, and forwarding path. This provides direct data support for subsequent decisions on whether to encapsulate a response message and whether to forward the request. Furthermore, by having only the target device specifically parse the message, network resource waste caused by irrelevant devices' ineffective processing is avoided. This ensures both the relevance and efficiency of message parsing and lays a solid foundation for subsequent response encapsulation and forwarding control (such as hop count verification) by clearly defining core information. This ensures a smooth transition in the topology discovery process from "request initiation" to "subsequent response," improving the accuracy and orderliness of overall topology information collection.
[0045] Optionally, after S5 and before S6, it also includes: Determine if the device receiving the topology response message is a proxy device. If yes, proceed to step S6; otherwise, check if an interface is found in the forwarding path. If yes, forward the topology response message from the interface. Otherwise, do not process the topology response message.
[0046] Optionally, the topology request message can be sent via broadcast.
[0047] S6: Based on the first parsing result of the topology request message, parse the topology response message sent by the target device through the proxy device.
[0048] Optionally, the topology response message specifically includes: the media access control address of the proxy device, the media access control address of the target device, the forwarding path of the response message, and the neighbor information of the target device, wherein the forwarding path of the response message includes the device's media access control address and the outgoing interface name.
[0049] Among them, the topology response message is sent by the target device and contains information about all of the target device's neighbors.
[0050] The topology response message is sent via unicast.
[0051] Among them, the proxy device is the device that needs to draw the network topology.
[0052] The proxy device maintenance includes three sets: the set of devices to be queried, the set of device status to be queried, and the set of link topology information.
[0053] The set of devices to be queried is expressed in the form of:<mac,hop> .
[0054] The form in which the set of queried device statuses is expressed is:<mac,hop,state> .
[0055] Here, hop represents the shortest path hop count to the proxy device, and state represents whether the device that initiated the query has received a response. It is initialized to 0, and when the proxy device receives the topology response from the target MAC address, state is set to 1.
[0056] In this embodiment of the invention, based on the first parsing result of the topology request message, the proxy device specifically parses the topology response message sent by the target device. This not only reduces the parsing complexity and improves the parsing efficiency of the proxy device by using the pre-parsing result, but also accurately extracts the core data such as the target device's neighbor information, forwarding path, and device identifier carried in the response message, providing a direct basis for subsequent updates to the set of devices to be queried, the set of device statuses to be queried, and the set of link topology information.
[0057] S7: Based on the second parsing result of the topology response message, update the set of devices to be queried and the set of device statuses to be queried.
[0058] In one possible implementation, S7 specifically includes: S701: Based on the second parsing result, add the target device's neighbor information to the link topology information set.
[0059] S702: Based on the results of collecting neighbor information, set the query status identifier of the target device in the query device status set to a third preset value.
[0060] Those skilled in the art can set the size of the third preset value according to actual needs, and the present invention does not limit this.
[0061] S703: Based on the results of collecting neighbor information, add the target device's neighboring devices to the set of devices to be queried.
[0062] S704: Based on the collection results of neighboring devices, traverse the set of devices to be queried, send a topology request, and update the set of devices to be queried and the set of status of the queried devices.
[0063] It should be noted that the corresponding information of media access control addresses and shortest path hop counts is removed from the set of devices to be queried, so that...<mac,hop,0> The data is added to the query device status set in the form of [data type].
[0064] In this embodiment of the invention, based on the second parsing result of the topology response message, a series of sequential sub-steps—"supplementing link data, updating device status, expanding the query range, and initiating a closed-loop request"—are designed to accurately inherit the message parsing results and achieve orderly updates of multi-dimensional data and sets: The target device's neighbor information is added to the link topology information set, accumulating core related data for the final topology map drawing; the target device's status identifier is set to a third preset value, clearly marking the "response received" completion status to ensure the accuracy of status tracking; neighbor devices are included in the query set, gradually expanding the topology discovery range and avoiding missing network nodes; finally, a request is sent by traversing the new query set, and...<mac,hop,0> The format completes the state transition between sets, which not only avoids repeated device queries but also ensures the closed-loop progress of the process. It not only keeps the information of the three core sets accurate and synchronized at all times, ensuring the orderly and controllable topology discovery process, but also continuously expands the topology coverage, providing solid support for drawing complete and accurate network topology maps.
[0065] S8: When there is no node to be queried in the set of devices to be queried, search for the status node in the set of device status with the status identifier of the first preset value.
[0066] Those skilled in the art can set the size of the first preset value according to actual needs, and the present invention does not limit this.
[0067] It should be noted that the network topology information collection is complete when there are no nodes to be queried in the set of devices to be queried.
[0068] In this embodiment of the invention, when there are no nodes to be queried in the set of devices to be queried, the nodes in the set of device statuses to be queried with a status identifier of the first preset value (no response received) are accurately located to avoid omission of topology information due to some devices not responding in time.
[0069] S9: Add the status node to the set of devices to be queried, and return to step S3.
[0070] In this embodiment of the invention, the status nodes with the selected status identifier of the first preset value (no response received) are added back to the set of devices to be queried and returned to S3, thus constructing a complete closed loop of "comprehensive query, filtering of unresponding devices, and retrying after further query". Meanwhile, it continues the...<mac,hop> The structured storage and state transition rules are consistent with the set operation logic, ensuring the continuity and controllability of the entire topology discovery process.
[0071] S10: Based on the second parsing result, establish a set of link topology information and transmit it to the network end to draw the network topology diagram of the switch device.
[0072] In this embodiment of the invention, based on the second parsing result, the link topology information set maintained by the proxy device is transmitted to the network end and a topology map is drawn. On the one hand, the link topology information set, after multiple steps of precise collection, updating, and supplementation, already includes structured data such as MAC addresses, connection interfaces, hop counts, and neighbor relationships of all network devices; on the other hand, by presenting the topology map through the network end (such as a web end), the abstract link data is transformed into an intuitive visual graphic, greatly reducing the understanding cost of device connection relationships for network operation and maintenance personnel, and facilitating the rapid location of network nodes and troubleshooting of link faults.
[0073] Reference manual attached Figure 2 The diagram shows a schematic representation of a network topology drawing system for a switch device provided in an embodiment of the present invention.
[0074] This invention provides a network topology diagram drawing system 20 for a switch device, comprising: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described method for drawing the network topology diagram of the switch device and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.
[0075] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may 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 gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0076] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).
[0077] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0078] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0079] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0080] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0081] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0083] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0084] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0085] This invention provides a readable storage medium comprising: storing a program or instructions on the readable storage medium, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the above-described method for drawing a network topology diagram of a switching device, and can achieve the same technical effect. To avoid repetition, this invention will not elaborate further.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A network topology mapping method of a switch device, characterized by, include: S1: Obtain the media access control address of the switch device's directly connected neighbor; S2: Add the corresponding information of the media access control address and the shortest path hop count to the set of devices to be queried; S3: Traverse the nodes in the set of devices to be queried and send a topology discovery request; S4: Add the node information corresponding to the topology discovery request to the query device status set; S5: Parse the topology request message sent by the switch device through the target device; S6: Based on the first parsing result of the topology request message, parse the topology response message sent by the target device through the proxy device; S7: Based on the second parsing result of the topology response message, update the set of devices to be queried and the set of statuses of the queried devices; S8: When there is no node to be queried in the set of devices to be queried, search for the status node in the set of device statuses with a status identifier of a first preset value. S9: Add the status node to the set of devices to be queried, and return to step S3; S10: Based on the second parsing result, establish a link topology information set and transmit it to the network end to draw the network topology diagram of the switch device.
2. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, S4 specifically includes: S401: Remove the node corresponding to the topology discovery request from the set of devices to be queried; S402: Add the node information to the query device status set.
3. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, After S4 and before S5, it also includes: Determine whether the device receiving the topology discovery request is the target device; if yes, proceed to S5; otherwise, determine whether the shortest path hop count in the topology request message is greater than a second preset value; if yes, assemble the topology request message, update the target device information, add relevant information about the receiving device to the forwarding path, and send the topology request message; otherwise, do not process the topology request message.
4. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, The topology request message specifically includes: the media access control address of the proxy device, the media access control address of the target device, the shortest path hop count, and the forwarding path of the request message, wherein the forwarding path of the request message includes the device media access control address and the packet receiving interface name.
5. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, After S5 and before S6, it also includes: Determine whether the device receiving the topology response message is the proxy device; if yes, proceed to S6; otherwise, determine whether an interface is found in the forwarding path; if yes, forward the topology response message from the interface; otherwise, do not process the topology response message.
6. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, The topology response message specifically includes: the media access control address of the proxy device, the media access control address of the target device, the forwarding path of the response message, and the neighbor information of the target device. The forwarding path of the response message includes the device's media access control address and the outgoing interface name.
7. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, Specifically, S7 includes: S701: Based on the second parsing result, add the neighbor information of the target device to the link topology information set; S702: Based on the results of collecting the neighbor information, set the query status identifier of the target device in the query device status set to a third preset value; S703: Based on the results of collecting the neighbor information, add the neighbor devices of the target device to the set of devices to be queried; S704: Based on the collection results of the neighboring devices, traverse the set of devices to be queried, send a topology request, and update the set of devices to be queried and the set of status of the queried devices.
8. The method for drawing network topology diagrams of a switching device according to claim 1, characterized in that, The topology request message is sent via broadcast.
9. A network topology diagram drawing system for a switching device, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the network topology drawing method for a switching device as described in any one of claims 1 to 8.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the network topology diagram drawing method for a switching device as described in any one of claims 1 to 8.