CN112104764B - Method and system for classifying DHCP (dynamic host configuration protocol) client - Google Patents

Method and system for classifying DHCP (dynamic host configuration protocol) client Download PDF

Info

Publication number
CN112104764B
CN112104764B CN202011004031.6A CN202011004031A CN112104764B CN 112104764 B CN112104764 B CN 112104764B CN 202011004031 A CN202011004031 A CN 202011004031A CN 112104764 B CN112104764 B CN 112104764B
Authority
CN
China
Prior art keywords
dhcp
dhcp client
classification
client
information
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.)
Active
Application number
CN202011004031.6A
Other languages
Chinese (zh)
Other versions
CN112104764A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202011004031.6A priority Critical patent/CN112104764B/en
Publication of CN112104764A publication Critical patent/CN112104764A/en
Application granted granted Critical
Publication of CN112104764B publication Critical patent/CN112104764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention provides a method and a system for classifying DHCP (dynamic host configuration protocol) clients, and relates to the technical field of DHCP. The DHCP client classification method comprises the following steps: when a DHCP request containing DHCP client classification information is received from a DHCP client, determining to generate a DHCP client IP address; establishing the DHCP client classification and the mapping relation between the DHCP client MAC and the generated IP address; the DHCP client IP address is assigned. The invention enables a user to flexibly formulate a DCHP client classification strategy according to various conditions, implement DHCP client classification and inquire DHCP client classification information.

Description

