Method for identifying network topology and electronic device

By using device identification template sets and network path information, FC and iSCSI devices in data center clusters can be identified, and detailed network topology can be constructed. This solves the problem that traditional methods cannot accurately identify the topology in a mixed protocol environment, and enables efficient network management and fault diagnosis.

CN120785757BActive Publication Date: 2025-11-18LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511280916.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-18
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

In environments that use a mix of Fibre Channel (FC) and Internet Small Computer System Interface (iSCSI) protocols, traditional topology discovery methods cannot accurately identify the network topology.

Method used

A set of device identification templates is used to identify devices in the data center cluster, obtain device information, determine port identifiers and connection relationships, and combine the identity identifiers of host devices and the access control lists of storage devices to identify related hosts and storage devices and build FC and iSCSI network topologies.

Benefits of technology

It enables comprehensive and accurate identification of heterogeneous network topologies, improves the accuracy and efficiency of device identification, enhances network management and troubleshooting capabilities, and optimizes network resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120785757B_ABST
    Figure CN120785757B_ABST
Patent Text Reader

Abstract

The application discloses a network topology identification method and electronic equipment, and relates to the technical field of network storage, and comprises the following steps: by using a series of preset templates, authentication and information query modes of various device types are covered, and comprehensive identification of various devices in a data center cluster is ensured. By acquiring first port identifiers of various devices and connection relationships of the first ports, a first type of network topology is constructed. By identifying hosts and storage devices having a correlation relationship, and combining network path information, a second type of network topology is constructed. Comprehensive and accurate heterogeneous network topology identification technology effects are achieved, and the technical problem that in a traditional topology discovery method, a single protocol is often designed, so that in a mixed network environment, a network topology cannot be accurately identified is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network storage technology, and in particular to methods and electronic devices for identifying network topology. Background Technology

[0002] With the rapid development of information technology, the storage needs of data centers are increasing day by day, and network storage technology has become a core solution for high-performance data access. In this field, the two mainstream technologies, Fibre Channel (FC) and Internet Small Computer System Interface (iSCSI), play key roles.

[0003] Because of the significant differences between FC and iSCSI protocols in topology discovery and network management, traditional topology discovery methods are often designed for a single protocol, resulting in the inaccurate identification of network topology in environments that use a mix of FC and iSCSI. Summary of the Invention

[0004] This application provides a method and electronic device for identifying network topology, in order to at least solve the problem that network topology cannot be accurately identified in related technologies.

[0005] This application provides a network topology identification method, comprising: identifying each device in a data center cluster according to a device identification template in a device identification template set, until successfully logging into each device and obtaining the device information corresponding to each device, wherein the device information includes the device type, and different device identification templates include different device identification information; after finding the first port identifier of the first port corresponding to each device according to the device type, obtaining the connection relationship between the first ports, and determining the first type of network topology corresponding to the data center cluster based on the connection relationship between the first ports; searching for the identity identification information of the host devices in each device, and searching for the access control list of the storage devices in each device; identifying the host devices and storage devices with an association relationship based on the found first identity identification information of the host devices and the second identity identification information included in the access control list of the storage devices; and determining the second type of network topology corresponding to the data center cluster based on the network path information between the host devices and storage devices with an association relationship.

[0006] This application also provides a network topology identification device, comprising: a device identification unit, configured to identify each device in a data center cluster according to a device identification template in a device identification template set, until successfully logging into each device and obtaining the device information corresponding to each device, wherein the device information includes a device type, and different device identification templates include different device identification information; a first topology determination unit, configured to obtain the connection relationship between the first ports after finding the first port identifier corresponding to each device according to the device type of each device, and determine a first type of network topology corresponding to the data center cluster based on the connection relationship between the first ports; a second topology determination unit, configured to find the identity identification information of the host devices in each device, and find the access control list of the storage devices in each device; identify the host devices and storage devices with an association relationship based on the found first identity identification information of the host devices and the second identity identification information included in the access control list of the storage devices; and determine a second type of network topology corresponding to the data center cluster based on the network path information between the host devices and storage devices with an association relationship.

[0007] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described network topology identification methods.

[0008] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described network topology identification methods.

[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described network topology identification methods.

[0010] In this embodiment, a series of preset templates covering authentication and information query methods for various device types are used to ensure comprehensive identification of multiple devices in the data center cluster. A first type of network topology is constructed by obtaining the first port identifier and connection relationship of each device. A second type of network topology is constructed by identifying related hosts and storage devices and combining network path information. This achieves comprehensive and accurate heterogeneous network topology identification, solving the technical problem that traditional topology discovery methods are often designed for a single protocol, leading to inaccurate network topology identification in environments using a mix of FC and iSCSI. Attached Figure Description

[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a network topology identification method provided in this application embodiment;

[0013] Figure 2 A flowchart illustrating another method for identifying network topology provided in an embodiment of this application;

[0014] Figure 3 A flowchart illustrating yet another method for identifying network topology provided in this application embodiment;

[0015] Figure 4 A flowchart illustrating yet another method for identifying network topology provided in this application embodiment;

[0016] Figure 5 A schematic diagram illustrating a network topology identification method provided in an embodiment of this application;

[0017] Figure 6 A flowchart illustrating a network topology identification method provided in this application embodiment;

[0018] Figure 7 This is a schematic diagram of a network topology identification device provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0020] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0021] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] The embodiments of this application provide a method for identifying network topology. The method is described in detail below in conjunction with the execution flow of the network topology identification method.

[0023] Data Center Cluster (DCC): refers to a group of data centers integrated together to provide data processing, storage, and networking services. They are interconnected through a network to form a large-scale computing environment that operates in a coordinated manner.

[0024] Device Identification Template Set (DITS): This consists of a series of templates, each containing authentication information and query instructions for a specific type of network device, used for automated device identification and login.

[0025] Authentication template: The template contains information such as the authentication method, login credentials, and authentication port number required to log in to the device, which is used in the device login process.

[0026] Information Query Template: The template contains instructions for querying device type, version information, port information, and configuration information to obtain detailed device information.

[0027] The first type of network topology specifically refers to the physical connection structure of a storage network built on the Fibre Channel (FC) protocol.

[0028] The second type of network topology refers to the logical connection view of a storage network built on the Internet Small Computer System Interface (iSCSI) protocol.

[0029] First port identifier: In FC networks, it refers to the World-Wide Port Name (WWPN) of the device port; in iSCSI networks, it refers to the MAC / IP address of the port.

[0030] Peer port identifier: refers to the identifier of the other port that is directly connected to the first port, such as the peer's WWPN or MAC address.

[0031] Access Control List (ACL): A configuration file in a storage device that lists the identity information of hosts allowed to access storage resources. It is commonly used in the iSCSI protocol to control data access.

[0032] Primary identification information: The unique identifier of the host device in the network, such as iSCSI IQN.

[0033] Second identification information: Host identification information recorded in the storage device access control list, used to determine the access permissions of the host and the storage device.

[0034] First data table: A data table in the management platform used to summarize connection information between network devices, including key data such as device type, port information, and identifiers.

[0035] First subnetwork topology: refers to the local topology of the host-to-storage connection links within a specific logical group (such as a zone) in an FC network.

[0036] Logical grouping information: In FC networks, this refers to zone configuration; in iSCSI networks, it refers to iSCSI initiator-target mapping, used to divide the network into groups of devices that can communicate with each other.

[0037] Link Layer Discovery Protocol (LLDP): A standard protocol used to automatically discover details of directly connected devices in a network, providing information support for building network topology.

[0038] Routing discovery commands, such as traceroute or tracert, are used to discover the network path of data packets from the source device to the destination device.

[0039] Network hop devices: Devices that forward data packets in a network path, such as routers and switches.

[0040] Network information of neighboring devices: Information such as IP address, MAC address, and port status of directly connected devices obtained through the LLDP protocol, used to refine the network topology.

[0041] Second subnetwork topology: Based on iSCSI network path information, it describes the local topology of the network path from a specific host to a specific storage device.

[0042] File System (FS): A way of organizing and managing files in computer memory, providing the ability to read and write files.

[0043] Storage Volume (SV): A logical unit on a storage device used to carry data and can be accessed by multiple hosts.

[0044] The first sub-logical network topology describes the logical connection between the file system on the host and the storage volume on the remote storage device, and is part of the second type of network topology.

[0045] Logical network topology: This describes the overall connection relationship between the host and storage devices based on logical identifiers and access permissions, and integrates information from multiple sub-logical network topologies.

