WO2011000258A1 - Method and device for acquiring configuration information based on dynamic host configuration protocol - Google Patents

Method and device for acquiring configuration information based on dynamic host configuration protocol Download PDF

Info

Publication number
WO2011000258A1
WO2011000258A1 PCT/CN2010/073799 CN2010073799W WO2011000258A1 WO 2011000258 A1 WO2011000258 A1 WO 2011000258A1 CN 2010073799 W CN2010073799 W CN 2010073799W WO 2011000258 A1 WO2011000258 A1 WO 2011000258A1
Authority
WO
WIPO (PCT)
Prior art keywords
dhcp
address
client
server
dhcp client
Prior art date
Application number
PCT/CN2010/073799
Other languages
French (fr)
Chinese (zh)
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
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011000258A1 publication Critical patent/WO2011000258A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for acquiring configuration information based on a dynamic host allocation protocol.
  • a dynamic host allocation protocol (DHCP) is referred to as a TCP/IP protocol cluster.
  • the RFC standard is 2131, which is mainly used to allocate dynamic IP addresses to network clients. These assigned IP addresses are a set of addresses consisting of multiple addresses reserved in advance by the DHCP server, and they are generally a contiguous address.
  • the current DHCP server has three types of address allocation, including: manual allocation, automatic allocation, and dynamic allocation. In the above three allocation processes, the DHCP client obtains the IP address according to the text negotiation process shown in Figure 1 below. FIG.
  • FIG. 1 is a schematic diagram of a DHCP message negotiation process according to the related art.
  • DHCPDISCOVER DHCP discovery
  • DHCPOFFER DHCP response 4
  • DHCPREQUEST DHCP request 4
  • DHCPACK DHCP confirmation 4
  • 2 is a DHCP message format according to the related art, wherein a DHCP message format definition is as shown in FIG. 2.
  • the main terms and concepts of the following three DHCP server configurations are as follows:
  • Scope The service unit of the DHCP server that comes with Windows 2000 is a subnet. For each subnet served, define a scope (including subnet network IP address, mask, assignable IP address pool, gateway, routing, DNS, etc.), when DHCP clients are served within the subnet When the DHCPDISCOVER request is issued, the available IP address is selected in the corresponding scope IP address pool to respond.
  • User class User classes can be defined to define specific configuration parameters (such as gateways, routes, DNS, etc.) assigned to specific DHCP clients or client collections. The option corresponding to the Windows 2000 DHCP SERVER user class is option 77.
  • the DHCPDISCOVER request packet sent by the DHCP client carries option 77, which fills in the custom content that can identify the client, such as "clientl";
  • the client's monthly server's DHCP server also needs to be configured accordingly.
  • a user class corresponding to "clientl” is defined in the scope to which the client belongs, and the gateway, route, and DNS are specified for the "clientl" user class. And other configurations. Therefore, the DHCP client identified by the clientl obtains configuration data such as gateway, routing, and DNS specified by the server.
  • MAC Medium Access Control
  • MAC address binding In the existing standard negotiation process, in order to achieve the purpose of allocating the specified configuration parameters for the specified client, the general practice is to use the MAC address of the DHCP client as a distinction between different clients, using MAC address binding. The method is implemented. However, in a specific application scenario of a wireless network device (such as a base station device) in a mobile communication network, each BTS network element of the base station system serves as a DHCP client, and obtains a specified configuration to the DHCP server for networking. There are two special requirements:
  • both the primary and backup systems need to be assigned the same IP address, that is, the same specified IP address is assigned to different MAC addresses.
  • Each BTS network element of the base station system not only needs to obtain its own IP address, but also needs to obtain the IP address information of other network elements (BSC network element, background system OMC, etc.) before the network configuration process can be completed.
  • BSC network element background system OMC, etc.
  • the existing standard DHCP negotiation has the following limitations for the special application scenarios in the mobile communication network described above:
  • the method of MAC address binding can only assign the specified IP address to the specified DHCP client, but for other configuration information required by the DHCP client, it cannot be used for each DHCP.
  • the client allocates the specified configuration information other than its own IP address. For example, when a DHCP client A belongs to the scope A (ie, a subnet) on the server A that serves it, the MAC address of the client A and an IP address in the scope A are on the server A. After the binding, after the standard DHCP negotiation is completed, Server A assigns the specified IP address to the client A. However, other configuration information such as gateways, routes, and so on are allocated in the scope of the scope.
  • the main object of the present invention is to provide an acquisition scheme of configuration information based on DHCP to solve at least one of the above problems.
  • a method for acquiring configuration information based on DHCP includes: the DHCP client obtains its own IP address, and determines whether the IP address is available.
  • the DHCP client sends a DHCP notification to the DHCP server. 4, where the DHCP notification message is used to notify the DHCP server of the IP address, and requests the DHCP server to send other configuration parameters than the IP address; the DHCP client receives the DHCP confirmation message returned by the DHCP server. And obtain other configuration parameters from the DHCP acknowledgement message.
  • the obtaining, by the DHCP client, the IP address comprises: the DHCP client obtaining its own IP address locally.
  • the DHCP client obtains the IP address, including: the DHCP client searches for the IP address locally, and if the IP address is 0, the DHCP client sends the DHCP sender to the DHCP server.
  • the DHCP message is used to request the IP address.
  • the DHCP client receives the DHCP response message returned by the DHCP server.
  • the DHCP response message carries the IP address information.
  • the DHCP client responds from the DHCP.
  • 4) Obtain the IP address information in the text, and obtain the IP address based on the IP address information.
  • the DHCP notification message further carries at least one of the following: a request parameter list option, and an option for the DHCP server to identify the DHCP client.
  • the DHCP discovery broadcast message further carries at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client.
  • the request parameter list option further includes: an option code for requesting a subnet mask, an option code for requesting a gateway address, and a customized option code, wherein the customized option code is an option code for requesting an IP address.
  • the option for the DHCP server to identify the DHCP client further includes: a MAC address of the DHCP client, and electronic barcode information of the DHCP client.
  • the method further includes: if the determination result is no, the DHCP client continues to send the DHCP discovery broadcast message to the DHCP server, wherein the DHCP discovery broadcast message is used. Request an IP address.
  • a DHCP client in another aspect of the present invention, includes: a first obtaining module, configured to acquire an IP address of a DHCP client; a determining module, configured to determine whether an IP address obtained by the first obtaining module is available; and a sending module, configured to determine in the determining module If the result is yes, the DHCP server sends a DHCP notification message to the DHCP server, where the DHCP notification message is used to notify the DHCP server end IP address, and requests the DHCP server to report other than the IP address.
  • the configuration module is configured to receive a DHCP confirmation message returned by the DHCP server, wherein the DHCP confirmation message carries other configuration parameters, and the second acquisition module is configured to receive the DHCP confirmation from the receiving module.
  • the first obtaining module includes: a first obtaining submodule, configured to locally obtain an IP address of the DHCP client from the DHCP client.
  • the first obtaining module includes: a searching submodule, configured to locally check from a DHCP client The IP address is sent; the sending sub-module is configured to send a DHCP discovery broadcast message to the DHCP server when the search result of the search sub-module is the IP address is 0, wherein the DHCP discovery broadcast message is used to request an IP address;
  • the receiving submodule is configured to receive a DHCP response message returned by the DHCP server, where the DHCP response message carries the IP address information, and the second obtaining submodule is configured to obtain the IP address from the DHCP response message received by the receiving submodule.
  • the third information obtaining module is configured to obtain an IP address according to the IP address information acquired by the second obtaining submodule.
  • the method for obtaining all configuration parameters according to the acquired IP address and other configuration parameters returned by the DHCP server is used by the DHCP client, and the related technologies cannot satisfy different MAC addresses. If the same specified IP address is assigned, the method of MAC address binding cannot meet the configuration information assigned to each DHCP client except its own IP address, and the configuration specified for the specified DHCP client cannot be configured.
  • the problem of data achieves the purpose of assigning specified configuration data to a specified DHCP client and is not restricted by the client MAC address.
  • FIG. 1 is a schematic diagram of a DHCP protocol according to the related art
  • FIG. 2 is a DHCP message format according to the related art
  • FIG. 3 is a schematic diagram of a BSS system model according to an embodiment of the present invention
  • 4 is a flowchart of a method for acquiring DHCP-based configuration information according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a DHCP protocol according to an embodiment of the present invention
  • FIG. 6 is a modification according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a client according to an embodiment of the present invention; and
  • FIG. 8 is a block diagram showing a preferred structure of a client according to an embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In view of the fact that the related technologies cannot meet the same specified IP address for different MAC addresses, the method of MAC address binding cannot satisfy the assignment of each DHCP client except its own IP address.
  • the configuration information of the DHCP-based configuration information is obtained by the DHCP client, and the DHCP client obtains the IP address of the DHCP client.
  • the DHCP client sends a DHCP notification message to the DHCP server, wherein the DHCP notification message is used to notify the IP address, and requests the DHCP server.
  • the terminal reports other configuration parameters except the IP address; the DHCP client receives the DHCP confirmation message returned by the DHCP server, and obtains other configuration parameters from the DHCP confirmation message. In this way, the DHCP client gets all the configuration parameters including the IP address and other configuration parameters.
  • FIG. 3 is a schematic diagram of a BSS system model according to an embodiment of the present invention.
  • a base station Base Transceiver Station, BTS for short
  • a base station controller Base Station Controller
  • OMC Operation and Maintenance Centre
  • DHCP server in the office i or the network
  • the network element BTS acts as a DHCP client to the LAN.
  • FIG. 4 is a flowchart of a method for acquiring DHCP-based configuration information according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps S402 to S406: Step S402, the DHCP client obtains its own IP.
  • the DHCP client sends a DHCP notification message to the DHCP server, where the DHCP notification message is used to notify the DHCP server IP address, and requests the DHCP server to report the IP address. Other configuration parameters. If the judgment result is no, the DHCP client continues to send a DHCP discovery broadcast message to the DHCP server, where the DHCP discovery broadcast message is used to request an IP address.
  • the DHCP notification message can also carry at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client.
  • the DHCP client obtains an IP address in one of the following ways:
  • the DHCP client obtains its own IP address locally.
  • the DHCP client searches for the IP address from the local device. If the IP address is 0, the DHCP client sends a DHCP discovery broadcast packet to the DHCP server.
  • the DHCP discovery broadcast packet is used to request the IP address.
  • the DHCP client receives the broadcast packet.
  • the DHCP response message returned by the DHCP server is configured, wherein the DHCP response message carries the IP address information; the DHCP client obtains the IP address information from the DHCP response message, and obtains the IP according to the IP address information. address.
  • the DHCP discovery broadcast packet carries at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client.
  • the request parameter list option may further include: an option code requesting a subnet mask, an option code requesting a gateway address, and a custom option code, the custom option code being an option code for requesting an IP address.
  • the option for the DHCP server to identify the DHCP client may further include: a MAC address of the DHCP client, and an electronic barcode information of the DHCP client.
  • Step S404 The DHCP client receives the DHCP confirmation message returned by the DHCP server, and obtains other configuration parameters from the DHCP confirmation message, where the DHCP confirmation message carries other configuration parameters.
  • the DHCP client obtains all configuration parameters, wherein all configuration parameters include: IP address and other configuration parameters.
  • the DHCP negotiation process is completed by using DHCPDISCOVER, DHCPOFFER, DHCPINFORM (DHCP notification) and DHCPACK four-step interaction, and the specified configuration data is allocated for the specified DHCP client and is not subject to the client. End MAC address The purpose of the restriction.
  • the present invention also defines a DHCP client state machine for the above scheme, in which two states of address check and notification are added, which will be described in detail later.
  • FIG. 5 is a schematic diagram of a DHCP message negotiation process according to an embodiment of the present invention.
  • Step 1 The DHCP client obtains an IP address from itself. If the obtained IP address is not 0, step 4 is performed; otherwise, step 2 is performed.
  • Step 2 The DHCP client sends a DHCPDISCOVER broadcast message to the DHCP server.
  • the options in the option field in the message are: option77 (user class id, user category option): Fill in the DHCP client here. Electronic barcode, the DHCP server uses this option to identify different DHCP clients and assign the specified configuration.
  • the option code may be other values, including information that uniquely identifies the client, including but not limited to information such as MAC address, electronic bar code (EID).
  • Option55 parameter request list, request parameter list option: jt ⁇ is filled in with option code 1 in order to request the subnet mask; option code 3 is used to request the gateway address; and custom option code 41 is used Request the DHCP client IP address.
  • the standard defines option41 as the network information servers, which is used to request the DHCP client IP address.
  • option 41 is user-defined, and other optional An option code not used in the negotiation.
  • Step 3 After receiving the DHCPOFFER 4 message returned by the DHCP server, the DHCP client obtains the subnet mask, the gateway address, and the IP address configuration through Option 1, 3, and the custom option 41, respectively. If the IP address is available, go to step 4 if available, otherwise go to step 2.
  • Step 4 The DHCP client sends a DHCPINFORM message to the DHCP server to notify the DHCP server of its own IP address, and requests the IP address of the BSC and the OMC server IP address required by the DHCP client.
  • Configuration parameters including: option code 1 (requesting subnet mask), option code 3 (requesting gateway address), custom option code, other configuration parameters in this step include but are not limited to the above Out of options, DHCP
  • option code 1 requesting subnet mask
  • option code 3 requesting gateway address
  • custom option code other configuration parameters in this step include but are not limited to the above Out of options
  • DHCP The standard option codes and custom option codes for the various configuration parameters required by the client can be added here.
  • option field ciaddr (client IP address field): Enter the client's own IP address obtained in step 1 or step 3 here; option77 (user class id, user category option;) : Same as in step 2; option55 ( parameter request list): jt ⁇ is filled in with option code 1 (request subnet mask), option code 3 (request gateway address;), custom Option code 6 (Request the BSC's IP address;), Custom Option Code 44 (Request OMC server IP address;).
  • step 5 After the DHCP client receives the DHCPACK message returned by the DHCP server, the DHCP client obtains all configuration parameters, and the configuration parameters include the IP address and other configuration parameters.
  • Step 6 After obtaining all the configuration information required by the DHCP client, the BTS saves the configuration, and the BTS starts to establish a link by using the obtained configuration.
  • the options 6, the options 41 and the options 44 utilized in the above steps are user-defined meanings, and the user-definable options include but are not limited to the above mentioned.
  • the state machine of the DHCP client is designed.
  • FIG. 6 is a schematic diagram of a modified DHCP client state machine according to an embodiment of the present invention. As shown in FIG. 6, the DHCP client state machine operation process includes:
  • the DHCP client is in the "A: Stop ⁇ ! Large state".
  • DHCP negotiation is started.
  • the operation of configuring the Ethernet interface is performed. After the state transitions to "D: Address check status,;
  • the DHCP client is in the "B: initial state,", the operation of transmitting the DHCPDISCOVER broadcast message is performed, and the state transitions to "C: selection state";
  • the DHCP client is in "C: Select state” and receives an acceptable DHCPOFFER 4 message, such as the DHCP client's available DHCPOFFER 4 option 43 ( Vendor) Specific Information, vendor-specific message) to distinguish whether the message is acceptable, obtain the information assigned to its own IP address from the DHCPOFFER message, perform the operation of configuring the Ethernet interface, and then transition to "D: address. Check status";
  • an acceptable DHCPOFFER 4 message such as the DHCP client's available DHCPOFFER 4 option 43 ( Vendor) Specific Information, vendor-specific message
  • the DHCP client is in "C: Select state", and if it receives an unacceptable DHCPOFFER message, it will remain in this state;
  • the DHCP client is in the C: selection state, and, when a timeout event is received, the total time for the DHCP negotiation is timed out;
  • the DHCP client is in the "D: address check status, and, if the obtained IP address is available, the DHCPINFORM message is sent to the DHCP server, and the status transitions to "E: notification status";
  • the DHCP client is in the "D: address check status, and, if the obtained IP address is not available, continue to send DHCPDISCOVER 4, the status returns to "C: Select Status";
  • the DHCP client is in the "E: notification state", receives an acceptable DHCPACK message, distinguishes whether the DHCPACK can be accepted or not, and the judgment of DHCPOFFER in [C1], and obtains the IP address from the DHCPACK.
  • Other requested configuration data is saved and saved, and the state transitions to "F: Bind ⁇ I state";
  • the DHCP client is in the ' ⁇ : Notification Status'. If it receives an unacceptable DHCPACK message, it will remain in this state.
  • the DHCP client is in the "E: notification state," and if the timeout event is received, the total time for the DHCP negotiation is timed out.
  • FIG. 7 is a structural block diagram of a client according to an embodiment of the present invention.
  • the DHCP client 101 includes: a first acquiring module 2, a determining module 4, a sending module 6, a receiving module 8, and a second acquiring module 10.
  • the third obtaining module 12 the above structure will be described below.
  • the first obtaining module 2 is configured to obtain an IP address of the DHCP client, and the determining module 4 is connected to the first obtaining module 2, configured to determine whether the IP address acquired by the first obtaining module 2 is available; the sending module 6 is connected to the determining module 4, configured to send a DHCP notification message to the DHCP server 202 when the determination result of the determination module 4 is YES, wherein the DHCP notification message is used to notify the DHCP server 202 of the acquired IP.
  • FIG. 8 is a block diagram of a preferred structure of a client according to an embodiment of the present invention. As shown in FIG.
  • the first acquiring module 2 includes: a first obtaining submodule 22, a searching submodule 24, a sending submodule 26, and a receiving subroutine.
  • the module 28, the second acquisition submodule 30, and the third acquisition submodule 32 are described below.
  • a first obtaining sub-module 22, configured to locally obtain an IP address of the DHCP client 101 from a DHCP client;
  • a searching sub-module 24 for searching for an IP address locally;
  • the receiving sub-module 28 is configured to Receiving the DHCP response message returned by the DHCP server 202, wherein the DHCP response message carries the IP address information;
  • the second obtaining submodule 30 is connected to the receiving submodule 28 for receiving the
  • the IP address information is obtained in the text.
  • the third obtaining sub-module 32 is connected to the second obtaining sub-module 30 for obtaining an IP address according to the IP address information acquired by the second obtaining sub-module 30.
  • the foregoing embodiment replaces the originally used DHCPREQUEST broadcast message with the DHCPINFORM unicast message in the DHCP negotiation process; and customizes through the client.
  • the configuration option is used to replace the purpose of the original field in the DHCP message, for example, using a custom option to obtain the IP address assigned to the client from the DHCP server, instead of using the yiaddr (IP address assigned to the client) field in the text;
  • the packets sent by the DHCP client carry the option that the DHCP server can use to distinguish each DHCP client.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Abstract

