[go: up one dir, main page]

CN104363137A - In-local-area-network IP address distribution information monitoring method and device - Google Patents

In-local-area-network IP address distribution information monitoring method and device Download PDF

Info

Publication number
CN104363137A
CN104363137A CN201410647404.XA CN201410647404A CN104363137A CN 104363137 A CN104363137 A CN 104363137A CN 201410647404 A CN201410647404 A CN 201410647404A CN 104363137 A CN104363137 A CN 104363137A
Authority
CN
China
Prior art keywords
address
available
record file
address record
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410647404.XA
Other languages
Chinese (zh)
Inventor
王荣廷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410647404.XA priority Critical patent/CN104363137A/en
Publication of CN104363137A publication Critical patent/CN104363137A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明提出一种监控局域网内IP地址分配信息的方法,所述方法能够对可用IP地址的分配状态进行检测,并实时更新可用IP地址记录文件,从而避免网络终端使用已经分配过的IP地址。同时还提出了一种IP地址分配信息监控装置、包括上述装置的IP网络终端或DHCP服务器、以及包括上述IP网络终端或DHCP服务器的IP网络系统。

The present invention proposes a method for monitoring IP address allocation information in a local area network. The method can detect the allocation status of available IP addresses and update the available IP address record files in real time, thereby preventing network terminals from using allocated IP addresses. At the same time, it also proposes an IP address allocation information monitoring device, an IP network terminal or a DHCP server including the above device, and an IP network system including the above IP network terminal or DHCP server.

Description

一种监控局域网内IP地址分配信息的方法和装置A method and device for monitoring IP address allocation information in a local area network

技术领域technical field

本发明涉及计算机技术领域,具体涉及一种监控局域网内IP地址分配信息的方法和装置。The invention relates to the field of computer technology, in particular to a method and device for monitoring IP address allocation information in a local area network.

背景技术Background technique

目前,大多数企业,学校,实验室都使用内部局域网进行工作,当有新的设备接入到局域网内时,需要为其分配一个IP来接入到局域网内。大部分情况下,局域网内的IP是通过架设DHCP服务器动态进行分配的,新设备接入到局域网时,会从DHCP服务器获取一个未分配的IP。At present, most enterprises, schools, and laboratories use the internal LAN for work. When a new device is connected to the LAN, it needs to be assigned an IP to access the LAN. In most cases, the IP in the LAN is dynamically assigned by setting up a DHCP server. When a new device is connected to the LAN, it will obtain an unallocated IP from the DHCP server.

在一些特殊情况下,某些设备可能需要一个固定的IP,以便通过固定的IP进行访问,这就需要:1.为其分配一个未使用的IP。2.尽量避免此设备关机时,此IP被其它设备占用。In some special cases, some devices may require a fixed IP for access through the fixed IP, which requires: 1. Assign an unused IP to it. 2. Try to avoid that this IP is occupied by other devices when the device is turned off.

基于上述现有技术中的问题,需要建立一种机制来检测局域网内IP地址的分配状况,并且避免使用已经分配过的IP地址。Based on the above-mentioned problems in the prior art, it is necessary to establish a mechanism to detect the allocation status of IP addresses in the local area network and avoid using IP addresses that have already been allocated.

发明内容Contents of the invention

为了实现上述目的,提供一种监控局域网内IP地址分配信息的方法,包括:In order to achieve the above purpose, a method for monitoring IP address allocation information in a local area network is provided, including:

S1:读取可用IP地址记录文件中记录的可用IP地址;S1: read the available IP address recorded in the available IP address record file;

S2:对所述可用IP地址进行分配状态检测;S2: Detecting the allocation state of the available IP address;

S3:检测完成后,更新该可用IP地址记录文件,流程结束。S3: After the detection is completed, the available IP address record file is updated, and the process ends.

特别地:In particular:

在所述步骤S1之前还具有步骤:There are also steps before said step S1:

S0:判断是否存在所述可用IP地址记录文件,如果存在,则执行步骤S1,S0: judging whether the available IP address record file exists, if so, execute step S1,

否则执行如下步骤:Otherwise, perform the following steps:

S01:创建可用IP地址记录文件;S01: Create an available IP address record file;

S02:提示用户输入需要检测的IP地址网段;S02: Prompt the user to input the IP address segment to be detected;

S03:检测所述IP地址网段中的IP地址的分配状态,将其中可用的IP地S03: Detect the allocation status of the IP addresses in the IP address network segment, and assign the available IP addresses to

