CN103825974B - Dhcp renewal processing method and apparatus - Google Patents

Dhcp renewal processing method and apparatus Download PDF

Info

Publication number
CN103825974B
CN103825974B CN 201410062579 CN201410062579A CN103825974B CN 103825974 B CN103825974 B CN 103825974B CN 201410062579 CN201410062579 CN 201410062579 CN 201410062579 A CN201410062579 A CN 201410062579A CN 103825974 B CN103825974 B CN 103825974B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
dhcp
lease
client
server
ip address
Prior art date
Application number
CN 201410062579
Other languages
Chinese (zh)
Other versions
CN103825974A (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
Grant date

Links

Abstract

本发明提供一种DHCP续约处理方法及装置,该方法包括:服务器在接收到客户端的DHCP‑REQUEST续约请求报文后,根据该续约请求报文中携带的客户端的IP地址,判断该客户端是否可以使用该IP地址,若不可以使用,则设置客户端的租期为0,若可以使用,则根据该IP地址所属地址池的租期时长设置该客户端的租期,并将该客户端的租期填充到DHCP应答报文中,将该应答报文单播发送给客户端。 The present invention provides a DHCP renewal processing method and apparatus, the method comprising: the server receives the client request to renew the DHCP-REQUEST message, the client requests an IP address carried in the packet based on the contract, which determines whether the client can use the IP address, if available, is set to 0 client lease, if available, provided the length of the lease during the lease based client IP address belongs to the address pool, and the customer end of the lease to the DHCP response packet is filled in, the single response message broadcast to the client. 客户端在接收到服务器的DHCP‑ACK应答报文后,解析该应答报文中携带的租期,若该租期为0,则释放当前使用的IP地址,若该租期不为0,则更新租期。 After the client receives the DHCP-ACK message to the server's response, parse the response message carries the lease, if the lease is 0, then the release of the current IP address, if the lease is not 0, then updated lease. 本发明解决了在经过中继组网的情况下,客户端无法感知50%续约失败的问题,有效提升了DHCP续约处理速度。 The invention solves the case after a relay network, the client can not perceive the problem of failure to renew 50%, effectively increasing the DHCP renewal processing speed.

Description

DHCP续约处理方法及装置 DHCP renewal processing method and apparatus

技术领域 FIELD

[0001] 本发明涉及网络通信技术领域,尤其涉及一种DHCP续约处理方法及装置。 [0001] The present invention relates to network communication technologies, and in particular, to a method and apparatus for processing DHCP renew.

背景技术 Background technique

[0002] 当DHCP客户端与DHCP服务器不在同一网段时,需要通过DHCP中继进行IP地址申请。 [0002] When a DHCP client and the DHCP server are not on the same network segment, the IP address of the application required by the DHCP relay. 由于动态分配的IP地址都有一定的租期,因此要求DHCP客户端在期满之前向DHCP服务器发送续约请求,其续约过程如下。 Due to the dynamic allocation of IP address lease has a certain, thus requiring the DHCP client sends a DHCP renew request to the server before the expiry of its renewal process is as follows.

[0003] 当租期达到50 °乂时,DHCP客户端向DHCP服务器发送单播的DHCP-REQUEST续约请求报文。 [0003] When the lease reaches 50 ° qe, DHCP clients to the DHCP server sends a unicast request to renew a DHCP-REQUEST packet. 由于该续约报文是从DHCP客户端单播发送给DHCP服务器的,报文的目的IP地址为DHCP服务器的IP地址,因此,该续约报文不经过DHCP中继处理,报文中的giaddr字段为0。 Since the renewal message is unicast from the DHCP client to the DHCP server, the packet destination IP address for the DHCP server IP address, and therefore, the renewal DHCP relay packets without processing, packets giaddr field is zero. giaddr字段用于填充DHCP客户端发出请求报文后经过的第一个DHCP中继的IP地址。 giaddr field for filling the DHCP client sends a first IP address of the DHCP relay the request packet passes. DHCP月艮务器接收到该续约报文后,若不允许DHCP客户端继续使用该IP地址,则回应DHCP-NAK报文。 After DHCP month that works to renew receives the message, if allowed to continue to use the DHCP client IP address, the response DHCP-NAK messages. 由于接收到的续约报文中giaddr字段为0,DHCP服务器只能广播发送DHCP-NAK报文。 Since the renewal message received giaddr field is 0, DHCP server sending DHCP-NAK only broadcast packets. 若DHCP 中继与DHCP服务器不在同一局域网内,DHCP中继将无法收到该DHCP-NAK报文,因此,也无法转发该DHCP-NAK报文给DHCP客户端,最终导致DHCP客户端无法实时感知续约失败的情况。 If within the DHCP relay agent and not in the same local area network server, DHCP relay will not receive the DHCP-NAK message, therefore, can not forward the DHCP-NAK message to the DHCP client, DHCP client can not ultimately lead to real-time perception renewal fails.

发明内容 SUMMARY

[0004] 有鉴于此,本发明提供了一种DHCP服务器续约处理装置,应用于包括DHCP客户端、 DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中, 该装置可以设置在DHCP服务器中,该装置具体包括: [0004] Accordingly, the present invention provides a DHCP server to renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server on each different segment, the apparatus may be provided in the DHCP server, the apparatus comprises:

[0005] 报文接收单元,用于接收DHCP客户端的单播发送DHCP-REQUEST续约请求报文,且所述续约请求报文中未携带有DCHP中继设备的IP地址; [0005] The packet receiving unit, for receiving a unicast DHCP client to renew a DHCP-REQUEST request packet, and the renewal request message does not carry the IP address DCHP relay device;

[0006] 租期设置单元,用于根据该续约请求报文中携带的DHCP客户端的IP地址,判断该DHCP客户端是否可以使用该IP地址,若不可以使用,则设置DHCP客户端的租期为〇,若可以使用,则根据该IP地址所属地址池的租期时长设置该DHCP客户端的租期; [0006] The rental period setting unit configured to request the renewal of the IP address of the DHCP client carried in the message, determining whether the DHCP client can use the IP address, if available, is set DHCP client lease is square, may be used if, in accordance with the lease of the IP address when the address belongs to the pool length setting of the DHCP client's lease;

[0007] 报文应答单元,用于在设置DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP应答报文中,并将该应答报文单播发送给DHCP客户端。 [0007] message responding unit, after setting the lease for the DHCP client, the DHCP lease to the DHCP client filled reply packet, and sends the reply message unicast to the DHCP client.

[0008] 本发明提供了一种DHCP服务器续约处理方法,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,该方法包括: [0008] The present invention provides a DHCP server to renew processing method, applied to a DHCP client, DHCP relay device and a network DHCP server, the DHCP client and the DHCP server in each different network segments, the method comprising:

[0009] DHCP服务器接收DHCP客户端的单播发送DHCP-REQUEST续约请求报文,且所述续约请求报文中未携带有DCHP中继设备的IP地址; _〇] DHCP服务器根据该续约请求报文中携带的DHCP客户端的IP地址,判断该DHCP客户端是否可以使用该IP地址,若不可以使用,则设置DHCP客户端的租期为〇,若可以使用,则根据该IP地址所属地址池的租期时长设置该DHCP客户端的租期; [0009] DHCP server receives the DHCP client unicast request to renew a DHCP-REQUEST message, and the renewal request message does not carry the IP address DCHP relay device; _〇] According to the DHCP server to renew request packet carries an IP address of the DHCP client, determining whether the DHCP client can use the IP address, if available, is set DHCP client lease is square, if available, then according to the IP address belongs address the length setting lease when DHCP client lease pool;

