Method and device for managing IP of equipment in enterprise, equipment and medium
Patent Information
- Application Number
- CN202311689364.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-06-13
AI Technical Summary
When managing and maintaining the IP addresses of a large number of network terminals, large and medium-sized enterprises face problems such as management chaos, IP address conflicts and difficulty in quickly locate network security incidents, resulting in high operation and maintenance pressure and low fault resolution efficiency.
By obtaining the device IP address, applicant information and work station information uploaded on the network device, it is automatically determined whether you need to apply for a new IP address, select the target IP address from the IP address management pool for updates, and update the correspondence between the IP address, employee information and work station information in the IP management table.
It realizes automatic maintenance and update of enterprise equipment IP management, reduces human resources waste, improves the stability of IP management, and reduces the possibility of IP conflicts.
Smart Images

Figure CN120151323A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of enterprise device IP address management, and specifically relates to a method, device, equipment and medium for managing IP addresses of devices within an enterprise. Background Art
[0002] With the development of information technology, the staff size of large and medium-sized enterprises continues to grow, staff transfers continue to change, and the number of important network terminals such as personal PCs, printers, and conference systems increases year by year. Faced with the scale of large and medium-sized enterprises, the pressure of network planning and adjustment, troubleshooting, security defense, and other operation and maintenance is increasing, and the work is cumbersome and complicated.
[0003] At present, IP addresses are allocated in two ways: static allocation and dynamic allocation. According to the business characteristics of enterprises, different enterprises adopt different allocation methods. No matter which allocation method is adopted by enterprises, there are certain difficulties in information operation and maintenance. Among them, the more sensitive difficulties are: 1. The use of manual methods to maintain and manage the IP address table is prone to management chaos, time-consuming and labor-intensive; 2. IP address conflicts cannot be quickly located, resulting in users being unable to use it normally; 3. Network security incidents occur in device terminals and cannot be quickly located, and there is a possibility of the spread and expansion of hidden dangers. In the face of the above problems, the existing technical means generally conduct step-by-step inspections through switches and line links. This screening method faces a large number of switches and complex line links, and the inspection efficiency is low and the troubleshooting is difficult. The time requirement for informatization is quite harsh. When problems are found and solved, it is too late. Summary of the invention
[0004] In response to the above technical problems, the present invention proposes a method, device, equipment and medium for managing IP of equipment within an enterprise. This application obtains the device IP address, applicant information and application workstation information uploaded by any online device; determines whether the applicant needs to apply for a new IP address based on the device IP address; when it is determined that the applicant needs to apply for a new IP address, selects an IP address from the IP address management pool as the target IP address and sends it to the online device; updates the IP address management pool based on the target IP address, wherein the IP address management pool includes multiple unallocated IP addresses; updates the IP management table based on the target IP address, the applicant information and the application workstation information, wherein the IP management table stores the correspondence between IP addresses, employee information and workstation information. Automatic maintenance and update of enterprise equipment IP management is achieved, which reduces a lot of human resource waste, improves the stability of enterprise equipment IP management, and greatly reduces the possibility of IP conflicts.
[0005] To solve the above technical problems, the technical solution adopted by the present invention includes four aspects.
[0006] In a first aspect, a method for managing device IPs within an enterprise is provided, including: obtaining the device IP address, applicant information, and application workbench information uploaded by any on-network device; determining whether the applicant needs to apply for a new IP address according to the device IP address; when it is determined that the applicant needs to apply for a new IP address, randomly selecting an IP address from the IP address management pool as the target IP address and sending it to the on-network device; updating the IP address management pool according to the target IP address, where the IP address management pool includes multiple unallocated IP addresses; and updating the IP management table according to the target IP address, the applicant information, and the application workbench information, where the IP management table stores the correspondence between IP addresses, employee information, and workbench information.
[0007] In some embodiments, determining whether the applicant needs to apply for a new IP address according to the device IP address includes: determining the IP type of the device IP address according to the device IP address, where the IP type includes: fixed IP address and temporary IP address; when it is determined that the device IP address is the temporary IP address, determining that the applicant needs to apply for a new IP address.
[0008] In some embodiments, determining whether the applicant needs to apply for a new IP address according to the device IP address further includes: when it is determined that the device IP address is a fixed IP address, determining whether there is a correspondence between the device IP address and the applicant information according to the IP management table; when it is determined that there is no correspondence between the device IP address and the applicant information, determining that the applicant needs to apply for a new IP address.
[0009] In some embodiments, the method further includes: when it is determined that there is a correspondence between the device IP address and the applicant information, determining that the applicant needs to update information; determining the target workbench information corresponding to the device IP address in the IP management table according to the device IP address; and updating the IP management table with the target workbench information according to the application workbench information.
[0010] In some embodiments, the method further includes: updating the IP address of the on-network device according to the target IP address.
[0011] In some embodiments, the method further includes; real-time monitoring of the device networking status of each port of the switch; determining whether there is a device abnormal disconnection according to the device networking status; when it is determined that there is a device abnormal disconnection, obtaining the networking port of the disconnected device; and determining the disconnected IP address of the disconnected device according to the networking port and the IP management table, where the IP management table also stores the correspondence between the IP address and the networking port.
[0012] In some embodiments, the method further includes: obtaining at least one newly allocated IP address allocated within a preset time period; determining whether an IP conflict has occurred based on the newly allocated IP address and the off-network IP address; when it is determined that an IP conflict has occurred, determining a target networking port corresponding to the newly allocated IP address according to the IP management table; re-selecting any IP address from the IP address management pool as the target IP address; updating the IP address of the on-network device connected to the target networking port according to the target IP address; and updating the IP management table according to the target IP address and the target networking port.
[0013] In a second aspect, the present application provides a management device for device IPs within an enterprise, including: a first obtaining module, configured to obtain a device IP address, applicant information, and application work station information uploaded by any on-network device; a first determining module, configured to determine whether an applicant needs to apply for a new IP address according to the device IP address; a first execution module, configured to, when it is determined that the applicant needs to apply for a new IP address, arbitrarily select an IP address from the IP address management pool as the target IP address and send it to the on-network device; a second execution module, configured to update the IP address management pool according to the target IP address, where the IP address management pool includes a plurality of unallocated IP addresses; and a third execution module, configured to update the IP management table according to the target IP address, the applicant information, and the application work station information, where the IP management table stores the corresponding relationships between IP addresses, employee information, and work station information.
[0014] In a third aspect, the present application proposes an electronic device, including: a memory and a processor, where a computer program is stored on the memory, and when the computer program is executed by the processor, it executes the method according to any one of the first aspect.
[0015] In a fourth aspect, the present application proposes a storage medium, where a computer program stored in the storage medium can be executed by one or more processors, and the computer program can be used to implement the method according to any one of the first aspect.
[0016] Advantages of the present invention: This application obtains the device IP address, applicant information, and application workbench information uploaded by any online device; determines whether the applicant needs to apply for a new IP address based on the device IP address; when it is determined that the applicant needs to apply for a new IP address, randomly selects an IP address from the IP address management pool as the target IP address and sends it to the online device; updates the IP address management pool according to the target IP address, where the IP address management pool includes multiple unallocated IP addresses; updates the IP management table according to the target IP address, the applicant information, and the application workbench information, where the IP management table stores the correspondence between IP addresses, employee information, and workbench information. It realizes the automatic maintenance and update of enterprise device IP management, reduces a large amount of waste of human resources, improves the stability of enterprise device IP management, and greatly reduces the possibility of IP conflicts. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The scope of the present disclosure can be better understood by reading the detailed description of the exemplary embodiments below in conjunction with the accompanying drawings. The accompanying drawings included are:
[0018] Figure 1 It is a general flowchart of a method for managing device IPs within an enterprise provided by an embodiment of the present application;
[0019] Figure 2 It is a structural block diagram of a device for managing device IPs within an enterprise provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limitations of the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0021] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0022] If similar descriptions such as "first\second\third" appear in the application documents, the following explanation is added. In the following description, the terms "first\second\third" are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are for the purpose of describing embodiments of this application only and are not intended to limit this application.
[0024] Embodiment 1:
[0025] Currently, there are static allocation and dynamic allocation methods for IP addresses. According to the business characteristics of enterprises, different enterprises adopt different allocation methods. Regardless of the allocation method adopted by the enterprise, there are certain operation and maintenance difficulties in information operation and maintenance. Among them, several relatively sensitive difficulties are as follows: 1. Maintaining and managing the IP address table manually is prone to cause management chaos and consume time and effort; 2. When an IP address conflict occurs, it is impossible to quickly locate it, resulting in users being unable to use it normally; 3. When a network security event occurs on a device terminal, it is impossible to quickly locate it, and there is a possibility of the spread of potential hazards. In the face of the above problems, existing technical means generally conduct step-by-step investigations through switches and line connections. Facing a large number of switches and intricate line connections, this screening method has low investigation efficiency and is difficult to solve faults. The requirements of informatization for time are quite strict. By the time the problem is discovered and solved, it is already too late.
[0026] In view of the problems existing in the prior art, as Figure 1 shown, this application provides a method for managing device IPs within an enterprise. The method is applied to an electronic device, and the electronic device can be a server, a mobile terminal, a computer, a cloud platform, etc. The functions realized by the device data processing provided by the embodiments of this application can be achieved by the processor of the electronic device calling program code. Among them, the program code can be stored in a computer storage medium. The method for managing device IPs within an enterprise includes:
[0027] Step S1: Obtain the device IP address, applicant information, and application workbench information uploaded by any online device.
[0028] When within an enterprise, or when a switch is connected to multiple devices, if the IP address of each device is not allocated, it is very easy to occur IP conflicts. Therefore, generally, the network administrator of an enterprise will assign a fixed IP address to each device. However, as the number of devices increases, the maintenance and management of IP addresses will become more and more difficult, and IP conflicts will also occur more easily. Therefore, this application proposes a method for managing device IPs within an enterprise. This method can automatically allocate IPs to devices and can also automatically maintain and manage the IP management table, which can avoid the occurrence of IP conflicts to the greatest extent.
[0029] In this application, since each switch has multiple network interfaces, and each network interface corresponds one-to-one with the network ports installed beside the workstations, and there is a one-to-one correspondence between the workstations and the network ports beside them, we can obtain the correspondence between the workstations and the network ports, as well as the correspondence between the network ports and the network interfaces. Also, since each employee will be assigned a workstation, and the networked devices used by the employees are connected to the switch through the network ports, and the network address of each device is the IP address, we can obtain the correspondence between the IP address and the workstation, as well as the correspondence between the IP address and the employee. By combining the correspondence between the IP address and the employee, the correspondence between the IP address and the workstation, and the correspondence between the workstation and the network port, we can obtain the IP management table. The IP management table can express the correspondence between the IP address, the workstation, the network port, and the employee.
[0030] The management of the corresponding IP mainly reflects in the update of the IP management table, where the update mainly involves the addition, deletion, and replacement of the corresponding relationships in the IP management table. To perform the addition, deletion, and replacement of the corresponding relationships, generally, the IP management table is maintained manually. However, when there is too much data in the IP management table, manual maintenance becomes very difficult. Therefore, this application needs to achieve the automatic addition, deletion, and replacement of the corresponding relationships in the IP management table.
[0031] Taking the addition of the corresponding relationship as an example, when adding the corresponding relationship, many processes are involved. For example, if a new employee is added to a department, the personnel specialist needs to enter the employee information for the new employee, the department head of the new employee arranges a workstation for the new employee, and then the network administrator or the department head assigns a fixed IP address to the new employee, and the fixed IP address needs to be manually updated to the networked device of the new employee. There are many people involved in the whole process, which makes the process slow, and it is easy to make misinputs when manually updating the IP address. Therefore, in this application, the method of self-application and allocation is adopted to assign a fixed IP address to the new employee. The new employee can apply for a fixed IP address through their own networked device or entrust others to apply on their behalf. In this application, different application methods will have different processing methods. And when the new employee obtains a fixed IP address, the IP management table needs to be updated. Therefore, in this application, the device IP address, the applicant information, and the applied workstation information need to be obtained. The device IP address is mainly used to determine the application method of the fixed IP address, while the applicant information and the applied workstation information are mainly used to update the IP management table.
[0032] Step S2: Determine whether the applicant needs to apply for a new IP address according to the device IP address.
[0033] In this application, IP addresses can be divided into two categories: one is a fixed IP address, and the other is a temporary IP address. For devices that are not connected to the network or are newly connected to the network for the first time, temporary IP addresses will be used. Among them, the temporary IP address can be manually edited in the device in advance, or after the device is connected to the network, the network management system assigns a temporary IP address to the device. These methods are not further limited in this application.
[0034] As mentioned above, in this application, a new employee can use their own device to apply for their own fixed IP address, or use someone else's device to apply for a fixed IP address. However, the difference between the two methods lies in the type of the device IP address.
[0035] In some embodiments, step S2, "determine whether the applicant needs to apply for a new IP address according to the device IP address", includes:
[0036] Step S21: Determine the IP type of the device IP address according to the device IP address.
[0037] Step S22: When it is determined that the device IP address is the temporary IP address, determine that the applicant needs to apply for a new IP address.
[0038] Each application related to the IP address initiated only has three purposes: addition, deletion, and replacement. Among them, the application initiated by a device with a temporary IP address can only be to obtain a fixed IP address. After all, the IP addresses in the IP management table are all fixed IP addresses, and there is no corresponding relationship with the temporary IP address. Therefore, when the IP type of the device IP address is a temporary IP address, it means that the applicant needs to apply for a new IP address, that is, a fixed IP address.
[0039] When the device IP address is a fixed IP address, its purpose may be any one of addition, deletion, and replacement. Therefore, we need to make a further judgment on it. So in some embodiments, step S2, "determine whether the applicant needs to apply for a new IP address according to the device IP address", further includes:
[0040] Step S23: When it is determined that the device IP address is a fixed IP address, determine whether there is a corresponding relationship between the device IP address and the applicant information according to the IP management table.
[0041] Step S24: When it is determined that there is no corresponding relationship between the device IP address and the applicant information, determine that the applicant needs to apply for a new IP address.
[0042] Because when a fixed IP address device is used to apply for a fixed IP address for a new employee, the applicant information and the application workstation information are all the new employee's information, and there will be a situation where the device IP address has no corresponding relationship with the applicant information. Therefore, in this application, it is necessary to determine whether the device IP address has a corresponding relationship with the applicant information based on the IP management table. When it is determined that the device IP address has no corresponding relationship with the applicant information, it is determined that the applicant's intention in initiating the application is to obtain a new IP address.
[0043] Step S3: When it is determined that the applicant needs to apply for a new IP address, an IP address is randomly selected from the IP address management pool as the target IP address and sent to the online device.
[0044] Step S4: updating the IP address management pool according to the target IP address, wherein the IP address management pool includes a plurality of unallocated IP addresses.
[0045] Step S5: updating the IP management table according to the target IP address, the applicant information and the applied workstation information, wherein the IP management table stores the correspondence between the IP address, the employee information and the workstation information.
[0046] In order to facilitate the management of IP addresses and avoid IP conflicts as much as possible, an IP address management pool is set up in this application. Multiple unallocated IP addresses are set up in the IP address management pool. When an application for new IP address allocation is received, an IP address can be directly taken out of the IP address management pool as the target IP address and sent to the online device that initiated the application. At this time, since the IP address has been allocated, it is necessary to remove the IP address from the IP address management pool to update the IP address management pool.
[0047] After the new IP address is allocated, it means that a new corresponding relationship has been added, so the IP management table can be updated according to the target IP geology, applicant information and workstation information, so that the information of the newly allocated IP address is added to the IP management table. The automatic update and maintenance of the IP management table and the automatic allocation of fixed IP addresses are realized, while also avoiding the occurrence of IP conflicts as much as possible, and improving the security and stability of the enterprise network.
[0048] Steps S1 to S5 implement the allocation of fixed IP addresses and the updating and maintenance of the IP management table. However, considering that employees are prone to mis-entering when changing the IP address of a device, there is still a possibility of IP conflict. Therefore, in some embodiments, the method further includes:
[0049] Step S6: Update the IP address of the online device according to the target IP address.
[0050] When it is determined that the device IP address is a temporary IP address, it indicates that the device is the one for which the applicant needs to modify the IP address. At this time, in order to avoid incorrect entry when the applicant updates the IP address by himself / herself, the IP address of the in-network device will be automatically updated according to the target IP address. This enables the present application to achieve automatic allocation and update of fixed IP addresses, as well as automatic maintenance and update of the IP management table.
[0051] Steps S1 - S6 mainly describe how to achieve automatic allocation and update of fixed IP addresses, and how to automatically add corresponding relationships in the IP management table. However, it does not mention how to achieve automatic maintenance of the IP management table. Therefore, in some embodiments, the method further includes:
[0052] Step S71: When it is determined that there is a corresponding relationship between the device IP address and the applicant information, it is determined that the applicant needs to update the information.
[0053] Step S72: Determine the target work station information corresponding to the device IP address in the IP management table according to the device IP address.
[0054] Step S73: Update the IP management table with the target work station information according to the applied work station information.
[0055] In step S24, when it is determined that there is no corresponding relationship between the device IP address and the applicant information, it is considered that a new IP address needs to be applied for. However, if there is a corresponding relationship between the device IP address and the applicant information, it indicates that the subject of this application is the employee who has a corresponding relationship with the device IP address. At this time, the purpose of applying for a new IP can be excluded, and then there are only deletion and replacement left. Among enterprises, there are often situations where employees change their work stations due to job changes or other reasons. After an employee changes their work station, the IP management table needs to be updated in a timely manner to ensure the accuracy of the corresponding relationships in the IP management table. Therefore, when it is determined that there is a corresponding relationship between the device IP address and the applicant information, the corresponding target work station information is obtained according to the device IP address, and then the target work station information is updated according to the applied work station information, enabling the IP management table to be automatically maintained.
[0056] Steps S1 - S7 mainly describe the maintenance and update issues of fixed IP addresses and the IP management table. However, in actual use, there may also be a situation where an in-network device is abnormally disconnected from the network. In this case, the present application can also quickly locate the disconnected device and conduct a preliminary diagnosis and processing of the disconnection cause.
[0057] Therefore, in some embodiments, the method further includes:
[0058] Step S81: Real-time monitor the device networking status of each port of the switch.
[0059] Step S82: Determine whether there is any device with abnormal network disconnection according to the device networking status.
[0060] Step S83: When it is determined that there is a device with abnormal network disconnection, obtain the networking port of the disconnected device.
[0061] Step S84: Determine the off-network IP address of the disconnected device according to the networking port and the IP management table, where the IP management table also stores the corresponding relationship between the IP address and the networking port.
[0062] Since each on-network device is connected to the switch through a networking port, we can obtain the networking status of each device in the enterprise through the connection status of each port on the switch. In the device networking status, we can easily find out which devices have abnormal network disconnection. Therefore, we can determine whether there is any device with abnormal network disconnection according to the device networking status. And after a device has abnormal network disconnection, we can determine the corresponding networking port of the disconnected device in the first time. After determining the networking port, we can determine the off-network IP address of the device with abnormal network disconnection according to the corresponding relationship in the IP management table. Of course, we can also quickly determine the work station information and employee information of the disconnection, so as to achieve quick positioning when an accident occurs.
[0063] Here, the main purpose of determining the off-network IP address is to further conduct a preliminary diagnosis to confirm whether an IP conflict has occurred. And after determining that an IP conflict has occurred, automatic repair can also be achieved.
[0064] Therefore, in some embodiments, the method further includes:
[0065] Step S91: Obtain at least one newly allocated IP address allocated within a preset time period.
[0066] Step S92: Determine whether an IP conflict has occurred according to the newly allocated IP address and the off-network IP address.
[0067] Step S93: When it is determined that an IP conflict has occurred, determine the target networking port corresponding to the newly allocated IP address according to the IP management table.
[0068] Step S94: Select any IP address from the IP address management pool again as the target IP address.
[0069] Step S95: Update the IP address of the on-network device connected to the target networking port according to the target IP address.
[0070] Step S96: Update the IP management table according to the target IP address and the target network connection port.
[0071] Generally, IP conflicts occur after a new IP address is assigned. Due to certain errors, some bound IP addresses are reassigned. Therefore, in this application, it is also necessary to obtain the newly assigned IP addresses that have been newly assigned within a preset time period. Then, compare the offline IP address with each newly assigned IP address to find the newly assigned IP address that is the same as the offline IP address. When there is a newly assigned IP address among the newly assigned IP addresses that is the same as the offline IP address, it is determined that an IP conflict has occurred. At this time, the corresponding target network connection port will be determined in the IP management table according to the newly assigned IP address. Then, another IP address is taken from the IP address management pool as the target IP address and sent to the online device connected to the target network connection port, and the IP address of the online device is updated according to the target IP address. At the same time, the target IP address needs to be updated in the IP management table according to the target network connection port. This realizes the automatic diagnosis and automatic repair functions in case of unexpected situations.
[0072] Therefore, the method of this application can realize the automatic assignment and update of fixed IP addresses, the automatic update and maintenance of the IP management table, and when an unexpected situation occurs, quickly locate the device where the accident occurs, as well as the corresponding network connection port, employee information, etc. Moreover, when it is determined that an IP conflict has occurred, the IP conflict can be automatically resolved. This reduces a large amount of waste of human resources, improves the stability of enterprise device IP management, and greatly reduces the possibility of IP conflicts occurring.
[0073] Embodiment 2:
[0074] Based on the foregoing embodiments, an embodiment of this application provides a management device for device IPs within an enterprise. Each module included in the device, as well as each unit included in each module, can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits; during the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Microprocessor Unit), a digital signal processor (DSP, Digital Signal Processing), or a field programmable gate array (FPGA, Field Programmable Gate Array), etc.
[0075] As Figure 2 shown, a management device for device IPs within an enterprise includes: a first acquisition module 1, a first determination module 2, a first execution module 3, a second execution module 4, and a third execution module 5.
[0076] The first acquisition module 1 is used to acquire the device IP address, applicant information, and application workbench information uploaded by any online device. The first determination module 2 is used to determine whether the applicant needs to apply for a new IP address according to the device IP address. The first execution module 3 is used to, when it is determined that the applicant needs to apply for a new IP address, arbitrarily select an IP address from the IP address management pool as the target IP address and send it to the online device. The second execution module 4 is used to update the IP address management pool according to the target IP address, where the IP address management pool includes multiple unallocated IP addresses. The third execution module 5 is used to update the IP management table according to the target IP address, the applicant information, and the application workbench information, where the IP management table stores the correspondence between the IP address, employee information, and workbench information.
[0077] In some embodiments, the first determination module 2 includes: a second determination module and a third determination module.
[0078] The second determination module is used to determine the IP type of the device IP address according to the device IP address, where the IP type includes: fixed IP address and temporary IP address. The third determination module is used to, when it is determined that the device IP address is the temporary IP address, determine that the applicant needs to apply for a new IP address.
[0079] In some embodiments, the first determination module 2 further includes: a fourth determination module and a fifth determination module.
[0080] The fourth determination module is used to, when it is determined that the device IP address is a fixed IP address, determine whether there is a correspondence between the device IP address and the applicant information according to the IP management table. The fifth determination module is used to, when it is determined that there is no correspondence between the device IP address and the applicant information, determine that the applicant needs to apply for a new IP address.
[0081] In some embodiments, the device further includes: a sixth determination module, a seventh determination module, and a fourth execution module.
[0082] The sixth determination module is used to, when it is determined that there is a correspondence between the device IP address and the applicant information, determine that the applicant needs to update the information. The seventh determination module is used to determine the target workbench information corresponding to the device IP address in the IP management table according to the device IP address. The fourth execution module is used to update the IP management table according to the application workbench information and the target workbench information.
[0083] In some embodiments, the device further includes: a fifth execution module.
[0084] The fifth execution module is used to update the IP address of the online device according to the target IP address.
[0085] In some embodiments, the device further includes: a sixth execution module, an eighth determination module, a second acquisition module, and a ninth determination module.
[0086] The sixth execution module is used to monitor the device networking status of each port of the switch in real time. The eighth determination module is used to determine whether there is any device abnormally disconnected from the network according to the device networking status. The second acquisition module is used to acquire the networking port of the disconnected device when it is determined that there is a device abnormally disconnected from the network. The ninth determination module is used to determine the disconnected IP address of the disconnected device according to the networking port and the IP management table, where the IP management table also stores the correspondence between the IP address and the networking port.
[0087] In some embodiments, the device further includes: a third acquisition module, a tenth determination module, an eleventh determination module, a seventh execution module, an eighth execution module, and a ninth execution module.
[0088] The third acquisition module is used to acquire at least one newly allocated IP address allocated within a preset duration. The tenth determination module is used to determine whether an IP conflict has occurred according to the newly allocated IP address and the disconnected IP address. The eleventh determination module is used to determine the target networking port corresponding to the newly allocated IP address according to the IP management table when it is determined that an IP conflict has occurred. The seventh execution module is used to re-select any IP address from the IP address management pool as the target IP address. The eighth execution module is used to update the IP address of the online device connected to the target networking port according to the target IP address. The ninth execution module is used to update the IP management table according to the target IP address and the target networking port.
[0089] Each module in the above device for managing the IP of devices within an enterprise can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the device in hardware form or be independent of the processor, or can be stored in the memory in the processing device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. There may be other division methods in actual implementation.
[0090] Embodiment 3:
[0091] A third aspect provides an electronic device, including a storage and a processor. The storage stores a computer program, and when the processor executes the computer program, the steps of a method for managing the IP of devices within an enterprise are implemented.
[0092] Embodiment 4:
[0093] The fourth aspect provides a storage medium storing a computer program that can be executed by one or more processors, and the computer program can be used to implement the steps of any one of the methods for managing the IP of devices within an enterprise in the first aspect.
[0094] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0095] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the order numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0096] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.
[0097] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling or communication connection between the displayed or discussed components can be through some interfaces. The indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0098] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] In addition, in each embodiment of the present application, each functional unit can be fully integrated in a processing unit, or each unit can be separately regarded as a unit, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0100] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes various media that can store program codes, such as removable storage devices, read-only memories (ROMs), magnetic disks or optical discs.
[0101] Alternatively, if the above integrated units of the present application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a controller to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as removable storage devices, ROMs, magnetic disks, or optical discs.
[0102] As described above, the above are only the implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for managing device IPs within an enterprise, characterized in that, it includes: Obtaining the device IP address, applicant information, and application work station information uploaded by any on-network device; Determining whether the applicant needs to apply for a new IP address based on the device IP address; When it is determined that the applicant needs to apply for a new IP address, randomly select an IP address from the IP address management pool as the target IP address and send it to the on-network device; Updating the IP address management pool according to the target IP address, where the IP address management pool includes multiple unallocated IP addresses; Updating the IP management table according to the target IP address, the applicant information, and the application work station information, where the IP management table stores the corresponding relationship between the IP address, employee information, and work station information.
2. The method according to claim 1, characterized in that, The determining whether the applicant needs to apply for a new IP address based on the device IP address includes: Determining the IP type of the device IP address according to the device IP address, where the IP type includes: fixed IP address and temporary IP address; When it is determined that the device IP address is the temporary IP address, determining that the applicant needs to apply for a new IP address.
3. The method according to claim 2, characterized in that, The determining whether the applicant needs to apply for a new IP address based on the device IP address further includes: When it is determined that the device IP address is a fixed IP address, determining whether there is a corresponding relationship between the device IP address and the applicant information according to the IP management table; When it is determined that there is no corresponding relationship between the device IP address and the applicant information, determining that the applicant needs to apply for a new IP address.
4. The method according to claim 3, characterized in that, The method further includes: When it is determined that there is a corresponding relationship between the device IP address and the applicant information, determining that the applicant needs to update the information; Determining the target work station information corresponding to the device IP address in the IP management table according to the device IP address; Updating the IP management table according to the application work station information for the target work station information.
5. The method according to claim 2, characterized in that, The method further includes: Updating the IP address of the on-network device according to the target IP address.
6. The method according to claim 1, characterized in that, The method further includes; Real-time monitoring of the device networking status of each port of the switch; Determining whether there is a device abnormal disconnection according to the device networking status; When it is determined that there is a device abnormal disconnection, obtaining the networking port of the disconnected device; Determining the disconnected IP address of the disconnected device according to the networking port and the IP management table, where the IP management table also stores the corresponding relationship between the IP address and the networking port.
7. The method according to claim 6, characterized in that, The method further includes: Obtaining at least one newly allocated IP address allocated within a preset time period; Determining whether an IP conflict has occurred according to the newly allocated IP address and the disconnected IP address. When it is determined that an IP conflict has occurred, determine the target networking port corresponding to the newly allocated IP address according to the IP management table; Select any IP address from the IP address management pool again as the target IP address; Update the IP address of the online device connected to the target networking port according to the target IP address; Update the IP management table according to the target IP address and the target networking port.
8. An apparatus for managing the IP of devices within an enterprise, characterized in that, it includes: A first acquisition module, configured to acquire the device IP address, applicant information, and application workbench information uploaded by any online device; A first determination module, configured to determine whether the applicant needs to apply for a new IP address according to the device IP address; A first execution module, configured to, when it is determined that the applicant needs to apply for a new IP address, arbitrarily select an IP address from the IP address management pool as the target IP address and send it to the online device; A second execution module, configured to update the IP address management pool according to the target IP address, where the IP address management pool includes multiple unallocated IP addresses; A third execution module, configured to update the IP management table according to the target IP address, the applicant information, and the application workbench information, where the IP management table stores the correspondence between IP addresses, employee information, and workbench information.
9. An electronic device, characterized in that, it includes: A memory and a processor, where a computer program is stored on the memory, and when the computer program is executed by the processor, it executes the method according to any one of claims 1-7.
10. A storage medium, characterized in that, the computer program stored in this storage medium can be executed by one or more processors, and the computer program can be used to implement the method according to any one of claims 1-7.