The present invention discloses a method and device for acquiring configuration information based on Dynamic Host Configuration Protocol (DHCP). The method includes that a DHCP client acquires its own Internet Protocol (IP) address, and judges whether the IP address is available; if the judgment result is yes, the DHCP client sends a DHCP notification message to a DHCP server, wherein, the DHCP notification message is used for notifying the DHCP server of the IP address and requesting the DHCP server to report other configuration parameters except the IP address; the DHCP client receives a DHCP acknowledgement message returned by the DHCP server, and acquires other configuration parameters from the DHCP acknowledgement message. The present invention can allocate designated configuration data to a designated DHCP client without the limitation of the Media Access Control (MAC) address of the client.

Description

基于动态主机分配协议的配置信息的获取方法和装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种基于动态主机分配协议的配 置信息的获取方法和装置。 背景技术 动态主机分配协议( Dynamic Host Configuration Protocol,简称为 DHCP ) 简称为 TCP / IP )协议簇中的一种, RFC标准为 2131 , 主要是用来给网络客 户机分配动态的 IP地址。 这些被分配的 IP地址都是 DHCP服务器预先保留 的一个由多个地址组成的地址集, 并且它们一般是一段连续的地址。 目前的 DHCP月艮务器有三种地址分配方式, 包括: 手工分配、 自动分配和动态分配。 在上述三种分配过程中, DHCP客户端获取 IP地址都是按照如下图 1所示的 艮文协商过程来进行的。 图 1是根据相关技术的 DHCP报文协商过程的示意图, 如图 1所示的现 有的 DHCP报文协商过程中, 釆用 DHCPDISCOVER ( DHCP发现 4艮文)、 DHCPOFFER ( DHCP 应答 4艮文)、 DHCPREQUEST ( DHCP 请求 4艮文) 和 DHCPACK ( DHCP确认 4艮文) 四步 4艮文交互来完成 DHCP的协商过程。 图 2是根据相关技术的 DHCP报文格式, 其中, DHCP报文格式定义如图 2所 示。 以常用的 Windows 2000 Server作为 DHCP月艮务器为例, 主要有以下三 个 DHCP服务器端配置的相关术语和概念:  The present invention relates to the field of communications, and in particular to a method and apparatus for acquiring configuration information based on a dynamic host allocation protocol. A dynamic host allocation protocol (DHCP) is referred to as a TCP/IP protocol cluster. The RFC standard is 2131, which is mainly used to allocate dynamic IP addresses to network clients. These assigned IP addresses are a set of addresses consisting of multiple addresses reserved in advance by the DHCP server, and they are generally a contiguous address. The current DHCP server has three types of address allocation, including: manual allocation, automatic allocation, and dynamic allocation. In the above three allocation processes, the DHCP client obtains the IP address according to the text negotiation process shown in Figure 1 below. FIG. 1 is a schematic diagram of a DHCP message negotiation process according to the related art. In the existing DHCP message negotiation process shown in FIG. 1, DHCPDISCOVER (DHCP discovery) and DHCPOFFER (DHCP response 4) are used. DHCPREQUEST (DHCP request 4) and DHCPACK (DHCP confirmation 4) Four-step 4 text interaction to complete the DHCP negotiation process. 2 is a DHCP message format according to the related art, wherein a DHCP message format definition is as shown in FIG. 2. Take the commonly used Windows 2000 Server as the DHCP server. The main terms and concepts of the following three DHCP server configurations are as follows:
1 ) 作用域 ( Scope ): Windows 2000所带的 DHCP服务器的服务单位是 子网。对每个所服务的子网, 定义一个作用域(包括子网网络 IP地址,掩码, 可分配的 IP地址池、 网关、路由、 DNS等配置), 当被服务的子网内的 DHCP 客户端发出 DHCPDISCOVER请求时, 在对应的作用域的 IP地址池内选择 可用的 IP地址来响应。 2 ) 用户类 ( user class ): 可以定义用户类来对特定的 DHCP客户端或者 客户端集合定义分配给它们的特定的配置参数(比如网关、 路由、 DNS等)。 Windows 2000 DHCP SERVER 用户类对应的选项是 option 77, 应用举例: 在 DHCP客户端发出的 DHCPDISCOVER请求报文中携带 option 77 ,其中填 入可以标识该客户端的自定义内容,如" clientl"; 在为该客户端月艮务的 DHCP 服务器上也需要进行相应的配置, 在该客户端所属的作用域内定义一个对应 的" clientl"的用户类, 对" clientl"用户类进行指定的网关、 路由、 DNS 等配 置。 因此, clientl所标识的 DHCP客户端从服务器获取到为自己指定的网关、 路由、 DNS等配置数据。 1) Scope: The service unit of the DHCP server that comes with Windows 2000 is a subnet. For each subnet served, define a scope (including subnet network IP address, mask, assignable IP address pool, gateway, routing, DNS, etc.), when DHCP clients are served within the subnet When the DHCPDISCOVER request is issued, the available IP address is selected in the corresponding scope IP address pool to respond. 2) User class: User classes can be defined to define specific configuration parameters (such as gateways, routes, DNS, etc.) assigned to specific DHCP clients or client collections. The option corresponding to the Windows 2000 DHCP SERVER user class is option 77. Application example: The DHCPDISCOVER request packet sent by the DHCP client carries option 77, which fills in the custom content that can identify the client, such as "clientl"; The client's monthly server's DHCP server also needs to be configured accordingly. A user class corresponding to "clientl" is defined in the scope to which the client belongs, and the gateway, route, and DNS are specified for the "clientl" user class. And other configurations. Therefore, the DHCP client identified by the clientl obtains configuration data such as gateway, routing, and DNS specified by the server.
3 ) 保留: 可以在 Windows 2000 DHCP SERVER中使用媒体访问控制 ( Medium Access Control, 简称为 MAC )地址来唯一的标识一个 DHCP客户 端, 并分配给该客户端特定的 IP地址, 即通常所说的 MAC地址绑定。 在现有的标准协商流程中, 要达到为指定的客户端分配指定的配置参数 的目的, 一般的做法是釆用 DHCP客户端的 MAC地址来作为不同客户端间 的区分, 利用 MAC地址绑定的方法来实现。 但是, 在移动通信网内无线侧 设备(比如基站设备等)自组网这个特定的应用场景下,基站系统的每个 BTS 网元作为 DHCP客户端, 向 DHCP服务器获取指定的配置来组网时, 有以下 两个特殊的需求: 3) Reserved: You can use the Medium Access Control (MAC) address in the Windows 2000 DHCP SERVER to uniquely identify a DHCP client and assign it to the client-specific IP address, which is commonly known. MAC address binding. In the existing standard negotiation process, in order to achieve the purpose of allocating the specified configuration parameters for the specified client, the general practice is to use the MAC address of the DHCP client as a distinction between different clients, using MAC address binding. The method is implemented. However, in a specific application scenario of a wireless network device (such as a base station device) in a mobile communication network, each BTS network element of the base station system serves as a DHCP client, and obtains a specified configuration to the DHCP server for networking. There are two special requirements:
1 ) 移动通信网的基站系统内, 普遍存在着主备系统的情况, 且在配置 时需要对主备两个系统分配相同的 IP地址, 即对不同的 MAC地址分配相同 的指定的 IP地址。 1) In the base station system of the mobile communication network, there is a general situation of the active and standby systems. In the configuration, both the primary and backup systems need to be assigned the same IP address, that is, the same specified IP address is assigned to different MAC addresses.
2 )基站系统的每个 BTS网元不仅需要获取到自身的 IP地址, 同时也需 要获取到其他网元( BSC网元、 后台系统 OMC等)的 IP地址信息后才能完 成组网配置过程。 以常用的 Windows 2000 Server作为 DHCP月艮务器为例, 对于上文描述 的移动通信网内的特殊应用场景, 现有的标准的 DHCP协商有以下的局限: 2) Each BTS network element of the base station system not only needs to obtain its own IP address, but also needs to obtain the IP address information of other network elements (BSC network element, background system OMC, etc.) before the network configuration process can be completed. Taking the common Windows 2000 Server as the DHCP server as an example, the existing standard DHCP negotiation has the following limitations for the special application scenarios in the mobile communication network described above:
1 ) 不同的 MAC地址无法与同一个 IP地址绑定, 不能满足对具有不同 的 MAC地址的 DHCP客户端分配相同的指定的 IP地址的需求。 1) Different MAC addresses cannot be bound to the same IP address, and cannot meet the requirement of assigning the same specified IP address to DHCP clients with different MAC addresses.
2 ) 釆用 MAC地址绑定的方法只能为指定的 DHCP客户端分配指定的 IP地址,但是对于 DHCP客户端所需要的其他配置信息,则无法对每个 DHCP 客户端分配指定的除自身 IP 地址外的其他配置信息。 例如, 当某个 DHCP 客户端 A属于为它提供服务的服务器 A上的作用域 A (即一个子网), 在服 务器 A上将客户端 A的 MAC地址与作用域 A中的某个 IP地址绑定后, 标 准的 DHCP协商完成后, 服务器 A向该客户端 A分配了指定的 IP地址, 但 其他配置信息如网关、 路由等, 则是以作用域为单位来进行分配。 即此种方 式下, 属于同一子网内的 DHCP客户端所获取的其他配置信息是相同的, 非 指定的。 另外, 对于 Windows 2000 Server, 也可以釆用在一个子网内 (即一个作 用域) 定义不同的用户类, 来为每个基站分配指定的信息; 然而这种情况下 DHCPOFFER报文中 yiaddr字段中携带的信息是从 DHCP服务器的地址池中 自动分配的 IP地址, 即分配给 DHCP客户端的 IP地址为非指定的, 因此, 也无法满足为指定的 DHCP客户端分配指定的配置数据的需求。 发明内容 针对相关技术中不能为具有不同的 MAC地址的 DHCP客户端分配相同 的 IP地址,以及釆用 MAC地址绑定的方法无法对每个 DHCP客户端分配指 定的除其自身 IP地址外的其他配置信息的问题而提出本发明, 为此, 本发明 的主要目的在于提供一种基于 DHCP的配置信息的获取方案, 以解决上述问 题至少之一。 为了实现上述目的, 根据本发明的一个方面, 提供了一种基于 DHCP的 配置信息的获取方法。 根据本发明的基于 DHCP的配置信息的获取方法包括: DHCP客户端获 取本身的 IP地址, 并判断 IP地址是否可用, 如果判断结果为是, 则 DHCP 客户端向 DHCP月艮务器端发送 DHCP通知 4艮文, 其中, DHCP通知 4艮文用于 通知 DHCP服务器端 IP地址, 并请求 DHCP服务器端下发除 IP地址之外的 其他配置参数; DHCP客户端接收 DHCP服务器端返回的 DHCP确认报文, 并从 DHCP确认报文中获取其他配置参数。 优选地, DHCP客户端获取 IP地址包括: DHCP客户端从本地获取本身 的 IP地址。 优选地, DHCP客户端获取 IP地址包括: DHCP客户端从本地查找 IP 地址, 如果 IP地址为 0, 则 DHCP客户端向 DHCP月艮务器端发送 DHCP发 现广播报文, 其中, DHCP发现广播报文用于请求 IP地址; DHCP客户端接 收 DHCP服务器端返回的 DHCP应答报文, 其中, DHCP应答报文携带有 IP 地址信息; DHCP客户端从 DHCP应答 4艮文中获取 IP地址信息, 并才艮据 IP 地址信息获取 IP地址。 优选地, DHCP通知报文还至少携带有以下之一: 请求参数列表选项、 DHCP月艮务器端用于标识 DHCP客户端的选项。 优选地, DHCP发现广播报文还至少携带有以下之一: 请求参数列表选 项、 DHCP服务器端用于标识 DHCP客户端的选项。 优选地, 请求参数列表选项进一步包括: 请求子网掩码的选项码、 请求 网关地址的选项码、 以及自定义的选项码, 其中, 自定义的选项码为用于请 求 IP地址的选项码。 优选地, DHCP 月艮务器端用于标识 DHCP 客户端的选项进一步包括: DHCP客户端的 MAC地址、 DHCP客户端的电子条码信息。 优选地,在判断 IP地址是否可用之后,方法还包括: 如果判断结果为否, 则 DHCP客户端继续向 DHCP月艮务器端发送 DHCP发现广播 4艮文, 其中, DHCP发现广播 4艮文用于请求 IP地址。 为了实现上述目的, 居本发明的另一个方面, 提供了一种 DHCP客户 端。 根据本发明的 DHCP客户端包括: 第一获取模块, 用于获取 DHCP客户 端的 IP地址; 判断模块, 用于判断第一获取模块获取的 IP地址是否可用; 发送模块, 用于在判断模块的判断结果为是的情况下, 向 DHCP服务器端发 送 DHCP通知 4艮文, 其中, DHCP通知 4艮文用于通知 DHCP月艮务器端 IP地 址, 并请求 DHCP服务器端上报除 IP地址之外的其他配置参数; 接收模块, 用于接收 DHCP月艮务器端返回的 DHCP确认 4艮文, 其中, DHCP确认 4艮文中 携带有其他配置参数; 第二获取模块, 用于从接收模块接收的 DHCP确认报 文中获取其他配置参数。 优选地, 第一获取模块包括: 第一获取子模块, 用于从 DHCP客户端本 地获取 DHCP客户端的 IP地址。 优选地, 第一获取模块包括: 查找子模块, 用于从 DHCP客户端本地查 找 IP地址; 发送子模块, 用于在查找子模块的查找结果为 IP地址为 0的情 况下, 向 DHCP服务器端发送 DHCP发现广播报文, 其中, DHCP发现广播 报文用于请求 IP地址;接收子模块,用于接收 DHCP服务器端返回的 DHCP 应答报文, 其中, DHCP应答报文携带有 IP地址信息; 第二获取子模块, 用 于从接收子模块接收的 DHCP应答报文中获取 IP地址信息; 第三获取子模 块, 用于根据第二获取子模块获取的 IP地址信息获取 IP地址。 通过本发明, 釆用 DHCP 客户端才艮据获取的本身的 IP 地址和接收到 DHCP 艮务器端返回的其他配置参数获取全部配置参数的方法, 解决了相关 技术中不能满足对不同的 MAC地址分配相同的指定的 IP地址, 釆用 MAC 地址绑定的方法无法满足对每个 DHCP客户端分配指定的除自身 IP地址外 的其他配置信息, 以及无法满足为指定的 DHCP客户端分配指定的配置数据 的问题, 进而实现为指定的 DHCP客户端分配指定的配置数据且不受客户端 MAC地址限制的目的。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中: 图 1是才艮据相关技术的 DHCP 4艮文协商过程的示意图; 图 2是根据相关技术的 DHCP报文格式; 图 3是根据本发明实施例的 BSS系统模型示意图; 图 4 是根据本发明实施例的基于 DHCP 的配置信息的获取方法的流程 图; 图 5是才艮据本发明实施例的 DHCP 4艮文协商过程的示意图; 图 6是根据本发明实施例的更改后的 DHCP客户端状态机的示意图; 图 7是根据本发明实施例的客户端的结构框图; 图 8是根据本发明实施例的客户端的优选结构框图。 具体实施方式 功能相克述 考虑到相关技术中不能满足对不同的 MAC地址分配相同的指定的 IP地 址, 釆用 MAC地址绑定的方法无法满足对每个 DHCP客户端分配指定的除 自身 IP地址外的其他配置信息, 以及无法满足为指定的 DHCP客户端分配 指定的配置数据的问题, 本发明实施例提供了一种基于 DHCP的配置信息的 获取方法, 该方法包括: DHCP客户端获取本身的 IP地址, 并判断 IP地址 是否可用,如果判断结果为是,则 DHCP客户端向 DHCP服务器端发送 DHCP 通知 4艮文, 其中, DHCP通知 4艮文用于通知 IP地址, 并请求 DHCP月艮务器 端上报除 IP地址之外的其他配置参数; DHCP客户端接收 DHCP服务器端 返回的 DHCP确认 4艮文, 并从 DHCP确认 4艮文中获取其他配置参数。 这样, DHCP客户端就得到了包括 IP地址和其他配置参数的全部配置参数。 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特 征可以相互组合。 下面将参考附图并结合实施例来详细说明本发明。 下文以移动通信基站系统(Base Station System, 简称为 BSS )为例, 来 阐述本发明所提供的方法的具体实施。 图 3是 居本发明实施例的 BSS系统模型示意图, 如图 3所示, 在 BSS 系统中, 网元基站) 发台 (Base Transceiver Station, 简称为 BTS )、 网元基 站控制器 ( Base Station Controller, 简称为 BSC )、 网管月艮务器操作维护中心 ( Operation and Maintenance Centre, 简称为 OMC ) 和局 i或网内的 DHCP 务器通过以太网交换机连接, 网元 BTS 作为 DHCP 客户端向局域网内的 DHCP服务器请求相关配置数据, 包括自身 IP地址、 子网掩码、 网关地址、 BSC的 IP地址以及 OMC的 IP地址等信息, 以完成 BTS与 BSC、 OMC之 间的链路建立。 方法实施例 根据本发明的实施例, 提供了一种基于 DHCP的配置信息的获取方法。 图 4是才艮据本发明实施例的基于 DHCP的配置信息的获取方法的流程图, 如 图 4所示, 该方法包括如下的步骤 S402至步骤 S406: 步骤 S402, DHCP客户端获取本身的 IP地址,并判断 IP地址是否可用, 如果判断结果为是, 则 DHCP客户端向 DHCP服务器端发送 DHCP通知报 文, 其中, DHCP通知 4艮文用于通知 DHCP月艮务器端 IP地址, 并请求 DHCP 服务器端上报除 IP地址之外的其他配置参数。 如果判断结果为否, 则 DHCP 客户端继续向 DHCP服务器端发送 DHCP发现广播报文, 其中, DHCP发现 广播 4艮文用于请求 IP地址。 其中, DHCP通知 4艮文还可以至少携带有以下之 一: 请求参数列表选项、 DHCP服务器端用于标识 DHCP客户端的选项。 其中, DHCP客户端获取 IP地址包括以下方式之一: 2) The method of MAC address binding can only assign the specified IP address to the specified DHCP client, but for other configuration information required by the DHCP client, it cannot be used for each DHCP. The client allocates the specified configuration information other than its own IP address. For example, when a DHCP client A belongs to the scope A (ie, a subnet) on the server A that serves it, the MAC address of the client A and an IP address in the scope A are on the server A. After the binding, after the standard DHCP negotiation is completed, Server A assigns the specified IP address to the client A. However, other configuration information such as gateways, routes, and so on are allocated in the scope of the scope. That is, in this mode, other configuration information acquired by the DHCP client belonging to the same subnet is the same, and is not specified. In addition, for Windows 2000 Server, it is also possible to define different user classes in one subnet (ie one scope) to assign specific information to each base station; however, in this case, the DHCPOFFER message is in the yiaddr field. The carried information is an IP address automatically assigned from the address pool of the DHCP server. That is, the IP address assigned to the DHCP client is unspecified. Therefore, the requirement for assigning the specified configuration data to the specified DHCP client cannot be met. SUMMARY OF THE INVENTION In the related art, a DHCP client having different MAC addresses cannot be assigned the same IP address, and a method of using MAC address binding cannot assign each DHCP client a specified address other than its own IP address. The present invention has been made in view of the problem of configuration information. To this end, the main object of the present invention is to provide an acquisition scheme of configuration information based on DHCP to solve at least one of the above problems. In order to achieve the above object, according to an aspect of the present invention, a method for acquiring configuration information based on DHCP is provided. The method for obtaining the DHCP-based configuration information according to the present invention includes: the DHCP client obtains its own IP address, and determines whether the IP address is available. If the judgment result is yes, the DHCP client sends a DHCP notification to the DHCP server. 4, where the DHCP notification message is used to notify the DHCP server of the IP address, and requests the DHCP server to send other configuration parameters than the IP address; the DHCP client receives the DHCP confirmation message returned by the DHCP server. And obtain other configuration parameters from the DHCP acknowledgement message. Preferably, the obtaining, by the DHCP client, the IP address comprises: the DHCP client obtaining its own IP address locally. Preferably, the DHCP client obtains the IP address, including: the DHCP client searches for the IP address locally, and if the IP address is 0, the DHCP client sends the DHCP sender to the DHCP server. The DHCP message is used to request the IP address. The DHCP client receives the DHCP response message returned by the DHCP server. The DHCP response message carries the IP address information. The DHCP client responds from the DHCP. 4) Obtain the IP address information in the text, and obtain the IP address based on the IP address information. Preferably, the DHCP notification message further carries at least one of the following: a request parameter list option, and an option for the DHCP server to identify the DHCP client. Preferably, the DHCP discovery broadcast message further carries at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client. Preferably, the request parameter list option further includes: an option code for requesting a subnet mask, an option code for requesting a gateway address, and a customized option code, wherein the customized option code is an option code for requesting an IP address. Preferably, the option for the DHCP server to identify the DHCP client further includes: a MAC address of the DHCP client, and electronic barcode information of the DHCP client. Preferably, after determining whether the IP address is available, the method further includes: if the determination result is no, the DHCP client continues to send the DHCP discovery broadcast message to the DHCP server, wherein the DHCP discovery broadcast message is used. Request an IP address. In order to achieve the above object, in another aspect of the present invention, a DHCP client is provided. The DHCP client according to the present invention includes: a first obtaining module, configured to acquire an IP address of a DHCP client; a determining module, configured to determine whether an IP address obtained by the first obtaining module is available; and a sending module, configured to determine in the determining module If the result is yes, the DHCP server sends a DHCP notification message to the DHCP server, where the DHCP notification message is used to notify the DHCP server end IP address, and requests the DHCP server to report other than the IP address. The configuration module is configured to receive a DHCP confirmation message returned by the DHCP server, wherein the DHCP confirmation message carries other configuration parameters, and the second acquisition module is configured to receive the DHCP confirmation from the receiving module. Obtain other configuration parameters in the packet. Preferably, the first obtaining module includes: a first obtaining submodule, configured to locally obtain an IP address of the DHCP client from the DHCP client. Preferably, the first obtaining module includes: a searching submodule, configured to locally check from a DHCP client The IP address is sent; the sending sub-module is configured to send a DHCP discovery broadcast message to the DHCP server when the search result of the search sub-module is the IP address is 0, wherein the DHCP discovery broadcast message is used to request an IP address; The receiving submodule is configured to receive a DHCP response message returned by the DHCP server, where the DHCP response message carries the IP address information, and the second obtaining submodule is configured to obtain the IP address from the DHCP response message received by the receiving submodule. The third information obtaining module is configured to obtain an IP address according to the IP address information acquired by the second obtaining submodule. Through the invention, the method for obtaining all configuration parameters according to the acquired IP address and other configuration parameters returned by the DHCP server is used by the DHCP client, and the related technologies cannot satisfy different MAC addresses. If the same specified IP address is assigned, the method of MAC address binding cannot meet the configuration information assigned to each DHCP client except its own IP address, and the configuration specified for the specified DHCP client cannot be configured. The problem of data, in turn, achieves the purpose of assigning specified configuration data to a specified DHCP client and is not restricted by the client MAC address. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawings: FIG. 1 is a schematic diagram of a DHCP protocol according to the related art; FIG. 2 is a DHCP message format according to the related art; FIG. 3 is a schematic diagram of a BSS system model according to an embodiment of the present invention; 4 is a flowchart of a method for acquiring DHCP-based configuration information according to an embodiment of the present invention; FIG. 5 is a schematic diagram of a DHCP protocol according to an embodiment of the present invention; FIG. 6 is a modification according to an embodiment of the present invention. FIG. 7 is a structural block diagram of a client according to an embodiment of the present invention; and FIG. 8 is a block diagram showing a preferred structure of a client according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In view of the fact that the related technologies cannot meet the same specified IP address for different MAC addresses, the method of MAC address binding cannot satisfy the assignment of each DHCP client except its own IP address. The configuration information of the DHCP-based configuration information is obtained by the DHCP client, and the DHCP client obtains the IP address of the DHCP client. Address, and determine whether the IP address is available. If the judgment result is yes, the DHCP client sends a DHCP notification message to the DHCP server, wherein the DHCP notification message is used to notify the IP address, and requests the DHCP server. The terminal reports other configuration parameters except the IP address; the DHCP client receives the DHCP confirmation message returned by the DHCP server, and obtains other configuration parameters from the DHCP confirmation message. In this way, the DHCP client gets all the configuration parameters including the IP address and other configuration parameters. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. The specific implementation of the method provided by the present invention is described below by taking a mobile station base station system (BSS) as an example. 3 is a schematic diagram of a BSS system model according to an embodiment of the present invention. As shown in FIG. 3, in a BSS system, a base station (Base Transceiver Station, BTS for short), and a base station controller (Base Station Controller) , referred to as BSC), the Operation and Maintenance Centre (OMC), and the DHCP server in the office i or the network are connected through the Ethernet switch. The network element BTS acts as a DHCP client to the LAN. The DHCP server requests related configuration data, including its own IP address, subnet mask, gateway address, BSC IP address, and OMC IP address, to complete the link establishment between the BTS and the BSC and the OMC. Method Embodiment According to an embodiment of the present invention, a method for acquiring configuration information based on DHCP is provided. FIG. 4 is a flowchart of a method for acquiring DHCP-based configuration information according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps S402 to S406: Step S402, the DHCP client obtains its own IP. Address and determine if the IP address is available, If the judgment result is yes, the DHCP client sends a DHCP notification message to the DHCP server, where the DHCP notification message is used to notify the DHCP server IP address, and requests the DHCP server to report the IP address. Other configuration parameters. If the judgment result is no, the DHCP client continues to send a DHCP discovery broadcast message to the DHCP server, where the DHCP discovery broadcast message is used to request an IP address. The DHCP notification message can also carry at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client. The DHCP client obtains an IP address in one of the following ways:
( 1 ) DHCP客户端从本地获取本身的 IP地址。 (1) The DHCP client obtains its own IP address locally.
( 2 ) DHCP客户端从本地查找 IP地址, 如果 IP地址为 0, 则 DHCP客 户端向 DHCP服务器端发送 DHCP发现广播报文, 其中, DHCP发现广播报 文用于请求 IP地址; DHCP客户端接收 DHCP月艮务器端返回的 DHCP应答 4艮文, 其中, DHCP应答 4艮文携带有 IP地址信息; DHCP客户端从 DHCP 应答 4艮文中获取 IP地址信息,并才艮据 IP地址信息获取 IP地址。其中, DHCP 发现广播报文还至少携带有以下之一: 请求参数列表选项、 DHCP服务器端 用于标识 DHCP客户端的选项。 请求参数列表选项可以进一步包括: 请求子 网掩码的选项码、 请求网关地址的选项码、 以及自定义的选项码, 自定义的 选项码为用于请求 IP地址的选项码。 其中, DHCP月艮务器端用于标识 DHCP 客户端的选项可以进一步包括: DHCP客户端的 MAC地址、 DHCP客户端 的电子条码信息。 这样, 通过在 DHCP发现广播报文中携带上述 DHCP服务 器用于标识 DHCP客户端的选项 ( DHCP客户端的标识符, 如电子条码 ), DHCP服务器就可以根据该标识符为 DHCP客户端分配 IP地址, 从而避免 了相关技术中由于才艮据 DHCP客户端的 MAC地址为客户端分配 IP地址导致 的不同的 MAC地址无法与同一个 IP地址绑定, 不能满足对不同的 MAC地 址分配相同的指定的 IP地址的需求的问题。 步骤 S404, DHCP客户端接收 DHCP月艮务器端返回的 DHCP确认 4艮文, 并从 DHCP确认报文中获取其他配置参数, 其中, DHCP确认报文中携带有 其他配置参数。 从而 DHCP客户端得到了全部配置参数, 其中, 全部配置参 数包括: IP地址和其他配置参数。 通过该实施例, 利用 DHCPDISCOVER、 DHCPOFFER、 DHCPINFORM ( DHCP通知 4艮文) 和 DHCPACK四步 4艮文交互来完成 DHCP的协商过程, 实现了为指定的 DHCP客户端分配指定的配置数据且不受客户端 MAC地址 限制的目的。 此外, 本发明还定义了用于上述方案的 DHCP客户端状态机, 其中新增 了地址检查和通知两个状态, 将在后文详细描述。 图 5是根据本发明实施例的 DHCP报文协商过程的示意图, 下述步骤中 将以 Windows 2000 Server系统作为 DHCP月艮务器为例, 来讲述实施过程中 相关选项和字段的使用, 如图 5所示, 包括如下的步骤 1至步骤 6: 步骤 1 , DHCP客户端从自身获取 IP地址,如果获取到的 IP地址不为 0 , 则执行步骤 4 , 否则执行步骤 2。 步骤 2, DHCP客户端向 DHCP月艮务器端发送 DHCPDISCOVER广播 4艮 文, 报文中的 option字段填入的选项有: option77 ( user class id, 用户类别选项): 此处填入 DHCP客户端的电子 条码, DHCP服务器根据此选项来识别不同的 DHCP客户端, 并分配指定的 配置。 对于其他类型的服务器, 该选项码可能为其他值, 其中添加能唯一标 识客户端的信息, 包括但不限于 MAC地址、 电子条码 ( EID ) 等信息。 option55 ( parameter request list, 请求参数列表选项): jt匕处依次填入选 项码 1 , 用来请求子网掩码; 选项码 3 , 用来请求网关地址; 以及自定义的 选项码 41 , 用来请求 DHCP客户端 IP地址, 标准中定义 option41为 network information servers即网络信息月艮务器, 此处用来请求 DHCP客户端 IP地址, 此处的选项 41 为用户自定义, 也可以选取其他的任意一个在协商中没有用 到的选项码。 步骤 3 , DHCP客户端接收到 DHCP月艮务器端返回的 DHCPOFFER 4艮文 后, 通过选项 1、 3和自定义选项 41分别获得了子网掩码、 网关地址和自身 IP地址配置, 检查此 IP地址是否可用, 如果可用则执行步骤 4, 否则转到步 骤 2。 步骤 4 , DHCP客户端向 DHCP月艮务器端发出 DHCPINFORM 4艮文, 通 知 DHCP服务器端已获取到的自身 IP地址, 同时请求 DHCP客户端所需要 的 BSC的 IP地址以及 OMC服务器 IP地址等其他配置参数, 该其他配置参 数, 包括: 选项码 1 (请求子网掩码), 选项码 3 (请求网关地址), 自定义 的选项码,此步骤中的其他配置参数包括但不限于以上所列出的选项, DHCP 客户端所需要的各种配置参数所对应的标准选项码以及自定义选项码都可以 在此添力口。 4艮文中的 option字段填入的选项有: ciaddr (客户端 IP地址字段): 此处填入步骤 1或步骤 3中获取的客户端 自身 IP地址; option77 ( user class id, 用户类别选项;): 同步骤 2中的内容; option55 ( parameter request list, 请求参数列表选项): jt匕处依次填入选 项码 1 (请求子网掩码), 选项码 3 (请求网关地址;), 自定义的选项码 6 (请 求 BSC的 IP地址;), 自定义选项码 44 (请求 OMC月艮务器 IP地址;)。 步骤 5 , DHCP客户端接收到 DHCP月艮务器端返回的 DHCPACK 4艮文后, DHCP客户端得到全部配置参数,该全部配置参数包括根据 IP地址和其他配 置参数。 通过步骤 3、 4 中的相应的选项分别获得了子网掩码、 网关地址、 BSC的 IP地址和 OMC月艮务器的 IP地址。 步骤 6, 通过以上步骤获取了 DHCP客户端所需的全部配置信息后进行 保存, BTS利用获取的配置开始建立链路。 需要说明的是, 在以上步骤中利用的选项 6、 选项 41和选项 44为用户 自定义的含义, 用户可以自行定义的选项包括但不限于上述提到的。 根据以上的协商过程, 设计 DHCP客户端的状态机。 图 6是根据本发明 实施例的更改后的 DHCP客户端状态机的示意图, 如图 6所示, DHCP客户 端状态机的运行过程包括: (2) The DHCP client searches for the IP address from the local device. If the IP address is 0, the DHCP client sends a DHCP discovery broadcast packet to the DHCP server. The DHCP discovery broadcast packet is used to request the IP address. The DHCP client receives the broadcast packet. The DHCP response message returned by the DHCP server is configured, wherein the DHCP response message carries the IP address information; the DHCP client obtains the IP address information from the DHCP response message, and obtains the IP according to the IP address information. address. The DHCP discovery broadcast packet carries at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client. The request parameter list option may further include: an option code requesting a subnet mask, an option code requesting a gateway address, and a custom option code, the custom option code being an option code for requesting an IP address. The option for the DHCP server to identify the DHCP client may further include: a MAC address of the DHCP client, and an electronic barcode information of the DHCP client. In this way, by carrying the DHCP discovery broadcast message in the DHCP discovery message for identifying the DHCP client (the identifier of the DHCP client, such as an electronic barcode), the DHCP server can assign an IP address to the DHCP client according to the identifier, thereby It is avoided that different MAC addresses cannot be bound to the same IP address due to the IP address assigned to the client according to the MAC address of the DHCP client, and the same specified IP address cannot be assigned to different MAC addresses. The problem of demand. Step S404: The DHCP client receives the DHCP confirmation message returned by the DHCP server, and obtains other configuration parameters from the DHCP confirmation message, where the DHCP confirmation message carries other configuration parameters. Therefore, the DHCP client obtains all configuration parameters, wherein all configuration parameters include: IP address and other configuration parameters. With this embodiment, the DHCP negotiation process is completed by using DHCPDISCOVER, DHCPOFFER, DHCPINFORM (DHCP notification) and DHCPACK four-step interaction, and the specified configuration data is allocated for the specified DHCP client and is not subject to the client. End MAC address The purpose of the restriction. In addition, the present invention also defines a DHCP client state machine for the above scheme, in which two states of address check and notification are added, which will be described in detail later. FIG. 5 is a schematic diagram of a DHCP message negotiation process according to an embodiment of the present invention. In the following steps, a Windows 2000 Server system is used as a DHCP server to describe the use of related options and fields in the implementation process. As shown in FIG. 5, the following steps 1 to 6 are included: Step 1: The DHCP client obtains an IP address from itself. If the obtained IP address is not 0, step 4 is performed; otherwise, step 2 is performed. Step 2: The DHCP client sends a DHCPDISCOVER broadcast message to the DHCP server. The options in the option field in the message are: option77 (user class id, user category option): Fill in the DHCP client here. Electronic barcode, the DHCP server uses this option to identify different DHCP clients and assign the specified configuration. For other types of servers, the option code may be other values, including information that uniquely identifies the client, including but not limited to information such as MAC address, electronic bar code (EID). Option55 ( parameter request list, request parameter list option): jt匕 is filled in with option code 1 in order to request the subnet mask; option code 3 is used to request the gateway address; and custom option code 41 is used Request the DHCP client IP address. The standard defines option41 as the network information servers, which is used to request the DHCP client IP address. Here, option 41 is user-defined, and other optional An option code not used in the negotiation. Step 3: After receiving the DHCPOFFER 4 message returned by the DHCP server, the DHCP client obtains the subnet mask, the gateway address, and the IP address configuration through Option 1, 3, and the custom option 41, respectively. If the IP address is available, go to step 4 if available, otherwise go to step 2. Step 4: The DHCP client sends a DHCPINFORM message to the DHCP server to notify the DHCP server of its own IP address, and requests the IP address of the BSC and the OMC server IP address required by the DHCP client. Configuration parameters, including: option code 1 (requesting subnet mask), option code 3 (requesting gateway address), custom option code, other configuration parameters in this step include but are not limited to the above Out of options, DHCP The standard option codes and custom option codes for the various configuration parameters required by the client can be added here. 4 The options in the option field are: ciaddr (client IP address field): Enter the client's own IP address obtained in step 1 or step 3 here; option77 (user class id, user category option;) : Same as in step 2; option55 ( parameter request list): jt匕 is filled in with option code 1 (request subnet mask), option code 3 (request gateway address;), custom Option code 6 (Request the BSC's IP address;), Custom Option Code 44 (Request OMC server IP address;). Step 5: After the DHCP client receives the DHCPACK message returned by the DHCP server, the DHCP client obtains all configuration parameters, and the configuration parameters include the IP address and other configuration parameters. The subnet mask, gateway address, BSC IP address, and IP address of the OMC server are obtained through the corresponding options in steps 3 and 4. Step 6: After obtaining all the configuration information required by the DHCP client, the BTS saves the configuration, and the BTS starts to establish a link by using the obtained configuration. It should be noted that the options 6, the options 41 and the options 44 utilized in the above steps are user-defined meanings, and the user-definable options include but are not limited to the above mentioned. According to the above negotiation process, the state machine of the DHCP client is designed. FIG. 6 is a schematic diagram of a modified DHCP client state machine according to an embodiment of the present invention. As shown in FIG. 6, the DHCP client state machine operation process includes:
[Al] DHCP 客户端处于" A: 停止^ I 态", 当客户端没有 IP 地址时启动 DHCP协商, 则状态跃迁至 "B: 初始状态"; [Al] The DHCP client is in "A: Stop ^ I state". When DHCP negotiation is initiated when the client does not have an IP address, the state transitions to "B: Initial state";
[A2] DHCP 客户端处于" A: 停止 ^!大态", 当客户端已有 IP 地址时启动 DHCP协商, 执行配置以太网口的操作, 后状态跃迁至" D: 地址检查状态,,; [A2] The DHCP client is in the "A: Stop ^! Large state". When the client has an IP address, DHCP negotiation is started. The operation of configuring the Ethernet interface is performed. After the state transitions to "D: Address check status,;
[Bl] DHCP客户端处于" B: 初始状态,,, 执行发送 DHCPDISCOVER广 播报文的操作, 后状态跃迁至 "C: 选择状态"; [Bl] The DHCP client is in the "B: initial state,", the operation of transmitting the DHCPDISCOVER broadcast message is performed, and the state transitions to "C: selection state";
[CI] DHCP客户端处于" C: 选择状态", 收到可接受的 DHCPOFFER 4艮 文, 比如 DHCP 客户端可用 DHCPOFFER 4艮文中携带的选项 43 ( Vendor Specific Information, 供应商特定消息) 来区分此报文是否是可接受的, 从 DHCPOFFER报文中取得分配给自身的 IP地址等信息,执行配置以太网口的 操作, 后状态跃迁至" D: 地址检查状态"; [CI] The DHCP client is in "C: Select state" and receives an acceptable DHCPOFFER 4 message, such as the DHCP client's available DHCPOFFER 4 option 43 ( Vendor) Specific Information, vendor-specific message) to distinguish whether the message is acceptable, obtain the information assigned to its own IP address from the DHCPOFFER message, perform the operation of configuring the Ethernet interface, and then transition to "D: address. Check status";
[C2] DHCP客户端处于" C: 选择状态", 收到不可接受的 DHCPOFFER 报文, 则仍然停留在此状态; [C2] The DHCP client is in "C: Select state", and if it receives an unacceptable DHCPOFFER message, it will remain in this state;
[C3] DHCP客户端处于" C: 选择状态,,, 收到超时事件, 则进行 DHCP 协商的总时间是否超时的判断; [C3] The DHCP client is in the C: selection state, and, when a timeout event is received, the total time for the DHCP negotiation is timed out;
[C3.1] 如果 DHCP协商的总时间超时, 则中止本次 DHCP的协商, 状态 返回到 "A: 停止^ I 态"; [C3.1] If the total time of DHCP negotiation times out, the negotiation of this DHCP is aborted, and the status returns to "A: Stop ^ I state";
[C3.2] 如果 DHCP 协商的 总 时 间 还未超时 , 则 继续发送 DHCPDISCOVER报文, 态停留在" C: 选择^ I 态"; [C3.2] If the total time of DHCP negotiation has not expired, continue to send DHCPDISCOVER message, and the state stays at "C: Select ^ I state";
[Dl] DHCP客户端处于 "D: 地址检查状态,,, 检查获得的 IP地址可用, 则向 DHCP月艮务器发送 DHCPINFORM 4艮文, 状态跃迁至 "E: 通知状态"; [Dl] The DHCP client is in the "D: address check status, and, if the obtained IP address is available, the DHCPINFORM message is sent to the DHCP server, and the status transitions to "E: notification status";
[D2] DHCP客户端处于 "D: 地址检查状态,,,检查获得的 IP地址不可用, 则继续发送 DHCPDISCOVER 4艮文, 状态返回到" C: 选择状态"; [D2] The DHCP client is in the "D: address check status, and, if the obtained IP address is not available, continue to send DHCPDISCOVER 4, the status returns to "C: Select Status";
[El] DHCP客户端处于 "E: 通知状态", 收到可接受的 DHCPACK 4艮文, 区分 DHCPACK可否接受的判断过程同 [C 1]中对 DHCPOFFER的判断, 从 DHCPACK中获取到除 IP地址外的其它所请求的配置数据并保存,状态跃迁 至" F: 绑定^ I 态"; [El] The DHCP client is in the "E: notification state", receives an acceptable DHCPACK message, distinguishes whether the DHCPACK can be accepted or not, and the judgment of DHCPOFFER in [C1], and obtains the IP address from the DHCPACK. Other requested configuration data is saved and saved, and the state transitions to "F: Bind ^ I state";
[E2] DHCP客户端处于 'Έ: 通知状态 " , 收到不可接受的 DHCPACK 4艮 文, 则仍然停留在此状态; [E2] The DHCP client is in the 'Έ: Notification Status'. If it receives an unacceptable DHCPACK message, it will remain in this state.
[E3] DHCP客户端处于 "E: 通知状态,,, 收到超时事件, 则进行 DHCP 协商的总时间是否超时的判断; [E3] The DHCP client is in the "E: notification state," and if the timeout event is received, the total time for the DHCP negotiation is timed out.
[E3.1] 如果 DHCP协商的总时间超时, 则中止本次 DHCP的协商, 状态 返回到 "A: 停止^ I 态"; [E3.1] If the total time of DHCP negotiation expires, the negotiation of this DHCP is aborted, and the status returns to "A: Stop ^ I state";
[E3.2] 如果 DHCP协商的总时间还未超时, 则继续发送 DHCPINFORM 艮文, 状态停留在 "E: 通知状态"; [Fl] DHCP客户端处于" F: 绑定状态", 则本次 DHCP协商成功完成, 中止本次十办商, 态返回到" A: 停止^ I 态"。 装置实施例 根据本发明的实施例, 提供了一种 DHCP客户端。 图 7是根据本发明实 施例的客户端的结构框图, 如图 7所示, 该 DHCP客户端 101包括: 第一获 取模块 2 , 判断模块 4, 发送模块 6, 接收模块 8, 第二获取模块 10, 第三获 取模块 12, 下面对上述结构进行描述。 第一获取模块 2 , 用于获取 DHCP客户端的 IP地址; 判断模块 4 , 连接 至第一获取模块 2, 用于判断第一获取模块 2获取的 IP地址是否可用; 发送 模块 6, 连接至判断模块 4, 用于在判断模块 4 的判断结果为是的情况下, 向 DHCP月艮务器端 202发送 DHCP通知 4艮文, 其中, DHCP通知 4艮文用于通 知 DHCP服务器端 202上述获取的 IP地址, 并请求 DHCP服务器端 202上 报除 IP地址之外的其他配置参数; 接收模块 8, 用于接收 DHCP服务器端 202返回的 DHCP确认 4艮文, 其中, DHCP确认 4艮文中携带有其他配置参数; 第二获取模块 10, 连接至接收模块 8, 用于从接收模块 8接收的 DHCP确认 艮文中获取其他配置参数。 从而得到了全部配置参数, 其中, 全部配置参数 包括: 第一获取模块 2获取的 IP地址和第二获取模块 10获取的其他配置参 数。 图 8是根据本发明实施例的客户端的优选结构框图, 如图 8所示, 优选 地, 第一获取模块 2 包括: 第一获取子模块 22 , 查找子模块 24, 发送子模 块 26, 接收子模块 28, 第二获取子模块 30, 第三获取子模块 32 , 下面对上 述结构进行描述。 第一获取子模块 22 , 用于从 DHCP客户端本地获取 DHCP客户端 101 的 IP地址; 查找子模块 24, 用于从本地查找 IP地址; 发送子模块 26, 连接 至查找子模块 24,用于在查找子模块 24的查找结果为 IP地址为 0的情况下, 向 DHCP服务器端 202发送 DHCP发现广播报文, 其中, DHCP发现广播 4艮 文用于请求 IP地址; 接收子模块 28, 用于接收 DHCP服务器端 202返回的 DHCP应答报文, 其中, DHCP应答报文携带有 IP地址信息; 第二获取子模 块 30, 连接至接收子模块 28, 用于从接收子模块 28接收的 DHCP应答报文 中获取 IP地址信息; 第三获取子模块 32 , 连接至第二获取子模块 30, 用于 才艮据第二获取子模块 30获取的 IP地址信息获取 IP地址。 综上所述, 通过本发明的上述实施例, 与相关技术相比较, 上述实施例 在 DHCP 协商过程中用 DHCPINFORM 单播 4艮文代替了原本使用的 DHCPREQUEST广播报文;并通过客户端自定义配置选项用途来替代 DHCP 报文中原有字段的用途, 比如, 使用自定义的选项从 DHCP服务器获取分配 给客户端的 ip地址, 而不使用 ^艮文中 yiaddr (分配给客户端的 IP地址) 字 段;并且在 DHCP客户端发出的报文中携带可以让 DHCP服务器端用来区别 每个 DHCP客户端的选项。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 或 者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制 作成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软 件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的 ^"神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。 [E3.2] If the total time of DHCP negotiation has not expired, continue to send DHCPINFORM message, and the status stays in "E: Notification Status"; [Fl] If the DHCP client is in the "F: Bind Status", the DHCP negotiation is successfully completed, and the tenth office is suspended. The status returns to "A: Stop ^ I State". Apparatus Embodiment In accordance with an embodiment of the present invention, a DHCP client is provided. FIG. 7 is a structural block diagram of a client according to an embodiment of the present invention. As shown in FIG. 7, the DHCP client 101 includes: a first acquiring module 2, a determining module 4, a sending module 6, a receiving module 8, and a second acquiring module 10. The third obtaining module 12, the above structure will be described below. The first obtaining module 2 is configured to obtain an IP address of the DHCP client, and the determining module 4 is connected to the first obtaining module 2, configured to determine whether the IP address acquired by the first obtaining module 2 is available; the sending module 6 is connected to the determining module 4, configured to send a DHCP notification message to the DHCP server 202 when the determination result of the determination module 4 is YES, wherein the DHCP notification message is used to notify the DHCP server 202 of the acquired IP. Addressing, and requesting the DHCP server 202 to report other configuration parameters than the IP address; the receiving module 8 is configured to receive the DHCP confirmation message returned by the DHCP server 202, wherein the DHCP confirmation message carries other configuration parameters. The second obtaining module 10 is connected to the receiving module 8 for obtaining other configuration parameters from the DHCP confirmation message received by the receiving module 8. The configuration parameters are obtained, wherein all the configuration parameters include: an IP address acquired by the first obtaining module 2 and other configuration parameters acquired by the second obtaining module 10. FIG. 8 is a block diagram of a preferred structure of a client according to an embodiment of the present invention. As shown in FIG. 8, the first acquiring module 2 includes: a first obtaining submodule 22, a searching submodule 24, a sending submodule 26, and a receiving subroutine. The module 28, the second acquisition submodule 30, and the third acquisition submodule 32 are described below. a first obtaining sub-module 22, configured to locally obtain an IP address of the DHCP client 101 from a DHCP client; a searching sub-module 24 for searching for an IP address locally; a sending sub-module 26, connected to the searching sub-module 24, for When the search result of the search sub-module 24 is that the IP address is 0, the DHCP discovery broadcast message is sent to the DHCP server 202, where the DHCP discovery broadcast message is used to request the IP address; and the receiving sub-module 28 is configured to Receiving the DHCP response message returned by the DHCP server 202, wherein the DHCP response message carries the IP address information; the second obtaining submodule 30 is connected to the receiving submodule 28 for receiving the DHCP response message from the receiving submodule 28. The IP address information is obtained in the text. The third obtaining sub-module 32 is connected to the second obtaining sub-module 30 for obtaining an IP address according to the IP address information acquired by the second obtaining sub-module 30. In summary, according to the foregoing embodiment of the present invention, compared with the related art, the foregoing embodiment replaces the originally used DHCPREQUEST broadcast message with the DHCPINFORM unicast message in the DHCP negotiation process; and customizes through the client. The configuration option is used to replace the purpose of the original field in the DHCP message, for example, using a custom option to obtain the IP address assigned to the client from the DHCP server, instead of using the yiaddr (IP address assigned to the client) field in the text; The packets sent by the DHCP client carry the option that the DHCP server can use to distinguish each DHCP client. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or they may be Multiple modules or steps are made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claims
1. 一种基于动态主机分配协议 DHCP的配置信息的获取方法,其特征在于, 包括: A method for obtaining configuration information based on a dynamic host allocation protocol, which is characterized by comprising:
DHCP客户端获取本身的 IP地址, 并判断所述 IP地址是否可用, 如果判断结果为是, 则所述 DHCP客户端向 DHCP服务器端发送 DHCP 通知 4艮文, 其中, 所述 DHCP通知 4艮文用于通知所述 DHCP月艮务器端所 述 IP地址, 并请求所述 DHCP 艮务器端下发除所述 IP地址之外的其他 配置参数;  The DHCP client obtains its own IP address, and determines whether the IP address is available. If the judgment result is yes, the DHCP client sends a DHCP notification message to the DHCP server, where the DHCP notification is 4 And configured to notify the DHCP server of the IP address, and request the DHCP server to send other configuration parameters than the IP address;
所述 DHCP客户端接收所述 DHCP月艮务器端返回的 DHCP确认 4艮 文, 并从所述 DHCP确认报文中获取所述其他配置参数。  The DHCP client receives the DHCP confirmation message returned by the DHCP server, and obtains the other configuration parameters from the DHCP confirmation message.
2. 居权利要求 1所述的方法, 其特征在于, 所述 DHCP客户端获取所述 IP地址包括: 2. The method of claim 1, wherein the obtaining, by the DHCP client, the IP address comprises:
所述 DHCP客户端从本地获取本身的 IP地址。  The DHCP client obtains its own IP address locally.
3. 居权利要求 1所述的方法, 其特征在于, 所述 DHCP客户端获取所述 IP地址包括: The method of claim 1, wherein the obtaining, by the DHCP client, the IP address comprises:
所述 DHCP客户端从本地查找 IP地址, 如果所述 IP地址为 0, 则 所述 DHCP客户端向所述 DHCP服务器端发送 DHCP发现广播报文,其 中, 所述 DHCP发现广播 4艮文用于请求 IP地址;  The DHCP client searches for an IP address from the local device. If the IP address is 0, the DHCP client sends a DHCP discovery broadcast message to the DHCP server, where the DHCP discovery broadcast message is used. Request an IP address;
所述 DHCP客户端接收所述 DHCP服务器端返回的 DHCP应答报 文, 其中, 所述 DHCP应答 4艮文携带有 IP地址信息;  The DHCP client receives the DHCP response message returned by the DHCP server, where the DHCP response message carries the IP address information;
所述 DHCP客户端从所述 DHCP应答报文中获取所述 IP地址信息, 并才艮据所述 IP地址信息获取 IP地址。  The DHCP client obtains the IP address information from the DHCP response message, and obtains an IP address according to the IP address information.
4. 居权利要求 1所述的方法, 其特征在于, 所述 DHCP通知 4艮文还至少携 带有以下之一: 请求参数列表选项、所述 DHCP服务器端用于标识所述 DHCP客户 端的选项。 根据权利要求 3所述的方法, 其特征在于, 所述 DHCP发现广播报文还 至少携带有以下之一: The method of claim 1, wherein the DHCP notification message further carries at least one of the following: a request parameter list option, and an option used by the DHCP server to identify the DHCP client. The method according to claim 3, wherein the DHCP discovery broadcast message further carries at least one of the following:
请求参数列表选项、所述 DHCP服务器端用于标识所述 DHCP客户 端的选项。 根据权利要求 5所述的方法, 其特征在于, 所述请求参数列表选项进一 步包括:  Requesting a parameter list option, the DHCP server side is used to identify an option of the DHCP client. The method according to claim 5, wherein the request parameter list option further comprises:
请求子网掩码的选项码、 请求网关地址的选项码、 以及自定义的选 项码, 其中, 所述自定义的选项码为用于请求 IP地址的选项码。 根据权利要求 5所述的方法, 其特征在于, 所述 DHCP服务器端用于标 识所述 DHCP客户端的选项进一步包括:  An option code for requesting a subnet mask, an option code for requesting a gateway address, and a customized option code, wherein the customized option code is an option code for requesting an IP address. The method according to claim 5, wherein the option for the DHCP server to identify the DHCP client further comprises:
所述 DHCP客户端的 MAC地址、 所述 DHCP客户端的电子条码信 息。 根据权利要求 1至 7中任一项所述的方法, 其特征在于, 在判断所述 IP 地址是否可用之后, 所述方法还包括:  The MAC address of the DHCP client and the electronic barcode information of the DHCP client. The method according to any one of claims 1 to 7, wherein after determining whether the IP address is available, the method further comprises:
如果判断结果为否, 则所述 DHCP客户端继续向所述 DHCP服务器 端发送 DHCP发现广播 4艮文, 其中, 所述 DHCP发现广播 4艮文用于请求 IP地址。 一种动态主机分配协议 DHCP客户端, 其特征在于, 包括:  If the judgment result is no, the DHCP client continues to send a DHCP discovery broadcast message to the DHCP server, where the DHCP discovery broadcast message is used to request an IP address. A dynamic host allocation protocol DHCP client, which is characterized in that it comprises:
第一获取模块, 用于获取所述 DHCP客户端的 IP地址;  a first obtaining module, configured to acquire an IP address of the DHCP client;
判断模块, 用于判断所述第一获取模块获取的所述 IP 地址是否可 用;  a determining module, configured to determine whether the IP address obtained by the first obtaining module is available;
发送模块,用于在所述判断模块的判断结果为是的情况下,向 DHCP 服务器端发送 DHCP通知报文, 其中, 所述 DHCP通知报文用于通知所 述 DHCP 艮务器端所述 IP地址, 并请求所述 DHCP 艮务器端下发除所 述 IP地址之外的其他配置参数;  a sending module, configured to send a DHCP notification message to the DHCP server when the judgment result of the determining module is yes, where the DHCP notification message is used to notify the DHCP server end of the IP Addressing, and requesting the DHCP server to send other configuration parameters than the IP address;
接收模块, 用于接收所述 DHCP月艮务器端返回的 DHCP确认报文, 其中, 所述 DHCP确认 4艮文中携带有所述其他配置参数;  a receiving module, configured to receive a DHCP acknowledgment message returned by the DHCP server, where the DHCP acknowledgment carries the other configuration parameters;
第二获取模块, 用于从所述接收模块接收的所述 DHCP确认报文中 获取所述其他配置参数。 And a second acquiring module, configured to obtain the other configuration parameter from the DHCP acknowledgement packet received by the receiving module.
10. 根据权利要求 9所述的 DHCP客户端, 其特征在于, 所述第一获取模块 包括: The DHCP client according to claim 9, wherein the first obtaining module comprises:
第一获取子模块, 用于从所述 DHCP客户端本地获取所述 DHCP客 户端的 IP地址。  The first obtaining submodule is configured to locally obtain an IP address of the DHCP client from the DHCP client.
11. 根据权利要求 9所述的 DHCP客户端, 其特征在于, 所述第一获取模块 包括: The DHCP client according to claim 9, wherein the first obtaining module comprises:
查找子模块, 用于从所述 DHCP客户端本地查找 IP地址; 发送子模块, 用于在所述查找子模块的查找结果为所述 IP地址为 0 的情况下, 向所述 DHCP 艮务器端发送 DHCP发现广播艮文, 其中, 所 述 DHCP发现广播 4艮文用于请求 IP地址;  a sub-module, configured to locally search for an IP address from the DHCP client, and a sending sub-module, configured to: when the search result of the searching sub-module is that the IP address is 0, to the DHCP server The terminal sends a DHCP discovery broadcast message, where the DHCP discovery broadcast message is used to request an IP address;
接收子模块,用于接收所述 DHCP服务器端返回的 DHCP应答报文, 其中, 所述 DHCP应答 4艮文携带有 IP地址信息;  a receiving submodule, configured to receive a DHCP response message returned by the DHCP server, where the DHCP response message carries IP address information;
第二获取子模块, 用于从所述接收子模块接收的所述 DHCP应答报 文中获取所述 IP地址信息;  a second obtaining submodule, configured to obtain the IP address information from the DHCP response message received by the receiving submodule;
第三获取子模块,用于根据所述第二获取子模块获取的所述 IP地址 信息获取 IP地址。  And a third obtaining submodule, configured to obtain an IP address according to the IP address information acquired by the second obtaining submodule.
PCT/CN2010/073799 2009-06-29 2010-06-11 Method and device for acquiring configuration information based on dynamic host configuration protocol WO2011000258A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910151507.6A CN101600001B (en) 2009-06-29 2009-06-29 Method and device for acquiring configuration information based on dynamic host configuration protocol
CN200910151507.6 2009-06-29