[0011] DHCP服务器在设置DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP应答报文中,并将该应答报文单播发送给DHCP客户端。 [0011] After setting the lease DHCP server DHCP client, the DHCP lease to the DHCP client filled reply packet, and sends the reply message unicast to the DHCP client.

[0012] 本发明提供了一种DHCP客户端续约处理装置,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,该装置可以设置在DHCP客户端中,该装置具体包括: [0012] The present invention provides a client DHCP renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server on each different network segments the apparatus may be provided in the DHCP client, the apparatus comprises:

[0013] 报文发送单元,用于单播发送DHCP-REQUEST续约请求报文至所述DHCP服务器; [00M]租期控制单元,用于在接收到DHCP服务器的DHCP-ACK应答报文后,解析该应答报文中携带的租期,若该租期为〇,则释放当前使用的IP地址,若该租期不为0,则更新租期。 [0013] The packet sending unit configured to send the unicast DHCP-REQUEST renewal request message to the DHCP server; [00M] lease a control unit configured to, after receiving the DHCP-ACK message reply DHCP server It parses the response message carried in the lease, if the lease is square, then release the IP addresses currently in use, if the lease is not 0, then update the lease.

[0015] 本发明提供了一种DHCP客户端续约处理方法,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,该方法包括: [0015] The present invention provides a client DHCP renew processing method, applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server on each different network segments , the method comprising:

