[go: up one dir, main page]

CN111385367A - Method and device for keeping access equipment on line - Google Patents

Method and device for keeping access equipment on line Download PDF

Info

Publication number
CN111385367A
CN111385367A CN201811607157.5A CN201811607157A CN111385367A CN 111385367 A CN111385367 A CN 111385367A CN 201811607157 A CN201811607157 A CN 201811607157A CN 111385367 A CN111385367 A CN 111385367A
Authority
CN
China
Prior art keywords
address
dhcp
access
management device
server
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.)
Granted
Application number
CN201811607157.5A
Other languages
Chinese (zh)
Other versions
CN111385367B (en
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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811607157.5A priority Critical patent/CN111385367B/en
Publication of CN111385367A publication Critical patent/CN111385367A/en
Application granted granted Critical
Publication of CN111385367B publication Critical patent/CN111385367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5076Update or notification mechanisms, e.g. DynDNS

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种接入设备保持在线的方法及装置,接入管理设备通过动态地址分配协议DHCP获取IP地址,发生IP地址变更,在判断已添加的接入设备不在线时,获取DHCP地址池,在DHCP分配地址池后,修改回原来的地址与原接入设备的网络互通,并把接入设备修改为DHCP网段的地址,修改成功后再把接入管理设备修改回DHCP地址,以保证接入设备在接入管理设备上始终保持在线状态。本发明不仅减少了对接入设备的操作,减轻了接入管理设备上的手工配置,且显著提升了用户体验,降低了配置成本。

Figure 201811607157

The invention discloses a method and a device for keeping an access device online. An access management device obtains an IP address through a dynamic address allocation protocol DHCP, and when an IP address change occurs, it obtains the DHCP address when judging that the added access device is not online. After the address pool is allocated by DHCP, modify the original address to communicate with the network of the original access device, and modify the access device to the address of the DHCP network segment. After the modification is successful, modify the access management device back to the DHCP address. To ensure that the access device is always online on the access management device. The invention not only reduces the operation of the access equipment, but also reduces the manual configuration on the access management equipment, and significantly improves the user experience and reduces the configuration cost.

Figure 201811607157

Description

一种接入设备保持在线的方法及装置A method and device for keeping an access device online

技术领域technical field

本发明属于设备安装维护技术领域,尤其涉及一种接入设备保持在线的方法及装置。The invention belongs to the technical field of equipment installation and maintenance, and in particular relates to a method and device for keeping an access equipment online.

背景技术Background technique

视频监控是安全防范系统的重要组成部分,视频监控以其直观、准确、及时和信息内容丰富而广泛应用于许多场合。近年来,随着计算机、网络以及图像处理、传输技术的飞速发展,视频监控的普及化趋势越来越明显。Video surveillance is an important part of the security system. Video surveillance is widely used in many occasions because of its intuitive, accurate, timely and rich information content. In recent years, with the rapid development of computer, network and image processing and transmission technology, the popularization trend of video surveillance has become more and more obvious.

在小型的视频监控系统中,简单的网络硬盘录像机NVR加网络摄像机IPC的组网形式最常用,其中,NVR负责管理和接入IPC。In a small video surveillance system, the simple network hard disk video recorder NVR plus network camera IPC networking form is the most commonly used, among which, the NVR is responsible for managing and accessing the IPC.

在很多情况下,组网结构如附图1所示,先将NVR和IPC接入到一台交换机(Switch)中,NVR自动搜索添加IPC,将IPC改为静态IP地址,IPC在NVR上线。然后再将交换机接入一台路由器上,以便去访问外网或被外网所访问。In many cases, the networking structure is shown in Figure 1. First, connect the NVR and IPC to a switch (Switch), the NVR will automatically search and add the IPC, change the IPC to a static IP address, and the IPC will go online on the NVR. Then connect the switch to a router to access the external network or be accessed by the external network.

在附图1的这种情况下,如果路由器开启了动态地址分配DHCP(Dynamic HostConfiguration Protocol),并且路由器DHCP地址池中的IP地址与NVR处于不同网段时,开启了动态地址分配的NVR会从路由器获取到新的IP地址,引起自己的IP地址改变。如果新的IP地址与IPC的地址处在不同网段,此时IPC将处于离线状态。这时候,需要手动的删除IPC,再重新添加才能让IPC上线。其中,手动删除IPC后,需要将IPC的静态IP地址修改为与NVR的IP地址同一网段,或将IPC也改为动态地址分配才能再添加到NVR。In the case of Figure 1, if the router has enabled DHCP (Dynamic Host Configuration Protocol), and the IP address in the router's DHCP address pool is in a different network segment from the NVR, the NVR with dynamic address assignment enabled will The router obtains a new IP address, causing its own IP address to change. If the new IP address and the IPC address are in different network segments, the IPC will be offline. At this time, you need to manually delete the IPC, and then add it again to make the IPC go online. Among them, after manually deleting the IPC, you need to change the static IP address of the IPC to the same network segment as the IP address of the NVR, or change the IPC to dynamic address allocation before adding it to the NVR.

上述手动删除IPC后再添加的技术方案,其配置过程冗余复杂,且若IPC是第三方IPC则更加的麻烦,所有工作均需手动配置,对技术知识要求较高,普通用户较难完成。The above technical solution of manually deleting the IPC and then adding it has a redundant and complicated configuration process, and if the IPC is a third-party IPC, it is more troublesome. All work needs to be manually configured, which requires high technical knowledge and is difficult for ordinary users to complete.

因此,在NVR发生IP地址改变的情况时,使IPC自适应NVR的地址变更,减少IPC网络的相关配置,提升用户体验,降低配置成本,是亟需解决的问题。Therefore, when the IP address of the NVR changes, it is an urgent problem to make the IPC adapt to the address change of the NVR, reduce the related configuration of the IPC network, improve the user experience, and reduce the configuration cost.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种接入设备保持在线的方法及装置,在接入管理设备的IP地址发生变更时,接入设备能够自适应地始终保持在线状态,减少配置成本,提升用户体验。The purpose of the present invention is to provide a method and device for keeping an access device online. When the IP address of the access management device changes, the access device can adaptively keep online all the time, reducing configuration costs and improving user experience.

为了实现上述目的,本发明技术方案如下:In order to achieve the above object, the technical scheme of the present invention is as follows:

一种接入设备保持在线的方法,应用于接入管理设备,所述接入管理设备通过原IP地址添加了接入设备,所述接入设备保持在线的方法,包括:A method for keeping an access device online, applied to an access management device, where the access management device adds an access device through an original IP address, and the method for keeping the access device online includes:

通过动态地址分配协议DHCP获取IP地址,发生IP地址变更;Obtain an IP address through the dynamic address allocation protocol DHCP, and the IP address changes;

在判断已添加的接入设备不在线时,获取DHCP地址池;When judging that the added access device is not online, obtain the DHCP address pool;

将自身的IP地址修改为原IP地址,将已添加的接入设备的IP地址修改为获取到的DHCP地址池中的IP地址;Modify its own IP address to the original IP address, and modify the IP address of the added access device to the IP address in the obtained DHCP address pool;

接收接入设备修改IP地址成功的消息后,修改已添加的接入设备的配置为修改后的IP地址;After receiving the message that the access device has successfully modified the IP address, modify the configuration of the added access device to the modified IP address;

将自身的IP地址恢复为通过DHCP获取的IP地址。Restore its own IP address to the IP address obtained through DHCP.

进一步地,所述接入管理设备连接到DHCP服务器,所述通过动态地址分配协议DHCP获取IP地址,包括:Further, the access management device is connected to the DHCP server, and the obtaining the IP address through the dynamic address allocation protocol DHCP includes:

将获取IP地址的模式修改为DHCP模式;Change the mode of obtaining IP address to DHCP mode;

向DHCP服务器申请IP地址,接收DHCP服务器的响应获取IP地址。Apply to the DHCP server for an IP address, and receive the response from the DHCP server to obtain the IP address.

进一步地,所述通过动态地址分配协议DHCP获取到的IP地址,与获取的DHCP地址池为同一网段。Further, the IP address obtained through the dynamic address allocation protocol DHCP is in the same network segment as the obtained DHCP address pool.

进一步地,所述将自身的IP地址恢复为通过DHCP获取的IP地址,包括:Further, restoring the own IP address to the IP address obtained through DHCP includes:

在通过动态地址分配协议DHCP获取IP地址时,记录获取到的IP地址;When obtaining an IP address through the dynamic address allocation protocol DHCP, record the obtained IP address;

根据记录的IP地址,将自身的IP地址恢复为通过DHCP获取的IP地址。Based on the recorded IP address, restore its own IP address to the IP address obtained through DHCP.

进一步地,所述接入管理设备连接到DHCP服务器,所述将自身的IP地址恢复为通过DHCP获取的IP地址,包括:Further, the access management device is connected to the DHCP server, and the restoring its own IP address to the IP address obtained through DHCP includes:

通过DHCP服务器的地址租期,将自身的IP地址恢复为通过DHCP获取的IP地址。Through the address lease period of the DHCP server, restore its own IP address to the IP address obtained through DHCP.

本发明还提出了一种接入设备保持在线的装置,应用于接入管理设备,所述接入管理设备通过原IP地址添加了接入设备,所述接入设备保持在线的装置,包括:The present invention also provides a device for keeping an access device online, which is applied to an access management device. The access management device adds an access device through the original IP address, and the device for keeping the access device online includes:

DHCP模块,用于通过动态地址分配协议DHCP获取IP地址,发生IP地址变更;The DHCP module is used to obtain an IP address through the dynamic address allocation protocol DHCP, and the IP address changes;

地址请求模块,用于在判断已添加的接入设备不在线时,获取DHCP地址池;The address request module is used to obtain the DHCP address pool when judging that the added access device is offline;

地址修改模块,用于将自身的IP地址修改为原IP地址,将已添加的接入设备的IP地址修改为获取到的DHCP地址池中的IP地址;The address modification module is used to modify its own IP address to the original IP address, and to modify the IP address of the added access device to the IP address in the obtained DHCP address pool;

配置修改模块,用于接收接入设备修改IP地址成功的消息后,修改已添加的接入设备的配置为修改后的IP地址;The configuration modification module is used to modify the configuration of the added access device to the modified IP address after receiving the message that the access device has successfully modified the IP address;

恢复模块,用于将自身的IP地址恢复为通过DHCP获取的IP地址。The restoration module is used to restore its own IP address to the IP address obtained through DHCP.

进一步地,所述接入管理设备连接到DHCP服务器,所述DHCP模块通过动态地址分配协议DHCP获取IP地址,执行如下操作:Further, the access management device is connected to a DHCP server, and the DHCP module obtains the IP address through the dynamic address allocation protocol DHCP, and performs the following operations:

将获取IP地址的模式修改为DHCP模式;Change the mode of obtaining IP address to DHCP mode;

向DHCP服务器申请IP地址,接收DHCP服务器的响应获取IP地址。Apply to the DHCP server for an IP address, and receive the response from the DHCP server to obtain the IP address.

进一步地,所述通过动态地址分配协议DHCP获取到的IP地址,与获取的DHCP地址池为同一网段。Further, the IP address obtained through the dynamic address allocation protocol DHCP is in the same network segment as the obtained DHCP address pool.

进一步地,所述恢复模块将自身的IP地址恢复为通过DHCP获取的IP地址,执行如下操作:Further, the restoration module restores its own IP address to the IP address obtained through DHCP, and performs the following operations:

在通过动态地址分配协议DHCP获取IP地址时,记录获取到的IP地址;When obtaining an IP address through the dynamic address allocation protocol DHCP, record the obtained IP address;

根据记录的IP地址,将自身的IP地址恢复为通过DHCP获取的IP地址。Based on the recorded IP address, restore its own IP address to the IP address obtained through DHCP.

进一步地,所述接入管理设备连接到DHCP服务器,所述恢复模块将自身的IP地址恢复为通过DHCP获取的IP地址,执行如下操作:Further, the access management device is connected to the DHCP server, and the restoration module restores its own IP address to the IP address obtained through DHCP, and performs the following operations:

通过DHCP服务器的地址租期,将自身的IP地址恢复为通过DHCP获取的IP地址。Through the address lease period of the DHCP server, restore its own IP address to the IP address obtained through DHCP.

本发明提出的一种接入设备保持在线的方法及装置,接入管理设备在DHCP分配地址后,修改回原来的地址与原接入设备网络互通,并把接入设备修改为DHCP网段的地址,修改成功后再把接入管理设备修改回DHCP地址,以保证接入设备在接入管理设备上始终保持在线状态。此方法不仅减少了对接入设备的操作,减轻了接入管理设备上的手工配置,且显著提升了用户体验,降低了配置成本。The present invention provides a method and device for keeping an access device online. After an address is allocated by DHCP, the access management device modifies the original address to communicate with the original access device network, and modifies the access device to the DHCP network segment. After successful modification, change the access management device back to the DHCP address to ensure that the access device is always online on the access management device. This method not only reduces the operations on the access device and the manual configuration on the access management device, but also significantly improves the user experience and reduces the configuration cost.

附图说明Description of drawings

图1为本发明实施例视频监控网络组网示意图;1 is a schematic diagram of a video surveillance network networking according to an embodiment of the present invention;

图2为本发明接入设备保持在线的方法流程图;FIG. 2 is a flow chart of a method for keeping an access device online according to the present invention;

图3为本发明实施例设备交互流程图。FIG. 3 is a flowchart of device interaction according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明技术方案做进一步详细说明,以下实施例不构成对本发明的限定。The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments, and the following embodiments do not constitute a limitation of the present invention.

本发明技术方案主要适用于如下场景:接入管理设备添加接入设备后把接入设备改为静态地址再接入外网路由器时,接入管理设备动态获取IP地址导致IP地址变更,变更后的IP地址与接入设备不在同一网段。The technical solution of the present invention is mainly applicable to the following scenarios: when the access management device adds the access device and then changes the access device to a static address and then accesses the external network router, the access management device dynamically obtains the IP address and causes the IP address to change. The IP address is not in the same network segment as the access device.

容易理解的是,在视频监控系统中,NVR是接入管理设备,而IPC是接入设备。以下实施例以视频监控系统中的NVR和IPC为例进行说明,对于其他组网环境下的接入管理设备和接入设备,同样适用。It is easy to understand that in a video surveillance system, NVR is an access management device, and IPC is an access device. The following embodiments take NVRs and IPCs in a video surveillance system as examples for description, and the same applies to access management devices and access devices in other networking environments.

如图2所示,一种接入设备保持在线的方法实施例,应用于接入管理设备,所述接入管理设备通过原IP地址添加了接入设备。本实施例一种接入设备保持在线的方法,包括:As shown in FIG. 2 , an embodiment of a method for keeping an access device online is applied to an access management device that adds an access device through an original IP address. In this embodiment, a method for keeping an access device online includes:

通过动态地址分配协议DHCP获取IP地址,发生IP地址变更;Obtain an IP address through the dynamic address allocation protocol DHCP, and the IP address changes;

在判断已添加的接入设备不在线时,获取DHCP地址池;When judging that the added access device is not online, obtain the DHCP address pool;

将自身的IP地址修改为原IP地址,将已添加的接入设备的IP地址修改为获取到的DHCP地址池中的IP地址;Modify its own IP address to the original IP address, and modify the IP address of the added access device to the IP address in the obtained DHCP address pool;

接收接入设备修改IP地址成功的消息后,修改已添加的接入设备的配置为修改后的IP地址;After receiving the message that the access device has successfully modified the IP address, modify the configuration of the added access device to the modified IP address;

将自身的IP地址恢复为通过DHCP获取的IP地址。Restore its own IP address to the IP address obtained through DHCP.

本实施例技术方案以接入管理设备为例进行说明,接入管理设备已添加了接入设备,接入设备在接入管理设备上处于在线状态。此时接入管理设备配置有IP地址,将此时接入管理设备的IP地址称为原IP地址。一般情况下,此时接入设备被设置了静态IP地址,接入设备与接入管理设备同时接入到交换机,接入设备的IP地址与接入管理设备的原IP地址处于同一网段。The technical solution of this embodiment is described by taking an access management device as an example. An access device has been added to the access management device, and the access device is in an online state on the access management device. At this time, the access management device is configured with an IP address, and the IP address of the access management device at this time is called the original IP address. In general, the access device is set with a static IP address at this time, the access device and the access management device are connected to the switch at the same time, and the IP address of the access device and the original IP address of the access management device are in the same network segment.

以图1为例,此时接入管理设备NVR的IP地址为192.168.1.30,接入设备IPC1的IP地址为192.168.1.31,IPC2的IP地址为192.168.1.32,IPC3的IP地址为192.168.1.33。Taking Figure 1 as an example, the IP address of the access management device NVR is 192.168.1.30, the IP address of the access device IPC1 is 192.168.1.31, the IP address of IPC2 is 192.168.1.32, and the IP address of IPC3 is 192.168.1.33 .

在交换机接入到路由器后,路由器接入外网,路由器启用了DHCP,此时路由器为接入管理设备的DHCP服务器,为其下连接的设备动态分配IP地址。NVR上启用DHCP,即NVR将获取IP地址的模式修改为DHCP模式,即可动态从路由器获取IP地址。After the switch is connected to the router, the router is connected to the external network, and DHCP is enabled on the router. At this time, the router is the DHCP server of the access management device and dynamically assigns IP addresses to the connected devices. DHCP is enabled on the NVR, that is, the NVR changes the mode of obtaining an IP address to DHCP mode, and the IP address can be dynamically obtained from the router.

假设NVR通过DHCP从路由器获取的IP地址为192.168.0.100,关于NVR通过DHCP从路由器获取动态IP地址,已经是比较成熟的技术,这里不再赘述。Assuming that the IP address obtained by the NVR from the router through DHCP is 192.168.0.100, it is a relatively mature technology for the NVR to obtain a dynamic IP address from the router through DHCP, and will not be repeated here.

容易理解的是,NVR获取到新的IP地址为192.168.0.100,而NVR上已添加的接入设备(IPC1~IPC3)的IP地址192.168.1.**与NVR获得的新IP地址192.168.0.100不在同一网段内,那么此时将导致NVR与IPC的网络不通,具体表现为NVR搜索不到IPC,或ping不通IPC,也就是说在配置页面上发现原来添加的IPC不在线了。It is easy to understand that the new IP address obtained by the NVR is 192.168.0.100, and the IP addresses 192.168.1.** of the access devices (IPC1~IPC3) that have been added to the NVR and the new IP address obtained by the NVR are 192.168.0.100 If they are not in the same network segment, the network between the NVR and the IPC will be blocked at this time. The specific manifestation is that the NVR cannot search for the IPC, or the IPC cannot be pinged.

此时,接入管理设备判断接入的接入设备不在线,从路由器获取DHCP地址池,路由器返回DHCP地址池。接入管理设备将自身的IP地址修改回原IP地址,将已添加的接入设备的IP地址修改为获取到的DHCP地址池中的IP地址。At this time, the access management device determines that the connected access device is offline, obtains the DHCP address pool from the router, and the router returns the DHCP address pool. The access management device modifies its own IP address back to the original IP address, and modifies the IP address of the added access device to the IP address in the acquired DHCP address pool.

仍然以图1为例,NVR从路由器获取到DHCP地址池,假设路由器的DHCP地址池为192.168.0.100~192.168.0.254,其中192.168.0.100分配给了NVR,在NVR申请DHCP地址池时,可以从192.168.0.101~192.168.0.254中取出一段返还给NVR,返还的DHCP地址池大小根据NVR的通道数量来决定,NVR在向路由器申请DHCP地址池时可以申明需要的DHCP地址池大小。假设路由器返还的DHCP地址池为192.168.0.101~192.168.0.150。需要说明的是,分配给NVR的IP地址,与分配给NVR的DHCP地址池位于同一网段内。Still taking Figure 1 as an example, the NVR obtains the DHCP address pool from the router. Suppose the router's DHCP address pool is 192.168.0.100 to 192.168.0.254, of which 192.168.0.100 is assigned to the NVR. When the NVR applies for the DHCP address pool, it can be obtained from Take a section from 192.168.0.101 to 192.168.0.254 and return it to the NVR. The size of the returned DHCP address pool is determined according to the number of NVR channels. The NVR can declare the required size of the DHCP address pool when applying for the DHCP address pool from the router. Assume that the DHCP address pool returned by the router is 192.168.0.101 to 192.168.0.150. It should be noted that the IP address allocated to the NVR is located in the same network segment as the DHCP address pool allocated to the NVR.

由于NVR的新IP地址与已添加的IPC的IP地址不处于同一网段,因此,需要将NVR的IP地址修改回原(旧)地址,即将NVR获取IP地址的模式修改为静态模式,将IP地址修改回192.168.1.30。Since the new IP address of the NVR and the IP address of the added IPC are not in the same network segment, it is necessary to change the IP address of the NVR back to the original (old) address, that is, change the mode from which the NVR obtains the IP address to static mode, and change the IP address of the NVR to the static mode. The address is modified back to 192.168.1.30.

在修改为原(旧)地址后,NVR可以与已添加的IPC重新进行通信,此时NVR将已添加的IPC的IP地址修改为获取到的DHCP地址池192.168.0.101~192.168.0.150中的IP地址。After changing to the original (old) address, the NVR can re-communicate with the added IPC. At this time, the NVR changes the IP address of the added IPC to the IP in the obtained DHCP address pool 192.168.0.101~192.168.0.150 address.

例如,可将IPC1的IP地址修改为:192.168.0.101;将IPC2的IP地址修改为192.168.0.102,将IPC3的IP地址修改为192.168.0.103。For example, the IP address of IPC1 can be modified to: 192.168.0.101; the IP address of IPC2 can be modified to 192.168.0.102, and the IP address of IPC3 can be modified to 192.168.0.103.

关于接入管理设备NVR如何修改接入设备IPC的IP地址,已经是比较成熟的技术,这里不再赘述。How the access management device NVR modifies the IP address of the IPC of the access device is a relatively mature technology, and will not be repeated here.

完成接入设备IPC的IP地址修改后,接入管理设备NVR接收接入设备修改IP地址成功的消息后,修改已添加的接入设备IPC的配置为修改后的IP地址,将自身的IP地址恢复为通过DHCP获取的IP地址。After completing the modification of the IP address of the access device IPC, the access management device NVR, after receiving the message that the access device has successfully modified the IP address, modifies the IPC configuration of the added access device to the modified IP address, and sets its own IP address. Revert to the IP address obtained via DHCP.

以图1为例,NVR在收到IPC返回修改成功的消息后,在NVR上将已添加的IPC1~IPC3的配置更改为修改后的IP地址192.168.0.101~192.168.0.103。然后NVR将自身的IP地址修改为192.168.0.100,从而NVR与IPC处于同一网段,完成配置的修改,NVR与IPC能够正常通信。Taking Figure 1 as an example, after receiving the message that the modification is successful returned by the IPC, the NVR changes the configurations of the added IPC1 to IPC3 to the modified IP addresses 192.168.0.101 to 192.168.0.103 on the NVR. Then the NVR modifies its own IP address to 192.168.0.100, so that the NVR and the IPC are in the same network segment, the configuration modification is completed, and the NVR and the IPC can communicate normally.

其中,将自身的IP地址恢复为通过DHCP获取的IP地址,可以采用两种方式。There are two ways to restore the own IP address to the IP address obtained through DHCP.

在通过动态地址分配协议DHCP获取IP地址时,记录获取到的IP地址;根据记录的IP地址,将自身的IP地址恢复为通过DHCP获取的IP地址。When the IP address is obtained through the dynamic address allocation protocol DHCP, the obtained IP address is recorded; according to the recorded IP address, its own IP address is restored to the IP address obtained through DHCP.

或,通过DHCP服务器的地址租期,将自身的IP地址恢复为通过DHCP获取的IP地址。即NVR恢复为通过DHCP获取的IP地址,可以将NVR恢复为动态获取IP地址(DHCP)模式,并通过路由器的地址租期,恢复为通过DHCP获取的IP地址,即192.168.0.100。此为成熟的现有技术,这里不再赘述。Or, through the address lease period of the DHCP server, restore its own IP address to the IP address obtained through DHCP. That is, the NVR can be restored to the IP address obtained through DHCP, and the NVR can be restored to the dynamic IP address (DHCP) mode, and the IP address obtained through DHCP, namely 192.168.0.100, can be restored through the address lease period of the router. This is a mature prior art and will not be repeated here.

本发明不限于采用哪种方式来恢复为通过DHCP获取的IP地址,这里不再赘述。The present invention is not limited to which method is adopted to restore the IP address obtained through DHCP, which will not be repeated here.

如图3所示,NVR、路由器、IPC的交互过程,包括如下步骤:As shown in Figure 3, the interaction process of NVR, router and IPC includes the following steps:

F1、NVR向路由器获取DHCP地址;F1, NVR obtains DHCP address from router;

F2、路由器为NVR分配DHCP地址192.168.0.100;F2. The router assigns the DHCP address 192.168.0.100 to the NVR;

F3、判断IPC通道是否在线,即判断已添加的IPC是否在线,若不在线则进入下一步;F3. Determine whether the IPC channel is online, that is, determine whether the added IPC is online, if not, go to the next step;

F4、向路由器获取DHCP地址池;F4. Obtain the DHCP address pool from the router;

F5、路由器返回DHCP地址池;F5, the router returns the DHCP address pool;

F6、NVR修改IP地址为原(旧)地址192.168.1.30;F6. The NVR modifies the IP address to the original (old) address 192.168.1.30;

F7、修改IPC地址为DHCP网段地址;F7. Modify the IPC address to the DHCP network segment address;

F8、IPC返回修改成功消息;F8, IPC returns a successful modification message;

F9、NVR修改通道配置,即修改已添加的IPC的配置为修改后的IP地址;F9. The NVR modifies the channel configuration, that is, modifies the configuration of the added IPC to the modified IP address;

F10、NVR修改IP地址为DHCP地址192.168.0.100。F10, NVR modify the IP address to DHCP address 192.168.0.100.

与上述方法对应的,这里还给出了一种接入设备保持在线的装置的实施例,应用于接入管理设备,所述接入管理设备通过原IP地址添加了接入设备,所述接入设备保持在线的装置,包括:Corresponding to the above method, an embodiment of an apparatus for keeping an access device online is also provided here, which is applied to an access management device. The access management device adds an access device through the original IP address, and the access device Incoming devices are kept online, including:

DHCP模块,用于通过动态地址分配协议DHCP获取IP地址,发生IP地址变更;The DHCP module is used to obtain an IP address through the dynamic address allocation protocol DHCP, and the IP address changes;

地址请求模块,用于在判断已添加的接入设备不在线时,获取DHCP地址池;The address request module is used to obtain the DHCP address pool when judging that the added access device is offline;

地址修改模块,用于将自身的IP地址修改为原IP地址,将已添加的接入设备的IP地址修改为获取到的DHCP地址池中的IP地址;The address modification module is used to modify its own IP address to the original IP address, and to modify the IP address of the added access device to the IP address in the obtained DHCP address pool;

配置修改模块,用于接收接入设备修改IP地址成功的消息后,修改已添加的接入设备的配置为修改后的IP地址;The configuration modification module is used to modify the configuration of the added access device to the modified IP address after receiving the message that the access device has successfully modified the IP address;

恢复模块,用于将自身的IP地址恢复为通过DHCP获取的IP地址。The restoration module is used to restore its own IP address to the IP address obtained through DHCP.

本实施例是前述一种接入设备保持在线的方法对应的具体装置,在所述方法的描述中已经详细的阐述了技术方案的内容,这里仅以实施例的方式对本装置进行简要说明,不再详细阐述。This embodiment is a specific device corresponding to the aforementioned method for keeping an access device online. The content of the technical solution has been described in detail in the description of the method. Elaborate further.

本发明的一个实施例,所述接入管理设备连接到DHCP服务器,所述DHCP模块通过动态地址分配协议DHCP获取IP地址,执行如下操作:In an embodiment of the present invention, the access management device is connected to a DHCP server, and the DHCP module obtains an IP address through the dynamic address allocation protocol DHCP, and performs the following operations:

将获取IP地址的模式修改为DHCP模式;Change the mode of obtaining IP address to DHCP mode;

向DHCP服务器申请IP地址,接收DHCP服务器的响应获取IP地址。Apply to the DHCP server for an IP address, and receive the response from the DHCP server to obtain the IP address.

本发明的一个实施例,所述通过动态地址分配协议DHCP获取到的IP地址,与获取的DHCP地址池为同一网段。In an embodiment of the present invention, the IP address obtained through the dynamic address allocation protocol DHCP is in the same network segment as the obtained DHCP address pool.

本发明的一个实施例,所述恢复模块将自身的IP地址恢复为通过DHCP获取的IP地址,执行如下操作:In an embodiment of the present invention, the restoration module restores its own IP address to an IP address obtained through DHCP, and performs the following operations:

在通过动态地址分配协议DHCP获取IP地址时,记录获取到的IP地址;When obtaining an IP address through the dynamic address allocation protocol DHCP, record the obtained IP address;

根据记录的IP地址,将自身的IP地址恢复为通过DHCP获取的IP地址。Based on the recorded IP address, restore its own IP address to the IP address obtained through DHCP.

本发明的一个实施例,所述接入管理设备连接到DHCP服务器,所述恢复模块将自身的IP地址恢复为通过DHCP获取的IP地址,执行如下操作:In an embodiment of the present invention, the access management device is connected to a DHCP server, and the restoration module restores its own IP address to an IP address obtained through DHCP, and performs the following operations:

通过DHCP服务器的地址租期,将自身的IP地址恢复为通过DHCP获取的IP地址。Through the address lease period of the DHCP server, restore its own IP address to the IP address obtained through DHCP.

以上实施例仅用以说明本发明的技术方案而非对其进行限制,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention. deformation, but these corresponding changes and deformations should belong to the protection scope of the appended claims of the present invention.

Claims (10)

1. A method for keeping an access device on line is applied to an access management device, the access management device adds the access device through an original IP address, and the method for keeping the access device on line is characterized by comprising the following steps:
acquiring an IP address through a dynamic address allocation protocol (DHCP) and changing the IP address;
when the added access equipment is judged to be offline, a DHCP address pool is obtained;
modifying the IP address of the access equipment into an original IP address, and modifying the IP address of the added access equipment into the IP address in the acquired DHCP address pool;
after receiving the message that the access equipment successfully modifies the IP address, modifying the configuration of the added access equipment into the modified IP address;
and restoring the IP address of the user into the IP address acquired through the DHCP.
2. The method for maintaining the access device on-line according to claim 1, wherein the access management device is connected to a DHCP server, and the obtaining the IP address through a dynamic address assignment protocol DHCP comprises:
modifying the mode of acquiring the IP address into a DHCP mode;
and applying for an IP address from the DHCP server, and receiving a response of the DHCP server to acquire the IP address.
3. The method of claim 1, wherein the IP address obtained by using a dynamic address assignment protocol DHCP is in the same network segment as the obtained DHCP address pool.
4. The method for keeping the access device on line according to claim 1, wherein the restoring the own IP address to the IP address obtained through DHCP comprises:
when an IP address is obtained through a dynamic address allocation protocol (DHCP), the obtained IP address is recorded;
and according to the recorded IP address, restoring the IP address of the user to the IP address obtained through the DHCP.
5. The method for maintaining the access device on line according to claim 1, wherein the access management device connects to a DHCP server, and the restoring the IP address of the access management device to the IP address obtained through DHCP comprises:
and restoring the IP address of the server to the IP address acquired by the DHCP server through the address lease of the DHCP server.
6. A device for keeping access equipment on line is applied to access management equipment, the access management equipment adds access equipment through an original IP address, and is characterized in that the device for keeping access equipment on line comprises:
the DHCP module is used for acquiring an IP address through a dynamic address allocation protocol DHCP and changing the IP address;
the address request module is used for acquiring a DHCP address pool when the added access equipment is judged to be offline;
the address modification module is used for modifying the IP address of the address modification module into an original IP address and modifying the IP address of the added access equipment into the IP address in the acquired DHCP address pool;
the configuration modification module is used for modifying the configuration of the added access equipment into the modified IP address after receiving the message that the access equipment successfully modifies the IP address;
and the recovery module is used for recovering the IP address of the recovery module into the IP address obtained through the DHCP.
7. The apparatus of claim 6, wherein the access management device is connected to a DHCP server, and the DHCP module obtains an IP address through a dynamic address assignment protocol DHCP and performs the following operations:
modifying the mode of acquiring the IP address into a DHCP mode;
and applying for an IP address from the DHCP server, and receiving a response of the DHCP server to acquire the IP address.
8. The apparatus of claim 6, wherein the IP address obtained by dynamic address assignment protocol DHCP is in the same network segment as the obtained DHCP address pool.
9. The apparatus of claim 6, wherein the recovery module recovers its own IP address to an IP address obtained through DHCP, and performs the following operations:
when an IP address is obtained through a dynamic address allocation protocol (DHCP), the obtained IP address is recorded;
and according to the recorded IP address, restoring the IP address of the user to the IP address obtained through the DHCP.
10. The apparatus of claim 6, wherein the access management device is connected to a DHCP server, the recovery module recovers its own IP address to an IP address obtained through DHCP, and performs the following operations:
and restoring the IP address of the server to the IP address acquired by the DHCP server through the address lease of the DHCP server.
CN201811607157.5A 2018-12-27 2018-12-27 A method and device for keeping an access device online Active CN111385367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811607157.5A CN111385367B (en) 2018-12-27 2018-12-27 A method and device for keeping an access device online

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811607157.5A CN111385367B (en) 2018-12-27 2018-12-27 A method and device for keeping an access device online

Publications (2)

Publication Number Publication Date
CN111385367A true CN111385367A (en) 2020-07-07
CN111385367B CN111385367B (en) 2022-07-19

Family

ID=71219319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811607157.5A Active CN111385367B (en) 2018-12-27 2018-12-27 A method and device for keeping an access device online

Country Status (1)

Country Link
CN (1) CN111385367B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6466981B1 (en) * 1998-06-30 2002-10-15 Microsoft Corporation Method using an assigned dynamic IP address and automatically restoring the static IP address
CN1417973A (en) * 2002-11-01 2003-05-14 北京佳讯飞鸿电气有限责任公司 Method of altering network equipment IP address via network managing equipment
US20140280467A1 (en) * 2013-03-13 2014-09-18 Everfocus Electronics Corp. Method of managing port dhcp server protocol addresses
CN104601959A (en) * 2015-01-29 2015-05-06 浙江宇视科技有限公司 Video monitoring system and method for rapidly accessing web camera
CN108337333A (en) * 2018-03-23 2018-07-27 普联技术有限公司 IP address management method, management equipment, Network Personal Video Recorder and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6466981B1 (en) * 1998-06-30 2002-10-15 Microsoft Corporation Method using an assigned dynamic IP address and automatically restoring the static IP address
CN1417973A (en) * 2002-11-01 2003-05-14 北京佳讯飞鸿电气有限责任公司 Method of altering network equipment IP address via network managing equipment
US20140280467A1 (en) * 2013-03-13 2014-09-18 Everfocus Electronics Corp. Method of managing port dhcp server protocol addresses
CN104601959A (en) * 2015-01-29 2015-05-06 浙江宇视科技有限公司 Video monitoring system and method for rapidly accessing web camera
CN108337333A (en) * 2018-03-23 2018-07-27 普联技术有限公司 IP address management method, management equipment, Network Personal Video Recorder and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖婷婷: "NVR网络通信系统的设计", 《中国优秀硕士学位论文全文数据库•信息科技辑》 *

Also Published As

Publication number Publication date
CN111385367B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN110677405B (en) Data processing method and device, electronic equipment and storage medium
CN104883547B (en) Method and NVR based on network access equipment physical port access IPC
TW202021315A (en) Network service system and network service method
WO2021184551A1 (en) Communication method and apparatus based on plurality of networks, electronic device, and storage medium
US20100281146A1 (en) Dynamic domain name service system and automatic registration method
EP3547748A1 (en) Method and system for guiding service application traffic
TW202021314A (en) Network service system and network service method
WO2021121040A1 (en) Broadband access method and apparatus, device, and storage medium
CN110633046A (en) A storage method, device, storage device and storage medium for a distributed system
CN107517277B (en) A method and device for realizing sanlock lock
CN112583868B (en) Backup method, device, equipment and medium for cloud storage data
CN101621526B (en) iSCSI method and apparatus for preventing useless connection from occupying system resources
CN105407148A (en) Network data synchronization method, device and system based on client
CN107341036A (en) A kind of method and apparatus of Remote Installation node operating system
CN105323128B (en) Method, device and system for connecting front-end equipment to server
US8266257B1 (en) Systems and methods for reducing the amount of time required to reconnect to a computing network
CN111385367B (en) A method and device for keeping an access device online
CN116107781A (en) Log tracking method, device, electronic equipment and computer program product
CN102495987B (en) The method and system of the anti-access of divulging a secret in a kind of electronic information this locality
CN110659080B (en) Page display method, device, electronic device and storage medium
US20120198445A1 (en) Playing television program in virtual environment
WO2016179960A1 (en) Domain name system (dns) resolution processing method and device
US9450910B2 (en) Network address allocation
JP7559260B2 (en) Location-based service data processing method and apparatus - Patents.com
CN101963919A (en) Progress management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant