[go: up one dir, main page]

CN1921496B - A method for DHCP client to identify DHCP server - Google Patents

A method for DHCP client to identify DHCP server Download PDF

Info

Publication number
CN1921496B
CN1921496B CN2005100415937A CN200510041593A CN1921496B CN 1921496 B CN1921496 B CN 1921496B CN 2005100415937 A CN2005100415937 A CN 2005100415937A CN 200510041593 A CN200510041593 A CN 200510041593A CN 1921496 B CN1921496 B CN 1921496B
Authority
CN
China
Prior art keywords
dhcp
client
server
information
dynamic host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2005100415937A
Other languages
Chinese (zh)
Other versions
CN1921496A (en
Inventor
杨旭
张磊
周衍坚
郭钟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHINA TECHNOLOGY EXCHANGE Co Ltd
State Grid Beijing Electric Power Co Ltd
State Grid Economic and Technological Research Institute
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2005100415937A priority Critical patent/CN1921496B/en
Publication of CN1921496A publication Critical patent/CN1921496A/en
Application granted granted Critical
Publication of CN1921496B publication Critical patent/CN1921496B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

本发明旨在提供一种DHCP客户端识别DHCP服务器的方法,包括以下步骤:DHCP客户端设置所信任的DHCP服务器信息;DHCP客户端发出DHCP发现数据包,网络中DHCP服务器响应该请求并发出DHCP提供数据包;DHCP客户端针对DHCP服务器响应的DHCP提供数据包,解析该DHCP服务器的信息,如果符合设置的信任信息,则继续DHCP协商过程,否则直接丢弃报文。本发明实现了DHCP服务器的适格识别,解决了现有网络中存在多个DHCP服务器时分配IP地址的不确定性导致的DHCP客户端不能正常接入网络的问题。

The present invention aims to provide a method for a DHCP client to identify a DHCP server, comprising the following steps: the DHCP client sets trusted DHCP server information; the DHCP client sends a DHCP discovery packet, and the DHCP server in the network responds to the request and sends a DHCP Provide data packets; the DHCP client responds to the DHCP provided data packets from the DHCP server, analyzes the information of the DHCP server, and if it conforms to the set trust information, continues the DHCP negotiation process, otherwise directly discards the packets. The invention realizes the qualified identification of the DHCP server, and solves the problem that the DHCP client cannot normally access the network caused by the uncertainty of assigning IP addresses when there are multiple DHCP servers in the existing network.

Description

一种DHCP客户端识别DHCP服务器的方法A method for DHCP client to identify DHCP server

技术领域technical field

本发明涉及数据通信领域,尤其涉及DHCP(Dynamic HostConfiguration Protocol,动态主机配置协议)技术。The present invention relates to the field of data communication, in particular to DHCP (Dynamic Host Configuration Protocol, dynamic host configuration protocol) technology.

背景技术Background technique

DHCP的全称是动态主机配置协议(Dynamic Host ConfigurationProtocol),由IETF(Internet网络工程师任务小组)设计,详尽的协议内容在RFC文档RFC2131规定了。DHCP是BOOTP(BootstrapProtocol,见RFC951)的扩展,是基于C/S模式的,它提供了一种动态指定IP地址和配置参数的机制,主要应用于大型网络环境和人工配置比较困难的地方。网络管理员把TCP/IP网络的设置参数集中在运行DHCP的服务器上,由DHCP服务器自动地为网络中的主机,也就是客户机指定IP地址和路由等配置,DHCP服务器可以指定的配置参数有些和IP协议并不相关,但这并不会影响计算机之间的通信,它的配置参数使得网络上的计算机通信变得方便而容易实现了。并且DHCP使IP地址的可以租用,这是相对于BOOTP的一个较为突出的功能,尤其对于拥有许多台计算机的大型网络来说,比如一所大学内的校园网,每台计算机静态拥有一个IP地址有时候可能是不必要的,DHCP服务器为每个IP地址指定一个租期,租期可以是1分钟,也可以是无限期,客户机也可以通过续租持续使用IP资源。当租期到了的时候,DHCP服务器可以回收这个IP地址,分配给别的机器使用。此外,DHCP还可以很好地满足移动服务,由于DHCP提供预约机制,客户机虽然物理位置发生了改变,但是客户机的基本信息仍然存在服务器中,当客户机再度发出请求时,如果该IP地址尚未被分配出去就仍然可以使用先前使用过的地址。The full name of DHCP is Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol), which is designed by IETF (Internet Network Engineer Task Force), and the detailed protocol content is specified in RFC document RFC2131. DHCP is an extension of BOOTP (Bootstrap Protocol, see RFC951). It is based on the C/S mode. It provides a mechanism for dynamically specifying IP addresses and configuration parameters. It is mainly used in large-scale network environments and places where manual configuration is difficult. The network administrator concentrates the setting parameters of the TCP/IP network on the server running DHCP, and the DHCP server automatically specifies IP addresses and routing configurations for the hosts in the network, that is, the clients. The configuration parameters that the DHCP server can specify are some It is not related to the IP protocol, but it will not affect the communication between computers. Its configuration parameters make the computer communication on the network convenient and easy to realize. And DHCP can rent IP addresses, which is a more prominent function compared to BOOTP, especially for large-scale networks with many computers, such as a campus network in a university, each computer has a static IP address Sometimes it may be unnecessary. The DHCP server specifies a lease period for each IP address. The lease period can be 1 minute or indefinite. The client can also continue to use IP resources by renewing the lease. When the lease expires, the DHCP server can reclaim the IP address and distribute it to other machines. In addition, DHCP can also satisfy mobile services very well. Because DHCP provides a reservation mechanism, although the physical location of the client has changed, the basic information of the client still exists in the server. When the client sends a request again, if the IP address Previously used addresses can still be used if they have not been allocated.

现有DHCP技术可以很好地使用在企业内部的局域网中,极大地减轻TCP/IP网络的规划、管理和维护的负担,自动进行IP地址的分配与回收,基本上不需要人为干预。但现有的DHCP组网方式对DHCP服务器是不进行限制的,如果网络中存在多台DHCP服务器,则有可能导致DHCP客户端无法识别所信任的DHCP服务器从而分配到不合适的IP地址,以致于不能正常进行相应的网络功能。The existing DHCP technology can be well used in the enterprise's internal LAN, greatly reducing the burden of TCP/IP network planning, management and maintenance, and automatically assigning and recycling IP addresses, basically without human intervention. However, the existing DHCP networking method does not limit the DHCP server. If there are multiple DHCP servers in the network, it may cause the DHCP client to fail to identify the trusted DHCP server and assign an inappropriate IP address, resulting in Therefore, the corresponding network functions cannot be performed normally.

发明内容Contents of the invention

本发明要解决的技术问题是克服现有技术存在的DHCP客户端缺乏对DHCP服务器识别机制的缺点,进而提供一种DHCP客户端识别DHCP服务器的方法,充分利用DHCP方便网络管理的特性,并配合对DHCP服务器的识别功能,实现用户的DHCP客户端接入。The technical problem to be solved by the present invention is to overcome the shortcoming that the DHCP client in the prior art lacks the DHCP server identification mechanism, and then provide a method for the DHCP client to identify the DHCP server, make full use of the convenient network management characteristics of DHCP, and cooperate with The identification function of the DHCP server realizes the user's DHCP client access.

本发明提供一种DHCP客户端识别DHCP服务器的方法,技术方案包括以下步骤:The invention provides a method for a DHCP client to identify a DHCP server, and the technical solution comprises the following steps:

步骤一:DHCP客户端设置所信任的DHCP服务器信息;Step 1: The DHCP client sets the trusted DHCP server information;

步骤二:DHCP客户端发出DHCP发现数据包,网络中DHCP服务器响应该请求并发出DHCP提供数据包;Step 2: The DHCP client sends a DHCP discovery packet, and the DHCP server in the network responds to the request and sends a DHCP offer packet;

步骤三:DHCP客户端针对DHCP服务器响应的DHCP提供数据包,解析该DHCP服务器的信息,如果符合设置的信任信息,则继续DHCP协商过程并执行步骤四,否则直接丢弃报文;Step 3: The DHCP client provides a data packet for the DHCP response of the DHCP server, and analyzes the information of the DHCP server. If it conforms to the set trust information, then continue the DHCP negotiation process and perform step 4, otherwise directly discard the message;

步骤四:对DHCP客户端判定为受信任的DHCP服务器,DHCP客户端接受该DHCP服务器分配IP地址和相关配置信息的内容,接入到所指定请求的网络中。Step 4: Determining the DHCP client as a trusted DHCP server, the DHCP client accepts the IP address assigned by the DHCP server and the content of related configuration information, and accesses the designated requested network.

相较与现有技术,本发明通过DHCP客户端指定所信任的DHCP服务器的信息实现了DHCP服务器的适格识别,解决了现有网络中存在多个DHCP服务器时分配IP地址的不确定性导致的DHCP客户端不能正常接入网络的问题。Compared with the prior art, the present invention realizes the qualified identification of the DHCP server through the information of the trusted DHCP server specified by the DHCP client, and solves the uncertainty of assigning IP addresses when there are multiple DHCP servers in the existing network. The DHCP client cannot access the network normally.

附图说明Description of drawings

图1是本发明方法流程图;Fig. 1 is a flow chart of the method of the present invention;

图2是本发明方法应用的系统模型图。Fig. 2 is a system model diagram of the application of the method of the present invention.

具体实施方式Detailed ways

以下通过附图,并结合实施例进一步说明本发明在DHCP客户端接入业务的具体实现。The specific realization of the access service of the DHCP client in the present invention will be further described below with reference to the accompanying drawings and embodiments.

图2是本发明方法应用的系统模型:在本地局域网中,存在有多台DHCP服务器的情况下,通过本发明方法可以使DHCP客户端识别出所信任的DHCP服务器,接受其分配IP地址和相关配置信息的功能。Fig. 2 is the system model of the application of the inventive method: in the local area network, there are many DHCP servers, the DHCP client can be identified by the inventive method to recognize the trusted DHCP server, and accept its allocation of IP addresses and related configurations information function.

结合图1,本发明提出两个实施例。With reference to Fig. 1, the present invention proposes two embodiments.

第一实施例,包括以下步骤:The first embodiment comprises the following steps:

第一步,客户端指定所信任的DHCP服务器MAC地址信息;In the first step, the client specifies the MAC address information of the trusted DHCP server;

第二步,DHCP客户端发出DHCP发现(DHCP DISCOVER)数据包,接收到DHCP DISCOVER数据包的DHCP服务器响应请求并发出DHCP提供(DHCP OFFER)数据包;In the second step, the DHCP client sends a DHCP discovery (DHCP DISCOVER) packet, and the DHCP server that receives the DHCP DISCOVER packet responds to the request and sends a DHCP offer (DHCP OFFER) packet;

第三步,DHCP客户端针对DHCP服务器响应的DHCP OFFER数据包,解析该DHCP服务器的MAC地址;In the third step, the DHCP client resolves the MAC address of the DHCP server for the DHCP OFFER packet responded by the DHCP server;

第四步,判断解析出的MAC地址是否符合客户端设置的所信任的DHCP服务器MAC地址。如果符合则进行后续的DHCP协商过程;如果不符合则直接丢弃报文。The fourth step is to determine whether the parsed MAC address matches the MAC address of the trusted DHCP server set by the client. If it matches, the subsequent DHCP negotiation process will be carried out; if not, the packet will be discarded directly.

对DHCP客户端判定为受信任的DHCP服务器,DHCP客户端接受该DHCP服务器分配IP地址和相关配置信息的内容,接入到所指定请求的网络中。For the DHCP server judged as trusted by the DHCP client, the DHCP client accepts the content of the IP address and related configuration information assigned by the DHCP server, and accesses the designated requested network.

第二实施例,包括以下步骤:The second embodiment comprises the following steps:

第一步,客户端指定所信任的DHCP服务器的IP地址;In the first step, the client specifies the IP address of the trusted DHCP server;

第二步,DHCP客户端发出DHCP DISCOVER数据包,接收到DHCP DISCOVER数据包的DHCP服务器响应该请求并发出DHCPOFFER数据包;In the second step, the DHCP client sends a DHCP DISCOVER packet, and the DHCP server that receives the DHCP DISCOVER packet responds to the request and sends a DHCPOFFER packet;