[0016] 所述DHCP客户端单播发送DHCP-REQUEST续约请求报文至所述DHCP服务器; [0016] the DHCP client unicasts a renewal request DHCP-REQUEST packet to the DHCP server;

[0017] 所述DHCP客户端在接收到DHCP服务器的DHCP-ACK应答报文后,解析该应答报文中携带的租期,若该租期为〇,则释放当前使用的IP地址,若该租期不为〇,则更新租期。 [0017] After the DHCP client receives the DHCP-ACK message reply DHCP server parses the response message carries the lease, if the lease is square, then release the IP address currently being used, if the lease is not square, then update the lease.

[0018]本发明解决了在经过DHCP中继组网的情况下,DHCP客户端无法感知50%续约失败的问题,有效提升了DHCP续约处理速度。 [0018] The present invention solves the problem in the case where after the DHCP relay network, the DHCP client can not sense the problem of the failure to renew 50%, effectively increasing the DHCP renewal process speed.

附图说明 BRIEF DESCRIPTION

[0019] 图1是本发明一种实施方式中DHCP服务器续约处理装置的逻辑结构及其基础硬件环境的示意图。 [0019] FIG. 1 is a schematic diagram of the logical structure and the underlying hardware environment described DHCP server to renew processing apparatus according to the present invention.

[0020] 图2是本发明一种实施方式中DHCP服务器续约处理方法的流程图。 [0020] FIG 2 is a flowchart of processing to renew a DHCP server method described one embodiment of the present invention.

[0021] 图3是本发明一种实施方式中DHCP客户端续约处理装置的逻辑结构及其基础硬件环境的示意图。 [0021] FIG. 3 is a schematic diagram of the logical structure and the underlying hardware environment described renew a DHCP client processing apparatus according to the present invention.

[0022] 图4是本发明一种实施方式中DHCP客户端续约处理方法的流程图。 [0022] FIG. 4 is a flowchart of a method of processing to renew the DHCP client described one embodiment of the present invention.

具体实施方式 detailed description

[0023]以下结合附图对本发明进行详细说明。 [0023] The present invention will be described in detail in conjunction with the accompanying drawings.

[0024]根据RFC2131,DHCP客户端如果在50%续约时没有收到DHCP服务器应答,则继续使用原先的IP地址,直到租期达到87.5 %时,广播发送DHCP-REQUEST续约报文。 [0024] According to RFC2131, DHCP client does not receive a response if the DHCP server to renew at 50%, continue to use the original IP address until the lease reached 87.5%, to renew a DHCP-REQUEST broadcast message. 由于是广播报文,DHCP中继可以收到。 Because it is broadcast packets, DHCP relay can receive. DHCP中继填充giaddr字段,并把DHCP-REQUEST续约报文转发给DHCP 服务器。 DHCP relay filling giaddr field, and to renew the DHCP-REQUEST packet to the DHCP server. DHCP服务器根据giaddr字段的地址把续约不成功的DHCP-NAK报文单播发送给DHCP 中继,DHCP中继再将该报文转发给DHCP客户端。 DHCP server address giaddr field of the renewal unsuccessful DHCP-NAK messages sent to a single broadcast DHCP relay, DHCP relay then forwards the message to the DHCP client. DHCP客户端收到DHCP-NAK报文后,释放当前使用的IP地址,重新申请新的IP地址。 After the DHCP client receives the DHCP-NAK message, release the IP addresses currently in use, re-apply for a new IP address.

[0025] 从上述过程中可以看出,在租期的50%到87 • 5%期间,DHCP客户端一直在使用DHCP 服务器不允许其继续使用的IP地址,无法及时感知续约失败。 [0025] As can be seen from the above process, during 50% to 87 • 5% of the lease, DHCP client has been using the IP address of the DHCP server does not allow its continued use, inability to perceive the renewal failed. 若DHCP服务器上启用了控制接入用户功能,只转发使用合法IP地址的用户流量,则续约失败的用户将无法访问外部网络资源。 If the user access control feature is enabled on the DHCP server forwards only legitimate user traffic using IP addresses, the failure to renew the user can not access the external network resources.