Method and system for classifying DHCP (dynamic host configuration protocol) client
Technical Field
The invention relates to the technical field of Dynamic Host Configuration Protocol (DHCP), in particular to a method and a system for classifying DHCP clients.
Background
The DHCP is a dynamic host configuration protocol and is responsible for address allocation of a DHCP client, and mainly comprises three modes of manual allocation, automatic allocation and dynamic allocation of an address allocation strategy.
DHCP is currently very widely used. However, in the process of implementing the present invention, it is found that when a plurality of DHCP servers exist in the same lan, IP addresses allocated by other servers cannot be detected, resulting in IP address collision.
The improved technology configures a static strategy on a DHCP server, and realizes the classification of clients by matching a certain attribute value or a combination of certain attribute values carried in a client DHCP request packet; the method comprises the steps that grouping information of a client is stored on a remote server, the DHCP server initiates inquiry to the remote server according to a certain attribute value or a combination of certain attribute values carried in a client DHCP request packet, and the client is classified according to an inquiry result. The technology tries to provide a multi-strategy DHCP client classification method and system, and further assigns a differentiated DHCP address allocation strategy, realizes differentiated control on client access authority or service types, and improves the utilization rate of an address pool. And according to the attribute value combination in the client DHCP request packet, the DHCP dynamically identifies and matches the corresponding equipment type fingerprint information, and the clients are classified according to the terminal types. However, this kind of technology needs to configure a policy at the DHCP end, which has low flexibility and high implementation difficulty, and thus it is difficult to solve the above address conflict problem.
On the other hand, the smart home is rapidly emerging, a large number of intelligent terminals including the DHCP clients access the DHCP server, and in the process of implementing the present invention, it is found that the IP of the intelligent terminals in classified management becomes very urgent, while the existing DHCP server does not include information of the DHCP client classification, and the DHCP client cannot query all the IP addresses of the DHCP clients in the same classification.
Disclosure of Invention
In order to solve the problems that the existing DHCP server in the prior art does not contain the information of DHCP client classification and the DHCP client cannot inquire all the IP addresses of the DHCP clients in the same classification, and improve the flexibility of formulating the classification strategy of the DHCP client, the invention provides a method and a system for classifying the DHCP client, which are used for solving the problems in the background technology.
In order to realize the purpose, the invention is realized by the following technical scheme: a method of DHCP client classification, the method comprising:
when receiving a DHCP request containing DHCP client classification information from a DHCP client, a DHCP server determines to generate a DHCP client IP address;
the DHCP server establishes the DHCP client classification and the mapping relation between the DHCP client MAC and the generated IP address;
the DHCP server assigns a DHCP client IP address.
Further, if the DHCP client classification and the mapping relationship between the DHCP client MAC and the generated IP address already exist and the DHCP client classification is inconsistent with the DHCP client classification data of the original mapping relationship, the DHCP client classification is updated to the mapping relationship between the DHCP client MAC and the generated IP address.
Further, when a DHCP request containing the DHCP client classification information is received from the DHCP client, the generation of the DHCP client classification IP address is determined according to the DHCP client classification information.
In another aspect, a method of DHCP client classification, the method comprising:
the DHCP server receives a DHCP request containing the classification information of the DHCP client to be inquired from the DHCP client;
the DHCP server inquires the mapping relation between the DHCP client MAC and the IP address corresponding to the DHCP client classification, and screens out all the information aiming at the same DHCP client classification to be inquired, wherein the information comprises at least one of the following information: IP, MAC, client host name, generate DHCP response information containing all the information;
and the DHCP server sends the DHCP response information to the DHCP client.
In another aspect, a method for DHCP client classification includes:
the DHCP client sends a DHCP request with DHCP client classification information to a DHCP server;
the DHCP client receives a DHCP server DHCP message.
Further, the DHCP client receives information about configuring the DHCP client class by the terminal through the client including the DHCP client.
In another aspect, a method for DHCP client classification includes:
terminal configuration DHCP client classification;
and the terminal sends the information of the DHCP client classification to the client.
In another aspect, a system for DHCP client classification, the system being embedded in a DHCP server, the system comprising:
the message receiving and sending unit is used for receiving and sending the DHCP message containing the classification information of the DHCP client;
and the classification unit is used for establishing and inquiring DHCP client classification and the mapping relation between the DHCP client MAC and the IP address.
Further, the classification unit is further configured to determine to generate a DHCP client classification IP address according to the DHCP client classification information.
In another aspect, a system for DHCP client classification, the system being built in a DHCP client, the system comprising: and the message receiving and sending unit is used for receiving and sending the DHCP message containing the classification information of the DHCP client.
In another aspect, a system for classifying DHCP clients is built in a terminal, and includes:
the classification allocation unit is used for determining the classification of the DHCP client according to the strategy;
and the communication unit is used for communicating with the client to set the classification information of the DHCP client.
The invention provides a method and a system for classifying DHCP clients. The method has the following beneficial effects:
in the invention: the client side information including the DHCP client side is configured, so that the flexibility of formulating the classification strategy of the DHCP client side is improved; the DHCP client sends the information with the DHCP client classification to the DHCP server, the DHCP server establishes the DHCP client classification and the mapping relation between the DHCP client MAC and the generated IP address, and the DHCP server stores the information of the DHCP client classification, so that the DHCP client can inquire all the DHCP client IP addresses of the same classification. The invention enables a user to flexibly formulate a DCHP client classification strategy according to various conditions, implement DHCP client classification and inquire DHCP client classification information.
Drawings
FIG. 1 is a flow chart of a first embodiment of the present invention;
FIG. 2 is a block diagram of a fifth embodiment of the present invention;
fig. 3 is a system block diagram of a seventh embodiment of the invention.
Detailed Description
The invention will be further illustrated with reference to the following examples and drawings:
the first embodiment is as follows:
the embodiment of the invention discloses a method for classifying DHCP clients, which comprises the following steps with reference to FIG. 1:
step S11, when the DHCP server receives the DHCP request containing the DHCP client classification information from the DHCP client, the DHCP server determines to generate the IP address of the DHCP client;
step S12, the DHCP server establishes the DHCP client classification and the mapping relation between the DHCP client MAC and the generated IP address;
in step S13, the DHCP server assigns a DHCP client IP address.
Further, if the DHCP client classification and the mapping relationship between the DHCP client MAC and the generated IP address already exist and the DHCP client classification is inconsistent with the DHCP client classification data of the original mapping relationship, the DHCP client classification is updated to the mapping relationship between the DHCP client MAC and the generated IP address.
Further, when a DHCP request containing DHCP client classification information is received from the DHCP client, the generation of the DHCP client classification IP address is determined according to the DHCP client classification information. This means that the system can perform IP address allocation management according to the client classification policy formulated by the user, which will fundamentally solve the problem of address conflict caused by multiple DHCP servers.
Example two:
the second embodiment of the invention discloses a method for classifying DHCP clients, which comprises the following steps:
the DHCP server receives a DHCP request containing the classification information of the DHCP client to be inquired from the DHCP client; the classification request is an DHCP CLASS request, specifically, the DHCP client can send a DHCP request packet to query the DHCP client classification, Options =53 and Message type =9 (DHCP CLASS), and the DHCP Message field is accompanied by DHCP client type information;
the DHCP server inquires the mapping relation between the DHCP client MAC and the IP address corresponding to the DHCP client classification, and screens out all the information aiming at the same DHCP client classification to be inquired, wherein the information comprises at least one of the following information: IP, MAC, client host name, generate DHCP response information containing all the information;
and the DHCP server sends the DHCP response information to the DHCP client.
Example three:
the third embodiment of the invention discloses a DHCP client classification method, which comprises the following steps:
the DHCP client sends a DHCP request with DHCP client classification information to a DHCP server; this REQUEST includes, but is not limited to, a DHCP REQUEST REQUEST, DHCP CLASS REQUEST, etc.; for the DHCP CLASS request, specifically, the DHCP client may send a DHCP request packet to query the DHCP client classification, Options =53 and Message type =9 (DHCP CLASS), and attach DHCP client type information in the DHCP Message field;
the DHCP client receives a DHCP server DHCP message.
Further, the DHCP client receives information about configuring the DHCP client class by the terminal through the client including the DHCP client.
Example four:
the fourth embodiment of the invention discloses a DHCP client classification method, which comprises the following steps:
terminal configuration DHCP client classification; a user can make a flexible DHCP client classification strategy according to the needs, for example, if the address conflict problem caused by a plurality of DHCP servers is avoided, the client scribing can be classified according to the physical area;
the terminal sends the information of the DHCP client classification to the client, and the terminal and the client can communicate in various communication modes such as Ethernet, WIFI, 4G, 5G, Bluetooth and the like.
Example five:
the fifth embodiment of the present invention discloses a system for classifying DHCP clients, which is embedded in a DHCP server with reference to fig. 2, and the system includes:
a message receiving and sending unit 101, configured to receive and send a DHCP message containing DHCP client classification information;
the classifying unit 102 is configured to establish and query DHCP client classifications and mapping relationships between DHCP client MACs and IP addresses.
Further, the classifying unit 102 is further configured to determine to generate a DHCP client classification IP address according to the DHCP client classification information. This means that the system can perform IP address allocation management according to the client classification policy formulated by the user, which will fundamentally solve the problem of address conflict caused by multiple DHCP servers.
The system for classifying the DHCP client side comprises a DHCP server, the DHCP client side and a terminal which are connected with each other through a network, wherein the client side comprises the DHCP client side and is in network connection with the DHCP server.
Example six:
the sixth embodiment of the invention discloses a system for classifying DHCP clients, which is arranged in the DHCP clients and comprises: and the message receiving and sending unit is used for receiving and sending the DHCP message containing the classification information of the DHCP client.
Example seven:
the seventh embodiment of the present invention discloses a system for classifying DHCP clients, referring to fig. 3, wherein the system is built in a terminal, and comprises:
a classification allocation unit 202, configured to determine a classification of the DHCP client according to a policy; a user can make a flexible DHCP client classification strategy according to the needs, for example, if the address conflict problem caused by a plurality of DHCP servers is avoided, the client scribing can be classified according to the physical area;
the communication unit 201 is configured to communicate with the client to set classification information of the DHCP client, and the terminal and the client may communicate in various communication modes such as ethernet, WIFI, 4G, 5G, bluetooth, and the like.
In the invention, the client side comprising the DHCP client side is configured with the DHCP client side information, thereby improving the flexibility of formulating the classification strategy of the DHCP client side; the DHCP client sends the information with the DHCP client classification to the DHCP server, the DHCP server establishes the DHCP client classification and the mapping relation between the DHCP client MAC and the generated IP address, and the DHCP server stores the information of the DHCP client classification, so that the DHCP client can inquire all the DHCP client IP addresses of the same classification. The invention enables a user to flexibly formulate a DCHP client classification strategy according to various conditions, implement DHCP client classification and inquire DHCP client classification information.
The above are only preferred embodiments of the present invention, and it should be noted that, for those skilled in the art, many variations and modifications can be made without departing from the inventive concept, and these are all within the scope of the present invention.

