CN103945016A - DHCP server active-standby redundancy method and system - Google Patents

DHCP server active-standby redundancy method and system Download PDF

Info

Publication number
CN103945016A
CN103945016A CN 201410145280 CN201410145280A CN103945016A CN 103945016 A CN103945016 A CN 103945016A CN 201410145280 CN201410145280 CN 201410145280 CN 201410145280 A CN201410145280 A CN 201410145280A CN 103945016 A CN103945016 A CN 103945016A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
server
dhcp
dhcp server
standby
backup
Prior art date
Application number
CN 201410145280
Other languages
Chinese (zh)
Other versions
CN103945016B (en )
Inventor
江少广
王宏
濮斌
苏静
Original Assignee
江苏物联网研究发展中心
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

Links

Abstract

The invention provides a DHCP server active-standby redundancy method and system. The method includes the steps that a main DHCP server and a standby DHCP server are started, and share an IP address pool; if the main DHCP server works, the main DHCP server collaborates with the standby DHCP server to obtain a standby server list; the main DHCP server synchronizes the obtained standby server list to the standby DHCP server on the standby server list; when the main DHCP server breaks down, the standby DHCP server on the standby server list carries out switching and judgment, and the standby DHCP server meeting switching conditions is switched to serve as the main DHCP server to work on the basis of the IP address pool. Under the situation of DHCP server active-standby redundancy, IP addresses are fully used.

Description

—种DHCP服务器主备冗余的方法和系统 - kind of method the DHCP server and standby redundant system

技术领域 FIELD

[0001] 本发明涉及动态主机配置协议DHCP服务器主备切换领域,尤其涉及一种DHCP服务器冗余的方法和系统。 [0001] The present invention relates to a dynamic host configuration protocol DHCP server standby switch, and more particularly, to a method and a DHCP server redundancy system.

背景技术 Background technique

[0002] 随着计算机网络的广泛应用以及网络规模的不断扩大,网络的维护和管理工作越来越困难和繁杂,因此一系列的管理和配置协议被提出来用于网络的自动化管理。 [0002] With the extensive use of computer networks and network size continues to expand, network maintenance and management increasingly difficult and complex, and therefore a series of management and configuration protocols have been proposed for the automated management to the network. 在1993年10月,动态主机配置协议DHCP成为标准协议,用于IP地址的自动分配。 In October 1993, Dynamic Host Configuration Protocol (DHCP) become the standard protocol used to automatically assign IP addresses.

[0003] 网络内的主机按照DHCP协议的规定向DHCP服务器获取自己的IP地址以及网络网关、DNS服务器地址等信息。 [0003] hosts within the network to get information its own IP address and network gateway, DNS server address from the DHCP server in accordance with the provisions of the DHCP protocol. DHCP协议是在RFC2131中定义的,此规范定义了DHCP服务器和客户端之间的交互标准。 DHCP is a protocol defined in RFC2131, the standard specification defines the interaction between the DHCP server and the client.

[0004] 在RFC2131中对同一局域网存在多个DHCP服务器的情况作了说明。 Case [0004] there are multiple DHCP servers on the same LAN has been described in RFC2131. 在RFC2131文档的描述中,每个DHCP服务器拥有的IP地址范围是不交叉的,也就是DHCP服务器之间独立工作。 In the description RFC2131 document, each DHCP server has an IP address range is not crossed, that is, to work independently between the DHCP server. 每台DHCP服务器接收到客户端发送的DHCPDISC0VER广播报文后,会给客户端发送本服务器地址池里空闲的IP地址,客户端在这些不同的DHCP0FFER中选择一个可用的IP地址。 After each DHCPDISC0VER DHCP server receives the broadcast packets sent by the client, the client will send the IP address of the server address pool idle client selects an IP address available in these various DHCP0FFER.

[0005] 在大型网络中,为了保证DHCP服务的可靠性,需要实现DHCP服务器的冗余。 [0005] In large networks, in order to ensure the reliability of DHCP services, that redundant DHCP server. 一般的做法是,按照8:2的比例对网络中总可用IP地址池进行划分,其中80%的IP地址分配给主服务器,20%的IP地址分配给备份服务器。 The general practice is, in accordance with 8: 2 ratio of the total available network IP address pool to be divided, where 80% of the IP address assigned to the primary server, 20% of the IP address assigned to the backup server. 当主DHCP服务器发生故障后,由备份DHCP服务器使用剩余的20%IP地址给客户端提供服务。 When the master DHCP server fails, using the remaining 20% ​​IP address by the DHCP server to the client the backup service. 这种机制在一定程度上满足了备份的需求,然而此方法无论是主DHCP服务器工作还是备用DHCP服务器工作,可分配给DHCP客户端的IP地址均只是部分IP地址,从而导致了IP地址的浪费。 This mechanism in some extent to meet the needs of backup, but this method either primary DHCP server is working or standby DHCP server is working, can be assigned to the DHCP client IP addresses are only part of the IP address, resulting in the waste of IP addresses.

发明内容 SUMMARY

[0006] 本发明提供了一种DHCP服务器主备冗余的方法和系统,以解决如何在DHCP服务器主备冗余的情况下,充分利用IP地址的技术问题。 [0006] The present invention provides a DHCP server standby redundancy method and system to solve the technical problem of how the DHCP server in the case of standby redundancy, make full use of the IP address.

[0007] 为解决上述技术问题,本发明一种DHCP服务器冗余的方法,所述方法包括: [0007] To solve the above technical problem, the present invention DHCP server redundancy, the method comprising:

[0008] 主DHCP服务器和备用DHCP服务器启动,所述主DHCP服务器和备用DHCP服务器共享IP地址池; [0008] DHCP server and standby master DHCP server startup, the master DHCP server and standby server is shared DHCP IP address pool;

[0009] 若主DHCP服务器工作,主DHCP服务器协同备用DHCP服务器获取备用服务器列表; [0009] If the primary work DHCP server, DHCP server synergistic standby master DHCP server acquires a list of the backup server;

[0010] 主DHCP服务器将获取的备用服务器列表同步至所述备用服务器列表上的备用DHCP服务器; [0010] The master DHCP server acquires the synchronization list of the backup server to the standby server DHCP server on the spare list;

[0011] 当主DHCP服务器出现故障后,由所述备用服务器列表上的备用DHCP服务器进行切换判断,由符合切换条件的备用DHCP服务器切换为主DHCP服务器继续基于所述IP地址池工作。 [0011] When the master DHCP server fails, the standby switch is determined by the DHCP server on the backup server list, switching from the standby switching condition compliant DHCP server based continue to operate based on the DHCP server IP address pool. [0012] 进一步地,所述主DHCP服务器协同备用服务器获取备用服务器列表,包括: [0012] Furthermore, the master DHCP server synergistic standby server acquires a list of backup server, comprising:

[0013] 主DHCP服务器定时广播心跳包; [0013] DHCP server is a timing master broadcasts a heartbeat packet;

[0014] 接收到主DHCP服务器广播的心跳包的备用DHCP服务器向主DHCP服务器返回单播心跳包; [0014] DHCP server receives the master broadcasting heartbeat packets to the backup master DHCP server returns the DHCP server unicast heartbeat packet;

[0015] 若主DHCP服务器接收到来自备用DHCP服务器返回的单播心跳包,则将该备用DHCP服务器存储进备用服务器列表; [0015] When the master DHCP server receives the DHCP server returns from the standby heartbeat unicast packet, the DHCP server stored into the standby standby server list;

[0016] 若主DHCP在预设时间内没有接收来自到备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对应的备用DHCP服务器从所述备用服务器列表中删除。 [0016] If the master is not received from the DHCP server to the standby list existing standby unicast DHCP server heartbeat packets returned within a preset time, then the corresponding alternate DHCP server from the backup server list.