第三步,DHCP客户端针对DHCP服务器响应的DHCP OFFER数据包,解析DHCP服务器的IP地址;In the third step, the DHCP client resolves the IP address of the DHCP server for the DHCP OFFER packet responded by the DHCP server;

第四步,判断解析出的IP地址是否符合客户端设置的所信任的DHCP服务器IP地址。如果符合则进行后续的DHCP协商过程;如果不符合则直接丢弃报文。The fourth step is to judge whether the resolved IP address matches the trusted DHCP server IP address set by the client. If it matches, the subsequent DHCP negotiation process will be carried out; if not, the packet will be discarded directly.

对DHCP客户端判定为受信任的DHCP服务器,DHCP客户端接受该DHCP服务器分配IP地址和相关配置信息的内容,接入到所指定请求的网络中。For the DHCP server judged as trusted by the DHCP client, the DHCP client accepts the content of the IP address and related configuration information assigned by the DHCP server, and accesses the designated requested network.

综上所述,本发明的方法很好地融合了DHCP便于网络管理的特性,同时又满足了DHCP客户端对所请求的DHCP服务器认证的要求,创造性地对DHCP客户端接入宽带网络的方式进行了扩展。In summary, the method of the present invention well integrates the characteristics of DHCP that are convenient for network management, and at the same time meets the requirements of the DHCP client for the authentication of the requested DHCP server, and creatively provides a way for the DHCP client to access the broadband network. was expanded.

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

Claims (3)

1. the method for dhcp client identification Dynamic Host Configuration Protocol server may further comprise the steps:
Step 1: dhcp client is provided with the Dynamic Host Configuration Protocol server information of being trusted;
Step 2: dhcp client sends DHCP and finds packet, this request of dhcp server response and send DHCP packet is provided in the network;
Step 3: dhcp client provides packet at the DHCP of dhcp server response, resolves the information of this Dynamic Host Configuration Protocol server, if meet the trust information of setting, then continues DHCP negotiations process and execution in step four, otherwise direct dropping packets;
Step 4: dhcp client is judged to be the Dynamic Host Configuration Protocol server of being trusted, and dhcp client is accepted the content of this Dynamic Host Configuration Protocol server distributing IP address and relevant configuration information, is linked in the network of specified request.
2. method according to claim 1 is characterized in that, it is the mac address information of specifying Dynamic Host Configuration Protocol server that dhcp client is provided with the Dynamic Host Configuration Protocol server information of being trusted.
3. method according to claim 1 is characterized in that, it is the IP address of specifying Dynamic Host Configuration Protocol server that dhcp client is provided with the Dynamic Host Configuration Protocol server information of being trusted.
CN2005100415937A 2005-08-24 2005-08-24 A method for DHCP client to identify DHCP server Expired - Fee Related CN1921496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2005100415937A CN1921496B (en) 2005-08-24 2005-08-24 A method for DHCP client to identify DHCP server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2005100415937A CN1921496B (en) 2005-08-24 2005-08-24 A method for DHCP client to identify DHCP server

Publications (2)

Publication Number Publication Date
CN1921496A CN1921496A (en) 2007-02-28
CN1921496B true CN1921496B (en) 2010-04-14

Family

ID=37779065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2005100415937A Expired - Fee Related CN1921496B (en) 2005-08-24 2005-08-24 A method for DHCP client to identify DHCP server

Country Status (1)