Claims (8)

1. A method for DHCP client classification, for a DHCP server, the method comprising:
when a DHCP request containing DHCP client classification information is received from a DHCP client, determining to generate a DHCP client classification IP address according to the DHCP client classification information;
establishing the mapping relation between the DHCP client classification and the DHCP client MAC and the DHCP client classification IP address, and updating the DHCP client classification into the mapping relation between the DHCP client MAC and the DHCP client classification IP address if the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address exist and the DHCP client classification data of the DHCP client classification and the original mapping relation are inconsistent;
assigning the DHCP client class IP address to the DHCP client.
2. A method for DHCP client classification, for a DHCP server, the method comprising:
receiving a DHCP request containing the classification information of the DHCP client to be inquired from the DHCP client;
inquiring the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address, and screening out at least one of the following information of all DHCP clients aiming at the same DHCP client classification information to be inquired: IP, MAC, client host name, generate DHCP response information containing the said information;
and sending the DHCP response information to the DHCP client.
3. A method for DHCP client classification, the method comprising:
the DHCP client sends a DHCP request with DHCP client classification information to a DHCP server, wherein the DHCP request is a DHCP request containing the DHCP client classification information to be inquired;
the DHCP server inquires the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address, and screens out at least one of the following information of all DHCP clients aiming at the same DHCP client classification information to be inquired: IP, MAC, client host name, generate DHCP response information containing the said information to send to the said DHCP client;
and the DHCP client receives the DHCP response information sent by the DHCP server.
4. The method for classifying a DHCP client according to claim 3, further comprising: and the DHCP client receives the information of the terminal about configuring the DHCP client classification through the client containing the DHCP client.
5. A method for DHCP client classification, for a terminal, the method comprising:
configuring DHCP client classification;
sending the DHCP client classification information to a client, wherein the DHCP client classification information is used for the DHCP client to send a DHCP request containing the DHCP client classification information to be inquired to a DHCP server; the DHCP server inquires the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address, and screens out at least one of the following information of all DHCP clients aiming at the same DHCP client classification information to be inquired: IP, MAC, client host name, and DHCP response information containing the information to be sent to the DHCP client.
6. A system for DHCP client classification, built into a DHCP server, the system comprising:
the message receiving and sending unit is used for receiving and sending the DHCP message containing the classification information of the DHCP client;
the classification unit is used for determining and generating a DHCP client classification IP address according to the DHCP client classification information and establishing and inquiring the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address; when inquiring, the DHCP server inquires the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address, and screens out at least one of the following information of all DHCP clients aiming at the same DHCP client classification information to be inquired: IP, MAC, client host name, and generate DHCP response information containing the information for sending to the DHCP client.
7. A system for DHCP client classification, the system being built-in to a DHCP client, the system comprising: the message receiving and sending unit is used for receiving and sending the DHCP message containing the classification information of the DHCP client, and the sent DHCP message is a DHCP request containing the classification information of the DHCP client to be inquired; the DHCP client side sends the DHCP request to a DHCP server, the DHCP server inquires the DHCP client side classification and the mapping relation between the DHCP client side MAC and the DHCP client side classification IP address, and screens out at least one of the following information of all DHCP client sides aiming at the same DHCP client side classification information to be inquired: IP, MAC, client host name, and generate DHCP response information containing the information for sending to the DHCP client.
8. A system for DHCP client classification, the system being built in a terminal, the system comprising:
the classification distribution unit is used for determining the classification of the DHCP client according to the strategy;
the communication unit is used for setting the classification information of the DHCP client side by communicating with the client side and sending the classification information of the DHCP client side to the client side, wherein the classification information of the DHCP client side is used for the DHCP client side to send a DHCP request containing the classification information of the DHCP client side to be inquired to a DHCP server; the DHCP server inquires the DHCP client classification and the mapping relation between the DHCP client MAC and the DHCP client classification IP address, and screens out at least one of the following information of all DHCP clients aiming at the same DHCP client classification information to be inquired: IP, MAC, client host name, and generate DHCP response information containing the information for sending to the DHCP client.
CN202011004031.6A 2020-09-22 2020-09-22 Method and system for classifying DHCP (dynamic host configuration protocol) client Active CN112104764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011004031.6A CN112104764B (en) 2020-09-22 2020-09-22 Method and system for classifying DHCP (dynamic host configuration protocol) client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011004031.6A CN112104764B (en) 2020-09-22 2020-09-22 Method and system for classifying DHCP (dynamic host configuration protocol) client

