Network equipment configuration method and device, electronic equipment and storage medium
By using the public IP address of network devices to automatically discover and configure other network devices through the server, the inefficiency caused by scanning codes one by one by terminal devices is solved, and efficient and flexible network device configuration is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
In the process of configuring network devices, obtaining device information by scanning codes one by one with terminal devices is inefficient, especially when the network devices are already wall-mounted, requiring climbing a ladder to scan codes, which is time-consuming and laborious.
The server obtains the public IP address of the first network device, determines and obtains the device information of the second network device, and performs network configuration on the first and second network devices. This avoids obtaining the device information of each device individually and improves configuration efficiency.
Discovering and configuring other network devices through a single network device improves the efficiency and flexibility of network device configuration, reduces manual intervention, and enhances the security and efficiency of information transmission.
Smart Images

Figure CN121750459A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a network device configuration method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, configuring network devices is required during the initial setup process.
[0003] In related technologies, network management project files are created on the server side by scanning the codes of network devices one by one through the application software (APP) of the terminal device, thereby enabling the server to configure the network devices that need to be configured in the network management project. However, in related technologies, the process of users scanning the codes of the network devices to be configured one by one is time-consuming, especially when the network devices are wall-mounted, requiring climbing ladders to scan the codes, which is time-consuming and laborious, resulting in low configuration efficiency. Summary of the Invention
[0004] The purpose of this application is to provide a network device configuration method, apparatus, electronic device, and storage medium. This avoids the need to obtain device information for each device individually through terminal devices, thereby improving the efficiency of network device configuration.
[0005] To achieve the above objectives, the embodiments of this application provide the following solutions:
[0006] Firstly, this application provides a network device configuration method applied to a server. The method includes: obtaining device information and the public IP address of a first network device; determining a second network device based on the public IP address of the first network device, and obtaining device information for the second network device, wherein the second network device is a network device other than the first network device that has a public IP address; and configuring the first and second network devices for networking based on the device information of the first and second network devices, respectively.
[0007] The server only needs to use the public IP address of the first network device to obtain the device information of the second network device with the same public IP address. This is equivalent to discovering the other network devices to be configured through only one network device, avoiding the need to obtain the device information of each device one by one through the terminal device (such as scanning the QR code of multiple network devices to be configured one by one to obtain the device information), thereby improving the efficiency of network device configuration.
[0008] In one possible implementation, obtaining the public IP address of the first network device includes: establishing a connection with the first network device in response to a connection request from the first network device; and obtaining the public IP address of the first network device according to the connection protocol on which the connection request is based.
[0009] The first network device actively initiates a connection request to the server. The server responds to this request and establishes a connection with the first network device. For example, the connection protocol can be a network communication protocol, improving the reliability of bidirectional communication. The connection request based on this protocol includes the public IP address and device information of the first network device. In this way, the server can obtain the public IP address of the first network device from the connection request, and this public IP address is the one currently being used by the first network device, making it more accurate and efficient.
[0010] In one possible implementation, the connection request is sent by the first network device based on the server address obtained from the registry center. The server address is determined by the registry center based on the location information of the first network device and a preset mapping. This preset mapping represents the correspondence between the location information and server addresses of multiple different network devices. Thus, since the registry center assigns corresponding server addresses to network devices based on their location information, network devices within the same area can share the same server address, meaning they are managed by the same server. This allocation logic makes the allocation of server addresses more rational.
[0011] In one possible implementation, determining the second network device based on the public IP address of the first network device includes: identifying network devices of a first category whose public IP addresses are the same as those of the first network device; sending the device information of the first category of network devices to the target device; and receiving the device information of the second network device returned by the target device. The second network device is selected by the user from the first category of network devices based on a preset set of devices to be configured. The set of devices to be configured includes both the first and second network devices.
[0012] In network management projects, network devices within the same area are typically deployed. Since network devices within the same area usually share the same public IP address, the network devices that need to be configured in a network management project are highly likely to share the same public IP address. This means that network devices with the same public IP address are very likely to include those that need to be configured in the network management project, i.e., they belong to the set of devices to be configured. Based on this, by identifying the first category of network devices whose public IP addresses are the same as the public IP address of the first network device, and then selecting the second network device from the first category, the network devices that need to be configured can be selected quickly and efficiently. This allows the discovery of other network devices to be configured using only one device, avoiding the need to obtain device information for each device individually through terminal devices, thus improving the efficiency of network device configuration. For example, when deploying a new branch network for an enterprise, the network devices (such as a gateway, a switch, and a wireless access point) at the enterprise's deployment site are deployed. Typically, the network devices at the deployment site share the same public IP address. Therefore, by using the public IP address of any one of the network devices at the deployment site, it is highly likely that the other network devices that need to be configured can be discovered, thereby enabling the configuration of the network devices that need to be configured at the deployment site.
[0013] In one possible implementation, obtaining the device information of the first network device includes: receiving a request from the target device, the request including the device information of the first network device. The request instructs the server to return a first-class network device whose public IP address is the same as the public IP address of the first network device.
[0014] Since the first network device belongs to the set of devices to be configured, the first network device in the set of devices to be configured is pre-determined by the target device, and the device information of the first network device is sent to the server. This enables the server to discover the first type of network devices based on the public IP address of the first network device, and obtain the device information of the second network device in the first type of network devices that meets the configuration requirements. This solves the technical problem of needing to scan the code of each network device in related technologies, and enables the configuration of multiple network devices through a single network device, thereby improving the efficiency of network device configuration.
[0015] In one possible implementation, the first or second network device includes a local area network (LAN) discovery device. This LAN discovery device discovers second-type network devices within its local area network (excluding other LAN discovery devices) and sends the device information of these second-type network devices to a server. The method further includes: receiving the device information of the second-type network devices sent by the LAN discovery device; and configuring the third network device based on its device information.
[0016] Since network devices in network management projects typically need to communicate or collaborate to ensure they meet the project's network requirements, discovering a second type of network device within the local area network (LAN) besides the LAN-discovering device indicates that this second type of network device can communicate or collaborate with the LAN-discovering device. Because the LAN-discovering device belongs to either the first or second type of network device, and both belong to the set of devices to be configured, this second type of network device is one capable of communicating or collaborating with either the first or second type. Therefore, this second type of network device has a high probability of including network devices that need to be configured in the network management project, i.e., devices belonging to the set of devices to be configured. Based on this, discovering the second type of network device and identifying the third type of network device improves both the discovery and configuration efficiency of network devices.
[0017] In one possible implementation, before configuring the third network device based on its device information within the second type of network devices, the process further includes: sending the device information of the second type of network devices to the target device; and receiving the device information of the third network device returned by the target device. The third network device is selected by the user from the second type of network devices based on a preset set of devices to be configured. The set of devices to be configured includes the third network device.
[0018] By introducing interaction with the target device, a third network device is identified from the second type of network devices. This third network device is confirmed to belong to the set of devices to be configured, thus achieving efficient discovery and accurate configuration of the third network device, while increasing the flexibility of the third network device identification.
[0019] In one possible implementation, the LAN discovery device includes a LAN discovery endpoint device, and the second type of network device includes all network devices in the LAN that respond to the LAN discovery endpoint device. The LAN discovery device includes network devices supporting discovery protocols, and the second type of network device includes network devices in the LAN that are directly connected to the network devices supporting discovery protocols. Thus, when the LAN discovery device includes a LAN discovery endpoint device, the server can read the device information of all network devices discovered on the LAN discovery endpoint device that respond to it, further expanding the discovery path to find all network devices in the LAN that can respond to the LAN discovery endpoint device, allowing the server to obtain the device information of the second type of network devices according to this discovery path. Meanwhile, when the local area network (LAN) device discovery includes network devices that support discovery protocols, the server can read the device information of the network devices directly connected to the network devices that support discovery protocols from the discovery protocol of the network devices that support discovery protocols. This further expands the discovery path to discover the network devices directly connected to the network devices that support discovery protocols in the LAN, so that the server can obtain the device information of the second type of network devices according to the discovery path.
[0020] In one possible implementation, the method further includes: determining a third type of network device; sending the device information of the third type of network device to the target device; receiving the device information of a fourth network device returned by the target device; the fourth network device being a newly added device selected by the user from the third type of network devices and being a preset set of devices to be configured; and configuring the fourth network device based on its device information.
[0021] By identifying the third type of network devices and then using the target device to identify the fourth network device within that third type, a more efficient method for discovering and configuring new network devices in expansion scenarios is provided. This not only achieves effective discovery and efficient configuration of new network devices but also provides users with a more flexible, automated, and easy-to-manage network management mechanism.
[0022] Secondly, this application provides another network device configuration method applied to a terminal device. The method includes: obtaining device information of a first network device. The first network device is one of a preset set of devices to be configured. Determining device information of a second network device, wherein the second network device is obtained based on the public IP address of the first network device, and the second network device is a network device other than the first network device that has a public IP address. Sending the device information of the second network device to a server, wherein the device information of the first network device and the device information of the second network device are used respectively for network configuration of the first network device and the second network device.
[0023] In network management projects, network devices within the same area are typically deployed. Since network devices within the same area usually share the same public IP address, and the first category of network devices refers to those with the same public IP address as the first network device, the network devices that need to be configured in the network management project are highly likely to share the same public IP address. In other words, the first category of network devices very likely includes the network devices that need to be configured in the network management project—that is, the network devices in the set of devices to be configured. Based on this, identifying the second network device from the first category of network devices allows for efficient and accurate identification of the network devices that need to be configured in the network management project, thereby improving the efficiency of network device configuration.
[0024] In one possible implementation, determining the device information of the second network device includes: receiving device information of a first type of network device sent by a server, where the first type of network device represents a network device with the same public IP address as the first network device. Based on a preset set of devices to be configured, the second network device is determined from the first type of network devices, and the device information of the second network device is obtained. The set of devices to be configured includes both the first and second network devices.
[0025] The required second network device can be identified from the first type of network devices discovered by the public IP address of the first network device. This eliminates the need for terminal devices to scan multiple network devices, enabling the server to configure multiple network devices and improving the efficiency and flexibility of network device configuration.
[0026] In one possible implementation, before determining the device information of the second network device, the process further includes sending a request message to the server, the request message including the device information of the first network device. The request message instructs the server to return a first-class network device whose public IP address is the same as the public IP address of the first network device.
[0027] By pre-determining a first network device and sending a request message including the device information of the first network device to the server, the server can perform subsequent operations based on the device information of the first network device, thereby discovering more other network devices.
[0028] In one possible implementation, the first or second network device includes a local area network (LAN) discovery device. This LAN discovery device discovers second-type network devices within its local area network (excluding other LAN discovery devices) and sends the device information of these second-type network devices to a server. The method further includes: receiving the device information of the second-type network devices sent by the server; determining a third network device from the second-type network devices based on a preset set of devices to be configured, wherein the set of devices to be configured includes the third network device; and sending the device information of the third network device to the server, whereby the device information is used for network configuration of the third network device.
[0029] Because network devices in network management projects typically need to communicate or collaborate to ensure they meet the project's network requirements, the second type of network devices can communicate or collaborate with either the first or second type of network devices. Therefore, this second type of network device is highly likely to include network devices that need to be configured in the network management project, i.e., network devices belonging to the set of devices to be configured. Based on this, identifying the third type of network device from the second type improves the efficiency of network device discovery and configuration.
[0030] In one possible implementation, the method further includes: receiving device information of a third type of network device sent by a server; identifying a fourth network device from the third type of network devices; the fourth network device being a newly added device to a preset set of devices to be configured; and sending the device information of the fourth network device to the server, the device information being used for network configuration of the fourth network device.
[0031] By identifying a fourth network device that meets the configuration requirements from the third type of network devices and sending the device information of the fourth network device to the server, the server can configure the network for the fourth device, thus enabling efficient and reliable configuration of network devices for expansion scenarios.
[0032] In one possible implementation, the method further includes: for a network device that failed to configure, determining the cause of the configuration failure based on the network device itself. Specifically, if the network device that failed to configure belongs to either the first or second network device, the cause of the configuration failure is determined to be a management plane DNS resolution error. If the network device that failed to configure belongs to both the first and second network devices and also to a third network device, the cause of the configuration failure is determined to be a network cable malfunction.
[0033] If the network device experiencing configuration failure is either the first or second network device, it indicates that the network device failed to connect to the corresponding server, thus the cause of the configuration failure is determined to be a management plane DNS resolution anomaly. If the network device experiencing configuration failure is also a third network device, it indicates that not only has the network device failed to connect to the corresponding server, but the network device is also not discoverable on the local area network. If both of these conditions occur simultaneously, the cause of the configuration failure is determined to be a network cable malfunction. In this way, by determining the cause of the configuration failure of the network device, necessary guidance on the cause of the failure can be provided.
[0034] Thirdly, this application provides a network device configuration apparatus applied to a server. The apparatus includes: an acquisition module for acquiring device information and the public IP address of a first network device; a determination module for determining a second network device based on the public IP address of the first network device, and acquiring device information of the second network device, wherein the second network device is a network device other than the first network device that has a public IP address; and a configuration module for configuring the first network device and the second network device respectively based on the device information of the first network device and the device information of the second network device.
[0035] Fourthly, this application provides another network device configuration apparatus for use in terminal devices. The apparatus includes: an acquisition module for acquiring device information of a first network device, wherein the first network device is one of a preset set of devices to be configured; a determination module for determining device information of a second network device, wherein the second network device is obtained based on the public IP address of the first network device, and the second network device is a network device other than the first network device that has a public IP address; and a sending module for sending the device information of the second network device to a server, wherein the device information of the first network device and the device information of the second network device are used respectively for network configuration of the first network device and the second network device.
[0036] Fifthly, this application provides an electronic device, including: a processor and a memory for storing processor-executable instructions. When the processor is configured to execute instructions, the electronic device implements the network device configuration method described above.
[0037] Sixthly, this application provides a storage medium storing computer program instructions thereon. When the computer program instructions are executed by an electronic device, the electronic device implements the network device configuration method described above.
[0038] In a seventh aspect, this application provides a program product including a computer-readable storage medium storing a computer program, which, when at least one processor executes the computer program, causes at least one processor to perform the network device configuration method described above. Attached Figure Description
[0039] Figure 1 A flowchart illustrating the application scenarios provided in this application embodiment;
[0040] Figure 2 This application provides a schematic diagram of the structure of a configuration system according to an embodiment of the present application.
[0041] Figure 3 A flowchart illustrating a network device configuration method provided in an embodiment of this application;
[0042] Figure 4 A flowchart illustrating another network device configuration method provided in an embodiment of this application;
[0043] Figure 5 A flowchart illustrating another network device configuration method provided in an embodiment of this application;
[0044] Figure 6 A flowchart illustrating another network device configuration method provided in an embodiment of this application;
[0045] Figure 7 This is a schematic diagram of the structure of a network device configuration apparatus provided in an embodiment of this application;
[0046] Figure 8 This is a schematic diagram of another network device configuration apparatus provided in an embodiment of this application;
[0047] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0048] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.
[0049] In the following description of the embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0050] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0051] The following provides an exemplary description of the application scenarios of the embodiments of this application.
[0052] When configuring network devices, a terminal device (such as an app on the terminal device) is typically used to scan the network device to be configured (e.g., an image on the network device) to obtain the device information. The server then performs network configuration on the network device based on this device information.
[0053] Taking the configuration of network equipment in a distribution network as an example, a distribution network is a collection of interconnected and interdependent organizations and individuals involved in the distribution process. These organizations and individuals, through division of labor and cooperation, form a systematic network organization that transcends enterprise boundaries, enabling the efficient transfer of goods and services from producers to consumers and users. In this process of transferring goods and services from producers to consumers and users, contractors need to correctly install and configure network equipment in the customer's environment. Network equipment has an image, specifically a barcode, which contains the device information. In the application scenario of network equipment configuration in a distribution network, such as... Figure 1 As shown, in step S101, the terminal device (specifically, an app used by the engineer on the terminal device) scans the barcodes of multiple network devices that need to be configured, obtaining device information for each device. In step S102, the terminal device sends the obtained device information to the server. In step S103, the server configures the network devices based on this information. However, this process of scanning the barcodes of each network device individually is time-consuming, especially when some network devices are wall-mounted, requiring users to climb ladders to scan the barcodes, which is time-consuming and laborious, resulting in low configuration efficiency.
[0054] In view of this, embodiments of this application provide a network device configuration method, which is applied to a server. First, the server obtains the device information and public IP address of a first network device. Second, the server determines a second network device based on the public IP address of the first network device and obtains the device information of the second network device, which is a network device other than the first network device that has a public IP address. Finally, the server performs network configuration on the first and second network devices respectively based on the device information of the first and second network devices. Since the server only needs to obtain the device information of the second network device with the public IP address of the first network device, it is equivalent to discovering the remaining network devices to be configured through only one network device, avoiding the need to obtain the device information of each device individually through terminal devices (e.g., scanning QR codes to obtain device information for multiple network devices to be configured), thereby improving the efficiency of network device configuration.
[0055] The system architecture of the embodiments of this application will be described exemplarily below.
[0056] like Figure 2 As shown in the figure, this application embodiment provides a configuration system, which includes network devices and servers.
[0057] Network devices include gateways, switches, wireless access points (APs), and LAN discovery devices. LAN discovery devices include network devices supporting discovery protocols and LAN discovery endpoint devices. The LAN discovery endpoint device is used to discover all network devices within its local area network that can respond to it. LAN discovery endpoint devices include network devices with broadcast and multicast mechanisms, such as gateways with broadcast and multicast mechanisms. Network devices supporting discovery protocols include those supporting the link layer discovery protocol (LLDP). These devices are used to discover network devices within their local area network that are directly connected to them.
[0058] A server, as the management center for network devices, is used to manage network devices within the network.
[0059] In some embodiments, the server is configured to obtain device information and public IP address of a first network device, determine a second network device based on the public IP address of the first network device, and obtain device information of the second network device. The server is also configured to perform network configuration on the first network device and the second network device respectively based on the device information of the first network device and the device information of the second network device. The second network device is a network device other than the first network device that has a public IP address.
[0060] In other embodiments, the server is also configured to respond to a connection request from the first network device, establish a connection with the first network device, and obtain the public IP address of the first network device according to the connection protocol on which the connection request is based.
[0061] In other embodiments, the server is also configured to receive request information sent by the target device. The request information includes device information of the first network device. The request information is used to instruct the server to return a first type of network device whose public IP address is the same as the public IP address of the first network device.
[0062] In other embodiments, the server is further configured to identify a first type of network device whose public IP address is the same as the public IP address of the first network device, send the device information of the first type of network device to the target device, and receive the device information of a second network device returned by the target device. The second network device is selected by the user from the first type of network devices based on a preset set of devices to be configured. The set of devices to be configured includes the first network device and the second network device.
[0063] Optionally, the configuration system may also include terminal devices.
[0064] In some embodiments, the terminal device is used to obtain device information of the first network device and send the device information of the first network device to the server. The first network device is one of a preset set of devices to be configured.
[0065] In other embodiments, the terminal device is further configured to determine the device information of the second network device and send the device information of the second network device to the server. The second network device is obtained based on the public IP address of the first network device.
[0066] For example, the terminal device includes an app with specific functions. This app can interact with the server and the user, thereby collaborating with the server to configure the network device. The app provides an interactive interface for the user, facilitating the management of the network device.
[0067] Optionally, the configuration system connects to a registry center. The registry center stores device information for network devices and their corresponding server addresses. Through interaction between the configuration system and the registry center, the configuration system can obtain the server address corresponding to the network device from the registry center. Specifically, the network device in the configuration system obtains its corresponding server address from the registry center, enabling the network device to establish a connection with the server based on its corresponding server address.
[0068] For example, the registry center can be set up inside the configuration system or outside the configuration system.
[0069] Optionally, the registry center is also connected to an information storage system. The information storage system stores device information and location information for network devices, where the location information indicates the region (e.g., sales region) where the network device is located. By interacting with the information storage system, the registry center can retrieve the device information and location information of the network devices from the information storage system. For example, the information storage system could be an inventory management system. Inventory management systems are typically established by manufacturers or distributors and store supply chain information for network devices. This supply chain information includes the device information and location information of the network devices. For instance, a manufacturer or distributor records the device information and location information of network devices to obtain supply chain information. For example, the supply chain information might be "Network device A's device information is 001, location information is Xi'an." This indicates that network device A is located in Xi'an.
[0070] For example, the information storage system can be located inside the configuration system or outside the configuration system.
[0071] In some embodiments, after obtaining the device information and location information of a network device from the information storage system, the registration center is further used to allocate a server address to the network device based on its location information. Since the location information of the network device corresponds to its device information, a correspondence is formed between the device information and the server address, so that the registration center stores the device information of the network device and its corresponding server address.
[0072] For example, the registration center assigns different server addresses to network devices whose location information does not belong to the same area, meaning that network devices that do not belong to the same area are managed by different servers.
[0073] In other embodiments, the registry center is also used to return the server address corresponding to the device information of the network device to the network device.
[0074] For example, in response to a query request from a network device, the registry center sends the server address corresponding to the network device's device information to the network device. The query request is used to indicate a request to query the server address corresponding to the network device.
[0075] In the above system, the server can be deployed in the cloud or a data center. The server can be a physical server or a virtualization platform. There can be one physical server or two or more physical servers that share different responsibilities. The physical servers work together to realize the various functions of the server.
[0076] For example, the server can be a blade server, a high-density server, a rack server, or a tower server, etc.
[0077] The registration center in the above system can be deployed in the cloud or a data center.
[0078] The inventory management system in the above system can be deployed in the cloud or data center.
[0079] The terminal devices in the above system can be mobile phones, tablets, handheld computers, personal computers (PCs), cellular phones, personal digital assistants (PDAs), wearable devices (such as smartwatches, smart bracelets, etc.), smart home devices (such as televisions, etc.), in-vehicle systems (such as in-vehicle computers, etc.), smart screens, laptops, desktop computers, or all-in-one computers, etc.
[0080] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0081] For ease of understanding, the network device configuration method provided in this application is described below with reference to the accompanying drawings. This network device configuration method is applicable to... Figure 2 The configuration system shown.
[0082] like Figure 3 As shown in the figure, this application embodiment provides a network device configuration method, which can be executed by a server, and the method includes:
[0083] S201, the server obtains the device information of the first network device and the public IP address of the first network device.
[0084] The device information includes a device identifier, which is unique and different network devices have different identifiers, thus allowing different network devices to be distinguished based on the device identifier. For example, the device identifier is specifically a serial number (e.g., xxx).
[0085] The first network device is one of the preset sets of devices to be configured.
[0086] The set of devices to be configured represents the collection of network devices that require network configuration within a network management project. A network management project defines a specific network environment or service. It also serves as the entry point for the server to manage the network devices in the set. For example, deploying a new branch network for an enterprise, including a gateway, a switch, and a wireless access point, constitutes a "network management project." The set of gateways, switches, and wireless access points is the "set of devices to be configured." The server uses this "network management project" as an entry point to configure the gateways, switches, and wireless access points within the "set of devices to be configured," ensuring they work together to meet the enterprise's network requirements.
[0087] For example, network management projects can be created by a server or by a terminal device. Specifically, network management projects are created by users (such as engineers) through an app on the terminal device.
[0088] In some embodiments, the server obtaining the public IP address of the first network device includes: establishing a connection with the first network device in response to a connection request from the first network device; and obtaining the public IP address of the first network device according to the connection protocol on which the connection request is based.
[0089] In this embodiment, the first network device actively initiates a connection request to the server. The server responds to the connection request and establishes a connection with the first network device. For example, the connection protocol can be a network communication protocol (transmission control protocol / internet protocol, TCP / IP), improving the reliability of bidirectional communication. The connection request based on this connection protocol includes the public IP address of the first network device and the device information of the first network device. In this way, the server can obtain the public IP address of the first network device from the connection request, and this public IP address is the public IP address currently used by the first network device, which is more accurate and efficient.
[0090] In some embodiments, the connection request is sent by the first network device based on the server address obtained from the registration center. The server address is determined by the registration center based on the location information of the first network device and a preset correspondence. The preset correspondence is used to represent the correspondence between the location information and server addresses of multiple different network devices.
[0091] Optionally, the registration center retrieves the device information and location information of the network devices from the information storage system. It then assigns corresponding server addresses to the network devices based on their location information and pre-defined mappings.
[0092] For example, the registry center retrieves the supply chain information of network devices stored in the inventory management system. In this way, the registry center can assign corresponding server addresses to the network devices stored in the inventory management system.
[0093] For example, the preset correspondence can be set so that network devices with location information within the same area correspond to the same server address. For instance, two network devices with similar location information can be considered to belong to the same area and can correspond to the same server address. This allows a single server to manage network devices within the same area, making it more convenient.
[0094] In some embodiments, after the registration center assigns a corresponding server address to a network device based on the network device's location information and a preset correspondence, the registration center responds to a query request from the network device by sending the server address corresponding to the network device's device information to the network device. The query request indicates a request to query the server address corresponding to the network device.
[0095] For example, network devices send query requests to the registration center at preset intervals. This preset interval can be set according to the user's actual needs.
[0096] For example, after the supply chain information in the inventory management system is updated, the registry center obtains the updated supply chain information from the inventory management system. In this way, for network devices whose corresponding server addresses cannot be found in the registry center, a new query request can be sent to the registry center to obtain the corresponding server address.
[0097] Optionally, the first network device obtaining the server address from the registration center includes: sending a query request to the registration center; and receiving the server address corresponding to the first network device returned by the registration center.
[0098] In some embodiments, if a network device establishes a connection with a server, it is determined that the network device is online in the cloud. If a network device does not establish a connection with a server, it is determined that the network device is not online in the cloud.
[0099] Furthermore, when network devices are not connected to a server, i.e., when the network devices are not online in the cloud, the server cannot obtain the device's status information (including log files, performance metrics, etc.). This makes problem diagnosis difficult if the network device malfunctions. In this situation, it can be determined that the network device is difficult to locate.
[0100] In related technologies, the registration center interacts with the server to obtain device information of network devices on the server, and then assigns server addresses to the network devices based on this information. However, the device information of the network devices on the server is obtained by scanning a code on the terminal device and then sent to the server. Thus, when assigning a server address to each network device, the registration center needs to interact with the server once, and the terminal device also needs to scan the code of that network device. This means that, on the one hand, the registration center can only assign corresponding server addresses to network devices scanned by the terminal device, and determining the server address for each network device requires manual intervention (i.e., the scanning operation). Furthermore, the frequent interaction between the registration center and the server results in low information transmission security and efficiency. On the other hand, because scanning each network device takes a long time, some network devices may be unable to connect to the server for extended periods, meaning they cannot go online in the cloud and are difficult to locate. In this embodiment, the registration center does not need to interact with the server; it only needs to interact with the information storage system to obtain the location and device information of the network devices (the network devices can be some or all of the network devices in the information storage system, depending on actual needs), and then assign corresponding server addresses to the network devices. In this way, on the one hand, the registration center can automatically and efficiently assign corresponding server addresses to multiple network devices with fewer interactions with the information storage system, without manual intervention (i.e., no QR code scanning required). This enables network devices to quickly connect to the server, improving the efficiency of network device deployment in the cloud and consequently, the efficiency of network device configuration. Simultaneously, since there is no need for interaction between the server and the registration center, the security and efficiency of information transmission are improved. On the other hand, because the registration center assigns server addresses to network devices based on their location information, network devices within the same area can share the same server address, meaning they are managed by the same server. This allocation logic makes server address allocation more rational.
[0101] Furthermore, because the information storage system contains relatively rich device and location information for network devices, the registration center obtains comprehensive device and location information from it. This allows the center to assign corresponding server addresses to the network devices stored in the information storage system based on actual needs, facilitating subsequent connections between network devices and their respective servers. In this way, network devices do not need to frequently query the registration center for server addresses or attempt to go online in the cloud multiple times. This solves the technical problems of multiple connection establishments, long processing times, and complex coupling involved in connecting network devices to cloud servers, further improving the efficiency of network device configuration.
[0102] In some embodiments, before obtaining the public IP address of the first network device according to the connection protocol on which the connection request is based, the first network device has already been powered on and successfully connected to the public network. The public IP address of the first network device is assigned to it by the operator after the first network device successfully connects to the public network. This allows the server to subsequently obtain the public IP address of the network device.
[0103] In some embodiments, the server obtains the device information of the first network device by: obtaining the device information of the first network device according to the connection protocol on which the connection request is based. Since the connection protocol includes the public IP address of the first network device and the device information of the first network device, the server can directly and efficiently obtain the device information of the first network device.
[0104] In other embodiments, the server obtaining the device information of the first network device includes receiving the device information of the first network device sent by the target device. The target device refers to the terminal device that obtains the device information of the first network device.
[0105] For example, the server obtaining device information of the first network device includes: receiving request information sent by the target device, the request information including device information of the first network device. The request information is used to instruct the server to return a first-class network device whose public IP address is the same as the public IP address of the first network device.
[0106] In this embodiment, since the first network device belongs to the set of devices to be configured, the first network device in the set of devices to be configured is pre-determined by the target device, and the device information of the first network device is sent to the server. This enables the server to discover the first type of network devices based on the public IP address of the first network device, and obtain the device information of the second network device in the first type of network devices that meets the configuration requirements. This solves the technical problem of needing to scan network devices one by one in related technologies, and enables the configuration of multiple network devices through one network device, thereby improving the efficiency of network device configuration.
[0107] S202, the server determines the second network device based on the public IP address of the first network device and obtains the device information of the second network device.
[0108] The second network device is any network device other than the first network device that has a public IP address. That is, the second network device and the first network device share the same public IP address.
[0109] In some embodiments, the server determines the second network device based on the public IP address of the first network device by: identifying a first-class network device whose public IP address is the same as that of the first network device; sending the device information of the first-class network device to the target device; and receiving the device information of the second network device returned by the target device.
[0110] The second network device is selected by the user from the first type of network devices based on a preset set of devices to be configured. The set of devices to be configured includes both the first and second network devices.
[0111] In this embodiment, network management projects typically deploy network devices within the same area. Since network devices within the same area usually share the same public IP address, the network devices that need to be configured in the network management project are highly likely to share the same public IP address. In other words, network devices with the same public IP address are very likely to include the network devices that need to be configured in the network management project, i.e., they belong to the set of devices to be configured. Based on this, by identifying a first category of network devices whose public IP addresses are the same as the public IP address of the first network device, and selecting a second network device from this first category, the network devices that need to be configured can be selected quickly and efficiently. This allows the discovery of other network devices to be configured using only one device, avoiding the need to obtain device information for each device individually through terminal devices, thereby improving the efficiency of network device configuration. For example, in deploying a new branch network for an enterprise, network devices (such as a gateway, a switch, and a wireless access point) at the enterprise's deployment site are deployed. Typically, the network devices at the deployment site share the same public IP address. Therefore, by using the public IP address of any one of the network devices at the deployment site, it is highly likely that the other network devices that need to be configured can be discovered, thereby enabling the configuration of the network devices that need to be configured at the deployment site.
[0112] Optionally, before determining the second network device based on the public IP address of the first network device, the server obtains the public IP address of each of all network devices connected to the server. Specifically, the server obtains the public IP address of each of all network devices based on the connection protocol underlying the connection requests of all network devices connected to the server.
[0113] For example, each network device connected to the server establishes a connection with the server based on the corresponding server address obtained from the registry center. For instance, if the server consists of two or more physical servers sharing different responsibilities, including a first server and a second server, and network device A's server address represents the address of the first server, then network device A establishes a connection with the first server based on that server address. Similarly, network device B's server address represents the address of the second server, so network device B establishes a connection with the second server based on that server address. This allows multiple network devices to be managed by multiple servers, avoiding overload of a single server handling a large number of devices, improving management stability, and reducing the time each server spends processing requests, thus improving management efficiency.
[0114] The following is an illustrative explanation of "establishing a connection between a network device and its corresponding server": If network devices belong to the same sales region, they can establish a connection with the same server. If network devices do not belong to the same sales region, they can establish connections with different servers. In this case, bidirectional communication can be established between the different servers, allowing one server to obtain the device information and public IP address of the network device connected to other servers. For example, network devices that need to be configured in the same network management project belong to the same sales region and establish connections with the same server.
[0115] In some embodiments, once a network device establishes a connection with a corresponding server, the connection may not be deleted. This solves the problem in related technologies where the connection between the network device and the server is terminated when there is no network management project file in the cloud, further improving the configuration efficiency of network devices.
[0116] In this embodiment, the server discovers a first type of network device using the public IP address of the first network device, and then introduces the target device to determine a second network device belonging to the set of devices to be configured from the first type of network devices. Thus, the second network device is identified as a network device requiring network configuration in the network management project, thereby enabling network configuration of the second network device. By using the discovery path of discovering the first type of network device based on the public IP address of the first network device, the configuration of both the first and second network devices can be achieved solely through the first network device, improving the efficiency of network device configuration.
[0117] S203, the server configures the first network device and the second network device according to the device information of the first network device and the second network device respectively.
[0118] Alternatively, the network configuration may represent the initial configuration of the network devices.
[0119] In some embodiments, the target network device includes a first network device and a second network device.
[0120] The following is an exemplary description of "configuring the target network device": First, the target network device is configured with a project-wide network password. This project-wide network password is a unified password configured by the user for the network management project, used for security authentication of all network devices in the set of devices to be configured. For example, the project-wide network password could be "SecureNetPass123!". Second, the server determines the target configuration instruction for configuring the target network device based on the target network device's device information and constructs a target configuration request including the target configuration instruction and the project-wide network password. The server sends the target configuration request to the target network device, so that the target network device, upon receiving the target configuration request, uses the project-wide network password to verify the validity of the target configuration request. If the target network device's project-wide network password matches the project-wide network password in the target configuration request, the verification is considered successful, and the target network device executes the received target configuration instruction, thereby enabling the server to configure the target network device.
[0121] For example, configuring the network-wide password for the target network device configuration project includes: associating the target network device's device information with the network management project, and assigning the project's network-wide password to the target network device. This ensures that the target network device is configured with the project's network-wide password, enabling it to recognize and verify the target configuration commands from the server. This establishes an association between the network device to be configured (e.g., the target network device) and the site (e.g., the network management project), facilitating successful subsequent configuration of the network device.
[0122] In some embodiments, the step of configuring the network password for the target network device can be performed by a server.
[0123] In other embodiments, the step of configuring the target network device's overall network password can be performed by the terminal device. After the terminal device performs this step, it sends the overall network password and the device information of the target network device configured with the overall network password to the server.
[0124] In other embodiments, after associating the device information of the first network device, the device information of the second network device, and the network management items, a network management item file is created, which includes the device information of the first network device, the information of the second network device, and the network management items. This network management item file is used by the server to configure the target network devices in the network management item file based on the information in the file, thereby facilitating the management of the network management items and the target network devices.
[0125] In some embodiments, the step of creating a network management project file that includes device information of a first network device, information of a second network device, and network management projects can be performed by a server.
[0126] In other embodiments, the step of creating a network management project file that includes device information of a first network device, information of a second network device, and network management items can be performed by a terminal device. After the terminal device performs the step of creating the network management project file that includes device information of the first network device, information of the second network device, and network management items, it sends the network management project file to the server so that the server can perform network configuration on the target network device in the network management project file based on the information in the network management project file.
[0127] In this embodiment of the application, since both the first network device and the second network device are identified as network devices belonging to the set of devices to be configured, network configuration is performed on the first network device and the second network device. This enables the determination of the second network device using only the first network device, thereby realizing network configuration of the first network device and the second network device and improving the efficiency and accuracy of network device configuration.
[0128] In some embodiments, the first network device or the second network device includes a local area network (LAN) discovery device. The LAN discovery device is used to discover a second type of network device in its local area network (excluding the LAN discovery device itself) and send the device information of the second type of network device to the server. The method further includes: the server receiving the device information of the second type of network device sent by the LAN discovery device; and the server configuring the third network device based on the device information of a third network device among the second type of network devices.
[0129] It is understandable that there may be overlapping network devices between the second type of network device and the second network device. The network devices in the third type of network device do not overlap with the network devices in the second type of network device.
[0130] In this embodiment, network devices in a network management project typically need to communicate or collaborate to ensure they meet the project's network requirements. Discovering a second type of network device within the local area network (LAN) besides the LAN discovery device indicates that this second type of network device can communicate or collaborate with the LAN discovery device. Since the LAN discovery device belongs to either the first or second network device, and both belong to the set of devices to be configured, this second type of network device is capable of communicating or collaborating with the first or second network device. Therefore, this second type of network device is highly likely to include network devices that need to be configured in the network management project, i.e., network devices belonging to the set of devices to be configured. Based on this, discovering the second type of network device and identifying the third network device within it improves both the discovery and configuration efficiency of network devices.
[0131] In other embodiments, the target network device also includes a third network device.
[0132] In other embodiments, after associating the device information of the first network device, the device information of the second network device, the device information of the third network device, and the network management items, a network management item file is created, which includes the device information of the first network device, the information of the second network device, the device information of the third network device, and the network management items, so that the server can perform network configuration on the first network device, the second network device, and the third network device.
[0133] In some embodiments, the step of creating a network management project file that includes device information of a first network device, information of a second network device, device information of a third network device, and network management projects can be performed by a server.
[0134] In other embodiments, the step of creating a network management project file, including device information of a first network device, information of a second network device, device information of a third network device, and network management items, can be performed by a terminal device. After the terminal device performs the step of creating the network management project file, it sends the network management project file to the server, so that the server can configure the target network device in the network management project file according to the information in the network management project file.
[0135] In other embodiments, after creating a network management project file that includes device information for a first network device, information for a second network device, and network management items, a third network device is added to the network management project file to obtain an updated network management project file. In this way, by updating the network management project, the server configures the network for the updated network device within the network management project.
[0136] In some embodiments, the step of adding a third network device to the network management project file to obtain an updated network management project file can be performed by the server.
[0137] In other embodiments, the step of adding a third network device to the network management project file to obtain an updated network management project file can be performed by the terminal device. After the terminal device performs the step of adding the third network device to the network management project file to obtain an updated network management project file, it sends the updated network management project file to the server so that the server can configure the target network device in the network management project file according to the information in the network management project file.
[0138] In some embodiments, the second type of network device may be a network device that has not established a connection with the corresponding server. Thus, this application provides a discovery path for discovering the second type of network device based on the local area network (LAN) device discovery method. This further enables the discovery of other network devices that have not established a connection with the server or whose public IP address differs from that of the first network device. This supplements the discovery path for discovering the first type of network device based on the public IP address of the first network device, expands the discovery scope, and further enhances discovery efficiency.
[0139] In this embodiment of the application, based on the discovery path of discovering the first type of network device according to the public IP address of the first network device, the local area network discovery device is used to further discover network devices that do not share the same public IP address as the first network device or network devices that have not established a connection with the server, thereby expanding the discovery scope and increasing the path to discover more network devices, thereby further improving the configuration efficiency of network devices.
[0140] In some embodiments, before configuring the third network device based on the device information of the third network device, the third network device establishes a connection with the corresponding server.
[0141] In some embodiments, the LAN discovery device includes a LAN discovery endpoint device, and the second type of network device includes all network devices in the LAN that respond to the LAN discovery endpoint device. Thus, when the LAN discovery device includes a LAN discovery endpoint device, the server can read the device information of all network devices that respond to the LAN discovery endpoint device discovered on the LAN discovery endpoint device, further expanding the discovery path to discover all network devices in the LAN that can respond to the LAN discovery endpoint device, enabling the server to obtain the device information of the second type of network devices according to this discovery path.
[0142] In other embodiments, the LAN discovery device includes a network device supporting a discovery protocol, and the second type of network device includes network devices within the LAN that are directly connected to the network device supporting the discovery protocol. Thus, when the LAN discovery device includes a network device supporting a discovery protocol, the server can read the device information of the network devices directly connected to the network device supporting the discovery protocol from the discovery protocol of that network device. This further expands the discovery path to find the network devices directly connected to the network device supporting the discovery protocol within the LAN, allowing the server to obtain the device information of the second type of network device based on this discovery path.
[0143] In this embodiment, by classifying LAN discovery devices, the discovery paths for network devices are further expanded. These include: discovering all network devices in the LAN that can respond to the LAN discovery device based on the LAN discovery endpoint device, and discovering network devices directly connected to the network device supporting the discovery protocol in the LAN based on the network device supporting the discovery protocol. This allows for a more comprehensive discovery of the second type of network devices, regardless of whether they share the same public IP address as the first type of network device, promoting automatic network device discovery and thus achieving efficient network device configuration.
[0144] In some embodiments, before configuring the network of the third network device based on the device information of the third network device in the second type of network devices, the server further includes: sending the device information of the second type of network devices to the target device; and receiving the device information of the third network device returned by the target device.
[0145] The third network device is selected by the user from the second type of network devices based on a preset set of devices to be configured. The set of devices to be configured includes the third network device.
[0146] In this embodiment of the application, by introducing the interaction of the target device, a third network device is determined from the second type of network devices. The third network device is confirmed to belong to the set of devices to be configured, which realizes efficient discovery and accurate configuration of the third network device, and increases the flexibility of the determination of the third network device.
[0147] In some embodiments, the method further includes: the server determining a third type of network device; the server sending the device information of the third type of network device to the target device; the server receiving the device information of a fourth network device returned by the target device; the fourth network device being selected by the user from the third type of network devices, and being a newly added device in a preset set of devices to be configured; and the server configuring the fourth network device based on the device information of the fourth network device.
[0148] For example, this method is applied to a capacity expansion scenario, which refers to a scenario where the network management project file has been created and new devices are added subsequently.
[0149] For example, the third type of network device can be a newly added device within the first type of network device or a newly added device within the second type of network device. Thus, by discovering the first type of network device using its public IP address and the second type of network device using its local area network (LAN) discovery method, both discovery paths can find the third type of network device, thereby determining whether the third type of network device can be added as a new device for the network management project.
[0150] In other embodiments, the target network device also includes a fourth network device.
[0151] In some embodiments, after creating a network management project file that includes device information for a first network device, information for a second network device, device information for a third network device, and network management items, a fourth network device is added to the network management project file to obtain an updated network management project file. In this way, by updating the network management project, the server configures the network devices updated in the network management project.
[0152] In some embodiments, the step of adding a fourth network device to the network management project file to obtain an updated network management project file can be performed by the server.
[0153] In other embodiments, the step of adding a fourth network device to the network management project file to obtain an updated network management project file can be performed by a terminal device. After the terminal device performs the step of adding the fourth network device to the network management project file to obtain an updated network management project file, it sends the updated network management project file to the server so that the server can configure the target network device in the network management project file according to the information in the network management project file.
[0154] Optionally, before the server determines the third type of network device, if the third type of network device is a newly added device discovered through the discovery path of discovering the first type of network device based on the public IP address of the first type of network device, then the third type of network device has established a connection with the server; if the third type of network device is a newly added device discovered through the discovery path of discovering the second type of network device based on the local area network, then the third type of network device may or may not establish a connection with the server.
[0155] In this embodiment, a method for efficiently discovering and configuring new network devices in a capacity expansion scenario is further provided. By identifying a third type of network device through a server and then identifying a fourth network device within that third type of network device through a target device, not only is effective discovery and efficient configuration of new network devices achieved, but a more flexible, automated, and easy-to-manage network management mechanism is also provided to users.
[0156] like Figure 4 As shown in the embodiment of this application, another network device configuration method is provided, which can be executed by a terminal device. The method includes:
[0157] S301, The terminal device obtains the device information of the first network device.
[0158] For example, a terminal device obtains the device information of a first network device by scanning a QR code on an app. For instance, the terminal device scans the QR code of any network device at the deployment site of a network management project. This network device at the deployment site is a network device in the set of devices to be configured and is designated as the first network device. In this way, by identifying the first network device through the terminal device, the server can directly configure the network on the first network device subsequently.
[0159] S302, the terminal device determines the device information of the second network device.
[0160] The second network device is obtained based on the public IP address of the first network device. The second network device is any network device other than the first network device that has a public IP address.
[0161] In some embodiments, the terminal device determines the device information of the second network device by: receiving device information of a first type of network device sent by a server; determining the second network device from the first type of network device based on a preset set of devices to be configured; and obtaining the device information of the second network device.
[0162] Among them, the first type of network device is used to represent a network device whose public IP address is the same as that of the first network device.
[0163] In this embodiment, network management projects typically deploy network devices within the same area. Since network devices within the same area usually share the same public IP address, and the first type of network device refers to a network device with the same public IP address as the first network device, the network devices that need to be configured in the network management project are highly likely to share the same public IP address. In other words, the first type of network devices very likely includes the network devices that need to be configured in the network management project, i.e., the network devices in the set of devices to be configured. Based on this, identifying the second network device from the first type of network devices can efficiently and accurately determine the network devices that need to be configured in the network management project, thereby improving the configuration efficiency of network devices.
[0164] In some embodiments, the terminal device displays a first type of network devices to the user. The user selects a second network device from the first type of network devices based on the set of devices to be configured, thereby enabling the terminal device to determine the second network device from the first type of network devices. This allows for more flexible selection of the second network device and better matches the user's actual needs.
[0165] In this embodiment, the terminal device determines the required second network device from the first type of network devices discovered based on the public IP address of the first network device. This eliminates the need for the terminal device to scan multiple network devices, enabling the server to configure multiple network devices and improving the efficiency and flexibility of network device configuration.
[0166] In some embodiments, before determining the device information of the second network device, the terminal device further includes sending a request message to the server. The request message includes the device information of the first network device. The request message is used to instruct the server to return a first-class network device whose public IP address is the same as the public IP address of the first network device.
[0167] In this embodiment, a first network device is pre-determined by a terminal device, and a request message including the device information of the first network device is sent to a server, so that the server performs subsequent operations based on the device information of the first network device, thereby discovering more other network devices.
[0168] S303, the terminal device sends the device information of the second network device to the server.
[0169] The device information of the first network device and the device information of the second network device are used to configure the network for the first network device and the second network device, respectively.
[0170] In some embodiments, the network management project file also includes an app account. The terminal device associates the app account, the device information of the target network device, and the network management project. This creates an associated configuration of the network device to be configured (e.g., the target network device), the site (e.g., the network management project), and the user (app account), facilitating subsequent notifications to the user via the app regarding the successful configuration of the target network device and enabling convenient management of network devices within the network management project. For example, if the target network device in the network management project file includes a first network device and a second network device, the device information of the first network device, the device information of the second network device, the network management project, and the app account are associated. If the target network device in the network management project file also includes a third network device, the device information of the third network device, the network management project, and the app account are associated.
[0171] In other embodiments, when a new target network device is added to the network management project file, the newly added target network device is associated with the APP account. This allows the user to determine whether the newly added target network device has been successfully configured through the APP account and facilitates the user's management of the newly added target network device through the APP. For example, if the target network device in the network management project file also includes a fourth network device, the device information of the fourth network device, the network management project, and the APP account are associated.
[0172] In this embodiment, after determining the first network device and the second network device, the terminal device sends the device information of the first network device and the second network device to the server, so that the server can perform network configuration on the first network device and the second network device based on the device information of the first network device and the second network device. Since the second network device is determined by the discovery path of discovering the first type of network device based on the public IP address of the first network device, it is equivalent to the terminal device only needing to obtain the device information of other network devices that meet the configuration requirements through one network device, thereby enabling the server to perform network configuration on multiple network devices that meet the configuration requirements.
[0173] In some embodiments, the method further includes: a terminal device receiving device information of a second type of network device sent by a server. The terminal device determines a third network device from the second type of network devices based on a preset set of devices to be configured. The terminal device sends the device information of the third network device to the server. The device information of the third network device is used for network configuration of the third network device.
[0174] In this embodiment, network devices in a network management project typically need to communicate or work collaboratively to ensure they meet the project's network requirements. The second type of network devices can communicate or work collaboratively with the first or second network devices. Therefore, this second type of network devices is highly likely to include network devices that need to be configured in the network management project, i.e., network devices belonging to the set of devices to be configured. Based on this, identifying a third network device from the second type of network devices improves the efficiency of network device discovery and configuration.
[0175] For example, the terminal device displays the second type of network devices to the user. Based on the set of devices to be configured, the user selects a third network device from the second type, thus enabling the terminal device to determine the third network device from the second type. This allows for more flexible selection of the third network device and better matches the user's actual needs.
[0176] In some embodiments, the terminal device sends the device information of the third network device to the server. The server updates the device information of the third network device in the network management project file and associates the device information of the third network device with the network management project. In this way, the server can directly configure the network of the third network device based on the updated network management project file.
[0177] In this embodiment, a terminal device identifies a third network device that meets the configuration requirements from the second type of network devices and sends the device information of the third network device to the server, enabling the server to configure the third network device based on this information. Since the third network device is determined through the discovery path of discovering second-type network devices via LAN device discovery, this expands the path for discovering other network devices, allowing for a more flexible and comprehensive identification of network devices that meet the configuration requirements, thus improving the efficiency and accuracy of network device configuration.
[0178] In other embodiments, the terminal device does not create a network management project immediately after determining the device information of the second network device. Instead, it creates a network management project file after determining the third network device. This network management project file includes the device information and network management projects of the target network devices (including the first, second, and third network devices), and associates the device information and network management projects of the target network devices. After creating the network management project file, the terminal device sends it to the server so that the server can configure the network for the first, second, and third network devices.
[0179] In some embodiments, the method further includes: receiving device information of a third type of network device sent by a server; determining a fourth network device from the third type of network devices; and sending the device information of the fourth network device to the server.
[0180] The fourth network device is a newly added device in the preset set of devices to be configured. The device information of the fourth network device is used for network configuration of the fourth network device.
[0181] For example, the terminal device displays a third type of network device to the user. The user selects a fourth network device from the third type of network device, thus enabling the terminal device to determine the fourth network device from the third type of network device. This allows for more flexible determination of the fourth network device and better matches the user's actual needs.
[0182] In some embodiments, the terminal device adds a fourth network device to a network management project file and associates the device information of the fourth network device with the network management project to obtain an updated network management project file. The terminal device sends the updated network management project file, which includes the device information of the fourth network device, to the server so that the server can perform network configuration for the fourth network device.
[0183] In other embodiments, the terminal device sends the device information of the fourth network device to the server. The server updates the device information of the fourth network device in the network management project file and associates the device information of the fourth network device with the network management project. In this way, the server can directly configure the network of the fourth network device based on the updated network management project file.
[0184] In this embodiment, a fourth network device that meets the configuration requirements is determined from the third type of network devices by the terminal device, and the device information of the fourth network device is sent to the server so that the server can configure the network for the fourth device. This realizes the configuration of network devices in the expansion scenario in a highly efficient and reliable manner.
[0185] In some embodiments, the method can be executed by a terminal device, and the method further includes: for a network device that has failed to configure, the terminal device determines the cause of the configuration failure based on the network device that has failed to configure. Specifically, if the network device that failed to configure belongs to a first network device or a second network device, the cause of the configuration failure is determined to be a domain name system (DNS) resolution error. If the network device that failed to configure belongs to a first network device, a second network device, and also a third network device, the cause of the configuration failure is determined to be a network cable malfunction.
[0186] It is understandable that if a network device that fails to configure belongs to the first network device, the second network device, and the third network device, it means that there are multiple network devices that fail to configure. Among these multiple network devices that fail to configure, at least one belongs to the first network device or the second network device, and at least one belongs to the third network device.
[0187] Specifically, if the network device that failed to configure is classified as a third-party network device, this includes: a third-party network device among the second-category network devices discovered by the LAN discovery device, or a third-party network device among the second-category network devices discovered by network devices supporting the discovery protocol. In this way, based on the different discovery paths of the second-category network devices, the network devices that failed to configure are further distinguished, allowing users to more accurately repair the network devices that failed to configure.
[0188] In some embodiments, after the terminal device determines the reason for the configuration failure of a network device that has failed to be configured, it will prompt the user with the network device that failed to be configured and the reason for the configuration failure, so that the user can perform the corresponding repair process.
[0189] In this embodiment, if the network device that failed to configure is a first or second network device, it indicates that the network device failed to connect to the corresponding server, and the reason for the configuration failure is determined to be a management plane DNS resolution anomaly. If the network device that failed to configure is a first, second, and third network device, it indicates that not only did the network device fail to connect to the corresponding server, but the network device also could not be discovered in the local area network. If both of these conditions occur simultaneously, the reason for the configuration failure is determined to be a network cable malfunction. Thus, by determining the cause of the configuration failure of the network device, necessary guidance on the cause of failure can be provided.
[0190] like Figure 5 As shown in the embodiments of this application, another network device configuration method is provided. This method can be executed by a server and a terminal device, and the method includes:
[0191] S401, the terminal device obtains the device information of the first network device.
[0192] S402, the terminal device sends a request to the server.
[0193] S403, the server obtains the device information of the first network device and the public IP address of the first network device.
[0194] S404, The server identifies a Class 1 network device whose public IP address is the same as the public IP address of the first network device.
[0195] S405, the server sends the device information of the first type of network device to the terminal device.
[0196] S406, The terminal device receives device information of the first type of network device sent by the server.
[0197] S407, the terminal device determines the second network device from the first type of network devices based on a preset set of devices to be configured, and obtains the device information of the second network device.
[0198] S408, the terminal device sends the device information of the second network device to the server.
[0199] S409, the server configures the first network device and the second network device according to the device information of the first network device and the second network device respectively.
[0200] This application provides an example of a network device configuration method based on the interaction between a server and a terminal device. Through the collaboration between the server and the terminal device, it is possible to discover other network devices, identify network devices that meet the configuration requirements, and configure network devices that meet the configuration requirements. This reduces the workload of manual configuration, improves the automation and efficiency of network device configuration, enhances network stability, and provides users with a more reliable and user-friendly network environment.
[0201] In some embodiments, after the server successfully configures the network devices in the set of devices to be configured, the terminal device will notify the user of the successful configuration of the network devices in the set of devices to be configured, and the network devices in the set of devices to be configured will display an online status in the APP.
[0202] like Figure 6 As shown in the embodiments of this application, another network device configuration method is provided. This method is applied to a configuration system, a registration center, and an information storage system. The method includes:
[0203] S501, the registration center obtains device information and location information of network devices.
[0204] Specifically, the registration center obtains the device information and location information of network devices from the information storage system.
[0205] S502, the registration center determines the server address corresponding to the network device.
[0206] Specifically, the registration center determines the server address corresponding to the network device based on the network device's location information and preset correspondence.
[0207] S503, the network device sends a query request to the registry center.
[0208] Specifically, the query request is used to indicate that the corresponding server address is being queried.
[0209] S504, the registration center returns the server address corresponding to the network device to the network device.
[0210] S505, network devices connect to the corresponding server.
[0211] Specifically, network devices connect to the corresponding server based on the corresponding server address.
[0212] S506, the terminal device obtains the device information of the first network device.
[0213] For example, such as Figure 6 As shown, the switch is the first network device.
[0214] S507, the terminal device sends a request message to the server.
[0215] For example, the server is the server to which the first network device is connected.
[0216] S508, the server obtains the public IP address of the first network device.
[0217] Specifically, the server obtains the public IP address of the first network device based on the connection protocol upon which the first network device's connection request is based.
[0218] S509, the server identifies the first type of network device.
[0219] Among them, the first type of network device is a network device whose public IP address is the same as that of the first network device.
[0220] S510: The server sends device information of the first type of network device to the terminal device.
[0221] S511, the terminal device determines the second network device from the first type of network devices.
[0222] Specifically, the terminal device displays the device information of the first type of network devices to the user. Based on a preset set of devices to be configured, the user selects a second network device from the first type of network devices.
[0223] For example, after the terminal device identifies the second network device from the first type of network devices, the first network device, the second network device, and the server maintain a connection.
[0224] S512, the server receives device information from the second type of network device.
[0225] Specifically, the server receives device information for the second type of network devices sent by the local area network discovery device.
[0226] S513, the server sends the device information of the second type of network device to the terminal device.
[0227] S514, the terminal device determines the third network device from the second type of network devices.
[0228] Specifically, the terminal device displays the device information of the second type of network devices to the user. Based on a preset set of devices to be configured, the user selects a third network device from the second type of network devices.
[0229] S515, terminal devices create network management project files.
[0230] The network management project file includes device information for the network devices to be configured, the APP account of the terminal device, and network management projects. These information are interconnected. The network devices to be configured include multiple devices from the first, second, and third network devices.
[0231] S516, the terminal device sends network management project files to the server.
[0232] Understandably, after the terminal device sends the network management project file to the server, the server obtains the network management project file.
[0233] S517, the server performs network configuration on the network devices to be configured.
[0234] Specifically, the server configures the network devices to be configured based on the network management project file.
[0235] S518, the server identifies a third-class network device.
[0236] S519, the server sends the device information of the third-class network device to the terminal device.
[0237] S520: The terminal device identifies the fourth network device from the third type of network devices.
[0238] Specifically, the terminal device displays the device information of the third type of network device to the user. The user then selects the fourth network device from the third type of network device.
[0239] S521, Terminal equipment updates network management project files.
[0240] Specifically, the terminal device updates the device information of the fourth network device to the network management project file.
[0241] S522, the terminal device sends the updated network management project file to the server.
[0242] Understandably, after the terminal device sends the updated network management project file to the server, the server retrieves the updated network management project file.
[0243] S523, the server performs network configuration on the fourth network device.
[0244] Specifically, the server configures the fourth network device based on the updated network management project file.
[0245] This application provides an example of a network device configuration method applied to a configuration system: Steps S501-S505 above describe the process of establishing connections between network devices stored in the inventory management system and the server, facilitating the subsequent discovery of more network devices. In steps S506-S517 above, other network devices are discovered through public IP addresses and local area networks, covering multiple discovery paths and enabling broader coverage of network devices, thus improving the efficiency of discovering other network devices and consequently increasing the efficiency of configuring network devices that meet configuration requirements. In steps S518-S523 above, by expanding the set of devices to be configured, network devices that meet configuration requirements are further configured, increasing the flexibility of network device configuration and meeting the actual usage needs of users.
[0246] like Figure 7As shown in the figure, this application embodiment provides a network device configuration apparatus 200, which is applied to a server. The network device configuration apparatus 200 includes: an acquisition module 21, a determination module 22, and a configuration module 23. The acquisition module 21 is used to acquire device information and the public IP address of a first network device. The determination module 22 is used to determine a second network device based on the public IP address of the first network device, and acquire the device information of the second network device, wherein the second network device is a network device other than the first network device that has a public IP address. The configuration module 23 is used to perform network configuration on the first network device and the second network device respectively based on the device information of the first network device and the device information of the second network device.
[0247] like Figure 8 As shown in the illustration, this application provides another network device configuration apparatus 300, which is applied to a terminal device. The network device configuration apparatus 300 includes: an acquisition module 31, a determination module 32, and a sending module 33. The acquisition module 31 is used to acquire device information of a first network device; the first network device is one of a preset set of devices to be configured. The determination module 32 is used to determine device information of a second network device, which is obtained based on the public IP address of the first network device. The second network device is a network device other than the first network device that has a public IP address. The sending module 33 is used to send the device information of the second network device to a server. The device information of the first network device and the device information of the second network device are used to configure the network for the first network device and the second network device, respectively.
[0248] like Figure 9 As shown, this application embodiment provides an electronic device 500. The electronic device 500 includes a processor 510 and a memory 520 for storing processor-executable instructions. When the processor 510 is configured to execute instructions, the electronic device 500 implements the network device configuration method described above.
[0249] Figure 9 The electronic device 500 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0250] Electronic device 500 is manifested in the form of a general-purpose computing device. The components of electronic device 500 may include, but are not limited to: one or more processors 510, memory 520, communication bus 540 connecting different system components (including memory 520 and processor 510), and communication interface 530.
[0251] The communication bus 540 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0252] Electronic devices 500 typically include a variety of computer system-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.
[0253] Memory 520 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Although Figure 9 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 540 via one or more data media interfaces. The memory 520 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0254] A program / utility having a set (at least one) of program modules can be stored in memory 520. Such program modules include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of this application.
[0255] Electronic device 500 can also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), and with one or more devices that enable a user to interact with the electronic device, and / or with any device that enables the electronic device to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through communication interface 530. Furthermore, electronic device 500 can also communicate through a network adapter (… Figure 9 (Not shown) communicates with one or more networks (e.g., Local Area Network (LAN), Wide Area Network (WAN), and / or public networks, such as the Internet). The aforementioned network adapter can communicate with other modules of the electronic device via the communication bus 540. It should be understood that, although... Figure 9 As not shown, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Drives (RAID) systems, tape drives, and data backup storage systems.
[0256] The processor 510 executes various functional applications and data processing by running programs stored in the memory 520, such as implementing the remote access method provided in the embodiments of this application.
[0257] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 500. In other embodiments of this application, the electronic device 500 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0258] It is understood that the aforementioned electronic devices, etc., include hardware structures and / or software modules corresponding to perform each function in order to achieve the above-mentioned functions. Those skilled in the art should readily recognize that, in conjunction with the exemplary units and algorithm steps described in conjunction with the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware 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 the embodiments of this application.
[0259] This application embodiment can divide the above-mentioned electronic device into functional modules according to the method example described above. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0260] This application also provides a storage medium, including a computer-readable storage medium storing a computer program, which, when executed by an electronic device, causes the electronic device to implement the network device configuration method described above.
[0261] This application also provides a program product, which includes a computer program that, when executed by at least one processor, causes the at least one processor to execute the network device configuration method provided in this application.
[0262] The electronic devices, storage media, or computer program products provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0263] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0264] In the embodiments of this application, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0265] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0266] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A network device configuration method, characterized in that, Applied to a server; the method includes: Obtain the device information of the first network device and the public IP address of the first network device; Based on the public IP address of the first network device, the second network device is determined, and the device information of the second network device is obtained. The second network device is a network device other than the first network device that has the public IP address. Based on the device information of the first network device and the device information of the second network device, respectively, network configuration is performed on the first network device and the second network device.
2. The network device configuration method according to claim 1, characterized in that, Obtaining the public IP address of the first network device includes: In response to the connection request from the first network device, establish a connection with the first network device; Based on the connection protocol upon which the connection request is based, obtain the public IP address of the first network device.
3. The network device configuration method according to claim 2, characterized in that, The connection request is sent by the first network device based on the server address obtained from the registration center. The server address is determined by the registration center based on the location information of the first network device and a preset correspondence. The preset correspondence is used to represent the correspondence between the location information and server addresses of multiple different network devices.
4. The network device configuration method according to any one of claims 1-3, characterized in that, The step of determining the second network device based on the public IP address of the first network device includes: Identify the first type of network device whose public IP address is the same as the public IP address of the first network device; Send the device information of the first type of network device to the target device; The system receives device information of the second network device returned by the target device; the second network device is selected by the user from the first type of network devices based on a preset set of devices to be configured; the set of devices to be configured includes the first network device and the second network device.
5. The network device configuration method according to claim 4, characterized in that, The step of obtaining the device information of the first network device includes: The server receives a request from the target device, the request including device information of the first network device; the request is used to instruct the server to return the first type of network device whose public IP address is the same as the public IP address of the first network device.
6. The network device configuration method according to any one of claims 1-5, characterized in that, The first network device or the second network device includes a local area network (LAN) discovery device, which is used to discover a second type of network device in the local area network other than itself, and to send the device information of the second type of network device to the server; the method further includes: Receive device information of the second type of network device sent by the local area network discovery device; Based on the device information of the third network device in the second type of network devices, the third network device is configured for network operation.
7. The network device configuration method according to claim 6, characterized in that, Before configuring the third network device based on the device information of the third network device in the second type of network devices, the method further includes: Send the device information of the second type of network device to the target device; The system receives device information of the third network device returned by the target device; the third network device is selected by the user from the second type of network devices based on a preset set of devices to be configured; the set of devices to be configured includes the third network device.
8. The network device configuration method according to claim 6 or 7, characterized in that, The LAN discovery device includes a LAN discovery terminal device, and the second type of network device includes all network devices in the LAN that respond to the LAN discovery terminal device; the LAN discovery device includes network devices that support discovery protocols, and the second type of network device includes network devices in the LAN that are directly connected to the network devices that support discovery protocols.
9. The network device configuration method according to any one of claims 1-8, characterized in that, The method further includes: Identify Category 3 network devices; Send the device information of the third type of network device to the target device; Receive device information of the fourth network device returned by the target device; the fourth network device is selected by the user from the third type of network devices, and the fourth network device is a newly added device in the preset set of devices to be configured; Based on the device information of the fourth network device, network configuration is performed on the fourth network device.
10. A network device configuration method, characterized in that, Applied to terminal devices; the method includes: Obtain device information of the first network device; the first network device is one of a preset set of devices to be configured; The device information of the second network device is determined. The second network device is obtained based on the public IP address of the first network device. The second network device is a network device other than the first network device that has the public IP address. The device information of the second network device is sent to the server. The device information of the first network device and the device information of the second network device are used to configure the network for the first network device and the second network device, respectively.
11. The network device configuration method according to claim 10, characterized in that, The determination of the device information of the second network device includes: Receive device information of a first type of network device sent by the server, wherein the first type of network device is used to represent a network device whose public IP address is the same as the public IP address of the first network device; Based on a preset set of devices to be configured, the second network device is determined from the first type of network devices, and the device information of the second network device is obtained; the set of devices to be configured includes the first network device and the second network device.
12. The network device configuration method according to claim 10 or 11, characterized in that, Before determining the device information of the second network device, the process also includes: Send a request message to the server, the request message including device information of the first network device; the request message is used to instruct the server to return the first type of network device whose public IP address is the same as the public IP address of the first network device.
13. The network device configuration method according to any one of claims 10-12, characterized in that, The first network device or the second network device includes a local area network (LAN) discovery device, which is used to discover a second type of network device in the local area network other than itself, and to send the device information of the second type of network device to the server; the method further includes: Receive device information of the second type of network device sent by the server; Based on a preset set of devices to be configured, a third network device is determined from the second type of network devices, wherein the set of devices to be configured includes the third network device; The device information of the third network device is sent to the server, and the device information of the third network device is used to configure the network of the third network device.
14. The network device configuration method according to any one of claims 10-13, characterized in that, The method further includes: Receive device information of a third type of network device sent by the server; A fourth network device is determined from the third type of network devices; the fourth network device is a newly added device in the preset set of devices to be configured; The device information of the fourth network device is sent to the server, and the device information of the fourth network device is used to configure the network of the fourth network device.
15. The network device configuration method according to claim 13 or 14, characterized in that, The method further includes: For network devices that fail to configure, determine the reason for the configuration failure based on the network device; wherein, If the network device that failed to configure belongs to the first network device or the second network device, then the reason for the configuration failure is determined to be an abnormal DNS resolution in the management plane. If the network device that failed to configure belongs to the first network device, the second network device, or the third network device, then the reason for the configuration failure is determined to be a network cable malfunction.
16. A network device configuration apparatus, characterized in that, Applied to a server; the device includes: The acquisition module is used to acquire the device information of the first network device and the public IP address of the first network device; The determination module is used to determine the second network device based on the public IP address of the first network device, and to obtain the device information of the second network device, wherein the second network device is a network device other than the first network device that has the public IP address; The configuration module is used to configure the first network device and the second network device respectively based on the device information of the first network device and the device information of the second network device.
17. A network device configuration apparatus, characterized in that, Applied to terminal devices; the device includes: The acquisition module is used to acquire device information of a first network device; the first network device is one of a preset set of devices to be configured. The determination module is used to determine the device information of the second network device, which is obtained based on the public IP address of the first network device. The second network device is a network device other than the first network device that has the public IP address. The sending module is used to send the device information of the second network device to the server. The device information of the first network device and the device information of the second network device are used to configure the network for the first network device and the second network device, respectively.
18. An electronic device, characterized in that, include: A processor, and a memory for storing processor-executable instructions; When the processor is configured to execute the instructions, the electronic device implements the network device configuration method as described in any one of claims 1-15.
19. A storage medium storing computer program instructions thereon; characterized in that, When the computer program instructions are executed by the electronic device, the electronic device implements the network device configuration method as described in any one of claims 1-15.
20. A program product, characterized in that, The device includes a computer-readable storage medium storing a computer program, which, when executed by at least one processor, causes the at least one processor to perform the network device configuration method according to any one of claims 1-15.