Country Link
CN (1) CN1921496B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677279B (en) * 2008-09-16 2014-05-21 华为终端有限公司 LAN device, gateway and association method thereof
CN102299932B (en) * 2011-09-22 2015-03-18 杭州华三通信技术有限公司 Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server
CN102647486B (en) * 2012-04-28 2015-11-25 华为技术有限公司 Address distribution method, equipment and system
CN102970383B (en) * 2012-11-13 2018-07-06 中兴通讯股份有限公司 A kind of method and device, method and device of information processing for distributing IP address
TWI511513B (en) 2012-11-14 2015-12-01 Wistron Corp Detection method in network system and related apparatus
CN106790701A (en) * 2017-02-23 2017-05-31 郑州云海信息技术有限公司 It is a kind of to orient the method and device that Dynamic Host Configuration Protocol server is specified in request
CN111464523A (en) * 2020-03-27 2020-07-28 深圳融安网络科技有限公司 Network monitoring method, terminal device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450766A (en) * 2002-04-10 2003-10-22 深圳市中兴通讯股份有限公司 User management method based on dynamic mainframe configuration procotol
CN1458761A (en) * 2002-05-15 2003-11-26 华为技术有限公司 Broadband network access method
JP2004228799A (en) * 2003-01-21 2004-08-12 Ntt Docomo Inc Gateway apparatus and network connection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450766A (en) * 2002-04-10 2003-10-22 深圳市中兴通讯股份有限公司 User management method based on dynamic mainframe configuration procotol
CN1458761A (en) * 2002-05-15 2003-11-26 华为技术有限公司 Broadband network access method
JP2004228799A (en) * 2003-01-21 2004-08-12 Ntt Docomo Inc Gateway apparatus and network connection method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任凤姣,王 洪,贾卓生.DHCP安全系统.计算机工程30 17.2004,30(17),127-129.
任凤姣,王洪,贾卓生.DHCP安全系统.计算机工程30 17.2004,30(17),127-129. *

Also Published As

Publication number Publication date
CN1921496A (en) 2007-02-28

Similar Documents

Publication Publication Date Title
US9237147B2 (en) Remote access manager for virtual computing services
US8605582B2 (en) IP network system and its access control method, IP address distributing device, and IP address distributing method
US20040064559A1 (en) Method and apparatus for dynamic assignment of network protocol addresses
US20150058967A1 (en) Remote Access Manager for Virtual Computing Services
CN1466341A (en) A Method of Preventing IP Address Spoofing in Dynamic Address Assignment
US7991856B2 (en) Network system
WO2010069181A1 (en) Method and system for configuring ipv6 address
CN102771149A (en) Systems and methods for managing IPv6 addresses and access policies
CN103078877B (en) Based on the user authentication of DNS and domain name access control method and system
CN102036422B (en) Method, device and system for acquiring IP address
WO2014101041A1 (en) Ipv6 address tracing method, device, and system
WO2021121040A1 (en) Broadband access method and apparatus, device, and storage medium
CN101084657A (en) Gateway, network configuration, and method for controlling access to web server
WO2011147343A1 (en) Method, device and system for address assignment in internet protocol (ip) networks
US20080320115A1 (en) Apparatus, method and system for acquiring ipv6 address
CN1921496B (en) A method for DHCP client to identify DHCP server
US20200267116A1 (en) Internet protocol version six address management
CN105827420A (en) Method and device for identifying illegal servers
WO2012034428A1 (en) Method and service node for ip address reassignment
CN102056166B (en) Multihoming implementation method and system in IPSPLIT network
KR100582181B1 (en) Communication system and method using multiple IP addresses
WO2022135132A1 (en) Service processing method and apparatus, electronic device, and storage medium
US20060193330A1 (en) Communication apparatus, router apparatus, communication method and computer program product
JP2004104355A (en) Method and apparatus for managing network address and network address management system
CN111935336A (en) IPv 6-based network management method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING POWER ECONOMIC RESEARCH INSTITUTE

Free format text: FORMER OWNER: ZTE CORPORATION

Effective date: 20140129

Owner name: STATE GRID BEIJING ELECTRIC POWER COMPANY CHINA TE

Effective date: 20140129

COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518057 SHENZHEN, GUANGDONG PROVINCE TO: 100055 XICHENG, BEIJING

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20140129

Address after: 100055 No. 15 West Street, Guanganmen station, Beijing, Xicheng District

Patentee after: State Power Economic Research Institute

Patentee after: State Grid Beijing Electric Power Company

Patentee after: CHINA TECHNOLOGY EXCHANGE CO., LTD.

Address before: 518057 law department, Zhongxing building, South hi tech Industrial Park, Nanshan District hi tech Industrial Park, Guangdong, Shenzhen

Patentee before: ZTE Corporation

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100414

Termination date: 20150824

EXPY Termination of patent right or utility model