址保存到步骤S01中创建的所述可用IP地址记录文件中,流程结束。The address is saved to the available IP address record file created in step S01, and the process ends.

特别地:In particular:

步骤S3中所述更新该可用IP地址记录文件具体为:The update of the available IP address record file described in step S3 is specifically:

将已经分配的IP地址从所述可用IP地址记录文件中删除。Delete the allocated IP address from the available IP address record file.

一种IP地址分配信息监控装置,应用于基于IP地址的局域网中,包括:An IP address allocation information monitoring device, applied to an IP address-based local area network, comprising:

可用IP地址记录文件读取模块,用于读取可用IP地址记录文件中的可用IP地址;The available IP address record file reading module is used to read the available IP address in the available IP address record file;

第一检测模块,用于对所述可用IP地址进行分配状态检测;A first detection module, configured to detect the distribution state of the available IP address;

更新模块,用于在检测完成后,更新所述可用IP地址记录文件。An update module, configured to update the available IP address record file after the detection is completed.

特别地,还具有:In particular, also has:

判断模块,用于判断是否存在所述可用IP地址记录文件;A judging module, configured to judge whether the available IP address record file exists;

可用IP地址记录文件创建模块,用于在判断模块判断不存在所述可用IP地址记录文件时创建所述可用IP地址记录文件;The available IP address record file creation module is used to create the available IP address record file when the judging module determines that the available IP address record file does not exist;

IP地址网段提示模块,用于在创建所述可用IP地址记录文件后,提示用户输入需要检测的IP地址网段,并接收用户输入的所述IP地址网段;The IP address network segment prompting module is used to prompt the user to input the IP address network segment to be detected after creating the available IP address record file, and receive the IP address network segment input by the user;

第二检测模块,用于检测所述IP地址网段中的IP地址的分配状态,并将其中可用的IP地址保存到所述可用IP地址记录文件创建模块创建的所述可用IP地址记录文件中。The second detection module is used to detect the allocation state of the IP address in the IP address network segment, and save the available IP address in the available IP address record file created by the available IP address record file creation module .

特别地:In particular:

所述更新该可用IP地址记录文件具体为:The update of the available IP address record file is specifically:

将已经分配的IP地址从所述可用IP地址记录文件中删除。Delete the allocated IP address from the available IP address record file.

一种IP网络终端,包括上述IP地址分配信息监控装置。An IP network terminal includes the above-mentioned IP address allocation information monitoring device.

一种DHCP服务器,包括上述IP地址分配信息监控装置。A DHCP server includes the above-mentioned IP address allocation information monitoring device.

一种基于IP地址的网络系统,包括上述IP网络终端,或上述DHCP服务器。An IP address-based network system includes the above-mentioned IP network terminal, or the above-mentioned DHCP server.

本发明的有益效果是:能够检测局域网内IP地址的分配状况,避免使用已经分配过的IP地址。The beneficial effect of the invention is that it can detect the allocation status of the IP address in the local area network, and avoid using the IP address that has been allocated.

附图说明Description of drawings

附图1是本发明提出的一种监控局域网内IP地址分配信息的方法的流程图。Accompanying drawing 1 is a flowchart of a method for monitoring IP address allocation information in a local area network proposed by the present invention.

具体实施方式Detailed ways

下面结合附图对本发明提出的技术方案进行详细说明。The technical solution proposed by the present invention will be described in detail below in conjunction with the accompanying drawings.

参见附图1,方法开始执行后,首先检查是否已经保存有可用IP地址记录文件,其中记录有前一次方法执行时记录的可用IP地址信息。Referring to accompanying drawing 1, after the method starts to execute, first check whether there is an available IP address record file, which records the available IP address information recorded when the previous method was executed.

如果没有检测到可用IP地址记录文件,则说明是首次执行本方法,随后将创建一个可用IP地址记录文件,并提示用户输入要检测的IP地址网段,然后会对这个网段的全部IP地址进行扫描,并将可用的未分配的IP地址保存到该记录文件中,以备下次方法执行时使用。If no available IP address record file is detected, it means that this method is executed for the first time, and then an available IP address record file will be created, and the user will be prompted to input the IP address network segment to be detected, and then all IP addresses of this network segment will be Scanning is performed and available unassigned IP addresses are saved to this log file for use the next time the method is executed.