[0026] 本发明提供一种DHCP服务器续约处理装置,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,以下以软件实现为例进行说明,但是本发明并不排除诸如硬件或者逻辑器件等其他实现方式。 [0026] The present invention provides a DHCP server to renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the following is implemented in software as an example, but the present invention does not exclude such as hardware other implementations or logic devices. 如图1所示,该装置运行的硬件环境通常包括CPU、内存、非易失性存储器以及其他硬件。 As shown in FIG. 1, the apparatus generally includes a hardware environment operating CPU, memory, nonvolatile memory and other hardware. 该装置作为一个逻辑层面的虚拟装置,其通过CPU来运订。 The device as a virtual device a logical level, which is set to run by the CPU. 该装置包括报文接收单元、租期设置单元以及报文应答单元。 The apparatus includes a message receiving unit, and a setting unit lease message responding unit. 请参考图2具体的实施步骤。 Step 2 specific embodiment Referring to FIG.

[0027] 步骤101,0肊?服务器接收01«^客户端的单播发送〇1«^-1^0此51'续约请求报文,且所述续约请求报文中未携带有DCHP中继设备的IP地址; ? [0027] Step 101,0 Yi server 01 receives the «^ client unicast transmission 〇1« ^ --1 this 51 ^ 0 'renewal request packet, and the renewal request message does not carry the DCHP following the IP address of the device;

[0028] 步骤102,DHCP服务器根据该续约请求报文中携带的DHCP客户端的IP地址,判断该DHCP客户端是否可以使用该IP地址,若不可以使用,则设置DHCP客户端的租期为〇,若可以使用,则根据该IP地址所属地址池的租期时长设置该DHCP客户端的租期; [0028] Step 102, the DHCP server to renew the request message carries the IP address of the DHCP client according to the DHCP client determines whether the IP address can be used, if available, is set to the DHCP client lease square If the use is possible in accordance with the lease of the IP address belongs to the address pool of the DHCP lease length setting of the client;

[0029] 步骤103, DHCP服务器在设置DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP应答报文中,并将该应答报文单播发送给DHCP客户端。 [0029] Step 103, after setting the lease DHCP server DHCP client, the DHCP lease to the DHCP client filled reply packet, and sends the reply message unicast to the DHCP client.

[0030] 本发明提供一种DHCP客户端续约处理装置,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,以下以软件实现为例进行说明,但是本发明并不排除诸如硬件或者逻辑器件等其他实现方式。 [0030] The present invention provides a client DHCP renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the following is implemented in software as an example, but the present invention does not exclude such other implementations or hardware logic devices. 如图3所示,该装置运行的硬件环境通常包括CPU、内存、非易失性存储器以及其他硬件。 As shown in FIG 3, the apparatus generally includes a hardware environment operating CPU, memory, nonvolatile memory and other hardware. 该装置作为一个逻辑层面的虚拟装置,其通过CPU来运行。 The device as a virtual device a logical level, which is run by the CPU. 该装置包括报文发送单元和租期控制单元。 The apparatus comprises a packet sending unit and the control unit lease. 请参考图4具体的实施步骤。 Step 4 specific embodiment Referring to FIG.

[0031] 步骤201,所述DHCP客户端单播发送DHCP-REQUEST续约请求报文至所述DHCP服务器; [0031] Step 201, the DHCP client unicasts a renewal request DHCP-REQUEST packet to the DHCP server;

[0032] 步骤202,所述DHCP客户端在接收到DHCP服务器的DHCP-ACK应答报文后,解析该应答报文中携带的租期,若该租期为〇,则释放当前使用的IP地址,若该租期不为〇,则更新租期。 [0032] Step 202, the DHCP client receives the DHCP-ACK response to the DHCP server packet, parses the reply message carries the lease, if the lease is square, then release the IP address currently used If the lease is not square, then update the lease.

[0033] DHCP服务器采用动态分配方式分配IP地址给DHCP客户端,并指定该IP地址的租期,在该租期期满后将收回此IP地址。 [0033] DHCP server using dynamic allocation to assign IP addresses to DHCP clients, and specify the IP address of the lease, to recover this IP address after the lease expires. DHCP客户端若希望继续使用此IP地址,则在租期的50%时,需向DHCP服务器申请续约。 DHCP client If you want to continue using this IP address, when 50% of the lease, to apply for renewal to the DHCP server.