[0017] 进一步地,所述当主DHCP服务器出现故障后,由所述备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续使用所述IP地址池提供服务,包括: [0017] Further, when the master DHCP server fails, the standby switch is determined by the DHCP server to the standby server on the list, when the switching condition is meet, the main switch of the DHCP server IP address pool continue to provide services ,include:

[0018] 当主DHCP服务器出现故障后,接收到所述备用服务器列表的备用DHCP服务器在备用服务器列表查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器; [0018] When the master DHCP server fails, standby server receives the DHCP server looks up the list of standby backup server IP address corresponding to the minimum in the list of alternate servers, that determines whether or not standby server itself, if so, switching is itself primary DHCP server;

[0019] 若备用服务器切换为主DHCP服务器失败,再由备用服务器列表中除该备用服务器之外的备用服务器在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器。 [0019] When the standby switch based server DHCP server fails, standby server other than the backup server and divide by the backup server list to find the IP address of the backup server corresponding to the minimum in the list of alternate servers, backup servers until successful handover is found primary DHCP server or backup server list no alternate servers available to find.

[0020] 进一步地,所述方法还包括: [0020] Preferably, the method further comprising:

[0021] 主DHCP服务器在工作后为DHCP客户端提供服务过程中生成的DHCP租约文件、DHCP历史租约缓存文件; Process [0021] primary DHCP server to provide DHCP services to clients in the working file generated DHCP lease, DHCP lease history cache file;

[0022] 当主DHCP服务器在判断出获取的备用服务器列表、DHCP租约文件和DHCP历史租约缓存文件三者中至少有一个发生变化后,将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器; [0022] When the content of the master DHCP server determines that the standby server list acquired, DHCP leases file and DHCP history lease cache file of the three least one changed after the update synchronization to the standby DHCP on the latest backup server list server;

[0023] 待备用服务器列表上的备用DHCP服务器切换为主DHCP服务器后,还基于DHCP租约文件、DHCP历史租约缓存文件工作。 After the [0023] secondary DHCP server on the list to be the standby server switch-based DHCP server, DHCP lease file is further based, DHCP lease history cache file work.

[0024] 进一步地,所述备用DHCP服务器切换为主DHCP服务器后,还包括: After [0024] Further, the standby switch based DHCP server a DHCP server, further comprising:

[0025] 切换后的主DHCP服务器绑定切换前的主DHCP服务器使用的虚拟IP地址。 [0025] After switching the primary binding virtual IP address the DHCP server before the switching of the master DHCP server.

[0026] 进一步地,所述方法还包括: [0026] Preferably, the method further comprising:

[0027] 若主DHCP服务器不工作,备用DHCP服务器建立包含自身IP地址的可用服务器列表,并广播心跳包; [0027] When the master DHCP server is not working, secondary DHCP server establishes a list of available servers including its own IP address, and broadcasts the heartbeat packet;

[0028] 所述备用服务器接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包; [0028] The backup server after receiving a heartbeat packet from the other backup servers broadcast, to the backup server broadcasts the heartbeat packet is returned unicast heartbeat packet;

[0029] 若备用服务器接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表; [0029] When the backup server receives from another DHCP server returns the standby heartbeat unicast packet, the DHCP server other backup storage into the list of available servers;

[0030] 备用DHCP服务器在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器; [0030] In the standby DHCP server list of available servers to find the IP address corresponding to the minimum standby DHCP server, the standby for judging whether a DHCP server, and if so, switch to the master DHCP server itself;

[0031] 若备用服务器切换为主DHCP服务器失败,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器;[0032] 接收到主DHCP服务器定时广播的心跳包后,备用DHCP服务器停止广播心跳包,向该主DHCP服务器返回单播心跳包。 [0031] When the standby switch based server DHCP server fails, standby server and then the list of available servers other than the backup server to find the minimum backup server IP address corresponding to the list of available servers, backup servers until successful handover is found master DHCP server; [0032] Upon receiving the heartbeat packet timing of the master broadcasts a DHCP server, DHCP server backup stop broadcasting the heartbeat packet to the master DHCP server returns a unicast heartbeat packet.

[0033] 为解决上述技术问题,本发明还提供了一种DHCP服务器冗余系统,所述系统包括主DHCP服务器和与主DHCP服务器共享IP地址池的备用DHCP服务器,其中, [0033] In order to solve the above technical problem, the present invention further provides a DHCP server redundancy, the system comprising a master DHCP server and IP address pool shared with the backup master DHCP server a DHCP server, wherein,

[0034] 所述主DHCP服务器,用于在其启动并工作后,协同备用DHCP服务器获取备用服务器列表;将获取的备用服务器列表同步至所述备用服务器列表中的备用DHCP服务器; [0034] The master DHCP server, and after it starts to work, the DHCP server acquires synergy standby backup server list; a list of the acquired synchronization of the backup server to the standby server list standby DHCP server;

[0035] 所述备用DHCP服务器,用于协同主DHCP服务器获取备用服务器列表;接收主DHCP服务器发送的备用服务器列表;并当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续基于所述IP地址池工作。 [0035] The standby DHCP server, the DHCP server for the cooperative master acquires a list of the backup server; receiving standby server list sent by the master DHCP server; and, when the master DHCP server fails, the standby switch is determined by the DHCP server on the backup server list when the switching condition is meet, the main switch of the DHCP server continues to operate based on the IP address pool.

[0036] 进一步地,主DHCP服务器与备用DHCP服务器协同获取备用服务器列表,包括: [0036] Further, the master DHCP server and the DHCP server synergistic standby backup server acquires list, comprising:

[0037] 主DHCP服务器,用于定时广播心跳包;接收到来自备用DHCP服务器返回的单播心跳包后,将该备用DHCP服务器存储进备用服务器列表;若在预设时间内没有接收到来自备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对于的备用DHCP服务器从所述备用服务器列表中删除; [0037] The master DHCP server, the timing for the broadcast heartbeat packet; receiving the heartbeat packet from the unicast DHCP server returns to standby, the standby DHCP server stores the list into the standby server; if not received within a predetermined time from the backup unicast server list heartbeat packets existing backup server returns the DHCP, the DHCP server will delete the backup for the backup server from the list;

[0038] 备用DHCP服务器,用于接收到主DHCP服务器广播的心跳包后,向主DHCP服务器返回单播心跳包。 After the [0038] secondary DHCP server to receive a heartbeat packet master broadcasts a DHCP server, the DHCP server returns to the main heartbeat unicast packets.

[0039] 进一步地,所述备用DHCP服务器,用于当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续使用所述IP地址池提供服务,包括: [0039] Further, the standby DHCP server, DHCP is used when the primary server fails, the standby switch is determined by the DHCP server on the backup server list, when the switching condition is meet, the main switch of the DHCP server to continue using IP address pools provide services, including:

[0040] 所述备用DHCP服务器,用于在判断出主DHCP服务器出现故障后,由接收到所述备用服务器列表的备用DHCP服务器在备用服务器列表查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败时,由备用服务器列表中除该备用服务器之外的备用服务器继续在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器。 [0040] The secondary DHCP server for, after determining that the master DHCP server fails, the backup server receives the DHCP server looks up the list of standby backup server IP address corresponding to the minimum in the list of alternate servers, determines whether it is the backup server, and if so, switch to the master DHCP server itself; and when it is judged to switch the standby server based DHCP server fails, the backup server to continue to find the list server other than the backup server at the backup server a list of alternate the smallest IP address corresponding to the backup server, backup server until you find success switch-based DHCP server or backup server in the list are not available, look for the backup server.

[0041] 进一步地,其特征在于, [0041] Further, characterized in that,