[0046] Third subnet topology: describes the physical path and network devices traversed by a specific host to access a specific storage device, and is any part of an FC or iSCSI network.

[0047] As an alternative, the above-mentioned network topology identification method, such as Figure 1 As shown, it includes:

[0048] S102, identify each device in the data center cluster according to the device identification template in the device identification template set, until successfully log in to each device and obtain the device information corresponding to each device. The device information includes the device type, and different device identification templates include different device identification information.

[0049] S104. After finding the first port identifier of the first port corresponding to each device according to the device type of each device, obtain the connection relationship between the first ports, and determine the first type of network topology corresponding to the data center cluster based on the connection relationship between the first ports.

[0050] S106, locate the identity information of the host devices in each device, and locate the access control list of the storage devices in each device; based on the first identity information of the host devices and the second identity information included in the access control list of the storage devices, identify the host devices and storage devices with related relationships; based on the network path information between the host devices and storage devices with related relationships, determine the second type of network topology corresponding to the data center cluster.

[0051] Optionally, the aforementioned device identification template set is used to represent a series of predefined templates, each containing specific authentication information and query instructions required to identify different types of network devices.

[0052] It should be noted that the above device identification template includes the device's authentication method (such as SSH, SNMP), login credentials (such as username and password), port number, and other device-specific query commands to help the management platform log in to the device and obtain relevant information.

[0053] Furthermore, the aforementioned data center cluster is a collection of multiple interconnected data centers located in one or more geographical regions, interconnected through network infrastructure, to jointly provide computing and storage resources.

[0054] It should be noted that logging into a device refers to the process of accessing and controlling a remote device by providing correct authentication information.

[0055] Optionally, the above device information covers detailed attributes of the device, including but not limited to its type, version, configuration, status, and any relevant port information that can be used for network topology construction.

[0056] It should be noted that the above device types include storage devices, hosts, switches, routers, etc., and these types define the role of the devices in the network architecture.

[0057] Furthermore, the aforementioned first port identifier is a unique identifier for a specific network port on the device. For FC devices, it may be, but is not limited to, WWPN (World-Wide Port Name).

[0058] Optionally, the first type of network topology (FC network topology) mentioned above is used to represent a physical network structure based on the FC protocol, including the connection between storage, hosts and FC switches through FC ports.

[0059] It should be noted that the above-mentioned search for the identity information of the host device involves running specific commands or query functions on the host device to obtain the device's unique identity, such as the IQN (iSCSI Qualified Name) of an iSCSI node.

[0060] Furthermore, the aforementioned Access Control List (ACL) is a list of policies stored on a storage device that defines which hosts can access specific storage resources, and typically includes the host's IQN.

[0061] Optionally, the second type of network topology (iSCSI network topology) mentioned above is used to represent a network structure based on the iSCSI protocol, covering the logical path for a host to access a storage device via an IP network.

[0062] It should be noted that the aforementioned related host devices and storage devices refer to those hosts and corresponding storage resources that have allowed access records in the access control list of the storage devices.

[0063] Furthermore, the aforementioned network path information includes the sequence of network devices and their interface information that the data packet passes through when it is transmitted from the source host to the target storage device, which is used to construct the logical connection link from the host to the storage.

[0064] Optionally, as an example, the above content can be illustrated by the following examples, but not limited to:

[0065] The management platform begins to identify devices in the data center cluster, using pre-built SSH authentication templates that include multiple SSH login attempts (such as port number 22, username root, password admin123) to log in to each device.

[0066] After successfully logging into a storage device, the management platform executes the command lsportfc to obtain the FC port information of the storage device, including the port's WWPN.

[0067] Next, the management platform logs into an FC switch via the SNMP protocol to query its port WWPN and zone configuration information, which is used to build the network connection topology between the storage device and the FC switch.

[0068] The management platform also logs into the host device and executes the command `ip addr show` to obtain the host's Ethernet port information, including the MAC address and IP address.

[0069] Using the lsscsi command on the host device, the management platform can find storage devices with iSCSI connections and record the host's IQN and the storage's IQN.

[0070] Using the traceroute or tracert command, the management platform traces from the host to the storage device, obtains information about the routers and switches along the way, and constructs the iSCSI network topology.

[0071] Finally, the management platform periodically scans FC and iSCSI ports from logged-in host devices to update the logical mapping between storage volumes and host file systems in real time, ensuring the accuracy of the network topology.

[0072] In this embodiment, each device in the data center cluster is identified according to the device identification templates in the device identification template set until successful login is achieved and the corresponding device information is obtained. The device information includes the device type, and different device identification templates include different device identification information. After finding the first port identifier of the first port corresponding to each device according to its device type, the connection relationship between the first ports is obtained, and based on the connection relationship between the first ports, the first type of network topology corresponding to the data center cluster is determined. The identity identification information of the host devices in each device is searched, and the access control list of the storage devices in each device is searched. Based on the found first identity identification information of the host devices and the second identity identification information included in the access control list of the storage devices, related host devices and storage devices are identified. Based on the network path information between the related host devices and storage devices, the second type of network topology corresponding to the data center cluster is determined. By using a series of preset templates covering authentication and information query methods for various device types, this embodiment ensures comprehensive identification of multiple devices in the data center cluster, improving the accuracy and efficiency of device identification. By acquiring the FC port identifiers and connection relationships of each device, an accurate FC network topology map can be constructed, helping operations and maintenance personnel quickly locate path faults in the storage network and optimize path design. By identifying hosts and storage devices with iSCSI associations and combining network path information, a detailed iSCSI network topology can be constructed, enhancing the visualization and management capabilities of the iSCSI network. In other words, using the embodiments of this application, combining the device identification template set with the first type of network topology (FC network), the management platform can accurately and efficiently identify all FC devices in the data center cluster and construct the FC network topology, which is of great significance for FC network fault diagnosis, performance tuning, and resource allocation. The combination of the device identification template set with the second type of network topology (iSCSI network) allows the management platform not only to identify iSCSI hosts and storage devices but also to construct the iSCSI network topology based on network path information and the identity associations between devices. This enhances the control over logical connections and actual paths in the iSCSI network, providing strong support for network resource optimization and fault diagnosis. In summary, the embodiments of this application achieve comprehensive, efficient and accurate heterogeneous network topology identification, solving the technical problem that traditional topology discovery methods are often designed for a single protocol, resulting in the inability to accurately identify the network topology in environments that use a mix of FC and iSCSI.

[0073] As an optional approach, each device in the data center cluster is identified according to the device identification templates in the device identification template set until successful login is achieved and the corresponding device information is obtained, including:

[0074] S1 retrieves network segment information for each network segment within the data center cluster.

[0075] S2 determines the network address of each device in the data center cluster based on network segment information.

[0076] S3 authenticates each device according to the authentication templates in the authentication template set until successful login to each device. Different authentication templates contain different authentication information.

[0077] S4. Query the device information of each logged-in device according to the various information query templates in the information query template set until the device information of each device is obtained. Different information query templates include different device information query instructions.

[0078] Optionally, the aforementioned network segment information is used to represent basic information about the various parts that constitute the data center cluster network, including IP address range, subnet mask, and gateway address.

[0079] It should be noted that the above determination of network address covers the process of inferring or obtaining the specific IP address of each device in the network based on network segment information.

[0080] Furthermore, the aforementioned authentication template set is a collection of pre-configured authentication schemes used to perform authentication logins on different devices. Each template contains different authentication information, such as username, password, and port number for authentication methods like SSH, SNMP, and Telnet.

[0081] Optionally, the above authentication template is used to represent authentication information for a specific device type or predefined information, including the username, password, authentication method, port number, and necessary security policies required to log in to the device.

[0082] It should be noted that the above device information includes a series of important data about the device itself and its functions, such as device type, version information, hardware specifications, software configuration, network port details, etc.

[0083] Furthermore, the aforementioned information query template set is a set of templates containing different device information query instructions, designed to efficiently extract the required information from authenticated and logged-in devices.

[0084] Optionally, the above information query template is used to represent query instructions designed for specific device models or device types, which can help the management platform accurately obtain detailed information about the device.

[0085] Alternatively, as an example, it may be possible, but is not limited to, by means of, such as Figure 2The following examples illustrate and explain the above content:

[0086] In step S202, the network segments of the data center are scanned. Specifically, the management platform performs parallel scans of the device network segments of the local data center and the remote data center. It is necessary to import the start IP address and end IP address, subnet mask and gateway of each network segment.