[0034] DHCP客户端通过单播发送DHCP-REQUEST续约请求报文向DHCP服务器申请续约,该续约请求报文的目的IP地址为DHCP服务器IP地址。 [0034] DHCP client by unicast request to renew a DHCP-REQUEST packet to the DHCP server to renew the application, the renewal request destination IP address of the packet is the DHCP server IP address. DHCP服务器接收到该续约请求报文后, 根据该报文中ciaddr字段中的DHCP客户端IP地址,查找记录的DHCP客户端租约数据,检查该DHCP客户端是否合法,是否允许继续使用当前的IP地址。 After the DHCP server receives the renewal request message, according to the newspaper article ciaddr field in the DHCP client IP address, find a record of the DHCP client lease data, check that the DHCP client is legitimate, if allowed to continue to use the current IP addresses. 若没有找到匹配的DHCP客户端租约记录,或者DHCP服务器的地址策略发生变化,不允许该DHCP客户端继续使用当前的IP 地址,则设置此DHCP客户端的租期为0;若找到匹配的DHCP客户端租约记录,允许DHCP客户端继续使用当前的IP地址,则设置此DHCP客户端的租期为该IP地址所属地址池的租期时长。 If there is no DHCP client lease records match is found, or DHCP server address policy changes, the DHCP client is not allowed to continue to use the current IP address, set this DHCP client lease is 0; if the DHCP client matches found end lease record, allowing DHCP client to use the current IP address, the DHCP client is set to this length of the lease of the IP address lease address pool that belongs. 在确定该DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP应答报文中,由于DHCP服务器接收到的续约请求报文中未携带DHCP中继设备的IP地址,因此DHCP服务器将该应答报文单播发送给DHCP客户端。 After determining the lease of the DHCP client, the DHCP client lease to the DHCP response message filled, since the DHCP server receives the renewal request message does not carry the IP address of the DHCP relay device, DHCP server so the single reply message broadcast to the DHCP client.

[0035] 优选地,DHCP服务器发送的DHCP应答报文为DHCP-ACK应答报文。 [0035] Preferably, DHCP DHCP reply message sent by the server to reply DHCP-ACK message. 无论DHCP服务器是否允许DHCP客户端继续使用当前的IP地址,均采用DHCP-ACK应答报文进行应答。 Regardless of whether or not to allow the DHCP server DHCP client continues to use the current IP address, are used DHCP-ACK response packet response. 这是由于在租期的50%时,DHCP客户端通过单播发送DHCP-REQUEST续约请求报文给DHCP服务器,该续约请求报文不经过DHCP中继处理,因此,该续约报文中的giaddr字段为0。 This is because at lease 50%, DHCP client sends a unicast DHCP-REQUEST renewed request packet to the DHCP server, the renewal request packet without DHCP relay process, and therefore, the renewal message the giaddr field is zero. 若采用现有处理方式,当DHCP服务器不允许DHCP客户端继续使用当前的IP地址时,将广播发送DHCP-NAK 报文,若网络中的DHCP中继与DHCP服务器不在同一局域网中,则DHCP中继无法接收到该报文,因此,也无法转发此报文给DHCP客户端。 When using the conventional approach, the DHCP server when the DHCP client is not allowed to continue to use the current IP address of the DHCP-NAK transmitted broadcast message, if the network DHCP relay and the DHCP server are not on the same LAN, the DHCP in following is unable to receive the message, therefore, it can not forward this message to the DHCP client. 若DHCP服务器采用DHCP-ACK应答报文,则在giaddr字段为0的情况下,可根据续约请求报文中ciaddr字段中的DHCP客户端IP地址,将DHCP-ACK应答报文单播发送给DHCP客户端,而无需DHCP中继转发。 If the DHCP server using DHCP-ACK response packet, then the giaddr field is zero, according to the renewal request packet ciaddr field in the IP address of the DHCP client, the DHCP-ACK message unicasts the response to the DHCP client, without the need for DHCP relay forwards.