[0042] 所述主DHCP服务器,还用于在工作后为DHCP客户端提供服务过程中生成DHCP租约信息、DHCP历史租约缓存文件;以及在判断出获取的备用服务器列表、DHCP租约信息和DHCP历史租约缓存文件三者中至少有一个发生变化后,将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器; [0042] The master DHCP server is further configured to provide service information generated during DHCP lease to the DHCP client after working, DHCP lease cache file history; and it is determined that the standby server list acquisition, DHCP and DHCP lease information history lease three cache file at least after a change occurs, the updated content synchronized to the standby DHCP server on the latest backup server list;

[0043] 所述备用服务器列表上的备用DHCP服务器,还用于切换为主DHCP服务器后,基于DHCP租约文件和DHCP历史租约缓存文件工作。 After the [0043] secondary DHCP server on the list standby server is further configured to switch to the master DHCP server, DHCP lease based on work history and DHCP leases file cache file.

[0044] 进一步地, [0044] Further,

[0045] 所述备用服务器,还用于将自身切换为主DHCP服务器后,绑定切换前的主DHCP服务器使用的虚拟IP地址。 The [0045] The backup server is further configured to switch itself mainly after the DHCP server, the IP address of the virtual master before the handover binding DHCP server.

[0046] 进一步地,其特征在于, [0046] Further, characterized in that,

[0047] 所述备用DHCP服务器,还用于在判断出主DHCP服务器不工作后,建立包含自身IP地址的可用服务器列表,并广播心跳包;接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包;若接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表;在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败后,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器;接收到主DHCP服务器定时广播的心跳包后,备用DHCP服务器停止广播心跳包,向该主DHCP服务 [0047] The standby DHCP server is further configured to, after it is determined that the master DHCP server is not working, the establishment of a list of available server contains its own IP address, and broadcasts the heartbeat packet; receiving a heartbeat packet from the other backup servers broadcast to broadcasting the heartbeat packet standby server returns a unicast heartbeat packet; if the received heartbeat packet from the unicast DHCP server returns the other backup, then the other backup DHCP server stored into the list of available servers; find the minimum in the list of available servers IP DHCP server address corresponding to alternate, that alternate judging whether a DHCP server, and if so, switch to the master DHCP server itself; and the backup server after the handover is judged based DHCP server failed, then in addition to the list of available servers standby server other than the backup server backup server to find the IP address corresponding to the smallest in the list of available servers, the standby server until it finds a DHCP server based successful handover; heartbeat packet after receiving the timing of the master broadcasts a DHCP server, DHCP server stops broadcasting standby heartbeat packet to the main DHCP service 器返回单播心跳包。 Unicast return heartbeat packet.

[0048] 上述实施方案主、备DHCP服务器使用相同的存储了全部IP地址的地址池,保证了无论是主服务器工作,还是备用服务器工作均能利用到全部IP地址,提供了IP地址的利用率。 [0048] The above-described embodiments, the main and standby DHCP server stores all of the same address pool of IP addresses to ensure that both master work, or could work using the backup server to the IP addresses, IP address provided utilization .

附图说明 BRIEF DESCRIPTION

[0049] 图1为本实施例的DHCP服务器主备冗余的方法流程图; The method of the DHCP server [0049] Figure 1 is an embodiment of a flow chart of standby redundancy;

[0050] 图2为本实施例的DHCP服务器主备冗余的系统组成图。 DHCP server according to standby redundant system components of FIG. [0050] FIG. 2 of the present embodiment.

具体实施方式 Detailed ways

[0051] 为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。 [0051] To make the objectives, technical solutions, and advantages of the present invention will become apparent from, the accompanying drawings hereinafter in conjunction with embodiments of the present invention will be described in detail. 需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。 Incidentally, in the case of no conflict, embodiments and features of the embodiments of the present application may be arbitrarily combined with each other.

[0052] 图1为本实施例的DHCP服务器主备冗余的方法流程图。 Method standby redundant DHCP server [0052] Figure 1 is a flow chart of an embodiment.

[0053] SlOl主DHCP服务器和备用DHCP服务器启动,所述主DHCP服务器和备用DHCP服务器共享IP地址池; [0053] SlOl master DHCP server and the DHCP server startup standby, the standby master DHCP server and the DHCP server IP address pool shared;

[0054] 为每个DHCP服务器设置配置文件,配置文件包含主备用标识、IP地址租约时长、IP地址池信息;DHCP服务器根据配置文件启动; [0054] provided for each DHCP server configuration file, the configuration file includes a main standby identification, IP address lease duration, the IP address pool information; DHCP server starts a configuration file;

[0055] S102判断主DHCP服务器是否工作,如果工作,执行步骤S103;否则,执行步骤S104; [0055] S102 determines whether the DHCP server master work, if the work is performed in step S103; otherwise, to step S104;

[0056] S103主DHCP服务器协同备用DHCP服务器获取备用服务器列表,执行S105 ; [0056] S103 synergistic standby master DHCP server DHCP server to obtain a list of alternate servers, performing S105;

[0057] 主DHCP服务器协同备用DHCP服务器获取备用服务器列表的方法包括:主DHCP服务器定时广播心跳包;接收到主DHCP服务器广播的心跳包的备用DHCP服务器向主DHCP服务器返回单播心跳包;若主DHCP服务器接收到来自备用DHCP服务器返回的单播心跳包,则将该备用DHCP服务器存储进备用服务器列表;若主DHCP在预设时间内没有接收来自到备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对应的备用DHCP服务器从所述备用服务器列表中删除; [0057] The master DHCP server Collaborative secondary DHCP server obtains the backup server a list comprising: a master DHCP server time broadcast heartbeat packet; receiving a heartbeat packet master DHCP server broadcast secondary DHCP server returns a unicast heartbeat packet to the master DHCP server; if master DHCP server receives the unicast heartbeat packet from the backup server returns the DHCP, the DHCP server is stored into the standby standby server list; prior to the backup server from the list if the master is not received within a predetermined DHCP standby time DHCP server returned unicast heartbeat packet, then the corresponding alternate DHCP server from the backup server list;

[0058] 在主DHCP服务器工作后,主DHCP服务器为DHCP客户端提供IP出租服务,并生成DHCP租约文件、DHCP历史租约缓存文件;所述租约文件包含多个租约条目,每个租约条目均记录IP地址、租约生效时间、租约结束时间、绑定的MAC地址、客户主机名、状态信息;其中,IP地址为租出的IP地址、租约生效时间和租约结束时间记录的是对应租出IP地址的有效时间范围、绑定的MAC地址记录的是租用此IP的网卡地址、状态记录了本租约条目是否发生改变,例如客户端是否延长了租约以便继续使用这个IP地址。 [0058] After the master DHCP server working, the master DHCP server to the DHCP client IP rentals, documents and generate DHCP lease, DHCP lease history cache file; leases file comprises a plurality of said lease entries, each entry is recorded lease IP address, the effective time of the lease, the lease ends, binding the MAC address, client host name, the state information; wherein, the IP address of the IP address leased, lease effective time and end time of the lease is recorded corresponding to the IP address lease valid time range, bound MAC address record leased the IP address of the network adapter, whether to change the present state of the record entry for the lease, such as whether the client to continue to extend the lease this IP address. 当DHCP客户端不再使用这个租约条目或者租约条目过期之后,主DHCP服务器从租约文件中删除该租约条目,把这该租约条目添加到DHCP历史租约缓存文件; When the DHCP client is no longer using this entry lease or lease expired entry, the master DHCP server to delete the entry from the lease lease file, add this entry to the lease DHCP lease history cache file;

[0059] S104备用DHCP服务器选择一个服务器作为工作的主DHCP服务器,执行步骤S103 ; [0059] S104 to select a standby server DHCP server as a working master DHCP server performs step S103;

[0060] 从备用DHCP服务器中选择一个服务器作为工作的主DHCP服务器,包括: [0060] Select a backup server from the DHCP server as a DHCP server master work, comprising:

[0061] 备用DHCP服务器建立包含自身IP地址的可用服务器列表,并广播心跳包;所述备用服务器接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包; [0061] DHCP server to establish a list of available standby server that contains its own IP address, and broadcasts the heartbeat packet; the backup server after receiving a heartbeat packet from the other backup servers broadcasts, broadcasts the heartbeat packet to the backup server returns a unicast heartbeat packet ;

[0062] 若备用服务器接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表; [0062] When the backup server receives from another DHCP server returns the standby heartbeat unicast packet, the DHCP server other backup storage into the list of available servers;

[0063] 备用DHCP服务器在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器; [0063] In the standby DHCP server list of available servers to find the IP address corresponding to the minimum standby DHCP server, the standby for judging whether a DHCP server, and if so, switch to the master DHCP server itself;

[0064] 若备用服务器切换为主DHCP服务器失败,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器; [0064] When the standby switch based server DHCP server fails, standby server and then the list of available servers other than the backup server to find the minimum backup server IP address corresponding to the list of available servers, backup servers until successful handover is found primary DHCP server;

[0065] 切换后的主DHCP服务器继续定时广播心跳包,接收到主DHCP服务器定时广播的心跳包后,备用DHCP服务器停止广播心跳包,向该主DHCP服务器返回单播心跳包; After [0065] the DHCP server continues switchover time broadcast heartbeat packet received heartbeat packet timing of the master broadcasts a DHCP server, DHCP server backup stop broadcasting the heartbeat packet and returns a unicast DHCP server heartbeat packet to the master;

[0066] 主、备用DHCP服务器在广播心跳包时,还可将主备用标识一同广播,以使接收到心跳包的备用DHCP服务器判断广播的心跳包来自主DHCP服务器还是备用DHCP服务器; [0066] primary, secondary DHCP server broadcasting the heartbeat packet may also be broadcast with identification primary spare, the heartbeat packet to the reception standby DHCP server determines the heartbeat packet from the master broadcasts a DHCP server or a DHCP server standby;

[0067] S105主DHCP服务器将获取的备用服务器列表同步至备用服务器列表上的备用DHCP服务器; [0067] S105 master DHCP server will obtain a list of the backup server to the standby synchronization DHCP server on the backup server list;

[0068] S106备用服务器列表上的备用DHCP服务器判断主DHCP是否出现故障,如果出现故障,由所述备用服务器列表上的备用DHCP服务器进行切换判断,由符合切换条件的备用DHCP服务器切换为主DHCP服务器继续基于所述IP地址池工作; [0068] DHCP server on the backup server list S106 determines whether the standby master DHCP fails if there is failure, the standby switch is determined by the DHCP server on the backup server list, switching from the standby switching condition compliant DHCP server based DHCP based on the IP address of the server to continue operation of the cell;

[0069] 备用服务器判断主DHCP服务器出现故障的方法为:当备用服务器在第一预设时长间内没有接收到主DHCP服务器发送的信号,如广播的心跳包,则认为主DHCP服务器出现 [0069] The method of determining the primary backup server DHCP server fails to: when the server does not receive the standby signal sent by the master DHCP server within the predetermined duration between the first, the heartbeat broadcast packet, the master DHCP server that appears

故障; malfunction;

[0070] 当备用服务器列表中的备用DHCP服务器判断出主DHCP服务器出现故障后,查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器; [0070] When the standby list server standby DHCP server determines that the failure of the master DHCP server, the standby server to find the IP address corresponding to a minimum, that determines whether or not standby server itself, if so, switch to the master DHCP server itself;

[0071] 如果备用服务器列表中的备用DHCP服务器判断出备用服务器切换为主DHCP服务器失败,再由备用服务器列表中除该备用服务器之外的备用服务器在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器;判断备用服务器切换为主DHCP服务器失败的方法为:在第二预设时长没有接收到主DHCP服务器发送的信号则判断切换失败,其中,第二预设时长比第一预设时长持续的时间长。 [0071] If the secondary server list spare backup server DHCP server determines that the handover failure based DHCP server, and then find the minimum of the corresponding IP address in the spare backup by the backup server list server list server other than the backup server backup server, until it finds a successful handover standby server based DHCP server or an alternate server list to find no available backup server; Analyzing standby server switch-based method failed DHCP server: length is not received when the second predetermined primary DHCP signal sent by the server determines that a handover failure, wherein the second length is longer than the predetermined long duration of the first predetermined time.

[0072] 在其他实施例中,为保证主备服务器的平滑切换,主DHCP服务器需要将在工作后为DHCP客户端提供服务过程中生成的DHCP租约文件、DHCP历史租约缓存文件同步至所述备用服务器列表上的备用DHCP服务器;当主DHCP服务器在判断出获取的备用服务器列表、DHCP租约文件和DHCP历史租约缓存文件三者中至少有一个发生变化后,即将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器。 [0072] In other embodiments, in order to ensure a smooth handover standby server, the master DHCP server needs to provide the service process file generated DHCP lease to the DHCP client after working, DHCP lease history cache file synchronization to the standby secondary DHCP server on the server list; when the contents of the primary DHCP server determines that an alternate server list acquisition, DHCP leases file and DHCP history lease cache file of the three least one change after the upcoming update synchronization to the latest backup server alternate DHCP server on the list. 待备用服务器列表上的备用DHCP服务器切换为主DHCP服务器后,基于DHCP租约文件、DHCP历史租约缓存文件和IP地址池工作。 After secondary DHCP server on the backup server list to be switched based DHCP server, based on the work of DHCP lease files, cache files and DHCP lease history IP address pool.

[0073] 进一步地,为保征主备DHCP服务器切换动作对客户端透明,可在备用DHCP服务器切换为主DHCP服务器后,继续使用与切换前的主DHCP服务器相同的虚拟IP地址,这样无论主备DHCP服务器如何切换,与DHCP客户端进行通信的服务器虚拟IP地址唯一,不会中断DHCP客服端的业务。 After [0073] Further, as a guarantee for the switching operation of the primary and the DHCP server transparent to the client, the DHCP server may be based on the standby switch DHCP server, DHCP continue to use the main switch before the same virtual IP address of the server, so that both the main how to prepare to switch DHCP server, DHCP server in communication with the virtual IP address unique client, DHCP will not be interrupted customer service side of the business.

[0074] 当主DHCP服务器发生切换后,由于主DHCP的MAC地址发生切换,需要通知DHCP客户端更新主DHCP服务器的MAC地址,以维持DHCP客户端与DHCP服务器之间的网络连接。 [0074] When the master DHCP server switching occurs, since the MAC address of the main switching occurs DHCP, the DHCP client needs to notify the MAC address of the master DHCP server is updated to maintain the network connectivity between the DHCP client and the DHCP server.

[0075] 图2为本实施例的DHCP服务器冗余的系统组成图。 DHCP server redundancy system composition according to FIG. [0075] FIG. 2 of the present embodiment.

[0076] 该系统包括主DHCP服务器和与主DHCP服务器共享IP地址池的备用DHCP服务器,其中, [0076] The system includes a master DHCP server and IP address pool shared with the backup master DHCP server a DHCP server, wherein,

[0077] 主DHCP服务器,用于在其启动并工作后,协同备用DHCP服务器获取备用服务器列表;以及将获取的备用服务器列表同步至所述备用服务器列表中的备用DHCP服务器; [0077] The master DHCP server, and after it starts to work, the DHCP server acquires synergy standby backup server list; and a list of the acquired synchronization of the backup server to the standby server list standby DHCP server;