[0087] After confirming connectivity, proceed to step S204. The device is located using the authentication template. Specifically, the ping command using the ICMP protocol can be used to determine if an IP address within the network segment is reachable. For different types of devices, a pre-added protocol template is used. Based on the content of the protocol template, authentication is performed before logging into the device. For storage, hosts, FC switches, Ethernet switches, and routers, the authentication template can use the SSH protocol, including the SSH port number, SSH username, and SSH password. For FC switches, the authentication template also supports the SNMP protocol, including the SNMP port number, SNMP protocol version, security level, authentication protocol type, authentication password, encryption protocol type, and encryption password. Since different devices use different usernames and passwords, if authentication fails using one SSH authentication template, another SSH authentication template will be used to continue authentication.

[0088] Execute step S206 to determine whether the device authentication was successful.

[0089] If successful, proceed to step S208-1 to determine the device type using the device template. Specifically, different device templates are used to identify the current device. The SSH protocol device template includes commands such as querying device type, device version number, and querying port list. If the current device does not support the query device type command of the current device template or does not produce the expected results, the next device template is used to continue trying.

[0090] If unsuccessful, proceed to step S208-2 to manually authenticate the device, and then proceed to step S208-1.

[0091] Next, step S210 is executed to determine if there is a suitable device template.

[0092] If a suitable device template is available, proceed to step S212-1 to query the version number and port list information. Specifically, if the current device supports the device type query command for the current device template and the results match the expectations, continue executing commands to query the device version number and port list, etc. The device template also supports the use of the SNMP protocol, and its content includes querying the device type, device version number, port list, and other corresponding OID information.

[0093] If no suitable device template is available, proceed to step S212-2 to manually add a new device template, and then proceed to step S212-1.

[0094] Then, step S214 is executed to automatically add the devices to the management platform. Specifically, after all scanning tasks are completed, the management platform will display the successfully scanned devices, including device type, device IP address, and other information, and automatically add them to the management platform for management. For devices that fail to scan (i.e., those that fail to authenticate after using all available authentication templates during the scanning process), the administrator needs to handle it manually. After successful authentication by manually entering the username and password, the new authentication information is added to the authentication template list for that device type. Similarly, if all device templates are not suitable for the current device, a new device template needs to be manually added to adapt to the device, and finally, the device is added to the management platform. The management platform will periodically scan the devices in the data center to adapt to changes in device information within the data center.

[0095] As can be seen from the above, this embodiment decouples the authentication and query processes. After successful authentication using the authentication template, the device template is then used to determine which type of device it is.

[0096] In this embodiment, network segment information of each network segment in the data center cluster is obtained; based on the network segment information, the network address of each device in the data center cluster is determined; each device is authenticated according to the authentication templates in the authentication template set until successful login to each device is achieved, wherein different authentication templates include different authentication information; and the device information of each logged-in device is queried according to the information query templates in the information query template set until the device information of each device is obtained, wherein different information query templates include different device information query instructions. By adopting this embodiment, combining network segment information acquisition, authentication template set, and information query template set, the management platform can automatically log in and collect the network addresses and detailed information of all devices in the data center cluster, laying a solid foundation for constructing physical and logical network topologies. This series of operations greatly improves the efficiency of network operation and maintenance, reduces the need for manual intervention, thereby reducing management costs and improving the overall operation and maintenance effect of the data center.

[0097] As an optional approach, each device is authenticated according to the various authentication templates in the authentication template set until successful login is achieved, including:

[0098] S1. Authenticate the target device according to the i-th authentication information in the i-th authentication template in the authentication template set, where i is a positive integer and the i-th authentication information includes the authentication method, login credentials and authentication port number.

[0099] S2, if the target device is successfully logged in based on the i-th authentication template, save the i-th authentication information.

[0100] S3, if logging into the target device based on the i-th authentication template fails, authenticate the target device according to the (i+1)-th authentication template in the authentication template set.

[0101] Optionally, the above set of certification templates represents a set of pre-prepared certification schemes, each scheme (template) targeting specific certification methods and parameters provided by different device types or manufacturers.

[0102] It should be noted that the i-th authentication information in the i-th authentication template above includes the authentication method (such as SSH, SNMP) used in the i-th attempt, login credentials (username, password), and authentication port number (such as the default SSH port 22).

[0103] Furthermore, the target device mentioned above refers to the network device currently attempting to log in, which can be a storage device, host, switch, or router, etc.

[0104] Optionally, the fact that i is a positive integer means that the order of selecting a template for authentication from the set of authentication templates starts from the first one (i=1) and tries them one by one until authentication is successful.

[0105] It should be noted that successful device login means that the management platform is able to establish a secure session with the remote device after using information from a specific authentication template. Login failure indicates that using a specific authentication template failed to establish a valid communication session between the management platform and the target device.

[0106] Optionally, as an example, the above content can be illustrated by the following examples, but not limited to:

[0107] Suppose that the authentication template set contains three different authentication templates: T1 (SSH authentication method, username 1, password 1, port 22), T2 (SNMP authentication method, version v3, security level authPriv, authentication protocol SHA, authentication password 2, encryption protocol AES, encryption password 2), and T3 (SSH authentication method, username 3, password 3, port 22).

[0108] When the management platform attempts to log in to an FC switch as the target device, it will first try using the authentication information in T1: SSH login, username 1, password 1, port 22.

[0109] If login fails, the management platform will continue to attempt authentication using the SNMP authentication information from T2. If the FC switch does not support SNMPv3 authentication, this authentication will also fail.

[0110] The management platform will continue its attempt, using the authentication information from T3 for one last look: SSH login, username 3, password 3, port 22. Assuming this login is successful (SL), the management platform will save T3 as a template for successfully authenticating this FC switch and can begin retrieving device information.

[0111] If all authentication templates fail to enable the management platform to successfully log in to the target device, it means that the administrator needs to manually intervene, provide additional authentication information to create a new authentication template, and then try to log in again until successful.

[0112] In this embodiment, the target device is authenticated according to the i-th authentication information in the i-th authentication template in the authentication template set, where i is a positive integer, and the i-th authentication information includes the authentication method, login credentials, and authentication port number. If login to the target device is successful based on the i-th authentication template, the i-th authentication information is saved. If login to the target device fails based on the i-th authentication template, the target device is authenticated according to the (i+1)-th authentication template in the authentication template set. By adopting this embodiment, combining authentication template usage and authentication failure handling, the management platform can flexibly respond to changing device authentication strategies, ensuring successful device login and management, providing a guarantee for network topology identification and construction, and reducing the workload of maintenance personnel.

[0113] As an optional approach, the device information of each logged-in device is queried according to the various information query templates in the information query template set until the device information of each device is obtained, including:

[0114] S1. Query the device type of the target device according to the j-th device type query instruction in the j-th information query template, where j is a positive integer and the information query template set includes the j-th information query template.

[0115] S2, if the device type of the target device is found based on the j-th device type query instruction, query the device version information of the target device according to the j-th version information query instruction in the j-th information query template, query the device port information of the target device according to the j-th port information query instruction in the j-th information query template, and query the device configuration information of the target device according to the j-th configuration information query instruction in the j-th information query template.

[0116] S3. If the device type of the target device is not found according to the j-th device type query instruction, the device type of the target device is queried according to the (j+1)-th device type query instruction in the (j+1)-th information query template. The device type queried by the j-th device type query instruction is different from the device type queried by the (j+1)-th device type query instruction. The information query template set includes the j-th information query template.

[0117] Optionally, the above information query template set is used to represent a series of preset templates. Each template set contains information query instructions for a specific device type, aiming to extract detailed information about the device efficiently and accurately.

[0118] It should be noted that the j-th information query template mentioned above is a specific template that contains instructions for querying the j-th device type, version information, port information, and configuration information. Here, j is a positive integer used to identify the specific template in the template set, so that it can be executed sequentially or used selectively.

[0119] Furthermore, the aforementioned device type query command is used to determine the type of the target device, such as a storage device, host, switch, or router. This is typically achieved by querying the device's system information, hardware identifier, or device description.

[0120] Optionally, the above device version information query command is used to query the software and hardware version information of the target device, which helps to understand whether the device supports specific functions or needs to be upgraded.

[0121] It should be noted that the above device port information query command is used to obtain detailed information about all ports on the target device, including port status, type, connection information, etc., which is crucial for building network topology.