Publications (1)

Publication Number Publication Date
WO2011000258A1 true WO2011000258A1 (en) 2011-01-06

Family

ID=41421244

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/073799 WO2011000258A1 (en) 2009-06-29 2010-06-11 Method and device for acquiring configuration information based on dynamic host configuration protocol

Country Status (2)

Country Link
CN (1) CN101600001B (en)
WO (1) WO2011000258A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542446A (en) * 2021-06-11 2021-10-22 杭州玖欣物联科技有限公司 Gateway equipment IP address remote management method based on lwm2m protocol
CN115604097A (en) * 2022-11-30 2023-01-13 天津聚芯光禾科技有限公司(Cn) Automatic configuration and detection system and method for switch leaving factory

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101600001B (en) * 2009-06-29 2013-01-16 中兴通讯股份有限公司 Method and device for acquiring configuration information based on dynamic host configuration protocol
CN102075590A (en) * 2010-12-16 2011-05-25 中兴通讯股份有限公司 Methods and corresponding systems for acquiring and configuring network parameters by utilizing base station
CN102123140B (en) * 2011-01-14 2014-01-08 普联技术有限公司 Network equipment control method, network equipment control system and network equipment
US20150304274A1 (en) * 2012-08-24 2015-10-22 Thomson Licensing Method and apparatus for configuring dhcp client
CN107395439A (en) * 2017-08-24 2017-11-24 郑州云海信息技术有限公司 A kind of network collocating method, device and controller
CN108572852A (en) * 2018-03-21 2018-09-25 江苏长顺江波软件科技发展有限公司 It is a kind of can be in the method for cross-network segment network startup
CN108777645A (en) * 2018-09-13 2018-11-09 郑州云海信息技术有限公司 A kind of system and method for configuration server network IP information
CN112689029A (en) * 2020-12-30 2021-04-20 海信视像科技股份有限公司 Method, device and equipment for acquiring IP address of group user

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2405711A (en) * 2003-09-05 2005-03-09 Sun Microsystems Inc Method and apparatus for communicating configuration information over a network using DHCP
CN1859437A (en) * 2005-04-30 2006-11-08 华为技术有限公司 Method for obtaining cut-in position information for user terminal and user terminal and relative device
US20070250605A1 (en) * 2006-04-24 2007-10-25 Microsoft Corporation Automatic discovery and configuration of network devices
CN101321102A (en) * 2007-06-07 2008-12-10 杭州华三通信技术有限公司 Detection method and access equipment of DHCP server
CN101600001A (en) * 2009-06-29 2009-12-09 中兴通讯股份有限公司 Acquisition methods and device based on the configuration information of dynamic host allocation protocol

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100502413C (en) * 2005-10-12 2009-06-17 华为技术有限公司 IP address requesting method for DHCP client by DHCP repeater
CN101227481A (en) * 2008-02-02 2008-07-23 中兴通讯股份有限公司 Apparatus and method of IP access based on DHCP protocol

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2405711A (en) * 2003-09-05 2005-03-09 Sun Microsystems Inc Method and apparatus for communicating configuration information over a network using DHCP
CN1859437A (en) * 2005-04-30 2006-11-08 华为技术有限公司 Method for obtaining cut-in position information for user terminal and user terminal and relative device
US20070250605A1 (en) * 2006-04-24 2007-10-25 Microsoft Corporation Automatic discovery and configuration of network devices
CN101321102A (en) * 2007-06-07 2008-12-10 杭州华三通信技术有限公司 Detection method and access equipment of DHCP server
CN101600001A (en) * 2009-06-29 2009-12-09 中兴通讯股份有限公司 Acquisition methods and device based on the configuration information of dynamic host allocation protocol

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542446A (en) * 2021-06-11 2021-10-22 杭州玖欣物联科技有限公司 Gateway equipment IP address remote management method based on lwm2m protocol
CN113542446B (en) * 2021-06-11 2023-04-07 杭州玖欣物联科技有限公司 Gateway equipment IP address remote management method based on lwm m protocol
CN115604097A (en) * 2022-11-30 2023-01-13 天津聚芯光禾科技有限公司(Cn) Automatic configuration and detection system and method for switch leaving factory