[0078] 所述主DHCP服务器,还用于在工作后为DHCP客户端提供服务过程中生成DHCP租约信息、DHCP历史租约缓存文件;所述租约文件包含多个租约条目,每个租约条目均记录IP地址、租约生效时间、租约结束时间、绑定的MAC地址、客户主机名、状态信息;其中,IP地址为租出的IP地址、租约生效时间和租约结束时间记录的是对应租出IP地址的有效时间范围、绑定的MAC地址记录的是租用此IP的网卡地址、状态记录了本租约条目是否发生改变,例如客户端是否延长了租约以便继续使用这个IP地址;当DHCP客户端不再使用这个租约条目或者租约条目过期之后,主DHCP服务器从租约文件中删除该租约条目,把这该租约条目添加到DHCP历史租约缓存文件; [0078] The master DHCP server is further configured to provide service information generated during DHCP lease to the DHCP client after working, DHCP lease history cache file; leases file comprises a plurality of said lease entries, each entry is recorded lease IP address, the effective time of the lease, the lease ends, binding the MAC address, client host name, the state information; wherein, the IP address of the IP address leased, lease effective time and end time of the lease is recorded corresponding to the IP address lease valid time range, bound MAC address record leased the IP address of the network adapter, whether to change the present state of the record entry for the lease, such as the client whether to extend the lease to continue using the IP address; DHCP clients no longer after using this entry lease or lease expired entry, the master DHCP server to delete the entry from the lease lease file, add this entry to the lease DHCP lease history cache file;

[0079] 备用DHCP服务器,用于协同主DHCP服务器获取备用服务器列表;接收主DHCP服务器发送的备用服务器列表;并当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续基于所述IP地址池工作。 [0079] Alternate DHCP server for the cooperative master DHCP server to obtain a backup server list; receiving standby server list master DHCP server sends; and when the master DHCP server after failure to switch is determined by the standby DHCP server on the backup server list, when when meet the switching condition, the switching based DHCP server continues to operate based on the IP address pool.

[0080] 上述主DHCP服务器与备用DHCP服务器协同获取备用服务器列表,包括: [0080] The master DHCP server and the DHCP server synergistic standby backup server acquires list, comprising:

[0081 ] 主DHCP服务器,用于定时广播心跳包;接收到来自备用DHCP服务器返回的单播心跳包后,将该备用DHCP服务器存储进备用服务器列表;若在预设时间内没有接收到来自备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对于的备用DHCP服务器从所述备用服务器列表中删除; [0081] The master DHCP server, the timing for the broadcast heartbeat packet; receiving the heartbeat packet from the unicast DHCP server returns to standby, the standby DHCP server stores the list into the standby server; if not received within a predetermined time from the backup unicast server list heartbeat packets existing backup server returns the DHCP, the DHCP server will delete the backup for the backup server from the list;

[0082] 备用DHCP服务器,用于接收到主DHCP服务器广播的心跳包后,向主DHCP服务器返回单播心跳包。 After the [0082] secondary DHCP server to receive a heartbeat packet master broadcasts a DHCP server, the DHCP server returns to the main heartbeat unicast packets.

[0083] 上述备用DHCP服务器,判断出当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器,包括: [0083] The secondary DHCP server determines that the DHCP server when the master fails, the standby switch is determined by the DHCP server on the backup server list, when the switching condition is meet, the main switch DHCP server, comprising:

[0084] 所述备用DHCP服务器,在判断出主DHCP服务器出现故障后,由接收到所述备用服务器列表的备用DHCP服务器在备用服务器列表查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败时,由备用服务器列表中除该备用服务器之外的备用服务器继续在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器。 [0084] The standby DHCP server, the DHCP server determines that the primary fails, the backup server receives the DHCP server looks up the list of standby backup server IP address corresponding to the minimum in the list of alternate servers, that determines whether its own backup server, if so, switch to the master DHCP server itself; and a minimum when it is judged to switch the standby server based DHCP server fails, the backup server to continue the list to find the list server other than the backup server in the standby standby server IP address corresponding to the backup server, backup server until you find success switch-based DHCP server or backup server in the list are not available, look for the backup server.

[0085] 备用服务器判断主DHCP服务器出现故障的方法为:当备用服务器在第一预设时长间内没有接收到主DHCP服务器发送的信号,如广播的心跳包,则认为主DHCP服务器出现故障。 [0085] The method of determining the primary backup server DHCP server fails to: when the server does not receive the standby signal sent by the master DHCP server within the predetermined duration between the first, the broadcasting heartbeat packets, it is considered the master DHCP server fails.

[0086] 备用服务器判断其他备用服务器切换为主DHCP服务器失败的方法为:在第二预设时长没有接收到主DHCP服务器发送的信号则判断切换是被,其中,第二预设时长比第一预设时长持续的时间长。 [0086] Analyzing other backup servers backup server switching method based DHCP server failure: length signal is not received in the master DHCP server determines that the transmission is in the second switch is preset, wherein the second predetermined time is longer than the first long long duration preset.

[0087] 上述备用服务器,还可用于在判断出主DHCP服务器不工作后,选择一个服务器作为工作的主DHCP服务器,包括:备用服务器建立包含自身IP地址的可用服务器列表,并广播心跳包;备用服务器接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包;备用服务器若接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表;备用服务器在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败后,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务 [0087] The backup server can also be used after it is determined that the master DHCP server is not working, selecting a server operating as the master DHCP server, comprising: establishing standby server list of available servers including its own IP address, and broadcasts the heartbeat packet; Alternate when the server receives a heartbeat packet from the other backup servers broadcasting, the process returns to the standby server broadcasts the heartbeat heartbeat packet unicast packet; standby server when receiving the heartbeat packet from the unicast DHCP server returns the other backup, then the other backup DHCP stored into the server list of available servers; standby server list of available servers to find the IP address corresponding to the minimum standby DHCP server, the standby for judging whether a DHCP server, and if so, switch to the master DHCP server itself; and the determined after switching the standby server based DHCP server fails, standby server to find the IP address corresponding to the smallest in the list of available servers from the list of available servers in addition to the backup server, the standby server, the standby server until it finds a DHCP service based handover success ;

[0088] 由于切换后的主DHCP服务器仍会定时广播的心跳包,备用DHCP服务器在接收到来自主DHCP服务器广播的心跳包后,停止广播心跳包,向该主DHCP服务器返回单播心跳包。 [0088] Since the switching timing of the master DHCP server will broadcast the heartbeat packets, secondary DHCP server receives the DHCP server independent heartbeat packet arrival broadcast, stop broadcasting the heartbeat packet to the master DHCP server returns a unicast heartbeat packet.

[0089] 主、备用DHCP服务器在广播心跳包时,还可将主备用标识一同广播,以使接收到心跳包的备用DHCP服务器判断广播的心跳包来自主DHCP服务器还是备用DHCP服务器。 [0089] primary, secondary DHCP server broadcasting the heartbeat packet may also be broadcast with identification primary spare, the heartbeat packet to the reception standby DHCP server determines the heartbeat packet from the master broadcasts a DHCP server or a DHCP server backup.

[0090] 在其他实施例中,为保证主备服务器的平滑切换,所述主DHCP服务器,还用于在工作后为DHCP客户端提供服务过程中生成DHCP租约信息、DHCP历史租约缓存文件;以及在判断出获取的备用服务器列表、DHCP租约信息和DHCP历史租约缓存文件三者中至少有一个发生变化后,将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器。 [0090] In other embodiments, in order to ensure a smooth handover standby server, the master DHCP server is further a process for providing services to the DHCP client after the DHCP lease information generating work, DHCP lease history cache file; and determines that the standby server list acquisition, DHCP lease information and DHCP lease history cache file at least one of the three changes after the updated content synchronized to the standby DHCP server on the latest backup server list. 所述备用服务器列表上的备用DHCP服务器,还用于切换为主DHCP服务器后,基于DHCP租约文件、DHCP历史租约缓存文件和IP地址池工作。 Alternate DHCP server on the backup server list, after the main switch is further configured to DHCP server, DHCP lease-based file, DHCP lease history cache file and the IP address pool work.