[0036] 优选地,该DHCP-ACK应答报文的封装过程包括:将DHCP-ACK类型填充到DHCP应答报文中的〇ption53 (DHCP Message Type,DHCP报文类型)字段;将DHCP服务器设置的DHCP客户端租期填充到DHCP应答报文中的〇ption51 (DHCP Address Lease Time,DHCP地址租期) 字段;将DHCP应答报文的目的IP地址设置为DHCP客户端使当前使用的IP地址。 [0036] Preferably, the DHCP-ACK response packet encapsulation process comprising: filling into the DHCP-ACK type DHCP response packets 〇ption53 (DHCP Message Type, DHCP message type) field; and by the DHCP server DHCP client to the DHCP lease response message filled in 〇ption51 (DHCP address lease Time, DHCP address lease) field; a DHCP reply message to the destination IP address of the DHCP client uses the IP address currently used. 经过上述封装的DHCP-ACK应答报文即可单播发送给DHCP客户端。 After the package of the DHCP-ACK response to the unicast packet to the DHCP client.

[0037] DHCP客户端在接收到DHCP服务器的DHCP-ACK应答报文后,若该报文为续约应答报文,则解析该续约应答报文中租期,若该租期为〇,表示该IP地址不允许继续使用,则释放该IP地址,并发送DHCP-DISCOVER报文重新申请新的IP地址。 [0037] After the DHCP client receives the DHCP-ACK DHCP server response packet if the packet is a renewal response message, parsing the lease renewal response message, if the lease is square, indicates that the IP address can not continue using the IP address is released and sent DHCP-DISCOVER message to re-apply for a new IP address. 若该租期不为0,则更新租期,继续使用当前IP地址。 If the lease is not 0, then update the lease to continue using the current IP address.

[0038] 优选地,DHCP客户端在更新租期后,重新设置续约定时器超时时间,以便重新计时,当定时时间达到租期的50%时,执行上述续约过程。 [0038] Preferably, DHCP clients lease after the update, reset the renewal timer expires, the re-order timing, when the lease timer reaches 50% of the time, executes the renewal process.

[0039] 本发明通过对DHCP续约交互过程的改进,解决了在经过DHCP中继组网情况下, DHCP客户端无法感知50%续约失败的问题,有效提升了DHCP续约处理速度。 [0039] The present invention, by improving the renewal of the DHCP interaction process, solves the networking through the DHCP relay, DHCP client can not sense the problem of the failure to renew 50%, effectively increasing the DHCP renewal process speed.

[0040]以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。 [0040] The foregoing is only preferred embodiments of the present invention but are not intended to limit the present invention, all within the spirit and principle of the present invention, any changes made, equivalent substitutions and improvements should be included within the scope of protection of the present invention.