[0122] Furthermore, the aforementioned device configuration information query command is used to obtain the configuration details of the target device, such as network settings and security policies. This information helps to understand the device's role and function in the network.

[0123] Optionally, as an example, the above content can be illustrated by the following examples, but not limited to:

[0124] Suppose the management platform is trying to identify an unknown device in the data center with IP address IP1.

[0125] The management platform begins identifying devices according to the templates in the information query template set. It first attempts to use the first information query template, which contains query instructions for different types of devices.

[0126] The first information query template: Assume that the device type query command in this template is executed via the SSH protocol to determine whether the device is a server or a host by using systeminfo (for Windows systems) or uname -a (for Unix / Linux systems).

[0127] Alternatively, connect to device IP1 via SSH and execute the uname -a command. If Linux system information is returned, the device type is determined to be a Linux server.

[0128] Once the device type is known, execute subsequent information query commands. Once the device type is determined, the management platform will execute query commands for the corresponding version information, port information, and configuration information in the template.

[0129] Version information query: Use commands such as sw_vers (MacOS), cat / etc / lsb-release (Linux) or wmic osget Caption,Version (Windows) to query the operating system version of the device.

[0130] Port information query: If the device is a switch, port information can be collected using commands such as show ip interface brief (Cisco devices) or ip addr show (Linux devices).

[0131] Configuration information query: Use ipconfig (Windows), ip addr show (Linux), or show running-config (network devices) to obtain the device's configuration information.

[0132] Device type unknown. Try the next template. If the information returned by the uname -a command is insufficient to identify the device type, the management platform will try to use the second information query template, which can include other types of query instructions, such as querying the device's MIB (Management Information Base) information via the SNMP protocol to identify the device type.

[0133] The management platform will continue to attempt to identify the device type using different templates, following the order in the information query template set, until a template suitable for the target device is found. Once the device type is determined, it will execute the version information, port information, and configuration information query commands in that template to obtain complete device information.

[0134] In this embodiment, the device type of the target device is queried according to the j-th device type query instruction in the j-th information query template, where j is a positive integer, and the information query template set includes the j-th information query template. If the device type of the target device is found based on the j-th device type query instruction, the device version information of the target device is queried according to the j-th version information query instruction in the j-th information query template, the device port information of the target device is queried according to the j-th port information query instruction in the j-th information query template, and the device configuration information of the target device is queried according to the j-th configuration information query instruction in the j-th information query template. If the device type of the target device is not found according to the j-th device type query instruction, the device type of the target device is queried according to the (j+1)-th device type query instruction in the (j+1)-th information query template, where the device type queried by the j-th device type query instruction is different from the device type queried by the (j+1)-th device type query instruction, and the information query template set includes the (j+1)-th information query template. By employing the embodiments of this application, and combining device type queries with device version, port, and configuration information queries, the management platform can obtain all necessary information about devices in the data center cluster, providing comprehensive data support for building and maintaining the network topology. Through device type query failure handling, the completeness and accuracy of information collection are further ensured, enhancing the flexibility and reliability of network management.

[0135] As an optional solution, after identifying each device in the data center cluster according to the device identification template set, until successfully logging into each device and obtaining the corresponding device information, the solution also includes:

[0136] S1, after executing the first command on the storage device in each device, and obtaining the first port identifier of the first port of the storage device and the peer port identifier of the storage device, it is determined that the storage device is in the first type of network.

[0137] S2, after executing the second command on the host device in each device, and obtaining the first port identifier of the first port of the host device and the peer port identifier of the host device, it is determined that the host device is in the first type of network.

[0138] S3, after executing the third command on each of the switch devices, and obtaining the first port identifier of the first port of the switch device and the peer port identifier of the switch device, determines that the switch device is in the first type of network.

[0139] S4, execute the fourth command on the switch device in the first type of network to obtain the logical group information of each logical group corresponding to the switch device. The logical group information stores the first port identifier of the host device and the first port identifier of the storage device in the corresponding logical group.

[0140] Optionally, the first command mentioned above is used to represent a command to query the FC port information of the storage device under the SSH or SNMP protocol, such as the lsportfc command under SSH or the corresponding OID query under SNMP.

[0141] It should be noted that the aforementioned first port identifier includes the WWPN (World-Wide Port Name) of each FC port of the storage device itself, which is a globally unique identifier.

[0142] Furthermore, the aforementioned peer port identifier refers to the FC port WWPN of a device (such as an FC switch or host) that is directly connected to the FC port of the storage device.

[0143] Optionally, the second command mentioned above is used to represent a command to query the FC port information of a host device under the SSH protocol, such as ls / sys / class / fc_host.

[0144] It should be noted that the first port identifier mentioned above also refers to the FC port WWPN of the host device.

[0145] Furthermore, the aforementioned peer port identifier refers to the FC port WWPN of a device (such as a storage device or an FC switch) that is directly connected to the FC port of the host device.

[0146] Optionally, the third command mentioned above is used to represent a command to query FC switch port information and adjacent device WWPN under the SSH or SNMP protocol, such as switchconfig under SSH or OID query under SNMP.

[0147] It should be noted that the first port identifier mentioned above refers to the FC port WWPN of the FC switch itself.

[0148] Furthermore, the aforementioned peer port identifier refers to the FC port WWPN of a device (such as a storage device, host, or other switch) that is directly connected to the switch port.

[0149] Optionally, the fourth command mentioned above is used to represent a command to query logical packet information of an FC switch under the SSH or SNMP protocol, such as zoneconfig under SSH or related OID query under SNMP.

[0150] It should be noted that the above logical grouping information represents the zone configuration information on the FC switch based on WWPN. A zone is a logical connection used to control which storage and hosts can communicate directly.

[0151] In this embodiment, after executing a first command on the storage device in each device, and obtaining the first port identifier of the first port of the storage device and the peer port identifier of the storage device, it is determined that the storage device is in a first-type network. After executing a third command on the host device in each device, and obtaining the first port identifier of the first port of the host device and the peer port identifier of the host device, it is determined that the host device is in a first-type network. After executing a third command on the switch device in each device, and obtaining the first port identifier of the first port of the switch device and the peer port identifier of the switch device, it is determined that the switch device is in a first-type network. Executing a third command on the switch device in the first-type network obtains the logical packet information of each logical packet corresponding to the switch device, wherein each logical packet information stores the first port identifier of the host device and the first port identifier of the storage device in the corresponding logical packet. By using this embodiment, the acquisition of port identifiers of storage devices, host devices, and switch devices is combined with the acquisition of logical packet information of storage devices. The management platform can accurately identify devices in the FC network and their direct connection relationships, and can understand the logical access control policies of storage devices, thereby constructing a complete FC network topology. This has a significant effect on optimizing access to storage resources, ensuring data security, and simplifying network management.

[0152] As an optional approach, the connection relationships between the first ports are obtained, and based on these relationships, the first type of network topology corresponding to the data center cluster is determined, including:

[0153] S1, store the device type, device port number, first port identifier, device network address, and peer port identifier of each device in the first type of network into the first data table;

[0154] S2, based on the first data table and logical grouping information, determine at least one first sub-network topology, wherein the first sub-network topology is used to characterize the connection links between host devices and storage devices in the same logical group;

[0155] S3, add at least one first sub-network topology to the first type of network topology.

[0156] Optionally, the first data table mentioned above is used to represent an information database in the management platform used to summarize the connection relationships between devices in the first type of network (FC network).

[0157] It should be noted that the above equipment types include all categories of equipment within a data center cluster, such as storage devices, hosts, and switches.

[0158] Furthermore, the aforementioned device port number refers to the network port number of the device participating in the connection, used to identify a specific connection interface.

[0159] Optionally, the aforementioned first port identifier specifically refers to the port WWPN identifier of a device in an FC network, which is a unique identifier for each FC port.

[0160] It should be noted that the above-mentioned device network address includes the device's IP address or a similar network location address, which is used to locate the device at the IP network layer.

[0161] Furthermore, the aforementioned peer port identifier refers to the identifier of another port that is directly connected to a certain port, such as the WWPN of the peer FC port.

[0162] Optionally, the aforementioned logical grouping information refers to the access control list or zone configuration defined in the storage device, used to divide devices into groups that can communicate with each other.

[0163] It should be noted that the first sub-network topology mentioned above refers to a small network structure diagram constructed based on the device connection relationships within a specific logical group.