[0091] 进一步地,为保征主备DHCP服务器切换动作对客户端透明,所述备用服务器,还用于将自身切换为主DHCP服务器后,绑定切换前的主DHCP服务器使用的虚拟IP地址继续与客户端通信,这样无论主备DHCP服务器如何切换,与DHCP客户端进行通信的虚拟IP地址唯一,不会中断DHCP客服端的业务。 After [0091] Further, as a guarantee for the switching operation of the primary and the DHCP server transparent to the client, the backup server is further configured to switch itself based DHCP server, virtual IP address of the previous binding of the DHCP server switchover continue to communicate with the client, so no matter how to switch the active and standby DHCP server, a virtual IP address to communicate only, without interrupting the customer service side of the business and DHCP DHCP client. 当主DHCP服务器发生切换后,由于主DHCP的MAC地址发生切换,需要通知DHCP客户端更新主DHCP服务器的MAC地址。 When the master DHCP server switching occurs, since the MAC address of the main switching occurs DHCP, the DHCP client needs to notify the updated MAC address of the master DHCP server.

[0092] 本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。 [0092] Those of ordinary skill in the art will be appreciated that the above-described method may be all or part of the steps by a program instructing relevant hardware is completed, the program may be stored in a computer-readable storage medium, such as read only memory, etc., magnetic or optical disk. 可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现,相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。 Alternatively, all or part of the steps of the above-described embodiments may be implemented using one or more integrated circuits, respectively, each module / unit in the above-described embodiments may be implemented using a form of hardware, software functional modules may also be employed forms. 本发明不限制于任何特定形式的硬件和软件的结合。 The present invention is not limited to any specific combination of hardware and software form.

[0093] 需要说明的是,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。 [0093] Incidentally, the present invention can have a variety of other embodiments, without departing from the spirit and essence of the invention, those skilled in the art may make various corresponding modifications and variations according to the present invention , but the protection scope of these respective modifications and variations of the present invention should belong to the appended claims.

