Automatic online method for network equipment
By automatically obtaining the configuration information of the network device in the DHCP server, obtaining and verifying the empty configuration startup file, and finally loading the configuration file to the network device, the problem of low efficiency of network device online in the existing technology is solved, and efficient and accurate device configuration and rapid online launch are achieved.
Patent Information
- Application Number
- CN202411544014.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, network equipment is less efficient in launching, and engineers are required to go to the site for debugging and configuration, which is inefficient and prone to configuration errors.
By automatically obtaining the IP address, TFTP server address and empty configuration startup file name of the network device in the pre-built DHCP server, obtaining the empty configuration startup file and performing version verification, patch verification and license verification, and finally loading the configuration file to the network device to complete the online.
It greatly simplifies the initial configuration process of network equipment, improves efficiency, reduces the possibility of human errors, ensures the consistency and compliance of the device, improves the stability and security of the network, and shortens the time for the device from installation to use.
Smart Images

Figure CN119603134A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method for automatically going online with a network device. Background Art
[0002] With the continuous development of science and technology, the network has spread to all aspects of life. Network equipment refers to network-related equipment, such as routers and switches. After the network equipment is wired, engineers need to go to the site for debugging to complete the basic configuration of the network equipment. However, the method of having engineers go to the site for debugging is inefficient.
[0003] Therefore, how to improve the online efficiency of network equipment has become a technical problem that technical personnel in this field need to solve urgently. Summary of the invention
[0004] Based on the above problems, the present application provides a method for automatically going online with a network device, the method comprising the following steps:
[0005] Obtain the IP address, TFTP server address, and empty configuration startup file name corresponding to the network device from the pre-built DHCP server;
[0006] Obtaining an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name;
[0007] Performing version verification, patch verification and license verification based on the empty configuration startup file, and obtaining verification results after the verification is completed;
[0008] Configuring the network device based on the verification result to obtain a configured network device;
[0009] Load the configuration file to the configured network device to complete the network device online.
[0010] In a possible implementation, the method further includes:
[0011] Reading a configuration file in the network device;
[0012] If a configuration file exists in the network device, deleting the configuration file;
[0013] If the configuration file of the network device is empty, the step of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server is performed.
[0014] In a possible implementation, the version verification is performed in the following manner:
[0015] Parse the network device version number in the empty configuration startup file;
[0016] The network device version number is matched with the version number of the network device to obtain a version verification result.
[0017] In a possible implementation, the patch verification is performed by parsing the patch loading information in the empty configuration startup file in the following manner;
[0018] The patch loading information is matched with the patch information installed by the network device to obtain a patch verification result.
[0019] In a possible implementation, the license verification is performed by parsing the license information in the empty configuration startup file in the following manner;
[0020] The license information is matched with the license information installed on the network device to obtain a patch permission result.
[0021] In a possible implementation, the method further includes:
[0022] Determine whether the network device is an IRF device according to the empty configuration startup file;
[0023] If the network device is an IRF device, load the configuration file corresponding to the IRF device;
[0024] If the network device is not an IRF device, the corresponding config file is loaded as the configuration file.
[0025] The present application also provides a device for automatically going online for a network device, the device comprising:
[0026] The first acquisition module is used to obtain the IP address, TFTP server address and empty configuration startup file name corresponding to the network device from the pre-built DHCP server;
[0027] A second acquisition module is used to acquire an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name;
[0028] A verification module, used to perform version verification, patch verification and license verification based on the empty configuration startup file, and obtain a verification result after the verification is completed;
[0029] A configuration module, configured to configure the network device based on the verification result to obtain a configured network device;
[0030] The online module is used to load the configuration file to the configured network device to complete the online operation of the network device.
[0031] In a possible implementation manner, the device further includes an initialization module, and the initialization module is used to:
[0032] Reading a configuration file in the network device;
[0033] If a configuration file exists in the network device, deleting the configuration file;
[0034] If the configuration file of the network device is empty, the step of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server is performed.
[0035] The present application also provides an electronic device, the electronic device comprising a processor and a memory:
[0036] The memory is used to store a computer program and transmit the computer program to the processor;
[0037] The processor is used to execute the steps of the above-mentioned method for automatic online access of network equipment according to the instructions in the computer program.
[0038] The present application also provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by an electronic device, the steps of the method for automatically going online of the above-mentioned network device are implemented.
[0039] Compared with the prior art, this application has the following beneficial effects:
[0040] The method provided by the present application greatly simplifies the initial configuration process of network devices by automatically obtaining the IP address, TFTP server address and empty configuration startup file name of the network device in the pre-built DHCP server. There is no need for engineers to go to the site to manually configure each device one by one, which improves the overall efficiency. The traditional on-site debugging method is susceptible to human operation errors, which may lead to configuration errors or inconsistencies. However, the present application implements batch configuration of devices through automated scripts and preset configuration files, reducing the possibility of human errors and improving the accuracy of configuration. After obtaining the empty configuration startup file, the present application performs version verification, patch verification and license verification to ensure the version consistency and compliance of the device before going online. Through this verification step, potential problems can be discovered in advance, the risk of going online with illness can be avoided, and the stability and security of the network can be improved. By loading the configuration file to the configured network device, the device's online process is quickly completed. Compared with traditional methods, the present application greatly shortens the time from equipment installation to commissioning, providing enterprises and users with faster service response. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 A flowchart of a method for automatically going online for a network device provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of the structure of a network equipment automatic online device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] As described above, after the network equipment is wired, the related technology requires engineers to go on-site for debugging to complete the basic configuration of the network equipment. However, the method of having engineers go on-site for debugging is inefficient.
[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] It is understandable that the method provided in the present application can be applied to a processing device, which is a processing device that can obtain the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in a pre-built DHCP server, for example, a terminal device or server that can obtain an empty configuration startup file in a TFTP server based on the TFTP server address and the empty configuration startup file name. The method provided in the present application can be executed independently by a terminal device or a server, and can also be applied to a network scenario in which a terminal device and a server communicate, and is executed in cooperation with a terminal device and a server. Among them, the terminal device can be a computer, a mobile phone and other devices. The server can be understood as an application server or a Web server. In actual deployment, the server can be an independent server or a cluster server.
[0047] Figure 1 A flowchart of a method for automatically going online of a network device provided in an embodiment of the present application, the method comprising the following steps:
[0048] S101: Obtain an IP address, a TFTP server address, and an empty configuration startup file name corresponding to a network device from a pre-built DHCP server.
[0049] The processing device can obtain the IP address, TFTP server address and empty configuration startup file name corresponding to the network device from the pre-built DHCP server.
[0050] It is understandable that before obtaining the above information, the network device may be initialized. In a possible implementation, the processing device may read a configuration file in the network device. If the configuration file exists in the network device, the configuration file is deleted. If the configuration file of the network device is empty, the steps of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server are performed.
[0051] In the process of automated configuration of network devices, the use of DHCP (Dynamic Host Configuration Protocol) server is the key first step. The pre-built DHCP server can automatically assign IP addresses, TFTP server addresses, and empty configuration startup file names when network devices are connected to the network. This process greatly simplifies the initialization steps of device configuration and avoids the tedious and error-prone manual setting of IP addresses. In actual operation, the DHCP server maintains an IP address pool and dynamically assigns available IP addresses based on device requests. In addition, the DHCP server can also pass the address of the TFTP server and the configuration file name through the option field. This information is crucial for subsequent steps because it provides the device with a path to obtain the startup configuration file. Through this automated process, the device can complete the initial configuration with minimal human intervention, ensuring that the network device has the correct network parameter settings at the initial stage of going online. This method not only improves the efficiency of device configuration, but also ensures the uniqueness and correctness of the IP address of each device in the network, avoiding the problem of IP address conflicts.
[0052] S102: Obtaining an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name.
[0053] The processing device may obtain the empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name.
[0054] TFTP servers play an important role in the configuration process of network devices. Based on the TFTP server address and empty configuration startup file name obtained from the DHCP server, network devices can automatically connect to the TFTP server and download the required startup configuration file. The TFTP protocol is known for its simplicity and efficiency, and is particularly suitable for the transmission of small files within a local area network. The startup configuration file usually contains basic configuration information required for device initialization, such as interface configuration, basic routing settings, etc. By automatically downloading the configuration file from the TFTP server, the device can start and load the basic configuration without manual intervention, ensuring that the device can immediately participate in network communication after power-on. This process significantly reduces the steps of manual configuration and improves the consistency and reliability of configuration. In addition, the TFTP server can centrally manage and update the configuration file, making configuration version control and updating more convenient. This automated method of obtaining and loading configuration files ensures that new devices can be quickly and accurately integrated into the existing network environment.
[0055] S103: Perform version verification, patch verification and license verification based on the empty configuration startup file, and obtain verification results after the verification is completed.
[0056] The processing device can perform version verification, patch verification and license verification based on the empty configuration startup file, and obtain a verification result after the verification is completed.
[0057] For version verification, the processing device can parse the network device version number in the empty configuration startup file, and match the network device version number with the network device version number to obtain a version verification result.
[0058] For patch verification, the processing device can parse the patch loading information in the empty configuration startup file, and match the patch loading information with the patch information installed by the network device to obtain the patch verification result.
[0059] For license verification, the processing device may parse the license information in the empty configuration startup file, and match the license information with the license information installed by the network device to obtain a patch license result.
[0060] After obtaining the empty configuration startup file, version verification, patch verification, and license verification are key steps to ensure the security and compliance of network devices. Version verification is designed to ensure that the software version running on the device matches the requirements of the network environment to avoid operational problems caused by version incompatibility. Patch verification checks whether the latest security patches are applied to the device to prevent the exploitation of known vulnerabilities. License verification ensures that the use of the device complies with the license agreement to avoid functional restrictions or legal disputes caused by licensing issues. Through automated verification scripts, the system can quickly identify and report any non-compliant configurations or missing updates. This process not only improves the security of device online, but also reduces the time and possible omissions of manual verification. The verification results provide a basis for subsequent device configuration. Only after all verifications are passed will the device proceed to the next step of configuration. This strict verification mechanism ensures the quality of device online and achieves the best network performance and security level with the lowest risk.
[0061] S104: Configure the network device based on the verification result to obtain the configured network device.
[0062] The processing device may configure the network device based on the verification result to obtain the configured network device.
[0063] Based on the verification results, the network device will perform specific configuration operations. This step applies the necessary configuration parameters based on the results of the previous verification to ensure the normal operation of the device. The configuration process may involve multiple aspects, including interface settings, routing protocol configuration, security policy application, etc. The automated configuration script flexibly adjusts the configuration parameters according to the needs of different devices to ensure that each device reaches the best working state before going online. This process not only improves the accuracy of the configuration, but also ensures the consistency of the configuration, avoiding the problem of inconsistent configuration caused by manual operation. In addition, through the template-based configuration method, the configuration can be quickly copied and applied to multiple devices, which speeds up the deployment. After the configuration is completed, the device will perform a self-check to ensure that all the set parameters are effective and ready for the next step. Through this automated configuration process, the device can quickly adapt to changes in the network environment and provide stable network service support.
[0064] Due to the particularity of IRF devices, in a possible implementation, the processing device can determine whether the network device is an IRF device according to the empty configuration startup file. If the network device is an IRF device, the configuration file corresponding to the IRF device is loaded. If the network device is not an IRF device, the corresponding config file is loaded as the configuration file.
[0065] S105: Load the configuration file to the configured network device to complete the online operation of the network device.
[0066] The processing device can load the configuration file to the configured network device to complete the online operation of the network device.
[0067] After the configuration is complete, loading the final configuration file onto the network device is the last step in the device's online operation. This process ensures that all configuration parameters are written into the device's running and startup configurations so that the correct configuration can be loaded each time it is started. The loading of the configuration file is usually accompanied by a backup of the configuration to prevent data loss due to configuration loss or device failure. After the device has loaded the configuration, it will perform a series of startup tests to ensure that all functional modules are operating normally. After the configuration is successfully loaded and the test is passed, the device can be officially launched and participate in the processing of network services. This step ensures that the device has complete functions and good performance when it goes online, and can be quickly integrated into the existing network architecture. Through the automated configuration loading and online process, the time and complexity of device deployment are significantly reduced, and the management efficiency and responsiveness of the overall network are improved. This approach is particularly important in large-scale network environments because it enables rapid and large-scale deployment of devices to support the business expansion needs of enterprises.
[0068] The method provided by the present application greatly simplifies the initial configuration process of network devices by automatically obtaining the IP address, TFTP server address and empty configuration startup file name of the network device in the pre-built DHCP server. There is no need for engineers to go to the site to manually configure each device one by one, which improves the overall efficiency. The traditional on-site debugging method is susceptible to human operation errors, which may lead to configuration errors or inconsistencies. However, the present application implements batch configuration of devices through automated scripts and preset configuration files, reducing the possibility of human errors and improving the accuracy of configuration. After obtaining the empty configuration startup file, the present application performs version verification, patch verification and license verification to ensure the version consistency and compliance of the device before going online. Through this verification step, potential problems can be discovered in advance, the risk of going online with illness can be avoided, and the stability and security of the network can be improved. By loading the configuration file to the configured network device, the device's online process is quickly completed. Compared with traditional methods, the present application greatly shortens the time from equipment installation to commissioning, providing enterprises and users with faster service response.
[0069] The present application also provides a Figure 2 The schematic diagram of the structure of the network equipment automatic online device shown in the figure, the network equipment automatic online device 200 includes the following modules:
[0070] The first acquisition module 201 is used to obtain the IP address, TFTP server address and empty configuration startup file name corresponding to the network device from the pre-built DHCP server;
[0071] A second acquisition module 202 is used to acquire an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name;
[0072] Verification module 203, used to perform version verification, patch verification and license verification based on the empty configuration startup file, and obtain verification results after the verification is completed;
[0073] A configuration module 204, configured to configure the network device based on the verification result to obtain a configured network device;
[0074] The online module 205 is used to load the configuration file to the configured network device to complete the online operation of the network device.
[0075] In a possible implementation manner, the device further includes an initialization module, and the initialization module is used to:
[0076] Reading a configuration file in the network device;
[0077] If a configuration file exists in the network device, deleting the configuration file;
[0078] If the configuration file of the network device is empty, the step of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server is performed.
[0079] The device provided by the present application automatically obtains the IP address, TFTP server address and empty configuration startup file name of the network device from the pre-built DHCP server, and the present application greatly simplifies the initial configuration process of the network device. There is no need for engineers to go to the site to manually configure each device one by one, which improves the overall efficiency. The traditional on-site debugging method is susceptible to human operation errors, which may cause configuration errors or inconsistencies. However, the present application implements batch configuration of devices through automated scripts and preset configuration files, reducing the possibility of human errors and improving the accuracy of configuration. After obtaining the empty configuration startup file, the present application performs version verification, patch verification and license verification to ensure the version consistency and compliance of the device before going online. Through this verification step, potential problems can be discovered in advance, the risk of going online with illness can be avoided, and the stability and security of the network can be improved. By loading the configuration file to the configured network device, the device's online process is quickly completed. Compared with traditional methods, the present application greatly shortens the time from equipment installation to commissioning, providing enterprises and users with faster service response.
[0080] An embodiment of the present application also provides a device for automatically going online with a network device, wherein the device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device performs the steps of the method for automatically going online with a network device described in any embodiment of the present application.
[0081] In practical applications, the computer-readable storage medium may be any combination of one or more computer-readable media, which may be a computer-readable signal medium or a computer-readable storage medium.
[0082] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0083] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0084] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0085] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0087] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for automatically going online for network equipment, characterized in that: include: Obtain the IP address, TFTP server address, and empty configuration startup file name corresponding to the network device from the pre-built DHCP server; Obtaining an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name; Performing version verification, patch verification and license verification based on the empty configuration startup file, and obtaining verification results after the verification is completed; Configuring the network device based on the verification result to obtain a configured network device; Load the configuration file to the configured network device to complete the network device online.
2. The method according to claim 1, characterized in that The method further comprises: Reading a configuration file in the network device; If a configuration file exists in the network device, deleting the configuration file; If the configuration file of the network device is empty, the step of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server is performed.
3. The method according to claim 1, characterized in that The version verification is performed in the following way: Parse the network device version number in the empty configuration startup file; The network device version number is matched with the version number of the network device to obtain a version verification result.
4. The method according to claim 1, characterized in that: The patch verification is performed as follows Parse the patch loading information in the empty configuration startup file; The patch loading information is matched with the patch information installed by the network device to obtain a patch verification result.
5. The method according to claim 1, characterized in that The license verification is performed in the following way Parse license information in empty configuration startup file; The license information is matched with the license information installed on the network device to obtain a patch permission result.
6. The method according to claim 1, characterized in that The method further comprises: Determine whether the network device is an IRF device according to the empty configuration startup file; If the network device is an IRF device, load the configuration file corresponding to the IRF device; If the network device is not an IRF device, the corresponding config file is loaded as the configuration file.
7. A device for automatically going online for network equipment, characterized in that: include: The first acquisition module is used to obtain the IP address, TFTP server address and empty configuration startup file name corresponding to the network device from the pre-built DHCP server; A second acquisition module is used to acquire an empty configuration startup file from the TFTP server based on the TFTP server address and the empty configuration startup file name; A verification module, used to perform version verification, patch verification and license verification based on the empty configuration startup file, and obtain a verification result after the verification is completed; A configuration module, configured to configure the network device based on the verification result to obtain a configured network device; The online module is used to load the configuration file to the configured network device to complete the online operation of the network device.
8. The device according to claim 7, characterized in that The device further comprises an initialization module, wherein the initialization module is used to: Reading a configuration file in the network device; If a configuration file exists in the network device, deleting the configuration file; If the configuration file of the network device is empty, the step of obtaining the IP address, TFTP server address and empty configuration startup file name corresponding to the network device in the pre-built DHCP server is performed.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the method for automatic online operation of a network device as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method for automatic online operation of a network device as described in any one of claims 1 to 6 is implemented.