[0164] Furthermore, the connection link refers to the actual communication path between the host device and the storage device through network devices.

[0165] Add at least one first sub-network topology to the first type of network topology.

[0166] Optionally, the above-described addition process involves merging each independent first sub-network topology into an overall view of the first type of network topology to reflect the complete FC network structure within the data center.

[0167] Alternatively, as an example, it may be possible, but is not limited to, by means of, such as Figure 3 The following examples illustrate and explain the above content:

[0168] Execute step S302 to traverse the devices in the data center.

[0169] Next, step S304 is executed to determine whether the device type is storage.

[0170] If it is a storage device, proceed to step S306 to query the FC port information of the storage device.

[0171] Then, step S308 is executed to determine whether the storage device contains an FC port.

[0172] If an FC port is present, proceed to step S310 to save the WWPN information of the FC port.

[0173] If the storage device does not have an FC port, proceed to step S302 and iterate through the next device in the data center.

[0174] If it is not a storage device, proceed to step S312 to determine whether the device type is an FC switch.

[0175] If it is an FC switch, execute step S314 to query the FC port information of the FC switch.

[0176] Next, step S316 is executed to save the WWPN information of the FC port of the FC switch, and then the process continues to traverse the next device in the data center.

[0177] If it is not an FC switch, proceed to step S318 to determine if the device type is a host.

[0178] If it is the host, execute step S320 to query the host's FC port information.

[0179] Then proceed to step S322 to determine whether the host has an FC port.

[0180] If an FC port is present, proceed to step S324, save the WWPN information of the FC port, and then continue to traverse the next device in the data center.

[0181] If the storage device does not have an FC port, proceed to step S302 and iterate through the next device in the data center.

[0182] Specifically, for FC networks, since the WWPNs of the FC ports of storage, FC switches, and hosts are globally unique identifiers provided at the factory, they can be identified by comparing the WWPN of the port with the WWPN of the peer port, thus discovering the physical connection topology between the storage, FC switches, and hosts. The management platform uses multi-threaded SSH connections to all storage devices, executing commands to query FC ports (such as lsportfc) on all devices, saving the WWPNs of each FC port on the storage device and the WWPN information of the peer port. If the FC port information cannot be found on a storage device, it indicates that the storage device does not support FC networks.

[0183] The system uses multi-threaded SSH connections to all FC switches. It executes commands on all FC switches to query FC ports (using commands like `switchconfig` for SSH and the corresponding OID node for SNMP), and saves the WWPN information for each FC port (i.e., the peer port) on the switch. It also executes commands to query zones on the switches (using commands like `zoneconfig` for SSH and the corresponding OID node for SNMP). Within each zone, the system stores the WWPNs of connected storage ports, switch ports, and host ports.

[0184] The multi-threaded SSH connection connects to all hosts and executes a query on all hosts to list all FC ports (e.g., ls / sys / class / fc_host), and queries the WWPN of each FC port (e.g., / sys / class / fc_host / fc_host1 / port_name). If no FC port information is found on a host, it means that the host does not support FC networking.

[0185] After retrieving the FC port WWPN of the host, store it along with the FC port WWPNs of the storage and FC switch in the same database's `fc_port_wwpn` table. The table fields include device type, device IP, device port number, port WWPN, and peer port WWPN, as shown in Table 1 (as an example of the first data table).

[0186] Table 1

[0187]

[0188] It is easy to see from the table above that the FC port 1 of storage IP1 is connected to the FC port 2 of FC switch IP2 via a fiber optic cable, and the FC port 3 of FC switch IP2 is connected to the FC port 4 of host IP3 via a fiber optic cable.

[0189] Multiple hosts and multiple storage devices can be connected to the same switch. Based on the zone information recorded on the FC switch, the storage ports, switch ports, and host ports within the same zone constitute an FC network topology. For example, zone1:{WWPN1,WWPN2,WWPN4,WWPN3}. Using a specific zone as a base and combining the records in the fc_port_wwpn table, the topology object contains two linked list pointers and two nodes. One linked list pointer points to a storage FC port object, and the other points to a host FC port object. The two nodes contain the port information of the switches connecting the storage and hosts, respectively. For example:

[0190] topo:{pre:storagePortInfo,connectPre:switchPortInfo1,connectNext:switchPortInfo2,next:hostPortInfo}.

[0191] This embodiment uses zone information as a basis and directly queries the fc_port_wwpn table using the wwpn index, which improves query speed. Data is stored using linked list pointers, reducing memory usage. By traversing the zone information on all FC switches, the physical connection topology of all storage-FC switches-hosts ports in the data center can be obtained.

[0192] Obtaining the connection relationships between the first ports and determining the first type of network topology corresponding to the data center cluster based on these relationships includes: storing the device type, device port number, first port identifier, device network address, and peer port identifier of each device in the first type of network into a first data table; determining at least one first sub-network topology based on the first data table and logical grouping information, wherein the first sub-network topology is used to characterize the connection links between host devices and storage devices in the same logical group; and adding at least one first sub-network topology to the first type of network topology. In this embodiment, the construction of the first data table is combined with the construction of the first type of network topology (FC network), ensuring the accuracy and efficiency of FC network topology construction. Through structured storage device information, the management platform can quickly analyze the physical connection relationships between devices and construct a clear FC network topology, which helps maintenance personnel to optimize network performance and troubleshoot faults.

[0193] As an optional approach, based on the first identity information of the found host device and the second identity information included in the access control list of the storage device, the associated host device and storage device can be identified as follows:

[0194] If a second identity information matching the first identity information of the first host device is identified in the access control list of the first storage device, it is determined that there is an association relationship between the first storage device and the first host device.

[0195] Optionally, the first storage device mentioned above is used to represent any storage device in the data center cluster that is identified and logged into by the management platform, on which various storage resources that interact with the host device are stored.

[0196] It should be noted that the access control list mentioned above includes a list of rules defined on the storage device, which controls which hosts can access its storage resources. Each item in the list records the identity information of the allowed hosts.

[0197] Furthermore, the aforementioned first host device refers to any host in the data center cluster, which may have an iSCSI port for establishing connections and data transfer with storage devices.

[0198] Optionally, the aforementioned first identity information is used to represent the unique identity of the host device in the network. For the iSCSI protocol, this usually refers to the iSCSI Qualified Name (IQN).

[0199] It should be noted that the aforementioned second identity information refers to the host identity information recorded in the storage device access control list, which corresponds to the first identity information of the first host device and is used to determine the access permissions between the host and the storage device.

[0200] Furthermore, the aforementioned relationship is a logical connection established between the host device and the storage device based on a network protocol (such as iSCSI), which means that the host can access specific resources on the storage device, such as storage volumes or iSCSI targets.

[0201] In this embodiment, identifying related host devices and storage devices based on the first identity information of the found host device and the second identity information included in the access control list of the storage device includes: if second identity information matching the first identity information of the first host device is found in the access control list of the first storage device, it is determined that there is an association between the first storage device and the first host device. By combining the acquisition of host device identity information with the analysis of the storage device access control list in this embodiment, the management platform can identify which hosts have the right to access specific storage resources, thus constructing a host-to-storage network topology based on the iSCSI protocol. This precise identification of logical relationships enhances the security of storage resources and the efficiency of network management, ensures the compliance of data access, and optimizes the allocation of storage resources.

[0202] As an optional approach, based on the network path information between related host devices and storage devices, the second type of network topology corresponding to the data center cluster is determined as follows:

[0203] S1, by executing a route discovery instruction with the target address of the first storage device on the first host device, network path information between the first host device and the first storage device is obtained, wherein the network path information includes device information of the network hop device between the first host device and the first storage device.

[0204] S2 enables the link layer discovery protocol for each device in the data center cluster to obtain the network information of the neighboring devices corresponding to each device.

[0205] S3. Based on the network path information and the network information of the neighboring devices corresponding to each device, determine the second sub-network topology between the first host device and the first storage device, and add the second sub-network topology to the second type of network topology.

[0206] Optionally, the aforementioned route discovery instructions are used to represent a command or set of commands designed to discover the network path from the source node to the destination node, including every hop along the way. In common network management, this typically refers to commands such as traceroute (Linux / Unix) or tracert (Track Route, Windows).

[0207] It should be noted that the device information of the aforementioned network hop device includes detailed information about intermediate devices such as routers and switches that the data packet passes through in the transmission path from the source host to the target storage device, such as device type, IP address, MAC address and port number.

