CN105245629A - DHCP-based host communication method and device - Google Patents

DHCP-based host communication method and device Download PDF

Info

Publication number
CN105245629A
CN105245629A CN201510621619.9A CN201510621619A CN105245629A CN 105245629 A CN105245629 A CN 105245629A CN 201510621619 A CN201510621619 A CN 201510621619A CN 105245629 A CN105245629 A CN 105245629A
Authority
CN
China
Prior art keywords
address
configuration protocol
main frame
protocol server
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510621619.9A
Other languages
Chinese (zh)
Other versions
CN105245629B (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.)
INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER LLC
Original Assignee
INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER LLC
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 INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER LLC filed Critical INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER LLC
Priority to CN201510621619.9A priority Critical patent/CN105245629B/en
Publication of CN105245629A publication Critical patent/CN105245629A/en
Application granted granted Critical
Publication of CN105245629B publication Critical patent/CN105245629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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]

Abstract

The invention provides a DHCP-based host communication method and a DHCP-based host communication device. The communication method comprises the steps as follows: a dynamic host configuration protocol DHCP server receives a first request message transmitted by a host, wherein the first request message is used for requesting the DHCP server to assign a network protocol IP address for the host; the DHCP server assigns a first IP address for the host, establishes and stores a corresponding relation between the first IP address and a multimedia access control MAC address of the host; the DHCP server transmits the first IP address and a first corresponding relation table to the host, wherein the first corresponding relation table contains corresponding relations, maintained by the DHCP server, between IP addresses and MAC addresses of other hosts in the same network segment as the host. Through adoption of the DHCP-based host communication method and the DHCP-based host communication device of the invention, the problem that the data could not reach a correct target host because a wrong MAC address is received due to a hostile attack in an existing broadcast enquiry mode is solved.

Description