如果检测到存在所述可用IP地址记录文件,则读取该可用IP地址记录文件,根据其中记录的可用IP地址信息进行IP地址分配状态检测,检测完成后,更新该可用IP地址记录文件,以备下次方法执行时使用。特别地,该步骤可以通过如下具体方式实现:如果检测到存在所述可用IP地址记录文件,则读取该可用IP地址记录文件,将其中的数据保存到一个临时创建的记录文件中,根据其中记录的可用IP地址信息进行IP地址分配状态检测,从中删除已经被分配的IP地址,检测完成后使用该临时创建的记录文件中的数据替换所述检测到的可用IP地址记录文件,从而实现更新。If it is detected that there is the available IP address record file, the available IP address record file is read, and the IP address allocation state detection is carried out according to the available IP address information recorded therein. After the detection is completed, the available IP address record file is updated to It is used for the next method execution. In particular, this step can be implemented in the following specific manner: if it is detected that the available IP address record file exists, then read the available IP address record file, save the data therein to a temporarily created record file, according to the The recorded available IP address information is used to detect the IP address allocation status, and the allocated IP address is deleted from it. After the detection is completed, the data in the temporarily created record file is used to replace the detected available IP address record file, so as to realize the update .

本发明还提出了一种IP地址分配信息监控装置,应用于基于IP地址的局域网中,包括:The present invention also proposes a monitoring device for IP address allocation information, which is applied to a local area network based on IP addresses, including:

可用IP地址记录文件读取模块,用于读取可用IP地址记录文件中的可用IP地址;The available IP address record file reading module is used to read the available IP address in the available IP address record file;

第一检测模块,用于对所述可用IP地址进行分配状态检测;A first detection module, configured to detect the distribution state of the available IP address;

更新模块,用于在检测完成后,更新所述可用IP地址记录文件。An update module, configured to update the available IP address record file after the detection is completed.

特别地,还具有:In particular, also has:

判断模块,用于判断是否存在所述可用IP地址记录文件;A judging module, configured to judge whether the available IP address record file exists;

可用IP地址记录文件创建模块,用于在判断模块判断不存在所述可用IP地址记录文件时创建所述可用IP地址记录文件;The available IP address record file creation module is used to create the available IP address record file when the judging module determines that the available IP address record file does not exist;

IP地址网段提示模块,用于在创建所述可用IP地址记录文件后,提示用户输入需要检测的IP地址网段,并接收用户输入的所述IP地址网段;The IP address network segment prompting module is used to prompt the user to input the IP address network segment to be detected after creating the available IP address record file, and receive the IP address network segment input by the user;

第二检测模块,用于检测所述IP地址网段中的IP地址的分配状态,并将其中可用的IP地址保存到所述可用IP地址记录文件创建模块创建的所述可用IP地址记录文件中。The second detection module is used to detect the allocation state of the IP address in the IP address network segment, and save the available IP address in the available IP address record file created by the available IP address record file creation module .

上述装置可以采用FPGA器件,专用集成电路等实现。The above-mentioned device can be realized by using an FPGA device, an application-specific integrated circuit, and the like.

本发明还提出了可应用于基于IP地址的网络中的如下设备:The present invention also proposes the following equipment applicable to the network based on the IP address:

一种IP网络终端,包括上述IP地址分配信息监控装置。An IP network terminal includes the above-mentioned IP address allocation information monitoring device.

一种DHCP服务器,包括上述IP地址分配信息监控装置。A DHCP server includes the above-mentioned IP address allocation information monitoring device.

一种基于IP地址的网络系统,包括上述IP网络终端,或上述DHCP服务器。An IP address-based network system includes the above-mentioned IP network terminal, or the above-mentioned DHCP server.

当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明的权利要求的保护范围。Of course, the present invention can also have other various embodiments, and those skilled in the art can make various corresponding changes and deformations according to the present invention without departing from the spirit and essence of the present invention, but these corresponding Changes and deformations should all belong to the protection scope of the claims of the present invention.

Claims (9)