Also Published As

Publication number Publication date
CN101600001B (en) 2013-01-16
CN101600001A (en) 2009-12-09

Similar Documents

Publication Publication Date Title
WO2011000258A1 (en) Method and device for acquiring configuration information based on dynamic host configuration protocol
EP0938217B1 (en) Mobile IP communication scheme using dynamic address allocation protocol
US7640287B1 (en) Method and apparatus for auto-configuring layer three intermediate computer network devices
JP4723653B2 (en) IP address assignment method and use thereof
EP3264731B1 (en) Method, relay agent, and system for acquiring internet protocol address in network
CA2619092C (en) Method of and system for support of user devices roaming between routing realms by a single network server
US7873003B2 (en) Method for allocating IP address to mobile station in mobile communication system
WO2013159641A1 (en) Address allocation method, device, and system
WO2014015775A1 (en) Ipv6 address stateless auto-configuration system, data card, and implementation method thereof
CN102984295B (en) A kind of mobile terminal and address distribution method thereof
WO2008031319A1 (en) The method and device for managing route information and retransmitting data in accessing device
EP2888863B1 (en) Method and apparatus for configuring dhcp client
KR100909014B1 (en) Dynamic IP Address Allocation Method for Mobile Terminal in Mobile Communication System
WO2014179923A1 (en) Network configuration method, device and system based on sdn
CN112654049B (en) Method, system, node and medium for configuring a wireless communication coverage extension system
WO2008058453A1 (en) Method and system of transmitting dhcp message through ppp link and of obtaining configuration information
EP2658206A1 (en) Ip address configuration method, device and system
US7085836B1 (en) System and method for automatic private IP address selection
WO2010022535A1 (en) Method and device for transferring packet in ipv6 access node
WO2013178164A1 (en) Ipv6 domain name server (dns) address allocation and obtaining method and device
WO2013023591A1 (en) Method and device for selecting policy server
WO2012155424A1 (en) Method and system for multiple address-prefixes assignment
WO2000044132A2 (en) Secure and efficient address resolution for client stations connected over wide area network links to ip networks such as the internet
EP1192777A1 (en) Method for an automatic allocation of ip addresses

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10793553

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10793553

Country of ref document: EP

Kind code of ref document: A1