Based on host communication method and the device of DHCP
Technical field
The present invention relates to computer network communication field, particularly relate to a kind of host communication method based on DHCP (DynamicHostConfigurationProtocol is called for short DHCP) and device.
Background technology
DHCP is applied in large-scale LAN environment, Main Function is concentrated management, distributing IP address, the main frame in network environment is made to obtain internet protocol address (InternetProtocolAddress dynamically, be called for short IP address), gateway Gateway address, the information such as domain name system (DomainNameSystem, be called for short DNS) server address.
In prior art, in DHCP, main frame communicates with destination host, multimedia control (the MediaAccessControl that the IP address needing to obtain destination host is corresponding, be called for short MAC) address to be to realize network service, at address resolution protocol (AddressResolutionProtocol, be called for short ARP) in, main frame adopts the mode of broadcast to inquire the MAC Address that the IP address of destination host is corresponding, the MAC Address of oneself is replied to main frame by destination host, and the MAC Address that main frame is replied according to destination host communicates with destination host.
But if having malicious attacker in the inquiry method of prior art, the meeting MAC Address that deliberately reply one is wrong is to main frame, and so now main frame adopts the MAC Address transmission data of mistake, and data cannot arrive correct destination host.
Summary of the invention
The invention provides a kind of host communication method based on DHCP and device, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
The invention provides a kind of host communication method based on DHCP, comprising:
The first request message that dynamic host configuration protocol DHCP server Receiving Host sends, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described Dynamic Host Configuration Protocol server is described host assignment the one IP address, sets up and stores the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame;
Described Dynamic Host Configuration Protocol server sends a described IP address and the first mapping table to described main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table.
Alternatively, described Dynamic Host Configuration Protocol server also comprises after being described host assignment the one IP address:
Described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.
Described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame, comprising:
Alternatively, described Dynamic Host Configuration Protocol server is according to the lease information of a described IP address, determine that the lease information of a described IP address expires, and do not receive described main frame send re-rent request, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.
Alternatively, described Dynamic Host Configuration Protocol server also comprises after being described host assignment the one IP address:
If described Dynamic Host Configuration Protocol server receives the second request message that described main frame sends, described second request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described Dynamic Host Configuration Protocol server is described host assignment the 2nd IP address, the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame is revised as the corresponding relation of the MAC Address of described 2nd IP address and described main frame.
Alternatively, described Dynamic Host Configuration Protocol server, to after described main frame sends a described IP address and the first mapping table, also comprises:
The corresponding relation of the multimedia control MAC Address of a described IP address and described main frame adds in described first mapping table by described Dynamic Host Configuration Protocol server;
Described first mapping table is sent to other main frames by described Dynamic Host Configuration Protocol server.
Alternatively, described first mapping table is stored in and selects in OPTION field.
The invention provides a kind of host communication method based on DHCP, comprising:
Main frame sends the first request message to dynamic host configuration protocol DHCP server, and described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described main frame receives an IP address and first mapping table of the transmission of described Dynamic Host Configuration Protocol server, the IP address of described host assignment that to be described Dynamic Host Configuration Protocol server be in a described IP address, comprises the IP address of other main frames and the corresponding relation of multimedia control MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table;
Described main frame communicates with other main frames of the place network segment according to described first mapping table.
Alternatively, described main frame communicates with other main frames of the place network segment according to described first mapping table, comprising:
The MAC Address that the IP address of destination host to be communicated is corresponding whether is comprised in first mapping table described in described host query;
If there is the MAC Address corresponding with the IP address of described destination host, described main frame then adopts the MAC Address of the destination host inquired to communicate with described destination host.
Alternatively, described method also comprises: if there is not the MAC Address corresponding with the IP address of described destination host, and described main frame, by ARP mechanism, adopts the mode of broadcast to obtain the MAC Address of destination host.
The invention provides a kind of host communication device based on DHCP, comprising:
Receiver module, for the first request message that Receiving Host sends, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Distribution module, for being described host assignment the one IP address, setting up and storing the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame;
Sending module, for sending a described IP address and the first mapping table to described main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table.
The invention provides a kind of host communication device based on DHCP, comprising:
Sending module, for sending the first request message to dynamic host configuration protocol DHCP server, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Receiver module, for receiving an IP address and first mapping table of the transmission of described Dynamic Host Configuration Protocol server, the IP address of described host assignment that to be described Dynamic Host Configuration Protocol server be in a described IP address, comprises the IP address multimedia control of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table;
Communication module, for communicating with other main frames of the place network segment according to described first mapping table.
Host communication method based on DHCP provided by the invention and device, the message for request dispatching IP address that Dynamic Host Configuration Protocol server Receiving Host sends, Dynamic Host Configuration Protocol server is host assignment the one IP address, set up and store the corresponding relation of the MAC Address of an IP address and main frame, Dynamic Host Configuration Protocol server is by sending an IP address and first mapping table of above-mentioned distribution to main frame, the IP address of other main frames and the corresponding relation of MAC Address of the same network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in this first mapping table, make main frame when the MAC Address of query aim main frame, the each main frame of broadcast mode inquiry can not be adopted, but by inquiry first mapping table, thus obtain the MAC Address of destination host, to communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the host communication method embodiment one that the present invention is based on DHCP;
Fig. 2 is the flow chart of the host communication method embodiment two that the present invention is based on DHCP;
Fig. 3 is the flow chart of the host communication method embodiment three that the present invention is based on DHCP;
Fig. 4 is the flow chart of the host communication method embodiment four that the present invention is based on DHCP;
Fig. 5 is the flow chart of the host communication device embodiment one that the present invention is based on DHCP;
Fig. 6 is the flow chart of the host communication device embodiment two that the present invention is based on DHCP.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The method that the embodiment of the present invention provides is applied in dynamic host configuration protocol DHCP network.DHCP is the procotol of a local area network (LAN), controls one section of IP address range by Dynamic Host Configuration Protocol server, just automatically can obtain IP address and the subnet mask of Dynamic Host Configuration Protocol server distribution when main frame logs in Dynamic Host Configuration Protocol server.Two main frames be connected on the Internet communicate each other, respective IP address must be had, because IP address resource is limited, broadband access operator distributes a fixing IP address cannot to each user, therefore adopts the user of DHCP mode to online to carry out interim address assignment.Namely, when subscriber's main station adds network, Dynamic Host Configuration Protocol server is interim from address pool distributes an IP address, and after subscriber's main station rolls off the production line, Dynamic Host Configuration Protocol server may give other main frames of reaching the standard grade afterwards this address assignment.Therefore can effectively save IP address, both ensure that network service, put forward again the utilization rate of higher ip address.
Fig. 1 is the flow chart of the host communication method embodiment one that the present invention is based on DHCP, and as shown in Figure 1, the method comprises:
The first request message that step 101:DHCP server Receiving Host sends, the first request message is host assignment procotol IP address for asking Dynamic Host Configuration Protocol server.
In this step, when main frame adds network, need to Dynamic Host Configuration Protocol server IP address requesting, now, the request Dynamic Host Configuration Protocol server that Dynamic Host Configuration Protocol server Receiving Host sends is the first request message of host assignment IP address.
Step 102:DHCP server is host assignment the one IP address, sets up and stores the corresponding relation of the multimedia control MAC Address of an IP address and main frame.
In this step, Dynamic Host Configuration Protocol server by current not by an IP address assignment separating to the main frame of this request, this method of salary distribution is dynamic assignment mode, namely Dynamic Host Configuration Protocol server specifies an IP address with time restriction to main frame, time expires or main frame clearly represents that when abandoning this address, this address can be used by other main frames.Dynamic Host Configuration Protocol server is set up in this locality and is stored the corresponding relation of an IP address and MAC Address simultaneously, its corresponding relation can carry out record by setting up a list, this list comprises two parts content, a part has distributed IP and the MAC corresponding relation of host address, and another part is the corresponding relation of IP and MAC of the crucial main frame that network manager adds.
Step 103:DHCP server sends an IP address and the first mapping table to main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded in the first mapping table.
In this step, the IP address of other main frames of the same network segment that Dynamic Host Configuration Protocol server is safeguarded to the IP address that Dynamic Host Configuration Protocol server in main frame forwarding step 102 distributes and above-mentioned Dynamic Host Configuration Protocol server and the corresponding relation of MAC Address, this corresponding relation is stored in the first mapping table.Namely Dynamic Host Configuration Protocol server issues main frame when forward direction Dynamic Host Configuration Protocol server IP address requesting in the lump by separating the IP address of this network segment of adding to the corresponding relation of other host IP address of the same network segment and MAC Address and keeper and the corresponding relation of MAC Address.
Optionally, described first mapping table is stored in and selects in OPTION field.Wherein, OPTION field is an option in DHCP message, and this option is the field of variable length in DHCP message, contains partial charter party information, type of message etc. in OPTION option.Can comprise at most 255 OPTION in OPTION option, minimum is 1 OPTION.The IP address of the present embodiment and the corresponding relation of MAC Address are sent by the OPTION class that can customize.
The host communication method based on DHCP of the present embodiment, the message for request dispatching IP address that Dynamic Host Configuration Protocol server Receiving Host sends, Dynamic Host Configuration Protocol server is host assignment the one IP address, set up and store the corresponding relation of the MAC Address of an IP address and main frame, Dynamic Host Configuration Protocol server is by sending an IP address and first mapping table of above-mentioned distribution to main frame, the IP address of other main frames and the corresponding relation of MAC Address of the same network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in this first mapping table, make main frame when the MAC Address of query aim main frame, the each main frame of broadcast mode inquiry can not be adopted, but by inquiry first mapping table, thus obtain the MAC Address of destination host, to communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Further, after described Dynamic Host Configuration Protocol server is described host assignment the one IP address, also comprise: described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.Concrete, after distributing an IP address a period of time, when main frame does not re-use an IP address of above-mentioned distribution, the corresponding relation of the described IP address in the first mapping table of Dynamic Host Configuration Protocol server deletion local maintenance and the MAC Address of main frame, thus upgrade this first mapping table.
Further, described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame, comprise: described Dynamic Host Configuration Protocol server is according to the lease information of a described IP address, determine that the lease information of a described IP address expires, and do not receive described main frame send re-rent request, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.Concrete, the corresponding relation that above-mentioned Dynamic Host Configuration Protocol server deletes the MAC Address of a described IP address in the first mapping table and main frame specifically comprises, after distributing an IP address a period of time, Dynamic Host Configuration Protocol server is according to the lease information of an IP address, judge that the lease information of an IP address expires, and do not receive main frame re-rent request, just delete the corresponding relation of the MAC Address of an IP address and main frame, wherein, the lease information of above-mentioned lease information to be Dynamic Host Configuration Protocol server be an IP address of host assignment, this lease information comprises the time period etc. that main frame can use an IP address.
Further, after described Dynamic Host Configuration Protocol server is described host assignment the one IP address, also comprise: if described Dynamic Host Configuration Protocol server receives the second request message that described main frame sends, described second request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described Dynamic Host Configuration Protocol server is described host assignment the 2nd IP address, the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame is revised as the corresponding relation of the MAC Address of described 2nd IP address and described main frame.
Concrete, after distributing an IP address, if Dynamic Host Configuration Protocol server receives again the message of the IP address requesting that this main frame sends, then Dynamic Host Configuration Protocol server is this host assignment the 2nd IP address, and the corresponding relation of the MAC Address of the IP address of Dynamic Host Configuration Protocol server in the first mapping table of local maintenance and main frame is revised as the corresponding relation of the MAC Address of the 2nd IP address and main frame.
Fig. 2 is the flow chart of the host communication method embodiment two that the present invention is based on DHCP, and as shown in Figure 2, the method comprises:
The first request message that step 201:DHCP server Receiving Host sends, the first request message is host assignment procotol IP address for asking Dynamic Host Configuration Protocol server.
This step is identical with step 101 embodiment, repeats no more herein.
Step 202:DHCP server is host assignment the one IP address, sets up and stores the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame.
This step is identical with step 102 embodiment, repeats no more herein.
Step 203:DHCP server sends an IP address and the first mapping table to main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded in the first mapping table.
This step is identical with step 103 embodiment, repeats no more herein.
The corresponding relation of the MAC Address of the one IP address and main frame adds in the first mapping table by step 204:DHCP server.
In this step, Dynamic Host Configuration Protocol server will separate the IP address of this network segment of adding to the corresponding relation of the IP address of other main frames of the same network segment and MAC Address and keeper and the corresponding relation of MAC Address is issued after the main frame of forward direction Dynamic Host Configuration Protocol server IP address requesting, is added in the first mapping table by the corresponding relation of newly assigned IP address and MAC Address simultaneously.
First mapping table is sent to other main frames by step 205:DHCP server.
In this step, above-mentioned the first mapping table that with the addition of the corresponding relation of newly assigned IP address and MAC Address is sent to other main frames in the same network segment by Dynamic Host Configuration Protocol server.
The host communication method based on DHCP of the present embodiment, the message for request dispatching IP address that Dynamic Host Configuration Protocol server Receiving Host sends, Dynamic Host Configuration Protocol server is host assignment the one IP address, set up and store the corresponding relation of the MAC Address of an IP address and main frame, Dynamic Host Configuration Protocol server is by sending an IP address and first mapping table of above-mentioned distribution to main frame, the IP address of other main frames and the corresponding relation of MAC Address of the same network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in this first mapping table, further, by the corresponding relation of newly assigned IP address and MAC Address is added in the first mapping table, and the first mapping table is sent to other main frames, make other main frames when the MAC Address of query aim main frame, the each main frame of broadcast mode inquiry can not be adopted, but by inquiring about the first respective mapping table, thus obtain the MAC Address of destination host, to communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Fig. 3 is the flow chart of the host communication method embodiment three that the present invention is based on DHCP, and as shown in Figure 3, the method comprises:
Step 301: main frame sends the first request message to dynamic host configuration protocol DHCP server, the first request message is host assignment procotol IP address for asking Dynamic Host Configuration Protocol server.
In this step, main frame, to Dynamic Host Configuration Protocol server IP address requesting, sends the first solicited message particular by Dynamic Host Configuration Protocol server, and the first solicited message is this host assignment IP address for asking Dynamic Host Configuration Protocol server.
Step 302: main frame receives an IP address and first mapping table of Dynamic Host Configuration Protocol server transmission.
In this step, main frame receives an IP address and first mapping table of Dynamic Host Configuration Protocol server transmission.Wherein, the IP address of host assignment that to be Dynamic Host Configuration Protocol server be in an IP address, comprises the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded in the first mapping table.
Step 303: main frame communicates with other main frames of the place network segment according to the first mapping table.
In this step, when main frame needs to communicate with other main frames of the same network segment, by inquiring about this first mapping table, finding the MAC Address of destination host, thus communicating with destination host.
The host communication method based on DHCP of the present embodiment, main frame to Dynamic Host Configuration Protocol server IP address requesting, and receives an IP address and first mapping table of Dynamic Host Configuration Protocol server transmission.Wherein, the IP address of host assignment that to be Dynamic Host Configuration Protocol server be in the one IP address, the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in first mapping table, thus make when main frame needs to communicate with other main frames of the same network segment, by inquiring about this first mapping table, find the MAC Address of destination host, thus communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Fig. 4 is the flow chart of the host communication method embodiment four that the present invention is based on DHCP, and as shown in Figure 4, the step 303 in embodiment three comprises:
Step 3031: whether comprise the MAC Address that the IP address of destination host to be communicated is corresponding in host query first mapping table.
In this step, MAC Address corresponding to the IP address that whether comprises destination host to be communicated inquired about by main frame in the first mapping table, if comprised, then performs step 3032, otherwise perform 3033.Wherein, the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in this first mapping table.
Step 3032: if there is the MAC Address corresponding with the IP address of destination host, main frame then adopts the MAC Address of the destination host inquired to communicate with destination host.
In this step, if there is the MAC Address corresponding with the IP address of destination host in the first mapping table, then main frame is communicated with destination host by this MAC Address inquired.
Step 3033: if there is not the MAC Address corresponding with the IP address of destination host, main frame, by ARP mechanism, adopts the mode of broadcast to obtain the MAC Address of destination host.
In this step, if there is not the MAC Address corresponding with the IP address of destination host in the first mapping table, then main frame adopts existing ARP mechanism, adopts broadcast mode to obtain the MAC Address of destination host, thus communicates with destination host.
The host communication method based on DHCP of the present embodiment, when main frame needs to communicate with other main frames, by first inquiring about the first mapping table, judge whether there is the MAC Address corresponding with the IP address of destination host in the first mapping table, if existed, MAC Address then by inquiring communicates with destination host, otherwise by ARP mechanism, the mode of broadcast is adopted to obtain the MAC Address of destination host, thus reduce the probability that main frame adopts other host MAC address of ARP protocol inquiry same network segment, solve to a certain extent and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Fig. 5 is the flow chart of the host communication device embodiment one that the present invention is based on DHCP, as shown in Figure 5, comprising:
Receiver module 11, for the first request message that Receiving Host sends, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Distribution module 12, for being described host assignment the one IP address, setting up and storing the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame;
Sending module 13, for sending a described IP address and the first mapping table to described main frame, in described first mapping table, comprise the IP address of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded.
The host communication device based on DHCP of the present embodiment, the message for request dispatching IP address that Dynamic Host Configuration Protocol server is sent by receiver module Receiving Host, be host assignment the one IP address by distribution module, set up and store the corresponding relation of the MAC Address of an IP address and main frame, Dynamic Host Configuration Protocol server sends an IP address and first mapping table of above-mentioned distribution to main frame by sending module, the IP address of other main frames and the corresponding relation of MAC Address of the same network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in this first mapping table, make main frame when the MAC Address of query aim main frame, the each main frame of broadcast mode inquiry can not be adopted, but by inquiry first mapping table, thus obtain the MAC Address of destination host, to communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
Fig. 6 is the flow chart of the host communication device embodiment two that the present invention is based on DHCP, as shown in Figure 6, comprising:
Sending module 21, for sending the first request message to dynamic host configuration protocol DHCP server, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Receiver module 22, for receiving an IP address and first mapping table of the transmission of described Dynamic Host Configuration Protocol server, the IP address of described host assignment that to be described Dynamic Host Configuration Protocol server be in a described IP address, comprises the IP address multimedia control of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table;
Communication module 23, for communicating with other main frames of the place network segment according to described first mapping table.
The host communication device based on DHCP of the present embodiment, main frame to Dynamic Host Configuration Protocol server IP address requesting, receives an IP address and first mapping table of Dynamic Host Configuration Protocol server transmission by sending module by receiver module.Wherein, the IP address of host assignment that to be Dynamic Host Configuration Protocol server be in the one IP address, the IP address of other main frames and the corresponding relation of MAC Address of the main frame place network segment that Dynamic Host Configuration Protocol server is safeguarded is comprised in first mapping table, thus make when main frame needs to communicate with other main frames of the same network segment, by inquiring about this first mapping table, find the MAC Address of destination host, thus communicate with destination host, solve and there is malicious attack in existing broadcast inquiry mode and receive a wrong MAC Address, thus data cannot arrive the problem of correct destination host.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that program command is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (11)