[0208] Furthermore, the Link Layer Discovery Protocol (LLDP) mentioned above is a standard network protocol used to broadcast the operational status and description of devices in a local area network, allowing devices to automatically discover detailed information about neighboring devices, thereby constructing a network topology map.

[0209] Optionally, the aforementioned data center cluster is used to represent a combination of one or more data centers, which may be located in the same geographical location or belong to different regions, interconnected through network facilities to form a larger network environment.

[0210] It should be noted that the network information of the neighboring devices mentioned above refers to the network information of other devices directly connected to a specific device, collected through the LLDP protocol, including IP address, MAC address, device type, and port status, which is used to build a more detailed network topology view.

[0211] Furthermore, the aforementioned second sub-network topology refers to a detailed network connection diagram constructed for the logical connection path between a specific host and storage device under the overall second type network topology (iSCSI network topology). It not only shows the physical connection, but also includes the IP network path, the network devices traversed, and the relationships between these devices.

[0212] Alternatively, as an example, it may be possible, but is not limited to, by means of, such as Figure 4 The following examples illustrate and explain the above content:

[0213] Perform step S402 to connect the storage device.

[0214] Then, proceed to step S404 to query the iSCSI host corresponding to the storage device. Specifically, for an iSCSI IP network, if the storage and the host have formed an iSCSI link, the host's IQN information has already been added to the storage. Query the information of the iSCSI hosts already added to the storage. If no information is found, it indicates that an iSCSI network has not been formed between the storage and the host, and further identification of the storage and the host is unnecessary.

[0215] Then, step S406 is executed to save the IQN information of the hosts that have been added to the storage device. Specifically, the IQN information on each host is queried. If it cannot be found, it indicates that the host does not support iSCSI network. If it can be found, the iSCSI connection relationship between the storage and the host can be obtained.

[0216] Next, proceed to step S408 to query the IP and MAC information of the storage device and its corresponding host. Specifically, since the start and end points of the topology are already determined, it is only necessary to identify which Ethernet switches and routers pass between the storage and the host. Connect to the storage via SSH and execute commands to obtain the IP and MAC addresses of the Ethernet ports under different input / output groups on the storage. Simultaneously, connect to the host via SSH and execute the command `ip addr show` to obtain the IP and MAC addresses of the host's network interface card (NIC).

[0217] Then, step S410 is executed, which obtains the routing nodes between the host and the storage device through the routing discovery command. Specifically, the routing tracert command is executed on the host, with the destination address being the storage IP address. This will obtain all router information between the host and the storage.

[0218] Next, step S412 is executed. Based on the LLDP neighbor information stored in the database, the connection relationships between the host, Ethernet switch, router, and storage device are obtained. Specifically:

[0219] Based on the returned router information, the path is divided into multiple parts, and the topology information of each part is obtained segment by segment. Next, it is necessary to find the IP information of all Ethernet switches in the N parts between the host and router 1, router 1 and router 2, router 2 and router 3, ... router N and storage.

[0220] After LLDP is enabled on devices such as hosts, switches, routers, and storage, the LLDP agent on the device collects the device's IP address, Ethernet port, and MAC address information, and sends it to neighboring directly connected devices periodically. This allows neighbors to know the name, Ethernet port, MAC address, and other information of the other party's directly connected devices.

[0221] The management platform uses SSH to connect to devices such as hosts, switches, routers, and storage to obtain LLDP information of directly connected neighboring devices stored on the local device. The results are then summarized and saved in the `iscsi_port_mac` table. The table fields include device type, device IP, device port number, port MAC address, neighbor IP, neighbor port number, and neighbor port MAC address, as shown in several records in Table 2:

[0222] Table 2

[0223]

[0224] From the table above, we can see that Ethernet port 7 of storage IP1 is connected to Ethernet port 2 of Ethernet switch IP4 via a network cable, and Ethernet port 3 of Ethernet switch IP4 is connected to Ethernet port 4 of router IP5 via a network cable. For iSCSI links, the topology object contains N parts for the N parts between host and router, router and router, and router and storage: topo{link1, link2, link3...linkN}. Each link is a path between a device and a router, including multiple device nodes. A device node is defined as {pre, node, next}, where pre points to the previous device node, node is the current device node, and next points to the next device node.

[0225] If it's a host, the `pre` property of the corresponding link is NULL, and the `node` corresponds to a port. If it's storage, the `next` property of the corresponding link is NULL, and the `node` corresponds to a port. If it's an Ethernet switch or router, neither `pre` nor `next` is NULL, and the `node` corresponds to two ports, one connected to `pre` and the other to `next`. The reachable paths from the host to the storage are found in the `iscsi_port_mac` table. Each record is treated as a device port and saved in the `topo` object. The topology paths are stored in a doubly linked list. When changes are detected in data center devices, updating the topology information only requires modifying the device nodes pointed to by `pre` and `next`, reducing addressing time.

[0226] like Figure 5 As shown, the path from A to D is A, B, C, D. If the device link involves multiple data centers or multiple cities, the connection between data centers is a connection between data center gateway routers.

[0227] In this embodiment, a route discovery instruction with the target address of the first storage device is executed on the first host device to obtain network path information between the first host device and the first storage device. This network path information includes device information of network hop devices between the first host device and the first storage device. A Link Layer Discovery Protocol (LLDP) is enabled on each device in the data center cluster to obtain network information of the neighboring devices corresponding to each device. Based on the network path information and the network information of the neighboring devices corresponding to each device, a second sub-network topology between the first host device and the first storage device is determined and added to the second type of network topology. By employing this embodiment, the combination of route discovery instruction execution, Link Layer Discovery Protocol (LLDP) activation, and the construction of the second type of network topology (iSCSI network) enables the management platform to construct an iSCSI network topology that includes both physical connection paths and logical connection relationships. This topology not only demonstrates the physical architecture of the network but also reveals the logical access links between the host and storage resources, significantly improving network performance and resource access efficiency.

[0228] As an alternative approach, the above-mentioned network topology identification method also includes:

[0229] S1, query the first file system on the second host device used to access the second storage device, and the first storage volume on the second storage device used to provide storage services to the second host device.

[0230] S2, based on the identification information of the first file system, the identification information of the first storage volume, and the third sub-network topology used by the second host device to access the second storage device, determine the first sub-logical network topology between the second host device and the second storage device, wherein the first sub-logical network topology is used to characterize the logical connection relationship between the first file system and the first storage volume.

[0231] S3, add the first sub-logical network topology to the logical network topology, wherein the third sub-network topology belongs to either the first type of network topology or the second type of network topology.

[0232] Optionally, the aforementioned second host device is used to represent another host device in the data center cluster whose storage access is being checked.

[0233] It should be noted that the aforementioned second storage device refers to a storage resource accessed by a second host device for reading and writing data. It can be a storage array or a single storage unit in a SAN environment.

[0234] Furthermore, the aforementioned first file system refers to a file system located on the second host device, which accesses the storage volume on the second storage device through a specific network protocol.

[0235] Optionally, the first storage volume mentioned above is used to represent the storage space provided by the second storage device for the second host device. It is a logical division of storage resources used to carry data and applications.

[0236] It should be noted that the aforementioned third sub-network topology refers to the specific data path between the second host device and the second storage device. It can be either physical (such as FC network topology) or logical (such as iSCSI network topology).

[0237] Furthermore, the aforementioned first sub-logical network topology is used to reveal the logical connection relationship between the first file system and the first storage volume, that is, how the host accesses storage resources without involving specific physical path details.

[0238] Optionally, the above can be added to the logical network topology. This refers to integrating a specific sub-logical network topology into the overall logical network topology to maintain the integrity of the topology.

[0239] Alternatively, as an example, it may be possible, but is not limited to, by means of, such as Figure 6 The following examples illustrate and explain the above content:

[0240] Execute step S602 to traverse the hosts under the data center.

[0241] Then, proceed to step S604 to connect to the current host and query port information.

[0242] Next, step S606 is executed, which iterates through the FC ports and iSCSI ports under the current host.

[0243] Then, step S608 is executed to scan the current port and query the storage volume corresponding to the port path and the mapped host file system.

[0244] Then, step S610 is executed to add storage volumes and file systems based on the host information stored in the physical topology, and construct logical topology information.

[0245] Next, step S612 is executed to save the logical topology information to the database.