1.一种监控局域网内IP地址分配信息的方法,其特征在于,包括:1. A method for monitoring IP address allocation information in a local area network, characterized in that, comprising: S1:读取可用IP地址记录文件中记录的可用IP地址;S1: read the available IP address recorded in the available IP address record file; S2:对所述可用IP地址进行分配状态检测;S2: Detecting the allocation state of the available IP address; S3:检测完成后,更新该可用IP地址记录文件,流程结束。S3: After the detection is completed, the available IP address record file is updated, and the process ends. 2.根据权利要求1所述的方法,其特征在于:2. The method according to claim 1, characterized in that: 在所述步骤S1之前还具有步骤:There are also steps before said step S1: S0:判断是否存在所述可用IP地址记录文件,如果存在,则执行步骤S1,否则执行如下步骤:S0: Determine whether the available IP address record file exists, if it exists, execute step S1, otherwise execute the following steps: S01:创建可用IP地址记录文件;S01: Create an available IP address record file; S02:提示用户输入需要检测的IP地址网段;S02: Prompt the user to input the IP address segment to be detected; S03:检测所述IP地址网段中的IP地址的分配状态,将其中可用的IP地址保存到步骤S01中创建的所述可用IP地址记录文件中,流程结束。S03: Detect the allocation status of the IP addresses in the IP address network segment, save the available IP addresses in the available IP address record file created in step S01, and the process ends. 3.根据权利要求1或2所述的方法,其特征在于:3. The method according to claim 1 or 2, characterized in that: 步骤S3中所述更新该可用IP地址记录文件具体为:The update of the available IP address record file described in step S3 is specifically: 将已经分配的IP地址从所述可用IP地址记录文件中删除。Delete the allocated IP address from the available IP address record file. 4.一种IP地址分配信息监控装置,应用于基于IP地址的局域网中,其特征在于,包括:4. An IP address allocation information monitoring device, applied in a local area network based on an IP address, is characterized in that, comprising: 可用IP地址记录文件读取模块,用于读取可用IP地址记录文件中的可用IP地址;The available IP address record file reading module is used to read the available IP address in the available IP address record file; 第一检测模块,用于对所述可用IP地址进行分配状态检测;A first detection module, configured to detect the distribution state of the available IP address; 更新模块,用于在检测完成后,更新所述可用IP地址记录文件。An update module, configured to update the available IP address record file after the detection is completed. 5.如权利要求4所述的装置,其特征在于,还具有:5. The device of claim 4, further comprising: 判断模块,用于判断是否存在所述可用IP地址记录文件;A judging module, configured to judge whether the available IP address record file exists; 可用IP地址记录文件创建模块,用于在判断模块判断不存在所述可用IP地址记录文件时创建所述可用IP地址记录文件;The available IP address record file creation module is used to create the available IP address record file when the judging module determines that the available IP address record file does not exist; IP地址网段提示模块,用于在创建所述可用IP地址记录文件后,提示用户输入需要检测的IP地址网段,并接收用户输入的所述IP地址网段;The IP address network segment prompting module is used to prompt the user to input the IP address network segment to be detected after creating the available IP address record file, and receive the IP address network segment input by the user; 第二检测模块,用于检测所述IP地址网段中的IP地址的分配状态,并将其中可用的IP地址保存到所述可用IP地址记录文件创建模块创建的所述可用IP地址记录文件中。The second detection module is used to detect the allocation state of the IP address in the IP address network segment, and save the available IP address in the available IP address record file created by the available IP address record file creation module . 6.如权利要求4或5所述的装置,其特征在于:6. The device according to claim 4 or 5, characterized in that: 所述更新该可用IP地址记录文件具体为:The update of the available IP address record file is specifically: 将已经分配的IP地址从所述可用IP地址记录文件中删除。Delete the allocated IP address from the available IP address record file. 7.一种IP网络终端,其特征在于:包括如权利要求4至6中任一项所述的装置。7. An IP network terminal, characterized by comprising the device according to any one of claims 4 to 6. 8.一种DHCP服务器,其特征在于:包括如权利要求4至6中任一项所述的装置。8. A DHCP server, characterized in that it comprises the device according to any one of claims 4 to 6. 9.一种基于IP地址的网络系统,其特征在于:包括权利要求7所述的IP网络终端,或权利要求8所述的DHCP服务器。9. An IP address-based network system, characterized in that it comprises the IP network terminal as claimed in claim 7, or the DHCP server as claimed in claim 8.
CN201410647404.XA 2014-11-14 2014-11-14 In-local-area-network IP address distribution information monitoring method and device Pending CN104363137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410647404.XA CN104363137A (en) 2014-11-14 2014-11-14 In-local-area-network IP address distribution information monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410647404.XA CN104363137A (en) 2014-11-14 2014-11-14 In-local-area-network IP address distribution information monitoring method and device

Publications (1)

Publication Number Publication Date
CN104363137A true CN104363137A (en) 2015-02-18

Family

ID=52530364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410647404.XA Pending CN104363137A (en) 2014-11-14 2014-11-14 In-local-area-network IP address distribution information monitoring method and device

Country Status (1)