1. based on a host communication method of DHCP, it is characterized in that, comprising:
The first request message that dynamic host configuration protocol DHCP server Receiving Host sends, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described Dynamic Host Configuration Protocol server is described host assignment the one IP address, sets up and stores the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame;
Described Dynamic Host Configuration Protocol server sends a described IP address and the first mapping table to described main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table.
2. method according to claim 1, is characterized in that, described Dynamic Host Configuration Protocol server also comprises after being described host assignment the one IP address:
Described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.
3. method according to claim 2, is characterized in that, described Dynamic Host Configuration Protocol server determines that described main frame does not re-use a described IP address, then delete the corresponding relation of the MAC Address of a described IP address and described main frame, comprising:
Described Dynamic Host Configuration Protocol server, according to the lease information of a described IP address, determines that the lease information of a described IP address expires, and do not receive described main frame send re-rent request, then delete the corresponding relation of the MAC Address of a described IP address and described main frame.
4. method according to claim 1, is characterized in that, described Dynamic Host Configuration Protocol server also comprises after being described host assignment the one IP address:
If described Dynamic Host Configuration Protocol server receives the second request message that described main frame sends, described second request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described Dynamic Host Configuration Protocol server is described host assignment the 2nd IP address, the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame is revised as the corresponding relation of the MAC Address of described 2nd IP address and described main frame.
5. method according to claim 1, is characterized in that, described Dynamic Host Configuration Protocol server, to after described main frame sends a described IP address and the first mapping table, also comprises:
The corresponding relation of the multimedia control MAC Address of a described IP address and described main frame adds in described first mapping table by described Dynamic Host Configuration Protocol server;
Described first mapping table is sent to other main frames by described Dynamic Host Configuration Protocol server.
6. method according to claim 1, is characterized in that, described first mapping table is stored in be selected in OPTION field.
7. based on a host communication method of DHCP, it is characterized in that, comprising:
Main frame sends the first request message to dynamic host configuration protocol DHCP server, and described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Described main frame receives an IP address and first mapping table of the transmission of described Dynamic Host Configuration Protocol server, the IP address of described host assignment that to be described Dynamic Host Configuration Protocol server be in a described IP address, comprises the IP address of other main frames and the corresponding relation of multimedia control MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table;
Described main frame communicates with other main frames of the place network segment according to described first mapping table.
8. method according to claim 7, is characterized in that, described main frame communicates with other main frames of the place network segment according to described first mapping table, comprising:
The MAC Address that the IP address of destination host to be communicated is corresponding whether is comprised in first mapping table described in described host query;
If there is the MAC Address corresponding with the IP address of described destination host, described main frame then adopts the MAC Address of the destination host inquired to communicate with described destination host.
9. method according to claim 8, is characterized in that, also comprises:
If there is not the MAC Address corresponding with the IP address of described destination host, described main frame, by ARP mechanism, adopts the mode of broadcast to obtain the MAC Address of destination host.
10. based on a host communication device of DHCP, it is characterized in that, comprising:
Receiver module, for the first request message that Receiving Host sends, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Distribution module, for being described host assignment the one IP address, setting up and storing the corresponding relation of the multimedia control MAC Address of a described IP address and described main frame;
Sending module, for sending a described IP address and the first mapping table to described main frame, comprises the IP address of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table.
11. 1 kinds based on the host communication device of DHCP, is characterized in that, comprising:
Sending module, for sending the first request message to dynamic host configuration protocol DHCP server, described first request message is described host assignment procotol IP address for asking described Dynamic Host Configuration Protocol server;
Receiver module, for receiving an IP address and first mapping table of the transmission of described Dynamic Host Configuration Protocol server, the IP address of described host assignment that to be described Dynamic Host Configuration Protocol server be in a described IP address, comprises the IP address multimedia control of other main frames and the corresponding relation of MAC Address of the described main frame place network segment that described Dynamic Host Configuration Protocol server is safeguarded in described first mapping table;
Communication module, for communicating with other main frames of the place network segment according to described first mapping table.
CN201510621619.9A 2015-09-25 2015-09-25 Host communication method based on DHCP and device Active CN105245629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510621619.9A CN105245629B (en) 2015-09-25 2015-09-25 Host communication method based on DHCP and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510621619.9A CN105245629B (en) 2015-09-25 2015-09-25 Host communication method based on DHCP and device