Publications (2)

Publication Number Publication Date
CN112104764A CN112104764A (en) 2020-12-18
CN112104764B true CN112104764B (en) 2022-09-13

Family

ID=73755840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011004031.6A Active CN112104764B (en) 2020-09-22 2020-09-22 Method and system for classifying DHCP (dynamic host configuration protocol) client

Country Status (1)

Country Link
CN (1) CN112104764B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744612A (en) * 2005-08-19 2006-03-08 杭州华为三康技术有限公司 DHCP address allocation method
CN104333610A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 IPv6 address allocation method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7337219B1 (en) * 2003-05-30 2008-02-26 Aol Llc, A Delaware Limited Liability Company Classifying devices using a local proxy server
KR20060000342A (en) * 2004-06-28 2006-01-06 주식회사 이지브로네트웍스 Device for enabling intra-edge routing-less premises internet protocol communication and communication method using the same
CN102055645A (en) * 2009-11-11 2011-05-11 上海贝尔股份有限公司 Method and device for automatically classifying IP service data streams in access network
CN103117902B (en) * 2013-02-04 2016-05-25 北京傲天动联技术股份有限公司 User offline automatic checkout system and method under a kind of IPoE
CN106130859A (en) * 2016-06-23 2016-11-16 北京东土科技股份有限公司 A kind of industry internet field layer wideband bus configuration management implementation method
US10164938B2 (en) * 2016-09-01 2018-12-25 Cisco Technology, Inc. Topology-aware addressing for reconfigurable networks
US20200162517A1 (en) * 2018-11-21 2020-05-21 Cisco Technology, Inc. Method and apparatus to have entitlement follow the end device in network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744612A (en) * 2005-08-19 2006-03-08 杭州华为三康技术有限公司 DHCP address allocation method
CN104333610A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 IPv6 address allocation method and device

