CN105245629B - Host communication method based on DHCP and device - Google Patents
Host communication method based on DHCP and device Download PDFInfo
- Publication number
- CN105245629B CN105245629B CN201510621619.9A CN201510621619A CN105245629B CN 105245629 B CN105245629 B CN 105245629B CN 201510621619 A CN201510621619 A CN 201510621619A CN 105245629 B CN105245629 B CN 105245629B
- Authority
- CN
- China
- Prior art keywords
- host
- address
- configuration protocol
- protocol server
- dynamic
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
Abstract
The present invention provides a kind of host communication method and device based on DHCP, including:The first request message that dynamic host configuration protocol DHCP server receiving host is sent, first request message are the host assignment network protocol IP address for asking the Dynamic Host Configuration Protocol server;The Dynamic Host Configuration Protocol server is the first IP address of the host assignment, establishes and store the correspondence of first IP address and the multimedia control MAC Address of the host;The Dynamic Host Configuration Protocol server sends first IP address and the first mapping table to the host, the correspondence of the IP address and MAC Address of other hosts of the network segment where the host safeguarded comprising the Dynamic Host Configuration Protocol server in first mapping table, the problem of solving in existing broadcast inquiry mode and receive a wrong MAC Address there are malicious attack, correct destination host can not be reached to data.
Description
Technical field
The present invention relates to computer network communication fields, more particularly to one kind being based on dynamic host configuration protocol (Dynamic
Host Configuration Protocol, abbreviation DHCP) host communication method and device.
Background technology
DHCP is applied in large-scale LAN environment, and main function is the management concentrated, distribution IP address, makes net
Host in network environment dynamically obtains internet protocol address (Internet Protocol Address, abbreviation IP address), net
Close the information such as the addresses Gateway, domain name system (Domain Name System, abbreviation DNS) server address.
In the prior art, in DHCP, host is communicated with destination host, needs the IP address pair for obtaining destination host
Address is to realize network communication for the multimedia control (Media Access Control, abbreviation MAC) answered, in address resolution protocol
In (Address Resolution Protocol, abbreviation ARP), host with inquiring the IP of destination host by the way of broadcast
The MAC Address of oneself is replied to host by the corresponding MAC Address in location, destination host, the MAC that host is replied according to destination host
Location is communicated with destination host.
But if there is malicious attacker in the inquiry method of the prior art, a wrong MAC Address can be deliberately replied
To host, then host can not reach correct destination host using wrong MAC Address transmission data, data at this time.
Invention content
The present invention provides a kind of host communication method and device based on DHCP, solves and is deposited in existing broadcast inquiry mode
A problem of wrong MAC Address being received in malicious attack, correct destination host can not be reached to data.
The present invention provides a kind of host communication method based on DHCP, including:
The first request message that dynamic host configuration protocol DHCP server receiving host is sent, first request message
It is the host assignment network protocol IP address for asking the Dynamic Host Configuration Protocol server;
The Dynamic Host Configuration Protocol server be the first IP address of the host assignment, establish and store first IP address with it is described
The correspondence of the multimedia control MAC Address of host;
The Dynamic Host Configuration Protocol server sends first IP address and the first mapping table to the host, and described first
The IP address of other hosts of the network segment where the host safeguarded comprising the Dynamic Host Configuration Protocol server in mapping table is with MAC
The correspondence of location.
Optionally, after the Dynamic Host Configuration Protocol server is the first IP address of the host assignment, further include:
The Dynamic Host Configuration Protocol server determines that the host does not use first IP address, then deletes first IP address
With the correspondence of the MAC Address of the host.
The Dynamic Host Configuration Protocol server determines that the host does not use first IP address, then deletes first IP address
With the correspondence of the MAC Address of the host, including:
Optionally, the Dynamic Host Configuration Protocol server determines first IP address according to the lease information of first IP address
Lease information expire, and do not receive that the host sends re-rents request, then deletes first IP address and the host
MAC Address correspondence.
Optionally, after the Dynamic Host Configuration Protocol server is the first IP address of the host assignment, further include:
If the Dynamic Host Configuration Protocol server receives the second request message that the host is sent, second request message is used for
It is the host assignment network protocol IP address to ask the Dynamic Host Configuration Protocol server;
The Dynamic Host Configuration Protocol server is the second IP address of the host assignment, by the more of first IP address and the host
The correspondence of media control MAC Address is revised as the correspondence of second IP address and the MAC Address of the host.
Optionally, the Dynamic Host Configuration Protocol server to the host send first IP address and the first mapping table it
Afterwards, further include:
The Dynamic Host Configuration Protocol server is by the correspondence of first IP address and the multimedia control MAC Address of the host
It is added in first mapping table;
First mapping table is sent to other hosts by the Dynamic Host Configuration Protocol server.
Optionally, first mapping table is stored in selection OPTION fields.
The present invention provides a kind of host communication method based on DHCP, including:
Host sends the first request message to dynamic host configuration protocol DHCP server, and first request message is used for
It is the host assignment network protocol IP address to ask the Dynamic Host Configuration Protocol server;
The host receives the first IP address and the first mapping table that the Dynamic Host Configuration Protocol server is sent, and described first
IP address is the IP address that the Dynamic Host Configuration Protocol server is the host assignment, includes the DHCP in first mapping table
The correspondence of the IP address and multimedia control MAC Address of other hosts of the network segment where the host that server is safeguarded;
The host is communicated according to first mapping table with other hosts of the place network segment.
Optionally, the host is communicated according to first mapping table with other hosts of the place network segment, packet
It includes:
Whether the IP address comprising destination host to be communicated corresponds in first mapping table described in the host query
MAC Address;
If in the presence of MAC Address corresponding with the IP address of the destination host, the host is using the target inquired
The MAC Address of host is communicated with the destination host.
Optionally, the method further includes:If MAC Address corresponding with the IP address of the destination host, institute is not present
Host is stated by Address Resolution Protocol ARP mechanism, the MAC Address of destination host is obtained by the way of broadcast.
The present invention provides a kind of host communication device based on DHCP, including:
Receiving module, for the first request message that receiving host is sent, first request message is described for asking
Dynamic Host Configuration Protocol server is the host assignment network protocol IP address;
Distribution module, for be the first IP address of the host assignment, establish and store first IP address with it is described
The correspondence of the multimedia control MAC Address of host;
Sending module, for sending first IP address and the first mapping table to the host, described first
The IP address of other hosts of the network segment where the host safeguarded comprising the Dynamic Host Configuration Protocol server in mapping table is with MAC
The correspondence of location.
The present invention provides a kind of host communication device based on DHCP, including:
Sending module, for sending the first request message to dynamic host configuration protocol DHCP server, described first asks
Ask message for asking the Dynamic Host Configuration Protocol server for the host assignment network protocol IP address;
Receiving module, for receiving the first IP address and the first mapping table that the Dynamic Host Configuration Protocol server is sent, institute
It is the IP address that the Dynamic Host Configuration Protocol server is the host assignment to state the first IP address, includes institute in first mapping table
The IP address multimedia control of other hosts of the network segment is corresponding with MAC Address where stating the host of Dynamic Host Configuration Protocol server maintenance
Relationship;
Communication module, for being communicated with other hosts of the place network segment according to first mapping table.
Host communication method and device provided by the invention based on DHCP, what Dynamic Host Configuration Protocol server receiving host was sent is used for
The message of request distribution IP address, Dynamic Host Configuration Protocol server is the first IP address of host assignment, establishes and stores the first IP address and master
The correspondence of the MAC Address of machine, Dynamic Host Configuration Protocol server by sent to host above-mentioned distribution the first IP address and first pair
Answer relation table, in first mapping table comprising Dynamic Host Configuration Protocol server safeguard the same network segment other hosts IP address with
The correspondence of MAC Address so that host can not use broadcast mode inquiry each when inquiring the MAC Address of destination host
Host, but by inquiring the first mapping table, to obtain the MAC Address of destination host, to be led to destination host
Letter, solves in existing broadcast inquiry mode and receives a wrong MAC Address there are malicious attack, to which data can not arrive
The problem of up to correct destination host.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Some bright embodiments for those of ordinary skill in the art without having to pay creative labor, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow chart of the host communication method embodiment one the present invention is based on DHCP;
Fig. 2 is the flow chart of the host communication method embodiment two the present invention is based on DHCP;
Fig. 3 is the flow chart of the host communication method embodiment three the present invention is based on DHCP;
Fig. 4 is the flow chart of the host communication method example IV the present invention is based on DHCP;
Fig. 5 is the flow chart of the host communication device embodiment one the present invention is based on DHCP;
Fig. 6 is the flow chart of the host communication device embodiment two the present invention is based on DHCP.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Method provided in an embodiment of the present invention is applied in dynamic host configuration protocol DHCP network.DHCP is a local
The procotol of net controls one section of IP address range by Dynamic Host Configuration Protocol server, and host can obtain automatically when logging in Dynamic Host Configuration Protocol server
Obtain the IP address and subnet mask of Dynamic Host Configuration Protocol server distribution.Two hosts being connected on internet communicate between each other, it is necessary to
There is respective IP address, since IP address resource is limited, broadband access operator can not give each user to distribute a fixation
IP address, therefore interim address is carried out to the user of online using DHCP modes and is distributed.I.e. when network is added in subscriber's main station
When, Dynamic Host Configuration Protocol server distributes an IP address temporarily in address pool, and after subscriber's main station is offline, Dynamic Host Configuration Protocol server is possible will
This address is distributed to other hosts reached the standard grade later.Therefore it can not only ensure that network communication with effectively save IP address, but also
Improve the utilization rate of IP address.
Fig. 1 is the flow chart of the host communication method embodiment one the present invention is based on DHCP, as shown in Figure 1, this method packet
It includes:
Step 101:The first request message that Dynamic Host Configuration Protocol server receiving host is sent, the first request message is for asking DHCP
Server is host assignment network protocol IP address.
In this step, it when network is added in host, needs to Dynamic Host Configuration Protocol server IP address requesting, at this point, Dynamic Host Configuration Protocol server
The request Dynamic Host Configuration Protocol server that receiving host is sent is the first request message of host assignment IP address.
Step 102:Dynamic Host Configuration Protocol server is the first IP address of host assignment, establishes and store the more of the first IP address and host
Media control the correspondence of MAC Address.
In this step, be not separated out currently IP address is distributed to the host of the request by Dynamic Host Configuration Protocol server, should
The method of salary distribution is dynamic allocation mode, i.e. Dynamic Host Configuration Protocol server specifies an IP address with time restriction, time to arrive to host
Phase or host explicitly indicate that when abandoning the address, which can be used by other hosts.Dynamic Host Configuration Protocol server is built locally simultaneously
Vertical and storage the first IP address and MAC Address correspondence, correspondence can be recorded by establishing a list, should
List includes two parts content, and a part is to have distributed IP the and MAC correspondences of host address, and another part is network management
The correspondence of the IP and MAC of the crucial host of member's addition.
Step 103:Dynamic Host Configuration Protocol server sends the first IP address and the first mapping table, the first correspondence to host
The correspondence of the IP address and MAC Address of other hosts of the network segment where the host safeguarded comprising Dynamic Host Configuration Protocol server in table.
In this step, Dynamic Host Configuration Protocol server into host forwarding step 102 Dynamic Host Configuration Protocol server distribute the first IP address with
And the correspondence of the IP address and MAC Address of other hosts of the same network segment of above-mentioned Dynamic Host Configuration Protocol server maintenance, the correspondence are closed
It is stored in the first mapping table.I.e. Dynamic Host Configuration Protocol server will separate other host IP address to the same network segment with
The IP address of the network segment and the correspondence of MAC Address of the correspondence of MAC Address and administrator's addition are issued currently together
To the host of Dynamic Host Configuration Protocol server IP address requesting.
Optionally, first mapping table is stored in selection OPTION fields.Wherein, OPTION fields are DHCP
An option in message, the option are the field of variable length in DHCP message, and partial charter party is contained in OPTION options
Information, type of message etc..It at most may include 255 OPTION in OPTION options, be at least 1 OPTION.The present embodiment
IP address and the correspondence OPTION classes that can customize by one of MAC Address send.
The host communication method based on DHCP of the present embodiment, what Dynamic Host Configuration Protocol server receiving host was sent distributes for request
The message of IP address, Dynamic Host Configuration Protocol server are the first IP address of host assignment, with establishing and store the MAC of the first IP address and host
The correspondence of location, Dynamic Host Configuration Protocol server by sending the first IP address and the first mapping table of above-mentioned distribution to host,
Pair of the IP address and MAC Address of other hosts of the same network segment safeguarded comprising Dynamic Host Configuration Protocol server in first mapping table
It should be related to so that host can not use each host of broadcast mode inquiry when inquiring the MAC Address of destination host, but logical
The first mapping table of inquiry is crossed, to obtain the MAC Address of destination host, to be communicated with destination host, is solved existing
Have in broadcast inquiry mode and receive a wrong MAC Address there are malicious attack, to which data can not reach correct mesh
The problem of marking host.
Further, after the Dynamic Host Configuration Protocol server is the first IP address of the host assignment, further include:The DHCP clothes
Business device determines that the host does not use first IP address, then deletes first IP address with the MAC of the host
The correspondence of location.Specifically, after distributing the first IP address for a period of time, when host does not use the first of above-mentioned distribution
When IP address, Dynamic Host Configuration Protocol server deletes the MAC of first IP address and host in the first mapping table of local maintenance
The correspondence of address, to update first mapping table.
Further, the Dynamic Host Configuration Protocol server determines that the host does not use first IP address, then described in deletion
The correspondence of first IP address and the MAC Address of the host, including:The Dynamic Host Configuration Protocol server is according to first IP address
Lease information, determine that the lease information of first IP address expires, and do not receive that the host sends re-rents request, then
Delete the correspondence of first IP address and the MAC Address of the host.Specifically, above-mentioned Dynamic Host Configuration Protocol server deletes first
The correspondence of the MAC Address of first IP address and host in mapping table specifically includes, and is distributing the first IP
Address for a period of time after, Dynamic Host Configuration Protocol server judges that the lease information of the first IP address arrives according to the lease information of the first IP address
Phase, and do not receive host re-rents request, just deletes the correspondence of the MAC Address of first IP address and host, wherein
Above-mentioned lease information is the lease information for the first IP address that Dynamic Host Configuration Protocol server is host assignment, which includes that host can
To use the period etc. of first IP address.
Further, after the Dynamic Host Configuration Protocol server is the first IP address of the host assignment, further include:If the DHCP
Server receives the second request message that the host is sent, and second request message is for asking the Dynamic Host Configuration Protocol server
For the host assignment network protocol IP address;
The Dynamic Host Configuration Protocol server is the second IP address of the host assignment, by the more of first IP address and the host
The correspondence of media control MAC Address is revised as the correspondence of second IP address and the MAC Address of the host.
Specifically, after distributing the first IP address, if Dynamic Host Configuration Protocol server is with receiving the request IP of host transmission again
The message of location, then Dynamic Host Configuration Protocol server be second IP address of host assignment, and by Dynamic Host Configuration Protocol server local maintenance the first couple
Answer the correspondence of the MAC Address of the first IP address and host in relation table with being revised as the MAC of the second IP address and host
The correspondence of location.
Fig. 2 is the flow chart of the host communication method embodiment two the present invention is based on DHCP, as shown in Fig. 2, this method packet
It includes:
Step 201:The first request message that Dynamic Host Configuration Protocol server receiving host is sent, the first request message is for asking DHCP
Server is host assignment network protocol IP address.
The step is identical with step 101 specific implementation mode, and details are not described herein again.
Step 202:Dynamic Host Configuration Protocol server be the first IP address of host assignment, establish and store first IP address with it is described
The correspondence of the multimedia control MAC Address of host.
The step is identical with step 102 specific implementation mode, and details are not described herein again.
Step 203:Dynamic Host Configuration Protocol server sends the first IP address and the first mapping table, the first correspondence to host
The correspondence of the IP address and MAC Address of other hosts of the network segment where the host safeguarded comprising Dynamic Host Configuration Protocol server in table.
The step is identical with step 103 specific implementation mode, and details are not described herein again.
Step 204:It is corresponding that first IP address is added to first by Dynamic Host Configuration Protocol server with the correspondence of the MAC Address of host
In relation table.
In this step, Dynamic Host Configuration Protocol server will have been separated to the IP address and MAC Address of other hosts of the same network segment
Correspondence and the IP address of the network segment and the correspondence of MAC Address of administrator's addition issue when preceding to Dynamic Host Configuration Protocol server
After the host of IP address requesting, while the correspondence of newly assigned IP address and MAC Address is added to the first correspondence
In table.
Step 205:First mapping table is sent to other hosts by Dynamic Host Configuration Protocol server.
In this step, Dynamic Host Configuration Protocol server is by the above-mentioned correspondence for being added to newly assigned IP address and MAC Address
First mapping table is sent to other hosts in the same network segment.
The host communication method based on DHCP of the present embodiment, what Dynamic Host Configuration Protocol server receiving host was sent distributes for request
The message of IP address, Dynamic Host Configuration Protocol server are the first IP address of host assignment, with establishing and store the MAC of the first IP address and host
The correspondence of location, Dynamic Host Configuration Protocol server by sending the first IP address and the first mapping table of above-mentioned distribution to host,
Pair of the IP address and MAC Address of other hosts of the same network segment safeguarded comprising Dynamic Host Configuration Protocol server in first mapping table
It should be related to, further, by the way that the correspondence of newly assigned IP address and MAC Address is added to the first mapping table
In, and the first mapping table is sent to other hosts so that other hosts, can when inquiring the MAC Address of destination host
Not use each host of broadcast mode inquiry, but by inquiring respective first mapping table, to obtain destination host
MAC Address solve in existing broadcast inquiry mode to be communicated with destination host and receive one there are malicious attack
The MAC Address of mistake, thus the problem of data can not reach correct destination host.
Fig. 3 is the flow chart of the host communication method embodiment three the present invention is based on DHCP, as shown in figure 3, this method packet
It includes:
Step 301:Host sends the first request message, the first request message to dynamic host configuration protocol DHCP server
It is host assignment network protocol IP address for asking Dynamic Host Configuration Protocol server.
In this step, host sends first to Dynamic Host Configuration Protocol server IP address requesting particular by Dynamic Host Configuration Protocol server
Solicited message, the first solicited message are the host assignment IP address for asking Dynamic Host Configuration Protocol server.
Step 302:Host receives the first IP address and the first mapping table that Dynamic Host Configuration Protocol server is sent.
In this step, host receives the first IP address and the first mapping table that Dynamic Host Configuration Protocol server is sent.Wherein, should
First IP address is the IP address that Dynamic Host Configuration Protocol server is host assignment, is safeguarded comprising Dynamic Host Configuration Protocol server in the first mapping table
The correspondence of the IP address and MAC Address of other hosts of the network segment where host.
Step 303:Host is communicated according to the first mapping table with other hosts of the place network segment.
In this step, when host needs and other hosts of the same network segment are communicated, by inquiring the first couple
Relation table is answered, the MAC Address of destination host is found, to be communicated with destination host.
The host communication method based on DHCP of the present embodiment, host are received to Dynamic Host Configuration Protocol server IP address requesting
The first IP address and the first mapping table that Dynamic Host Configuration Protocol server is sent.Wherein, which is based on Dynamic Host Configuration Protocol server
The IP address of machine distribution, the IP of other hosts of the network segment where the host safeguarded comprising Dynamic Host Configuration Protocol server in the first mapping table
The correspondence of address and MAC Address passes through so that when host needs and other hosts of the same network segment are communicated
First mapping table is inquired, the MAC Address of destination host is found, to be communicated with destination host, is solved existing
A wrong MAC Address is received there are malicious attack in broadcast inquiry mode, to which data can not reach correct target
The problem of host.
Fig. 4 is the flow chart of the host communication method example IV the present invention is based on DHCP, as shown in figure 4, embodiment three
In step 303 include:
Step 3031:Whether the IP address comprising destination host to be communicated corresponds in the first mapping table of host query
MAC Address.
In this step, host inquires the IP address for whether including destination host to be communicated in the first mapping table
Corresponding MAC Address, if including, 3032 are thened follow the steps, otherwise executes 3033.Wherein, it is wrapped in first mapping table
The correspondence of the IP address and MAC Address of other hosts of the network segment where the host safeguarded containing Dynamic Host Configuration Protocol server.
Step 3032:If in the presence of MAC Address corresponding with the IP address of destination host, host is using the target inquired
The MAC Address of host is communicated with destination host.
In this step, if there is MAC Address corresponding with the IP address of destination host in the first mapping table,
Then host is communicated by the MAC Address inquired with destination host.
Step 3033:If MAC Address corresponding with the IP address of destination host is not present, host passes through address resolution protocol
ARP mechanism obtains the MAC Address of destination host by the way of broadcast.
In this step, if in the first mapping table there is no MAC corresponding with the IP address of destination host
Location, then host use existing ARP mechanism, using broadcast mode obtain destination host MAC Address, to destination host into
Row communication.
The host communication method based on DHCP of the present embodiment passes through head when host needs and other hosts are communicated
The first mapping table is first inquired, judges to whether there is MAC corresponding with the IP address of destination host in the first mapping table
Otherwise address passes through Address Resolution Protocol ARP if it is present being communicated with destination host by the MAC Address inquired
Mechanism obtains the MAC Address of destination host by the way of broadcast, and same net is inquired using ARP protocol mechanism to reduce host
The probability of other host MAC address of section, solves to receive there are malicious attack in existing broadcast inquiry mode to a certain extent
One wrong MAC Address, thus the problem of data can not reach correct destination host.
Fig. 5 is the flow chart of the host communication device embodiment one the present invention is based on DHCP, as shown in figure 5, including:
Receiving module 11, for the first request message that receiving host is sent, first request message is for asking institute
It is the host assignment network protocol IP address to state Dynamic Host Configuration Protocol server;
Distribution module 12 is established for being the first IP address of the host assignment and stores first IP address and institute
State the correspondence of the multimedia control MAC Address of host;
Sending module 13, for sending first IP address and the first mapping table to the host, described the
The IP address and MAC of other hosts of the network segment where the host safeguarded comprising the Dynamic Host Configuration Protocol server in one mapping table
The correspondence of address.
The host communication device based on DHCP of the present embodiment, Dynamic Host Configuration Protocol server are sent by receiving module receiving host
Message for asking distribution IP address is the first IP address of host assignment by distribution module, establishes and with storing the first IP
The correspondence of the MAC Address of location and host, Dynamic Host Configuration Protocol server send the first IP of above-mentioned distribution by sending module to host
Address and the first mapping table, other masters for the same network segment safeguarded comprising Dynamic Host Configuration Protocol server in first mapping table
The IP address of machine and the correspondence of MAC Address so that host can not use wide when inquiring the MAC Address of destination host
Each host of broadcast mode inquiry, but by inquiring the first mapping table, to obtain the MAC Address of destination host, with and mesh
Mark host is communicated, and is solved in existing broadcast inquiry mode and is received a wrong MAC Address there are malicious attack, from
And data can not reach the problem of correct destination host.
Fig. 6 is the flow chart of the host communication device embodiment two the present invention is based on DHCP, as shown in fig. 6, including:
Sending module 21, for dynamic host configuration protocol DHCP server send the first request message, described first
Request message is the host assignment network protocol IP address for asking the Dynamic Host Configuration Protocol server;
Receiving module 22, for receiving the first IP address and the first mapping table that the Dynamic Host Configuration Protocol server is sent,
First IP address is the IP address that the Dynamic Host Configuration Protocol server is the host assignment, includes in first mapping table
Pair of the IP address multimedia control and MAC Address of other hosts of the network segment where the host that the Dynamic Host Configuration Protocol server is safeguarded
It should be related to;
Communication module 23, for being communicated with other hosts of the place network segment according to first mapping table.
The host communication device based on DHCP of the present embodiment, host ask IP by sending module to Dynamic Host Configuration Protocol server
Location receives the first IP address and the first mapping table that Dynamic Host Configuration Protocol server is sent by receiving module.Wherein, the first IP
Location is the IP address that Dynamic Host Configuration Protocol server is host assignment, the host place safeguarded comprising Dynamic Host Configuration Protocol server in the first mapping table
The IP address of other hosts of the network segment and the correspondence of MAC Address, so that when other of host needs and the same network segment
When host is communicated, by inquiring first mapping table, the MAC Address of destination host is found, thus and destination host
It is communicated, solves in existing broadcast inquiry mode and receive a wrong MAC Address there are malicious attack, to data
The problem of correct destination host can not be reached.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or
The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to
So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into
Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (11)
1. a kind of host communication method based on DHCP, which is characterized in that including:
The first request message that dynamic host configuration protocol DHCP server receiving host is sent, first request message are used for
It is the host assignment network protocol IP address to ask the Dynamic Host Configuration Protocol server;
The Dynamic Host Configuration Protocol server is the first IP address of the host assignment, establishes and stores first IP address and the host
Multimedia control MAC Address correspondence;
The Dynamic Host Configuration Protocol server sends first IP address and the first mapping table to the host, and described first corresponds to
Include the IP address and MAC Address of other hosts of the network segment where the host that the Dynamic Host Configuration Protocol server is safeguarded in relation table
Correspondence;Wherein,
Whether first mapping table is for making in the first mapping table of host query to include destination host to be communicated
The corresponding MAC Address of IP address, if in the presence of MAC Address corresponding with the IP address of destination host, host is using inquiring
The MAC Address of destination host communicated with destination host.
2. according to the method described in claim 1, it is characterized in that, the Dynamic Host Configuration Protocol server for the first IP of the host assignment
After location, further include:
The Dynamic Host Configuration Protocol server determines that the host does not use first IP address, then deletes first IP address and institute
State the correspondence of the MAC Address of host.
3. according to the method described in claim 2, it is characterized in that, the Dynamic Host Configuration Protocol server determines that the host does not use institute
The first IP address is stated, then deletes the correspondence of first IP address and the MAC Address of the host, including:
The Dynamic Host Configuration Protocol server determines that the lease information of first IP address arrives according to the lease information of first IP address
Phase, and do not receive that the host sends re-rents request, then deletes pair of the MAC Address of first IP address and the host
It should be related to.
4. according to the method described in claim 1, it is characterized in that, the Dynamic Host Configuration Protocol server for the first IP of the host assignment
After location, further include:
If the Dynamic Host Configuration Protocol server receives the second request message that the host is sent, second request message is for asking
The Dynamic Host Configuration Protocol server is the host assignment network protocol IP address;
The Dynamic Host Configuration Protocol server is the second IP address of the host assignment, by the multimedia of first IP address and the host
The correspondence of control MAC Address is revised as the correspondence of second IP address and the MAC Address of the host.
5. according to the method described in claim 1, it is characterized in that, the Dynamic Host Configuration Protocol server sends described first to the host
After IP address and the first mapping table, further include:
The Dynamic Host Configuration Protocol server adds the correspondence of first IP address and the multimedia control MAC Address of the host
Into first mapping table;
First mapping table is sent to other hosts by the Dynamic Host Configuration Protocol server.
6. according to the method described in claim 1, it is characterized in that, first mapping table is stored in selection OPTION words
Duan Zhong.
7. a kind of host communication method based on DHCP, which is characterized in that including:
Host sends the first request message to dynamic host configuration protocol DHCP server, and first request message is for asking
The Dynamic Host Configuration Protocol server is the host assignment network protocol IP address;
The host receives the first IP address and the first mapping table that the Dynamic Host Configuration Protocol server is sent, the first IP
Location is the IP address that the Dynamic Host Configuration Protocol server is the host assignment, includes the DHCP service in first mapping table
The correspondence of the IP address and multimedia control MAC Address of other hosts of the network segment where the host that device is safeguarded;
The host is communicated according to first mapping table with other hosts of the place network segment;
In the first mapping table of the host query whether the IP address corresponding MAC comprising destination host to be communicated
Location;
If in the presence of MAC Address corresponding with the IP address of destination host, the host uses the MAC of the destination host inquired
Address is communicated with destination host.
8. the method according to the description of claim 7 is characterized in that the host is according to first mapping table and place
Other hosts of the network segment are communicated, including:
Whether the IP address corresponding MAC of to be communicated destination host is included in first mapping table described in the host query
Address;
If in the presence of MAC Address corresponding with the IP address of the destination host, the host is using the destination host inquired
MAC Address communicated with the destination host.
9. according to the method described in claim 8, it is characterized in that, further including:
If MAC Address corresponding with the IP address of the destination host is not present, the host passes through Address Resolution Protocol ARP machine
System, obtains the MAC Address of destination host by the way of broadcast.
10. a kind of host communication device based on DHCP, which is characterized in that including:
Receiving module, for the first request message that receiving host is sent, first request message is for asking the DHCP
Server is the host assignment network protocol IP address;
Distribution module is established for being the first IP address of the host assignment and stores first IP address and the host
Multimedia control MAC Address correspondence;
Sending module, for sending first IP address and the first mapping table to the host, described first corresponds to
Include the IP address and MAC Address of other hosts of the network segment where the host that the Dynamic Host Configuration Protocol server is safeguarded in relation table
Correspondence.
11. a kind of host communication device based on DHCP, which is characterized in that including:
Sending module, for sending the first request message to dynamic host configuration protocol DHCP server, first request disappears
Breath is the host assignment network protocol IP address for asking the Dynamic Host Configuration Protocol server;
Receiving module, for receiving the first IP address and the first mapping table that the Dynamic Host Configuration Protocol server is sent, described the
One IP address is the IP address that the Dynamic Host Configuration Protocol server is the host assignment, comprising described in first mapping table
The IP address multimedia control of other hosts of the network segment where the host that Dynamic Host Configuration Protocol server is safeguarded is corresponding with MAC Address to close
System;
Communication module, for being communicated with other hosts of the place network segment according to first mapping table.
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 CN105245629A (en) | 2016-01-13 |
CN105245629B true 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) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108123915B (en) * | 2016-11-28 | 2020-11-20 | 北京神州泰岳软件股份有限公司 | Detection method and device for illegal network access equipment |
CN106982234A (en) * | 2017-05-26 | 2017-07-25 | 杭州迪普科技股份有限公司 | A kind of ARP attack defense methods and device |
CN106973126A (en) * | 2017-05-26 | 2017-07-21 | 杭州迪普科技股份有限公司 | A kind of arp reply 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 |
CN110661903B (en) * | 2019-10-12 | 2022-12-06 | 苏州浪潮智能科技有限公司 | Cloud platform route management method and device |
CN112689029A (en) * | 2020-12-30 | 2021-04-20 | 海信视像科技股份有限公司 | Method, device and equipment for acquiring IP address of group user |
CN112688958B (en) * | 2020-12-30 | 2023-03-21 | 联想未来通信科技(重庆)有限公司 | Information processing method and electronic equipment |
CN112822218B (en) * | 2021-02-28 | 2022-07-12 | 新华三信息安全技术有限公司 | Access control method and device |
CN115002071A (en) * | 2022-05-25 | 2022-09-02 | 深信服科技股份有限公司 | Information updating method, device, equipment and readable storage medium |
Citations (6)
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 |
-
2015
- 2015-09-25 CN CN201510621619.9A patent/CN105245629B/en active Active
Patent Citations (6)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN105245629A (en) | 2016-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105245629B (en) | Host communication method based on DHCP and device | |
US8363663B2 (en) | Methods and apparatus for routing data to nodes | |
CN109413640B (en) | Session information query method, network element and computer storage medium | |
US7139818B1 (en) | Techniques for dynamic host configuration without direct communications between client and server | |
CN107733670B (en) | Forwarding strategy configuration method and device | |
CN109981803B (en) | Service request processing method and device | |
JP4072536B2 (en) | Network device dynamic port configuration | |
CN108777722B (en) | Multi-system networking communication method and device, mobile terminal and storage medium | |
US20120297087A1 (en) | Method And Apparatus For Message Distribution In A Device Management System | |
US9769113B1 (en) | Socket-based internet protocol for wireless networks | |
IL150608A (en) | System and method for using an ip address as a wireless unit identifier | |
EP2439903B1 (en) | Method for providing information, home gateway and home network system | |
CN106464745B (en) | Server, client and the method for data synchronization of DNS | |
CN101800760A (en) | Realization method and system for accessing data service | |
CN111107171A (en) | Security defense method and device for DNS (Domain name Server), communication equipment and medium | |
CN111327668B (en) | Network management method, device, equipment and storage medium | |
CN105472048A (en) | Address allocating method, information aggregation method and related equipment | |
CN106453690A (en) | IP address allocation method and apparatus | |
CN105282269A (en) | Local DNS root server configuration method and service method | |
CN106878481B (en) | Method, device and system for acquiring Internet Protocol (IP) address | |
CN102572003B (en) | Method and system for acquiring and processing multiplexing address and port range | |
CN106878479B (en) | Address allocation method and device | |
CN101552802A (en) | Information processing method, gateway and network system | |
CN102480476A (en) | Multi-service access method based on DHCP protocol extension | |
CN108429641A (en) | A kind of network device management 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 |