Claims (12)

  1. 1.一种DHCP服务器冗余的方法,其特征在于,所述方法包括: 主DHCP服务器和备用DHCP服务器启动,所述主DHCP服务器和备用DHCP服务器共享IP地址池; 若主DHCP服务器工作,主DHCP服务器协同备用DHCP服务器获取备用服务器列表; 主DHCP服务器将获取的备用服务器列表同步至所述备用服务器列表上的备用DHCP服务器; 当主DHCP服务器出现故障后,由所述备用服务器列表上的备用DHCP服务器进行切换判断,由符合切换条件的备用DHCP服务器切换为主DHCP服务器继续基于所述IP地址池工作。 A DHCP server redundancy method, wherein said method comprises: a main DHCP server and DHCP server startup standby, the standby master DHCP server and the DHCP server IP address pool shared; if the master DHCP server is working, the main cooperative secondary DHCP server DHCP server to obtain a list of backup server; master DHCP server will obtain a list of the backup server to the standby synchronization DHCP server on the backup server list; DHCP when the primary server fails, the backup server from the backup list DHCP Analyzing server switching, switching from the standby switching condition compliant DHCP server based continue to operate based on the DHCP server IP address pool.
  2. 2.如权利要求1所述的方法,其特征在于,所述主DHCP服务器协同备用服务器获取备用服务器列表,包括: 主DHCP服务器定时广播心跳包; 接收到主DHCP服务器广播的心跳包的备用DHCP服务器向主DHCP服务器返回单播心跳包; 若主DHCP服务器接收到来自备用DHCP服务器返回的单播心跳包,则将该备用DHCP服务器存储进备用服务器列表; 若主DHCP在预设时间内没有接收来自到备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对应的备用DHCP服务器从所述备用服务器列表中删除。 2. The method according to claim 1, wherein said primary backup server DHCP server collaboration server list acquisition standby, comprising: a timing master DHCP server broadcasts a heartbeat packet; receiving a heartbeat packet to the master DHCP server broadcast DHCP standby DHCP server returns to the main server unicast heartbeat packet; if the master DHCP server receives the unicast heartbeat packet from the backup server returns the DHCP, the DHCP server is stored into the standby standby server list; if DHCP is not a main receiver for a preset time heartbeat packet from the unicast backup server already in the list returned from the DHCP server backup, then the corresponding alternate DHCP server from the backup server list.
  3. 3.如权利要求2所述的方法,其特征在于,所述当主DHCP服务器出现故障后,由所述备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续使用所述IP地址池提供服务,包括: 当主DHCP服务器出现故障后,接收到所述备用服务器列表的备用DHCP服务器在备用服务器列表查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器; 若备用服务器切换为主DHCP服务器失败,再由备用服务器列表中除该备用服务器之外的备用服务器在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器。 3. The method according to claim 2, wherein, when the master DHCP server fails, the standby switch is determined by the DHCP server to the standby server on the list, when the switching condition is meet, the switching based DHCP server continue to use the IP address pool services, comprising: when the master DHCP server fails, the DHCP server receives the standby standby server list to find the minimum backup server IP address corresponding to the backup server in the list, whether it is determined that the backup server , if so, switch to the master DHCP server itself; backup server if the main switch DHCP server fails, the IP address corresponding to find the minimum backup in the backup server a list of backup server list server other than the backup server backup server, backup server until you find success switch-based DHCP server or backup server in the list are not available, look for the backup server.
  4. 4.如权利要求1所述的方法,其特征在于,所述方法还包括: 主DHCP服务器在工作后为DHCP客户端提供服务过程中生成的DHCP租约文件、DHCP历史租约缓存文件; 当主DHCP服务器在判断出获取的备用服务器列表、DHCP租约文件和DHCP历史租约缓存文件三者中至少有一个发生变化后,将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器; 待备用服务器列表上的备用DHCP服务器切换为主DHCP服务器后,还基于DHCP租约文件、DHCP历史租约缓存文件工作。 4. The method according to claim 1, wherein said method further comprises: the master DHCP server provides service process file generated DHCP lease to the DHCP client after working, DHCP lease history cache files; when the master DHCP server It determines that the standby server list acquisition, DHCP leases file and DHCP lease history cache file at least one of the three changes after the updated content synchronized to the standby DHCP server on the latest backup server list; to be the backup server list after the DHCP server on the standby switch-based DHCP server, also based DHCP lease files, cache files DHCP lease history work.
  5. 5.如权利要求1或3所述的方法,其特征在于,所述备用DHCP服务器切换为主DHCP服务器后,还包括: 切换后的主DHCP服务器绑定切换前的主DHCP服务器使用的虚拟IP地址。 5. The method according to claim 13, wherein said standby switch based DHCP server a DHCP server, further comprising: a master DHCP server before the switching of the switching primary binding DHCP server virtual IP address.
  6. 6.如权利要求2所述的方法,其特征在于,所述方法还包括:若主DHCP服务器不工作,备用DHCP服务器建立包含自身IP地址的可用服务器列表,并广播心跳包; 所述备用服务器接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包; 若备用服务器接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表; 备用DHCP服务器在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器; 若备用服务器切换为主DHCP服务器失败,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器; 接收到主DHCP服务器定时广 6. The method according to claim 2, wherein said method further comprises: if the master DHCP server is inoperative, standby server establishes a list of available DHCP server contains its own IP address, and broadcasts the heartbeat packet; the backup server after receiving a heartbeat packet from the other backup servers broadcasting, the process returns to the standby server broadcasts the heartbeat packet unicast heartbeat packets; if the backup server receives the unicast heartbeat packet from the DHCP server returns other backup, then the other backup DHCP server stored into the list of available servers; standby DHCP server in the list of available servers to find the IP address corresponding to the minimum standby DHCP server, the standby for judging whether a DHCP server, and if so, switch to the master DHCP server itself; if the standby server switch based DHCP server fails, standby server to find the IP address corresponding to the smallest in the list of available servers from the list of available servers in addition to the backup server, the standby server, the standby server until it finds a successful handover based DHCP server; receiving the master DHCP server timed wide 的心跳包后,备用DHCP服务器停止广播心跳包,向该主DHCP服务器返回单播心跳包。 After the heartbeat packets, alternate stop broadcasting the heartbeat packet DHCP server, the DHCP server returns to the main unicast heartbeat packet.
  7. 7.一种DHCP服务器冗余系统,其特征在于,所述系统包括主DHCP服务器和与主DHCP服务器共享IP地址池的备用DHCP服务器,其中, 所述主DHCP服务器,用于在其启动并工作后,协同备用DHCP服务器获取备用服务器列表;将获取的备用服务器列表同步至所述备用服务器列表中的备用DHCP服务器; 所述备用DHCP服务器,用于协同主DHCP服务器获取备用服务器列表;接收主DHCP服务器发送的备用服务器列表;并当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续基于所述IP地址池工作。 A DHCP server redundant system, wherein said system comprises a master DHCP server and IP address pool shared with the backup master DHCP server a DHCP server, wherein the master DHCP server, and to start their work in after obtaining synergistic standby standby server DHCP server list; a list of the acquired synchronization of the backup server to the standby server list server standby DHCP; DHCP server of the backup, for the cooperative master DHCP server to obtain a list of the backup server; receiving master DHCP the server sends a list of backup server; and, when the master DHCP server fails, the standby switch is determined by the DHCP server on the backup server list, when the switching condition is meet, the main switch of the DHCP server continues to operate based on the IP address pool.
  8. 8.如权利要求7所述的系统,其特征在于,主DHCP服务器与备用DHCP服务器协同获取备用服务器列表,包括: 主DHCP服务器,用于定时广播心跳包;接收到来自备用DHCP服务器返回的单播心跳包后,将该备用DHCP服务器存储进备用服务器列表;若在预设时间内没有接收到来自备用服务器列表中已有的备用DHCP服务器返回的单播心跳包,则将对于的备用DHCP服务器从所述备用服务器列表中删除; 备用DHCP服务器,用于接收到主DHCP服务器广播的心跳包后,向主DHCP服务器返回单播心跳包。 8. The system according to claim 7, characterized in that, the master DHCP server with the DHCP server synergistic standby backup server acquires list, comprising: a master DHCP server, the timing for the broadcast heartbeat packet; receiving a single DHCP server returns from the standby heartbeat packet after sowing, the backup memory into the standby server DHCP server list; if no heartbeat packet received unicast from the backup server in the list of existing secondary DHCP server returns within the preset time, then the DHCP server for backup remove from the backup server list; standby DHCP server, after receiving the heartbeat packet of the master broadcasts a DHCP server, the DHCP server returns a unicast master heartbeat packet.
  9. 9.如权利要求8所述的系统,其特征在于,所述备用DHCP服务器,用于当主DHCP服务器出现故障后,由备用服务器列表上的备用DHCP服务器进行切换判断,当符合切换条件时,切换为主DHCP服务器继续使用所述IP地址池提供服务,包括: 所述备用DHCP服务器,用于在判断出主DHCP服务器出现故障后,由接收到所述备用服务器列表的备用DHCP服务器在备用服务器列表查找最小IP地址对应的备用服务器,判断自身是否为该备用服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败时,由备用服务器列表中除该备用服务器之外的备用服务器继续在备用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器或备用服务器列表中无可供查找的备用服务器。 9. The system according to claim 8, wherein said secondary DHCP server to the DHCP server when the master fails, the standby switch is determined by the DHCP server on the backup server list, when the switching condition compliance, handover DHCP based server continues to use the IP address pool services, comprising: a secondary DHCP server for, after determining that the master DHCP server fails, the backup server by the received list of alternate backup server DHCP server list Find the minimum backup server IP address corresponding to, for judging whether the backup server, and if so, switch to the master DHCP server itself; when the main switch and the DHCP server determines that the standby server fails, the backup server list in addition to the backup server other than the standby server continues to find the minimum alternate server IP address corresponding to the backup server in the list until you find the backup server successfully switched based DHCP server or backup server list are not available, look for the backup server.
  10. 10.如权利要求7所述的系统,其特征在于,所述主DHCP服务器,还用于在工作后为DHCP客户端提供服务过程中生成DHCP租约信息、DHCP历史租约缓存文件;以及在判断出获取的备用服务器列表、DHCP租约信息和DHCP历史租约缓存文件三者中至少有一个发生变化后,将更新后的内容同步至最新的备用服务器列表上的备用DHCP服务器; 所述备用服务器列表上的备用DHCP服务器,还用于切换为主DHCP服务器后,基于DHCP租约文件和DHCP历史租约缓存文件工作。 10. The system according to claim 7, wherein said master DHCP server is further a process for providing services to the DHCP client after the DHCP lease information generating work, DHCP lease cache file history; and determined the obtain a list of backup servers, and DHCP lease information cache files of the three DHCP lease history with at least after a change occurs, the updated content synchronized to the standby DHCP server on the latest backup server list; on the standby server list secondary DHCP server is further configured to switch the main DHCP server, DHCP lease based on historical documents and DHCP lease cache files work.
  11. 11.如权利要求7或9所述系统,其特征在于, 所述备用服务器,还用于将自身切换为主DHCP服务器后,绑定切换前的主DHCP服务器使用的虚拟IP地址。 11 or the system of claim 79, wherein the backup server is further configured to switch itself mainly after the DHCP server, the IP address of the virtual master before the handover binding DHCP server.
  12. 12.如权利要求8所述的系统,其特征在于, 所述备用DHCP服务器,还用于在判断出主DHCP服务器不工作后,建立包含自身IP地址的可用服务器列表,并广播心跳包;接收到来自其他备用服务器广播的心跳包后,向广播该心跳包的备用服务器返回单播心跳包;若接收到来自其他备用DHCP服务器返回的单播心跳包,则将该其他备用DHCP服务器存储进所述可用服务器列表;在可用服务器列表查找最小IP地址对应的备用DHCP服务器,判断自身是否为该备用DHCP服务器,如果是,则将自身切换为主DHCP服务器;以及在判断出备用服务器切换为主DHCP服务器失败后,再由可用服务器列表中除该备用服务器之外的备用服务器在可用服务器列表查找最小的IP地址对应的备用服务器,直至找到的备用服务器成功切换为主DHCP服务器;接收到主DHCP服务器定时广播的心跳包后,备用DHCP服 12. The system according to claim 8, wherein said secondary DHCP server is further configured to, after it is determined that the master DHCP server is not working, the establishment of a list of available server contains its own IP address, and broadcasts the heartbeat packet; receiving after the heartbeat packet from the other backup servers broadcasting, the process returns to the standby server broadcasts the heartbeat heartbeat packet unicast packet; if the received heartbeat packet from the unicast DHCP server returns the other backup, then the other backup storage into the DHCP server said list of available servers; the list of available servers to find the IP address corresponding to the minimum standby DHCP server, the standby for judging whether a DHCP server, and if so, switch to the master DHCP server itself; and it is determined that the standby switch based DHCP server after the server fails, then find the list of available servers in addition to the backup server in the server list of available servers standby backup server IP address corresponding to a minimum, the standby server until it finds a successful handover based DHCP server; receiving the master DHCP server after broadcasting the heartbeat packet timing, secondary DHCP server 务器停止广播心跳包,向该主DHCP服务器返回单播心跳包。 Server stops broadcasting the heartbeat packet to the master DHCP server returns a unicast heartbeat packet.
CN 201410145280 2014-04-11 2014-04-11 Species standby redundancy method and system server dhcp CN103945016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201410145280 CN103945016B (en) 2014-04-11 2014-04-11 Species standby redundancy method and system server dhcp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201410145280 CN103945016B (en) 2014-04-11 2014-04-11 Species standby redundancy method and system server dhcp