[0246] In other words, in this embodiment, all hosts under the data center are traversed periodically, SSH connections are made to query the FC ports and iSCSI ports on the hosts, and the ports are scanned to query the host file system and the mapped storage volume corresponding to the port link. Based on the physical topology constructed above (e.g., the first type of network topology, the second type of network topology), the corresponding physical connection links between the host and the storage are found, the logical topology from the host file system to the storage volume is constructed, and the logical topology information is saved to the database.

[0247] If there are any newly added / modified / deleted file systems, the corresponding updates will be made in the database. When selecting a volume that has been mapped to FC host storage on the front-end page, you can view the connection between storage volume - storage FC port - FC switch FC port - host FC port - host file system; when selecting a volume that has been mapped to iSCSI host, you can view the connection between storage volume - storage Ethernet port - Ethernet switch network port - router network port - Ethernet switch network port - host Ethernet port - host file system.

[0248] In this embodiment, a first file system on the second host device used to access the second storage device, and a first storage volume on the second storage device used to provide storage services to the second host device are queried. Based on the identification information of the first file system, the identification information of the first storage volume, and the third sub-network topology used by the second host device to access the second storage device, a first sub-logical network topology between the second host device and the second storage device is determined. This first sub-logical network topology characterizes the logical connection relationship between the first file system and the first storage volume. The first sub-logical network topology is added to the logical network topology, where the third sub-network topology belongs to either a first-type network topology or a second-type network topology. By combining the query of the first file system and the first storage volume with the construction and updating of the first sub-logical network topology, the management platform can continuously refine and optimize its network topology information, including not only the details of physical connections but also delving into the logical level of data access. This comprehensive and dynamic network topology greatly improves the operational efficiency of the data center cluster, helps to quickly respond to network changes, and ensures the efficient and stable operation of the network.

[0249] As an alternative approach, the above-mentioned network topology identification method also includes:

[0250] After successfully logging in and identifying each device in the data center cluster, further performance metrics are collected, including but not limited to network latency, bandwidth utilization, and packet loss rate between devices.

[0251] The collected performance metrics data are input into a pre-defined data analysis algorithm, which includes, but is not limited to, machine learning models and statistical analysis methods, to identify performance bottlenecks and potential fault points in the network.

[0252] Based on performance metric analysis, the intelligent decision-making module dynamically adjusts network routing strategies to optimize data transmission paths. For example, when it detects that the bandwidth utilization of a certain FC or iSCSI connection is close to saturation, it automatically reallocates traffic to connections with lighter loads.

[0253] Based on intelligent routing decisions, the management platform automatically updates the routing tables in the data center cluster or issues new routing policies to network devices to achieve optimal allocation of network traffic.

[0254] After implementing the optimization strategy, changes in network performance metrics are continuously monitored to evaluate the effectiveness of the route optimization. Based on the feedback, data analysis algorithms are continuously iterated and optimized to improve the accuracy and efficiency of route optimization.

[0255] Optionally, as an example, the above content can be illustrated by the following examples, but not limited to:

[0256] Assume the management platform successfully logs in and identifies the storage device Stor1, the host device Host1, and the FC switch Swch1 and Ethernet switch Swch2 connected to them within the data center. After successful device identification, the management platform begins collecting performance metric data.

[0257] The management platform uses predefined performance monitoring templates to execute performance data collection commands via the SSH protocol. For example, it uses the ping command to monitor the network latency between Stor1 and Host1, and uses ifstat or similar commands to monitor the bandwidth utilization and packet loss rate of FC ports and Ethernet ports.

[0258] The collected data includes: the average network latency between Stor1 and Host1 is 10ms; the average bandwidth utilization of the FC port on Swch1 is 80%, while the average bandwidth utilization of the Ethernet port on Swch2 is 50%; and the packet loss rate of the FC port on Swch1 is as high as 2%.

[0259] The management platform inputs this data into a machine learning model based on support vector machine (SVM). The model analysis results show that the FC connection on Swch1 is close to saturation, while the Ethernet connection on Swch2 still has a lot of available bandwidth.

[0260] Based on the model analysis results, the management platform's intelligent decision-making module decided to redirect some FC traffic to the Ethernet connection to reduce the load on Swch1. The management platform automatically updated the routing policy, issued new routing configurations to Swch2, and adjusted the path for Host1 to access Stor1, enabling it to transmit data more through the Ethernet connection.

[0261] After the routing optimization was implemented, the management platform continuously monitored network performance metrics and found that the average network latency between Stor1 and Host1 decreased to 5ms, the packet loss rate of the FC port of Swch1 decreased to 1%, and the bandwidth utilization of the Ethernet port of Swch2 increased to 60%. This indicates that the routing optimization strategy was effective and significantly improved network performance and stability.

[0262] By adopting the embodiments of this application, intelligent management of data center networks is achieved through the introduction of performance index collection and analysis. Its effects are not limited to improving network performance, but also involve multiple aspects such as fault prevention, resource optimization and user experience enhancement, providing strong technical support for the efficient operation and stable operation of data center clusters.

[0263] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0264] Embodiments of this application also provide a network topology identification device, such as... Figure 7 The following are included:

[0265] The device identification unit 702 is used to identify each device in the data center cluster according to the device identification template in the device identification template set until it successfully logs into each device and obtains the device information corresponding to each device. The device information includes the device type, and different device identification templates include different device identification information.

[0266] The first topology determination unit 704 is used to obtain the connection relationship between the first ports after finding the first port identifier of the first port corresponding to each device according to the device type of each device, and to determine the first type of network topology corresponding to the data center cluster based on the connection relationship between the first ports.

[0267] The second topology determination unit 706 is used to find the identity information of the host devices in each device and to find the access control list of the storage devices in each device; based on the first identity information of the host devices found and the second identity information included in the access control list of the storage devices, it identifies the host devices and storage devices with related relationships; based on the network path information between the host devices and storage devices with related relationships, it determines the second type of network topology corresponding to the data center cluster.

[0268] Optionally, in this embodiment, the device identification unit includes: an acquisition module for acquiring network segment information of each network segment in the data center cluster; a determination module for determining the network address of each device in the data center cluster based on the network segment information; an authentication module for authenticating each device according to each authentication template in the authentication template set until successful login to each device, wherein different authentication templates include different authentication information; and an information query module for querying the device information of each logged-in device according to each information query template in the information query template set until the device information of each device is obtained, wherein different information query templates include different device information query instructions.

[0269] Optionally, in this embodiment, the authentication module is further configured to: authenticate the target device according to the i-th authentication information in the i-th authentication template in the authentication template set, where i is a positive integer, and the i-th authentication information includes the authentication method, login credentials, and authentication port number; save the i-th authentication information if the target device is successfully logged in based on the i-th authentication template; and authenticate the target device according to the (i+1)-th authentication template in the authentication template set if the login to the target device fails based on the i-th authentication template.

[0270] Optionally, in this embodiment, the information query module is further configured to: query the device type of the target device according to the j-th device type query instruction in the j-th information query template, where j is a positive integer, and the information query template set includes the j-th information query template; if the device type of the target device is found based on the j-th device type query instruction, query the device version information of the target device according to the j-th version information query instruction in the j-th information query template, query the device port information of the target device according to the j-th port information query instruction in the j-th information query template, and query the device configuration information of the target device according to the j-th configuration information query instruction in the j-th information query template; if the device type of the target device is not found according to the j-th device type query instruction, query the device type of the target device according to the j+1-th device type query instruction in the j+1-th information query template, where the device type queried by the j-th device type query instruction is different from the device type queried by the j+1-th device type query instruction, and the information query template set includes the j+1-th information query template.

[0271] Optionally, in this embodiment, the above-mentioned apparatus further includes: a first acquisition unit, configured to determine that the storage device is in a first type of network after obtaining the first port identifier of the first port of the storage device and the peer port identifier of the storage device after executing a first command on the storage device in each device; a second acquisition unit, configured to determine that the host device is in a first type of network after obtaining the first port identifier of the first port of the host device and the peer port identifier of the host device after executing a second command on the host device in each device; a third acquisition unit, configured to determine that the switch device is in a first type of network after obtaining the first port identifier of the first port of the switch device and the peer port identifier of the switch device after executing a third command on the switch device in each device; and a fourth acquisition unit, configured to execute a fourth command on the switch device in the first type of network to obtain logical group information of each logical group corresponding to the switch device, wherein each logical group information stores the first port identifier of the host device and the first port identifier of the storage device in the corresponding logical group.