Claims (12)

  1. 1. 一种DHCP服务器续约处理装置,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,所述DHCP中继设备与所述DHCP服务器不在同一局域网中,其特征在于,该装置包括: 报文接收单元,用于接收DHCP客户端的单播发送DHCP-REQUEST续约请求报文,且所述续约请求报文中未携带有DCHP中继设备的IP地址; 租期设置单元,用于根据该续约请求报文中携带的DHCP客户端的1P地址,判断该DHCP 客户端是否可以使用该IP地址,若不可以使用,则设置DHCP客户端的租期为0,若可以使用, 则根据该IP地址所属地址池的租期时长设置该DHCP客户端的租期; 报文应答单元,用于在设置DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP 应答报文中,并将该应答报文单播发送给DHCP客户端。 A DHCP server to renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server in each different network, the DHCP relay the DHCP server device and not in the same LAN, wherein, the apparatus comprising: a packet receiving unit, for receiving a unicast DHCP client to renew a DHCP-rEQUEST request packet and the request packet renewal does not carry the IP address DCHP relay device; lease setting means for requesting the renewal 1P address carried in the message according to the DHCP client, the DHCP client determines whether the IP address can be used, if possible use, DHCP client lease is set to 0, if available, provided the length of the DHCP lease when the client according to the lease of the IP address pool address belongs; packet responding unit, configured to set the DHCP client lease after the DHCP lease to the DHCP client filled reply packet, and sends the reply message unicast to the DHCP client.
  2. 2. 如权利要求1所述的装置,其特征在于: 所述DHCP应答报文为DHCP-ACK应答报文。 2. The apparatus as claimed in claim 1, wherein: said DHCP response packet to DHCP-ACK packet response.
  3. 3. 如权利要求2所述的装置,其特征在于: 将DHCP-ACK类型填充到所述DHCP应答报文中的option 53字段。 The apparatus as claimed in claim 2, wherein: the type of filling to the DHCP-ACK message in reply DHCP option 53 field.
  4. 4. 如权利要求1所述的装置,其特征在于: 将所述DHCP客户端租期填充到所述DHCP应答报文中的option 51字段。 4. The apparatus according to claim 1, wherein: filling the lease to the DHCP client option 51 field of the DHCP response packets.
  5. 5. —种DHCP服务器续约处理方法,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,所述DHCP中继设备与所述DHCP服务器不在同一局域网中,其特征在于,该方法包括以下步骤: DHCP服务器接收DHCP客户端的单播发送DHCP-REQUEST续约请求报文,且所述续约请求报文中未携带有DCHP中继设备的IP地址; DHCP服务器根据该续约请求报文中携带的DHCP客户端的IP地址,判断该DHCP客户端是否可以使用该IP地址,若不可以使用,则设置DHCP客户端的租期为〇,若可以使用,则根据该IP地址所属地址池的租期时长设置该DHCP客户端的租期; DHCP服务器在设置DHCP客户端的租期后,将该DHCP客户端的租期填充到DHCP应答报文中,并将该应答报文单播发送给DHCP客户端。 5. - Species renew a DHCP server processing method, applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server in each different network, the DHCP relay the DHCP server device and not in the same local area network, wherein the method comprises the steps of: receiving a DHCP server unicast DHCP client to renew a DHCP-rEQUEST request packet, and the renewal request packet does not carry the IP address DCHP relay device; DHCP server to renew the IP address of the DHCP request of the client carried in the message, determining whether the DHCP client can use the IP address, if available, is set DHCP client rent period square, if available, provided the length of the DHCP lease when the client according to the lease of the IP address pool address belongs; DHCP server when the DHCP client is provided the lease, the lease to the DHCP client DHCP reply filled message and the response message sent to a single broadcast DHCP client.
  6. 6. 如权利要求5所述的方法,其特征在于: 所述DHCP应答报文为DHCP-ACK应答报文。 The method as claimed in claim 5, characterized in that: the DHCP response packet to DHCP-ACK packet response.
  7. 7. 如权利要求6所述的方法,其特征在于: 将DHCP-ACK类型填充到所述DHCP应答报文中的option 53字段。 7. The method according to claim 6, wherein: the type of filling to the DHCP-ACK message in reply DHCP option 53 field.
  8. 8. 如权利要求5所述的方法,其特征在于: 将所述DHCP客户端租期填充到所述DHCP应答报文中的option 51字段。 8. The method according to claim 5, wherein: filling the lease to the DHCP client option 51 field of the DHCP response packets.
  9. 9. 一种DHCP客户端续约处理装置,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,所述DHCP中继设备与所述DHCP服务器不在同一局域网中,其特征在于,该装置包括: 报文发送单元,用于单播发送DHCP-REQUEST续约请求报文至所述DHCP服务器; 租期控制单元,用于在接收到DHCP服务器的DHCP-ACK应答报文后,解析该应答报文中携带的租期,若该租期为〇,则释放当前使用的IP地址,若该租期不为0,则更新租期。 A DHCP client to renew processing apparatus applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server in each different network, the DHCP in following the DHCP server device is not in the same LAN, wherein, the apparatus comprising: a packet sending unit configured to send the unicast DHCP-rEQUEST renewal request message to the DHCP server; lease a control unit for after the DHCP-ACK in the received DHCP server response message, parses the reply message carries the lease, if the lease is square, then release the IP address currently being used, if the lease is not 0, then updated lease.
  10. 10. 如权利要求9所述的装置,其特征在于: 租期控制单元,进一步用于在更新租期后,刷新续约定时器超时时间。 10. The apparatus according to claim 9, wherein: the lease control unit is further configured to update the lease renewal refresh timer.
  11. 11. 一种DHCP客户端续约处理方法,应用于包括DHCP客户端、DHCP中继设备和DHCP服务器的网络中,所述DHCP客户端与DHCP服务器各在不同的网段中,所述DHCP中继设备与所述DHCP服务器不在同一局域网中,其特征在于,该方法包括: 所述DHCP客户端单播发送DHCP-REQUEST续约请求报文至所述DHCP服务器; 所述DHCP客户端在接收到DHCP服务器的DHCP-ACK应答报文后,解析该应答报文巾丨隹. 的租期,若该租期为〇,则释放当前使用的ip地址,若该租期不为〇,则更新租期。 A DHCP client to renew processing method, applied to a DHCP client, the DHCP relay device and a network DHCP server, the DHCP client and the DHCP server in each different network, the DHCP in following the DHCP server device and not in the same local area network, wherein the method comprises: the DHCP client unicasts a renewal request DHCP-rEQUEST packet to the DHCP server; receiving the DHCP client in the after the response packet DHCP server DHCP-ACK, parse the response message towel Shu short-tailed bird. the lease, if the lease is square, then release ip addresses currently in use, if the lease is not square, then update the rent period.
  12. 12. 如权利要求11所述的方法,其特征在于,该方法进一步包括: 在更新租期后,刷新续约定时器超时时间。 12. The method according to claim 11, wherein the method further comprises: after updating lease renewal refresh timer.