Publications (2)

Publication Number Publication Date
CN103945016A true true CN103945016A (en) 2014-07-23
CN103945016B CN103945016B (en) 2018-07-06

Family

ID=51192496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201410145280 CN103945016B (en) 2014-04-11 2014-04-11 Species standby redundancy method and system server dhcp

Country Status (1)

Country Link
CN (1) CN103945016B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506654A (en) * 2015-01-08 2015-04-08 中国联合网络通信集团有限公司 Cloud computing system and backup method of dynamic host configuration protocol server
CN105007233A (en) * 2015-07-13 2015-10-28 互联网域名系统北京市工程研究中心有限公司 Method for distributing address based on DHCP (dynamic host configuration protocol) server cluster load
CN105791251A (en) * 2014-12-26 2016-07-20 中国移动通信集团公司 Network service migration method and device and router

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060391A (en) * 2007-05-16 2007-10-24 华为技术有限公司 Master and spare server switching method and system and master server and spare server
CN101090309A (en) * 2007-07-18 2007-12-19 杭州华三通信技术有限公司 Method for implementing DHCP service redundant and DHCP server
CN101309167A (en) * 2008-06-27 2008-11-19 华中科技大学 Disaster allowable system and method based on cluster backup
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
CN101465862A (en) * 2009-01-09 2009-06-24 北京星网锐捷网络技术有限公司 Method and device for processing switch of authentication business, network appliance and communication system
CN101695049A (en) * 2009-11-10 2010-04-14 杭州华三通信技术有限公司; Method and device for processing businesses in monitoring system
CN102064951A (en) * 2009-11-18 2011-05-18 中兴通讯股份有限公司 Method for implementing master and standby DHCP servers
CN102098354A (en) * 2011-02-28 2011-06-15 北京星网锐捷网络技术有限公司 Method and server for allocating dynamic host configuration protocol (DHCP) addresses
CN102404146A (en) * 2011-11-17 2012-04-04 福建星网锐捷网络有限公司 Master-slave switching method, network device and DHCP server
CN102572014A (en) * 2012-03-07 2012-07-11 华为终端有限公司 Message processing method and device and system thereof
CN103067206A (en) * 2012-12-28 2013-04-24 无锡博欧节能科技有限公司 Internet of things across-machine room distributed type full automatic hot standby server switching system
CN103248724A (en) * 2013-04-19 2013-08-14 中国(南京)未来网络产业创新中心 SDN (Software-Defined Networking) controller-based DHCP (Dynamic Host Configuration Protocol) broadcast processing method
US20140006568A1 (en) * 2012-06-28 2014-01-02 Alcatel-Lucent Canada, Inc. Prioritization based on ip pool and subnet by dhcp
CN103560922A (en) * 2013-11-18 2014-02-05 北京特立信电子技术股份有限公司 Disaster recovery method and system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060391A (en) * 2007-05-16 2007-10-24 华为技术有限公司 Master and spare server switching method and system and master server and spare server
CN101090309A (en) * 2007-07-18 2007-12-19 杭州华三通信技术有限公司 Method for implementing DHCP service redundant and DHCP server
CN101309167A (en) * 2008-06-27 2008-11-19 华中科技大学 Disaster allowable system and method based on cluster backup
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
CN101465862A (en) * 2009-01-09 2009-06-24 北京星网锐捷网络技术有限公司 Method and device for processing switch of authentication business, network appliance and communication system
CN101695049A (en) * 2009-11-10 2010-04-14 杭州华三通信技术有限公司; Method and device for processing businesses in monitoring system
CN102064951A (en) * 2009-11-18 2011-05-18 中兴通讯股份有限公司 Method for implementing master and standby DHCP servers
CN102098354A (en) * 2011-02-28 2011-06-15 北京星网锐捷网络技术有限公司 Method and server for allocating dynamic host configuration protocol (DHCP) addresses
CN102404146A (en) * 2011-11-17 2012-04-04 福建星网锐捷网络有限公司 Master-slave switching method, network device and DHCP server
CN102572014A (en) * 2012-03-07 2012-07-11 华为终端有限公司 Message processing method and device and system thereof
US20140006568A1 (en) * 2012-06-28 2014-01-02 Alcatel-Lucent Canada, Inc. Prioritization based on ip pool and subnet by dhcp
CN103067206A (en) * 2012-12-28 2013-04-24 无锡博欧节能科技有限公司 Internet of things across-machine room distributed type full automatic hot standby server switching system
CN103248724A (en) * 2013-04-19 2013-08-14 中国(南京)未来网络产业创新中心 SDN (Software-Defined Networking) controller-based DHCP (Dynamic Host Configuration Protocol) broadcast processing method
CN103560922A (en) * 2013-11-18 2014-02-05 北京特立信电子技术股份有限公司 Disaster recovery method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791251A (en) * 2014-12-26 2016-07-20 中国移动通信集团公司 Network service migration method and device and router
CN104506654A (en) * 2015-01-08 2015-04-08 中国联合网络通信集团有限公司 Cloud computing system and backup method of dynamic host configuration protocol server
CN105007233A (en) * 2015-07-13 2015-10-28 互联网域名系统北京市工程研究中心有限公司 Method for distributing address based on DHCP (dynamic host configuration protocol) server cluster load
CN105007233B (en) * 2015-07-13 2018-02-27 互联网域名系统北京市工程研究中心有限公司 Method based dhcp server load distribution cluster address

Also Published As

Publication number Publication date Type
CN103945016B (en) 2018-07-06 grant

Similar Documents

Publication Publication Date Title
US6430622B1 (en) Methods, systems and computer program products for automated movement of IP addresses within a cluster
US20110238793A1 (en) Managing distributed address pools within network devices
US20100191813A1 (en) Automatically releasing resources reserved for subscriber devices within a broadband access network
US20040008694A1 (en) Method for implementing router interface backup with virtual router redundancy protocol
US20110320577A1 (en) System and method for location based address assignment in the distribution of traffic in a virtual gateway
US20100191839A1 (en) Synchronizing resource bindings within computer network
US7647427B1 (en) Redundancy support for network address translation (NAT)
CN1851657A (en) Dual-machine back-up realizing method and system
CN101079742A (en) Data synchronization method and system between disaster tolerance home user servers
CN1845554A (en) Control method for dynamically distributing IP address in 3G network
CN101330531A (en) Method for processing DHCP address allocation and DHCP relay
CN101043398A (en) Method and system for sharing connection dynamically
CN103814554A (en) Communication method, device and system of virtual extensible local area network
JPH10105424A (en) Method for assigning ip address of duplex server
US20100098082A1 (en) Method for application broadcast forwarding for routers running redundancy protocols
CN1855900A (en) Gateway System
US20090201799A1 (en) High-Availability Network Systems
CN1878088A (en) Hot standby maintenance system and hot standby maintenance and failover method
CN103516546A (en) IP terminal device management system and method for double-center networking
US20090279454A1 (en) Method for configuring a dhcp server using dhcp option 82
JP2008193231A (en) Terminal belonging switching system
CN102025630A (en) Load balancing method and load balancing system
CN104579732A (en) Method, device and system for managing virtualized network function network elements
CN1859423A (en) Synchronous switching method for host and repeat device
US20140130044A1 (en) Method, Device, and System for Migrating Configuration Information During Live Migration of Virtual Machine

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
ASS Succession or assignment of patent right

Owner name: INST OF MICROELECTRONICS, C. A. S

Free format text: FORMER OWNER: JIANGSU INTERNET OF THINGS RESEARCH + DEVELOMENT CO., LTD.

Effective date: 20150624

C41 Transfer of patent application or patent right or utility model
C41 Transfer of patent application or patent right or utility model
GR01