[0272] Optionally, in this embodiment, the first topology determination unit includes: a storage module, used to store the device type, device port number, first port identifier, device network address, and peer port identifier of each device in the first type of network into a first data table; a first determination module, used to determine at least one first sub-network topology based on the first data table and logical grouping information, wherein the first sub-network topology is used to characterize the connection link between the host device and the storage device in the same logical group; and an adding module, used to add at least one first sub-network topology to the first type of network topology.

[0273] Optionally, in this embodiment, the second topology determination unit includes a second determination module, which is used to determine that there is an association between the first storage device and the first host device when a second identity information matching the first identity information of the first host device is identified in the access control list of the first storage device.

[0274] Optionally, in this embodiment, the second topology determination unit further includes: a first acquisition module, configured to acquire network path information between the first host device and the first storage device by executing a route discovery instruction with the target address of the first storage device on the first host device, wherein the network path information includes device information of network hop devices between the first host device and the first storage device; a second acquisition module, configured to enable the link layer discovery protocol for each device in the data center cluster and acquire the network information of the neighboring devices corresponding to each device; and a third determination module, configured to determine a second sub-network topology between the first host device and the first storage device based on the network path information and the network information of the neighboring devices corresponding to each device, and add the second sub-network topology to the second type of network topology.

[0275] Optionally, in this embodiment, the above-mentioned apparatus further includes: a query unit, configured to query a first file system on the second host device used for accessing the second storage device, and a first storage volume on the second storage device used for providing storage services to the second host device; a third topology determination unit, configured to determine a first sub-logical network topology between the second host device and the second storage device based on the identification information of the first file system, the identification information of the first storage volume, and the third sub-network topology used by the second host device to access the second storage device, wherein the first sub-logical network topology is used to characterize the logical connection relationship between the first file system and the first storage volume; and an adding unit, configured to add the first sub-logical network topology to the logical network topology, wherein the third sub-network topology belongs to a first type of network topology or a second type of network topology.

[0276] For a description of the features in the embodiment corresponding to the network topology identification device, please refer to the relevant description in the embodiment corresponding to the network topology identification method, which will not be repeated here.

[0277] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described network topology identification method embodiments.

[0278] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described network topology identification method embodiments when running.

[0279] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0280] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described network topology identification method embodiments.

[0281] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described network topology identification method embodiments.

[0282] Those skilled in the art will further 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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 implementation should not be considered beyond the scope of this application.

[0283] The foregoing has provided a detailed description of a network topology identification and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for identifying network topology, characterized in that, include: The device identification templates in the device identification template set are used to identify each device in the data center cluster until the device is successfully logged in and the device information corresponding to each device is obtained. The device information includes the device type, and different device identification templates include different device identification information. After finding the first port identifier of the first port corresponding to each device according to the device type of each device, the connection relationship between the first ports is obtained, and the first type of network topology corresponding to the data center cluster is determined based on the connection relationship between the first ports. The system retrieves the identity information of the host devices in each device and the access control list of the storage devices in each device. Based on the first identity information of the host devices and the second identity information included in the access control list of the storage devices, it identifies the host devices and storage devices with related relationships. Based on the network path information between the host devices and storage devices with related relationships, it determines the second type of network topology corresponding to the data center cluster.

2. The network topology identification method according to claim 1, characterized in that, The step of identifying each device in the data center cluster according to the device identification template in the device identification template set, until successfully logging into each device and obtaining the device information corresponding to each device, includes: Obtain network segment information for each network segment in the data center cluster; Based on the network segment information, the network addresses of each device in the data center cluster are determined; The authentication process is repeated using the authentication templates in the authentication template set until successful login is achieved. Different authentication templates contain different authentication information. According to the various information query templates in the information query template set, query the device information of each logged-in device until the device information of each device is obtained. Different information query templates include different device information query instructions.

3. The network topology identification method according to claim 2, characterized in that, The step of authenticating each device according to each authentication template in the authentication template set until successful login to each device includes: The target device is authenticated according to the i-th authentication information in the i-th authentication template in the authentication template set, where i is a positive integer, and the i-th authentication information includes authentication method, login credentials and authentication port number; If the target device is successfully logged in based on the i-th authentication template, the i-th authentication information is saved; If login to the target device fails based on the i-th authentication template, the target device is authenticated according to the (i+1)-th authentication template in the authentication template set.

4. The network topology identification method according to claim 2, characterized in that, The step of querying the device information of each logged-in device according to each information query template in the information query template set until the device information of each device is obtained includes: According to the j-th device type query instruction in the j-th information query template, query the device type of the target device, where j is a positive integer, and the information query template set includes the j-th information query template; If the device type of the target device is found based on the j-th device type query instruction, the device version information of the target device is queried according to the j-th version information query instruction in the j-th information query template, the device port information of the target device is queried according to the j-th port information query instruction in the j-th information query template, and the device configuration information of the target device is queried according to the j-th configuration information query instruction in the j-th information query template. If the device type of the target device is not found according to the j-th device type query instruction, the device type of the target device is queried according to the (j+1)-th device type query instruction in the (j+1)-th information query template. The device type queried by the j-th device type query instruction is different from the device type queried by the (j+1)-th device type query instruction. The information query template set includes the (j+1)-th information query template.

5. The network topology identification method according to claim 1, characterized in that, After identifying each device in the data center cluster according to the device identification template in the device identification template set, until successfully logging into each device and obtaining the device information corresponding to each device, the process further includes: After executing the first command on the storage device in each of the devices, and obtaining the first port identifier of the first port of the storage device and the peer port identifier of the storage device, it is determined that the storage device is in a first type of network. After executing the second command on the host device among the various devices, and obtaining the first port identifier of the first port of the host device and the peer port identifier of the host device, it is determined that the host device is in the first type of network. After executing the third command on the switch device in each of the devices, and obtaining the first port identifier of the first port of the switch device and the peer port identifier of the switch device, it is determined that the switch device is in the first type of network. The fourth command is executed on the switch device located in the first type of network to obtain the logical group information of each logical group corresponding to the switch device, wherein each logical group information stores the first port identifier of the host device and the first port identifier of the storage device in the corresponding logical group.

6. The network topology identification method according to claim 5, characterized in that, Obtain the connection relationships between the first ports, and based on the connection relationships between the first ports, determine the first type of network topology corresponding to the data center cluster, including: The device type, device port number, first port identifier, device network address, and peer port identifier of each device in the first type of network are stored in the first data table; Based on the first data table and the logical grouping information, at least one first sub-network topology is determined, wherein the first sub-network topology is used to characterize the connection links between host devices and storage devices in the same logical group. Add the at least one first sub-network topology to the first type of network topology.

7. The network topology identification method according to claim 1, characterized in that, The identification of associated host devices and storage devices based on the first identity information of the found host device and the second identity information included in the access control list of the storage device includes: If a second identity information matching the first identity information of the first host device is identified in the access control list of the first storage device, it is determined that there is an association between the first storage device and the first host device.

8. The network topology identification method according to claim 7, characterized in that, The determination of the second type of network topology corresponding to the data center cluster based on the network path information between associated host devices and storage devices includes: By executing a route discovery instruction with the target address of the first storage device on the first host device, network path information between the first host device and the first storage device is obtained, wherein the network path information includes device information of network hop devices between the first host device and the first storage device; Enable the link layer discovery protocol on each device in the data center cluster to obtain the network information of the neighboring devices corresponding to each device. Based on the network path information and the network information of the neighboring devices corresponding to each device, a second sub-network topology between the first host device and the first storage device is determined, and the second sub-network topology is added to the second type of network topology.

9. The network topology identification method according to any one of claims 1 to 8, characterized in that, The network topology identification method also includes: Query the first file system on the second host device used to access the second storage device, and the first storage volume on the second storage device used to provide storage services to the second host device; Based on the identification information of the first file system, the identification information of the first storage volume, and the third sub-network topology used by the second host device to access the second storage device, a first sub-logical network topology between the second host device and the second storage device is determined, wherein the first sub-logical network topology is used to characterize the logical connection relationship between the first file system and the first storage volume. Add the first sub-logical network topology to the logical network topology, wherein the third sub-network topology belongs to either the first type of network topology or the second type of network topology.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the network topology identification method as described in any one of claims 1 to 9 when executing the computer program.

Citation Information

Patent Citations

  • Topological relation preservation method and device based on MQTT and medium

    CN115987871A

  • Automatic identification method and device for Internet of Things equipment in cellular network environment and storage medium

    CN120296567A