Also Published As

Publication number Publication date
CN112104764A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US8103784B2 (en) Communication device and communication control method using efficient echonet address determination scheme
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
EP0943201B1 (en) Method for using dhcp to override learned ip addresses in a network
CN100527752C (en) DHCP address allocation method
CN100525316C (en) Method for assigning an IP address to a device
US7339895B2 (en) Gateway device and control method for communication with IP and IPV6 protocols
EP0998099B1 (en) Network address management
CN1889572B (en) Internet protocol address distributing method and dynamic main machine configuration protocol relay
CN105245629B (en) Host communication method based on DHCP and device
CN101159758B (en) Classification associated dynamic host machine configuring protocol option distribution method and device
CN1719808A (en) Power saving in wireless packet based networks
US9819641B2 (en) Method of and a processing device handling a protocol address in a network
US6272540B1 (en) Arrangement and method for providing flexible management of a network
CN108471440B (en) Digital talkback method and system
WO2016202016A1 (en) Device management method, apparatus and system
KR100241354B1 (en) Interlocking system between dhcp server and dns server
CN112104764B (en) Method and system for classifying DHCP (dynamic host configuration protocol) client
JP2001308909A (en) Method for assigning logical network address and terminal
CN108989173B (en) Message transmission method and device
US20030084173A1 (en) Method for setting up a communication between a device and a host application over an IP network, host application and DSL router, and software programs realizing said method
JPH09282259A (en) Network system
CN115174528A (en) Equipment address control method, device and system
US7702812B2 (en) Address allocation system and method
JP2007096539A (en) Conversion apparatus
JP3134823B2 (en) Automatic setting method of IP address in TCP / IP network

Legal Events

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