CN 201410062579 2014-02-24 2014-02-24 Dhcp renewal processing method and apparatus CN103825974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201410062579 CN103825974B (en) 2014-02-24 2014-02-24 Dhcp renewal processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201410062579 CN103825974B (en) 2014-02-24 2014-02-24 Dhcp renewal processing method and apparatus

Publications (2)

Publication Number Publication Date
CN103825974A true CN103825974A (en) 2014-05-28
CN103825974B true CN103825974B (en) 2017-11-14

Family

ID=50760797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201410062579 CN103825974B (en) 2014-02-24 2014-02-24 Dhcp renewal processing method and apparatus

Country Status (1)

Country Link
CN (1) CN103825974B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937632A (en) * 2005-09-23 2007-03-28 中兴通讯股份有限公司 Address distributing method for broadband wireless access system
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
CN102523316A (en) * 2011-12-23 2012-06-27 杭州华三通信技术有限公司 Address distribution method and address distribution device
CN102752152A (en) * 2012-07-24 2012-10-24 杭州华三通信技术有限公司 Method and device used for configuring VRRP (Virtual Router Redundancy Protocol) backup group

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4727537B2 (en) * 2006-09-11 2011-07-20 富士通株式会社 Relay agent device and the proxy address leasing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937632A (en) * 2005-09-23 2007-03-28 中兴通讯股份有限公司 Address distributing method for broadband wireless access system
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
CN102523316A (en) * 2011-12-23 2012-06-27 杭州华三通信技术有限公司 Address distribution method and address distribution device
CN102752152A (en) * 2012-07-24 2012-10-24 杭州华三通信技术有限公司 Method and device used for configuring VRRP (Virtual Router Redundancy Protocol) backup group

Also Published As

Publication number Publication date Type
CN103825974A (en) 2014-05-28 application

Similar Documents

Publication Publication Date Title
US20020065806A1 (en) DHCP server and method for allocating IP address thereby
CN101330531A (en) Method for processing DHCP address allocation and DHCP relay
CN103248724A (en) SDN (Software-Defined Networking) controller-based DHCP (Dynamic Host Configuration Protocol) broadcast processing method
CN101883090A (en) Client access method, equipment and system
CN101951417A (en) Method, system and trunk equipment for assigning multiple server addresses
CN1845554A (en) Control method for dynamically distributing IP address in 3G network
CN103647853A (en) Method for sending ARP message in VxLAN, VTEP and VxLAN controller
CN101980496A (en) Message processing method and system, exchange board and access server equipment
US20120331542A1 (en) Preventing neighbor-discovery based denial of service attacks
CN101656725A (en) Method for implementing safety access and access equipment
US8375109B1 (en) Shortened DHCP lease time
CN101741702A (en) Method and device for limiting broadcast of ARP request
CN101090309A (en) Method for implementing DHCP service redundant and DHCP server
CN101175080A (en) Method and system for preventing ARP message attack
US20060161652A1 (en) Network system
CN101841520A (en) Domain name system and information processing method and device for domain name system
CN101582888A (en) Method for creating neighbor discovery table item and server
US8972542B2 (en) Extending a DHCP relay to backup a DHCP server
CN102244690A (en) Address allocation method and system of dynamic host configuration protocol (DHCP) as well as client side and servers of same
CN101883158A (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
CN101197811A (en) Method for improving server reliability in dynamic main unit configuration protocol under proxy mode
CN102685264A (en) Dynamic host configuration protocol address allocation method, relay equipment and server
CN102413203A (en) IP (Internet Protocol) address allocation method and device
US20090225680A1 (en) Apparatus and method of processing stateful address auto-configuration protocol in ipv6 network
US20160380966A1 (en) Media Relay Server

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
CB02
GR01