Country Link
CN (1) CN104363137A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872130A (en) * 2016-06-14 2016-08-17 浪潮电子信息产业股份有限公司 Method for distributing IP (Internet Protocol) addresses and cloud management platform
CN108073487A (en) * 2017-11-23 2018-05-25 郑州云海信息技术有限公司 A kind of server Hostname reporting functions test method and system
CN108200224A (en) * 2017-12-29 2018-06-22 山东华软金盾软件股份有限公司 Terminal IP and MAC Address acquisition method and system under Linux based on DHCP protocol

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217575A (en) * 2008-01-18 2008-07-09 杭州华三通信技术有限公司 An IP address allocation and device in user end certification process
CN101662511A (en) * 2009-10-10 2010-03-03 中国电信股份有限公司 Network address distributing method, DHCP server, access system and method thereof
CN101841574A (en) * 2010-04-09 2010-09-22 江苏东大金智建筑智能化系统工程有限公司 Automatic IP address assignment and management method in network video monitoring system
CN102710814A (en) * 2012-06-21 2012-10-03 奇智软件(北京)有限公司 Method and device for controlling Internet protocol (IP) address of virtual machine
CN102932498A (en) * 2012-10-24 2013-02-13 广州杰赛科技股份有限公司 Virtual machine internet protocol (IP) resource management method of cloud computing platform
CN103037026A (en) * 2012-12-10 2013-04-10 上海斐讯数据通信技术有限公司 Dynamic host configuration protocol (DHCP) server address pool automatic configuration method and device and central processing element (CPE) equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217575A (en) * 2008-01-18 2008-07-09 杭州华三通信技术有限公司 An IP address allocation and device in user end certification process
CN101662511A (en) * 2009-10-10 2010-03-03 中国电信股份有限公司 Network address distributing method, DHCP server, access system and method thereof
CN101841574A (en) * 2010-04-09 2010-09-22 江苏东大金智建筑智能化系统工程有限公司 Automatic IP address assignment and management method in network video monitoring system
CN102710814A (en) * 2012-06-21 2012-10-03 奇智软件(北京)有限公司 Method and device for controlling Internet protocol (IP) address of virtual machine
CN102932498A (en) * 2012-10-24 2013-02-13 广州杰赛科技股份有限公司 Virtual machine internet protocol (IP) resource management method of cloud computing platform
CN103037026A (en) * 2012-12-10 2013-04-10 上海斐讯数据通信技术有限公司 Dynamic host configuration protocol (DHCP) server address pool automatic configuration method and device and central processing element (CPE) equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872130A (en) * 2016-06-14 2016-08-17 浪潮电子信息产业股份有限公司 Method for distributing IP (Internet Protocol) addresses and cloud management platform
CN108073487A (en) * 2017-11-23 2018-05-25 郑州云海信息技术有限公司 A kind of server Hostname reporting functions test method and system
CN108200224A (en) * 2017-12-29 2018-06-22 山东华软金盾软件股份有限公司 Terminal IP and MAC Address acquisition method and system under Linux based on DHCP protocol

Similar Documents

Publication Publication Date Title
CN110399267B (en) PCIE (peripheral component interface express) equipment monitoring method, system and equipment of server and readable storage medium
WO2018090290A1 (en) Mirror image file conversion method and apparatus
CN106354884A (en) Data object deleting method and device based on distributed file system
WO2019085466A1 (en) Association test method and system, application server, and computer readable storage medium
CN106681799B (en) It is inserted into the methods, devices and systems of disk
CN104135520B (en) A kind of method and device for identifying android terminal
US20150026322A1 (en) Configuring a network device
CN103500191A (en) Flow table configuration, query and table item deleting method and device
CN110851334B (en) Flow statistics method, electronic equipment, system and medium
CN104363137A (en) In-local-area-network IP address distribution information monitoring method and device
CN104375930A (en) Firmware detection system and method
CN113890879A (en) Load balancing method and device for data access, computer equipment and medium
CN104063284B (en) The method and apparatus running application program
CN106843947A (en) The treating method and apparatus of aacode defect
CN102238140B (en) System and method for sharing server by clients
CN104516749A (en) Information processing method and electronic device
CN107666658B (en) Determining a physical location of an electronic device
US20160012231A1 (en) Computer security responsive to an operating environment
CN104461741B (en) Graphics device interface based computing device optimizing method and device
CN105024949A (en) Port automatic binding method and system
JP6018344B2 (en) Dynamic reading code analysis apparatus, dynamic reading code analysis method, and dynamic reading code analysis program
CN105144073A (en) Removable storage device identity and configuration information
CN109388553A (en) A kind of multi-environment test method, device, equipment and the readable medium of application program
CN112115134A (en) Data storage method, device, electronic device and storage medium
CN107612755A (en) The management method and its device of a kind of cloud resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150218