Publications (2)

Publication Number Publication Date
CN105245629A true CN105245629A (en) 2016-01-13
CN105245629B CN105245629B (en) 2018-10-16

Family

ID=55043126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510621619.9A Active CN105245629B (en) 2015-09-25 2015-09-25 Host communication method based on DHCP and device

Country Status (1)

Country Link
CN (1) CN105245629B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106973126A (en) * 2017-05-26 2017-07-21 杭州迪普科技股份有限公司 A kind of arp reply method and device
CN106982234A (en) * 2017-05-26 2017-07-25 杭州迪普科技股份有限公司 A kind of ARP attack defense methods and device
CN108123915A (en) * 2016-11-28 2018-06-05 北京神州泰岳软件股份有限公司 A kind of detection method and device of illegal connection to LAN equipment
CN110661903A (en) * 2019-10-12 2020-01-07 苏州浪潮智能科技有限公司 Cloud platform route management method and device
CN110662197A (en) * 2019-09-02 2020-01-07 京信通信系统(中国)有限公司 Parameter configuration method, device, communication equipment and storage medium
CN110753134A (en) * 2019-09-30 2020-02-04 互联网域名系统北京市工程研究中心有限公司 Multi-policy DHCP client classification method and system
CN112688958A (en) * 2020-12-30 2021-04-20 联想未来通信科技(重庆)有限公司 Information processing method and electronic equipment
CN112689029A (en) * 2020-12-30 2021-04-20 海信视像科技股份有限公司 Method, device and equipment for acquiring IP address of group user
CN112822218A (en) * 2021-02-28 2021-05-18 新华三信息安全技术有限公司 Access control method and device
CN115002071A (en) * 2022-05-25 2022-09-02 深信服科技股份有限公司 Information updating method, device, equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889577A (en) * 2006-07-18 2007-01-03 Ut斯达康通讯有限公司 IP address distributing method based on DHCP extended attribute
CN1949784A (en) * 2005-10-12 2007-04-18 华为技术有限公司 IP address requesting method for DHCP client by DHCP repeater
CN101741702A (en) * 2008-11-25 2010-06-16 中兴通讯股份有限公司 Method and device for limiting broadcast of ARP request
CN102098354A (en) * 2011-02-28 2011-06-15 北京星网锐捷网络技术有限公司 Method and server for allocating dynamic host configuration protocol (DHCP) addresses
CN102143247A (en) * 2010-12-31 2011-08-03 华为技术有限公司 Method for allocating and configuring address, address allocation server and host machine
CN102209124A (en) * 2011-06-08 2011-10-05 杭州华三通信技术有限公司 Method for communication between private network and public network and network address translation equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949784A (en) * 2005-10-12 2007-04-18 华为技术有限公司 IP address requesting method for DHCP client by DHCP repeater
CN1889577A (en) * 2006-07-18 2007-01-03 Ut斯达康通讯有限公司 IP address distributing method based on DHCP extended attribute
CN101741702A (en) * 2008-11-25 2010-06-16 中兴通讯股份有限公司 Method and device for limiting broadcast of ARP request
CN102143247A (en) * 2010-12-31 2011-08-03 华为技术有限公司 Method for allocating and configuring address, address allocation server and host machine
CN102098354A (en) * 2011-02-28 2011-06-15 北京星网锐捷网络技术有限公司 Method and server for allocating dynamic host configuration protocol (DHCP) addresses
CN102209124A (en) * 2011-06-08 2011-10-05 杭州华三通信技术有限公司 Method for communication between private network and public network and network address translation equipment

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123915A (en) * 2016-11-28 2018-06-05 北京神州泰岳软件股份有限公司 A kind of detection method and device of illegal connection to LAN equipment
CN108123915B (en) * 2016-11-28 2020-11-20 北京神州泰岳软件股份有限公司 Detection method and device for illegal network access equipment
CN106973126A (en) * 2017-05-26 2017-07-21 杭州迪普科技股份有限公司 A kind of arp reply method and device
CN106982234A (en) * 2017-05-26 2017-07-25 杭州迪普科技股份有限公司 A kind of ARP attack defense methods and device
CN110662197A (en) * 2019-09-02 2020-01-07 京信通信系统(中国)有限公司 Parameter configuration method, device, communication equipment and storage medium
CN110753134A (en) * 2019-09-30 2020-02-04 互联网域名系统北京市工程研究中心有限公司 Multi-policy DHCP client classification method and system
CN110661903A (en) * 2019-10-12 2020-01-07 苏州浪潮智能科技有限公司 Cloud platform route management method and device
CN110661903B (en) * 2019-10-12 2022-12-06 苏州浪潮智能科技有限公司 Cloud platform route management method and device
CN112688958A (en) * 2020-12-30 2021-04-20 联想未来通信科技(重庆)有限公司 Information processing method and electronic equipment
CN112689029A (en) * 2020-12-30 2021-04-20 海信视像科技股份有限公司 Method, device and equipment for acquiring IP address of group user
CN112822218A (en) * 2021-02-28 2021-05-18 新华三信息安全技术有限公司 Access control method and device
CN115002071A (en) * 2022-05-25 2022-09-02 深信服科技股份有限公司 Information updating method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN105245629B (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN105245629A (en) DHCP-based host communication method and device
US8767737B2 (en) Data center network system and packet forwarding method thereof
CN102882699B (en) The distribution method of fringe node and device and fringe node controller
US9699136B2 (en) Stateless autoconfiguration of hostnames of network devices
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
CN102143247B (en) Method for allocating and configuring address, address allocation server and host machine
CN102845123B (en) Virtual private cloud connection method and tunnel proxy server
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
US9769113B1 (en) Socket-based internet protocol for wireless networks
CN102752413B (en) Dynamic Host Configuration Protocol server system of selection and the network equipment
CN101188514A (en) Method, device and system for automatically discovering network element device
CN101873320B (en) Client information verification method based on DHCPv6 relay and device thereof
CN102769678B (en) A kind of dhcp address distribution method and device
EP2536099A2 (en) Method and access node for preventing address conflict
CN105472048A (en) Address allocating method, information aggregation method and related equipment
CN101771732A (en) Message processing method, device and network equipment
CN101018193A (en) Load distribution method and system and device for allocating the backup packet and virtual IP address
CN104253878A (en) VLAN (Virtual Local Area Network) information management system and method of DHCP (Dynamic Host Configuration Protocol) RELAY termination sub-interface
CN106878481B (en) Method, device and system for acquiring Internet Protocol (IP) address
CN104104749A (en) Method and device for allocating tunnel IP addresses
CN106375489B (en) Method and device for processing Media Access Control (MAC) address
CN102594941B (en) Method for device access and device communication in building intercom system
CN102984696A (en) IP communication method, equipment and system based on mobile terminals
CN106878479B (en) Address allocation method and device
CN107172229B (en) Router configuration method and device

Legal Events

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