CN107547667A - A kind of message processing method and device - Google Patents
A kind of message processing method and device Download PDFInfo
- Publication number
- CN107547667A CN107547667A CN201610473552.3A CN201610473552A CN107547667A CN 107547667 A CN107547667 A CN 107547667A CN 201610473552 A CN201610473552 A CN 201610473552A CN 107547667 A CN107547667 A CN 107547667A
- Authority
- CN
- China
- Prior art keywords
- dhcp
- arp
- message
- processing method
- client
- 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.)
- Pending
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
Abstract
The invention provides a kind of message processing method and device, the message processing method is applied to message process device, including:When receiving dynamic host configuration protocol DHCP server and being sent to the DHCP response messages of dhcp client, generation is recorded for the ARP of the DHCP response messages, and DHCP marks are provided with the ARP records;When timing in ARP records reaches, the ARP records are deleted.Such scheme, when being reached by the timing that is recorded in ARP, by the ARP record deletion related to DHCP, the dynamic for realizing ARP table updates, avoid because the limitation of ARP table and caused by arrange net cost it is high the problem of, present invention reduces cost of arranging net.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of message processing method and device.
Background technology
DHCP (Dynamic Host Configuration Protocol, DHCP) is a kind of network
Main frame can allow the IP address of its proper communication and the agreement of host configuration information to server application with dynamic access one.
DHCP is described in detail in RFC2131.DHCP uses UDP (User Datagram Protocol, UDP) conduct
Host-host protocol, main frame send a message to No. 67 ports of Dynamic Host Configuration Protocol server, and Dynamic Host Configuration Protocol server goes back to No. 68 ports of the message to main frame.
DHCP work is broadly divided into following several steps:
1st, main frame sends an IP address requesting and broadcasting packet DHCP Discover (the DHCP hairs of other configurations parameter
Existing message);
2nd, unicast message DHCP Offer (dhcp response of the Dynamic Host Configuration Protocol server loopback one comprising valid ip address and configuration
Message);
3rd, that server for the DHCP Offer that Selection of chiller reaches at first, and send a unicast message DHCP to him
Request (DHCP request message), expression receive relevant configuration;
4th, the unicast message DHCP Ack (DHCP response messages) of one confirmation of the Dynamic Host Configuration Protocol server loopback chosen.
By above-mentioned steps, main frame can is led to using the IP address and relevant configuration obtained from Dynamic Host Configuration Protocol server
Letter.The effective storage life section of address is lease period, and before lease expiration, main frame must be asked continue to rent to server, be taken
Business device, which receives request, can just be continuing with, and otherwise unconditionally abandon.
DHCP message uses broadcast mode, can not pass through multiple different subnets, if DHCP message need to pass through it is multiple
During different subnet, it is necessary to which configuration DHCP relays (DHCP Relay).DHCP relay can configure on the router can be
Configured on dhcp client, its major function be message transmission to client not in the Dynamic Host Configuration Protocol server of same subnet, and
By the return message back of Dynamic Host Configuration Protocol server to dhcp client, the distribution to the dynamic address of dhcp client and pipe are completed
Reason.
DHCP relay working method:DHCP relay monitors all messages that UDP destination slogans are 67 and (is sent to DHCP
The message of server).After DHCP relay receives request message, the request message of broadcast is taken according to the DHCP formulated in advance
Device address conversion of being engaged in inserts the agent address of oneself into unicast message, is sent to Dynamic Host Configuration Protocol server.
With the development of technology, the capacity of Dynamic Host Configuration Protocol server is increasing, and actual use is due to by DHCP relay
Address resolution protocol (Address Resolution Protocol, ARP) table capacity limitation, using existing technology not
The router of expensive, big ARP table capacity is not purchased in the arranging net of reality.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of message processing method and device, to solve because by existing
The limitation of the ARP table capacity of DHCP relay, the problem of cost that causes to arrange net is high.
In order to solve the above-mentioned technical problem, the embodiment of the present invention provides a kind of message processing method, applied to Message processing
Device, including:
It is raw when receiving dynamic host configuration protocol DHCP server and being sent to the DHCP response messages of dhcp client
Into the ARP record for the DHCP response messages, DHCP marks are provided with the ARP records;
When timing in ARP records reaches, the ARP records are deleted.
Further, when the timing in ARP records reaches, the message processing method also includes:
Control stops sending ARP probe packet to dhcp client.
Further, when receiving Dynamic Host Configuration Protocol server and being sent to the DHCP response messages of dhcp client, the message
Processing method also includes:
Establish the direct-connected route of the message process device and the dhcp client.
Further, when receiving Dynamic Host Configuration Protocol server and being sent to the DHCP response messages of dhcp client, the message
Processing method also includes:
The DHCP response messages are sent to the dhcp client.
Further, the timing is 1000 milliseconds.
The embodiment of the present invention provides a kind of message process device, including:
Generation module, for receiving dynamic host configuration protocol DHCP server and being sent to the DHCP of dhcp client
During response message, generation records for the ARP of the DHCP response messages, is provided with the ARP records
DHCP is marked;
Removing module, when being reached for the timing in ARP records, delete the ARP records.
Further, the message process device, in addition to:
Control module, stop sending ARP probe packet to dhcp client for controlling.
Further, the message process device, in addition to:
Route establishment module, for establishing the direct-connected route of the message process device and the dhcp client.
Further, the message process device, in addition to:
Sending module, for the DHCP response messages to be sent into the dhcp client.
Further, the timing is 1000 milliseconds.
The beneficial effects of the invention are as follows:
Such scheme, when being reached by the timing recorded in ARP, the ARP record deletion related to DHCP is realized
The dynamic renewal of ARP table, avoid because the limitation of ARP table and caused by arrange net cost it is high the problem of, present invention reduces arrange net
Cost.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the message processing method of the embodiment of the present invention one;
Fig. 2 is the schematic flow sheet of processing of the DHCP relay to response message;
Fig. 3 is the scene that common dhcp client obtains IP address by a DHCP relay;
Fig. 4 is the scene that dhcp client obtains IP address by N number of DHCP relay;
Fig. 5 is that dhcp client passes through the scene that IP RAN networkings obtain IP address;
Fig. 6 is the module diagram of the message process device of the embodiment of the present invention two.
Embodiment
It is right below in conjunction with the accompanying drawings and the specific embodiments to make the object, technical solutions and advantages of the present invention clearer
The present invention is described in detail.
The problem of present invention, which is directed to, to be limited because of the ARP table capacity by existing DHCP relay, and the cost that causes to arrange net is high, carries
For a kind of message processing method and device.
Embodiment one
As shown in figure 1, the message processing method of the embodiment of the present invention one, applied to message process device, including:
Step 11, dynamic host configuration protocol DHCP server is being received and is being sent to the DHCP response reports of dhcp client
Wen Shi, generation are recorded for the ARP of the DHCP response messages, and DHCP marks are provided with the ARP records
Note;
Step 12, when the timing in ARP records reaches, the ARP records are deleted.
It should be noted that the timing in ARP records is the ageing time of ARP records, it is generally the case that should
Ageing time is 1000 milliseconds, and the ageing time can be configured according to applicable cases.
The embodiment of the present invention, when being reached by the timing that is recorded in ARP, by the ARP record deletion related to DHCP,
Realize ARP table dynamic renewal, avoid because the limitation of ARP table and caused by arrange net cost it is high the problem of, present invention reduces
Arrange net cost.
It should be noted that under normal circumstances, the message process device is referred to as DHCP relay, and it is generally arranged at road
By in device or dhcp client side.Because the arp entry (i.e. ARP records) of original DHCP message will not be automatically deleted, this
If when network in access excessive dhcp client arp entry quantity can be caused excessive, and DHCP relay is directed to each arp entry
It can send ARP probe packet always, because arp entry can be automatically deleted after the arrival of the ageing time of arp entry in the application, because
This would not also be further continued for sending ARP probe packet, therefore, when the timing in ARP records reaches, the message
Processing method also includes:
Control stops sending ARP probe packet to dhcp client.
It should also be noted that, the DHCP relay is receiving Dynamic Host Configuration Protocol server and is being sent to the DHCP response reports of dhcp client
Wen Shi, also need to establish the direct-connected route of the DHCP relay and the dhcp client, while the DHCP response messages are sent out
Give the dhcp client.
The specific work process of DHCP relay includes:
After DHCP relay receives broadcast DHCP Discover messages, replacing the source IP address of message and look into route will report
Text forwards;
DHCP relay receives unicast DHCP Offer messages, DHCP platforms (agreement of router DHCP aspects is referred to, with
DHCP relay is located at same aspect) specify and message is handed down to dhcp client;
DHCP relay receives unicast DHCP Request messages, and same route of looking into forwards the message to Dynamic Host Configuration Protocol server;
DHCP relay can be handled the response message received using method of the present invention afterwards, such as Fig. 2 institutes
Show, specifically processing procedure includes:
Step 21, DHCP relay receives the response message not routeing;
Step 22, judge whether the response message is DHCP message;If not DHCP message then performs step 23, otherwise hold
Row step 24;
Step 23, common Dynamic ARP entry is generated;
Step 24, generation band D mark arp entry, arp entry of the arp entry as DHCP is shown using this, and will beat D
The message up sending of mark gives DHCP platforms, i.e. DHCP platforms receive ARP back message and are the discovery that the IP of special D marks
What address learning arrived, D marks are beaten in the age items of the arp entry then generated;
Step 25, timer is configured, if timer expiry, whether the arp entry for judging time-out is to be marked with D, if
Band D is marked, then performs step 27, otherwise, performs step 28;
It should be noted that the acquiescence ageing time of arp entry with D marks is 1000 milliseconds, and ageing time can be with
Configuration, for example, the router that ARP table capacity is smaller, the ageing time configuration of the arp entry of band D marks it is shorter, its relaying
Ability is stronger.
Step 27, ARP probe packet is not sent after aging, and is automatically deleted arp entry;
Step 28, gratuitous ARP probe messages are sent after aging, when receiving response message and then updating the aging of the arp entry
Between.
Concrete application scene of the invention is specifically described below as follows:
As shown in figure 3, common dhcp client obtains the scene of IP address by a DHCP relay, DHCP relay is adopted
With the method processing DHCP of present invention response message.
As shown in figure 4, dhcp client obtains the scene of IP address by N number of DHCP relay, wherein, DHCP relay 1 is adopted
With the method processing DHCP of present invention response message.
As shown in figure 5, dhcp client passes through the scene that IP RAN networkings obtain IP address, two or three layers of bridging device (L2
L3 bridge) using method processing DHCP of the invention response message.
The embodiment of the present invention, realize the dynamic renewal of ARP table, avoid because the limitation of ARP table and caused by arrange net cost
The problem of high, present invention reduces cost of arranging net.
Embodiment two
As shown in fig. 6, the message process device of the embodiment of the present invention two, including:
Generation module 61, for being sent to dhcp client receiving dynamic host configuration protocol DHCP server
During DHCP response messages, generation records for the ARP of the DHCP response messages, is set in the ARP records
It is equipped with DHCP marks;
Removing module 62, when being reached for the timing in ARP records, delete the ARP records.
Alternatively, the message process device, in addition to:
Control module, stop sending ARP probe packet to dhcp client for controlling.
Alternatively, the message process device, in addition to:
Route establishment module, for establishing the direct-connected route of the message process device and the dhcp client.
Alternatively, the message process device, in addition to:
Sending module, for the DHCP response messages to be sent into the dhcp client.
Specifically, the timing is 1000 milliseconds.
It should be noted that the message process device of the present embodiment is report corresponding with the message processing method of embodiment one
Literary processing unit, all implementations of embodiment one can also reach and the identical of embodiment one suitable for the embodiment
Technique effect.
Above-described is the preferred embodiment of the present invention, it should be pointed out that is come for the ordinary person of the art
Say, some improvements and modifications can also be made under the premise of principle of the present invention is not departed from, and these improvements and modifications also exist
In protection scope of the present invention.
Claims (10)
- A kind of 1. message processing method, applied to message process device, it is characterised in that including:When receiving dynamic host configuration protocol DHCP server and being sent to the DHCP response messages of dhcp client, pin is generated The ARP of the DHCP response messages is recorded, DHCP marks are provided with the ARP records;When timing in ARP records reaches, the ARP records are deleted.
- 2. message processing method according to claim 1, it is characterised in that the timing in ARP records arrives Up to when, the message processing method also includes:Control stops sending ARP probe packet to dhcp client.
- 3. message processing method according to claim 1, it is characterised in that be sent to DHCP receiving Dynamic Host Configuration Protocol server During the DHCP response messages of client, the message processing method also includes:Establish the direct-connected route of the message process device and the dhcp client.
- 4. message processing method according to claim 1, it is characterised in that be sent to DHCP receiving Dynamic Host Configuration Protocol server During the DHCP response messages of client, the message processing method also includes:The DHCP response messages are sent to the dhcp client.
- 5. message processing method according to claim 1, it is characterised in that the timing is 1000 milliseconds.
- A kind of 6. message process device, it is characterised in that including:Generation module, for receiving dynamic host configuration protocol DHCP server and being sent to the DHCP responses of dhcp client During message, generation is recorded for the ARP of the DHCP response messages, and DHCP is provided with the ARP records Mark;Removing module, when being reached for the timing in ARP records, delete the ARP records.
- 7. message process device according to claim 6, it is characterised in that also include:Control module, stop sending ARP probe packet to dhcp client for controlling.
- 8. message process device according to claim 6, it is characterised in that also include:Route establishment module, for establishing the direct-connected route of the message process device and the dhcp client.
- 9. message process device according to claim 6, it is characterised in that also include:Sending module, for the DHCP response messages to be sent into the dhcp client.
- 10. message process device according to claim 6, it is characterised in that the timing is 1000 milliseconds.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610473552.3A CN107547667A (en) | 2016-06-24 | 2016-06-24 | A kind of message processing method and device |
PCT/CN2017/083812 WO2017219777A1 (en) | 2016-06-24 | 2017-05-10 | Packet processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610473552.3A CN107547667A (en) | 2016-06-24 | 2016-06-24 | A kind of message processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107547667A true CN107547667A (en) | 2018-01-05 |
Family
ID=60783190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610473552.3A Pending CN107547667A (en) | 2016-06-24 | 2016-06-24 | A kind of message processing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107547667A (en) |
WO (1) | WO2017219777A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111225080A (en) * | 2020-01-06 | 2020-06-02 | 博为科技有限公司 | Method for acquiring gateway down-hanging equipment information |
CN112261173A (en) * | 2020-10-20 | 2021-01-22 | 四川天邑康和通信股份有限公司 | DHCP server allocation address conflict detection method relating to convergence gateway |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1941722A (en) * | 2006-08-29 | 2007-04-04 | 杭州华为三康技术有限公司 | Method and device for maintaining DHCP safety property list by detecting customer terminal |
CN101106512A (en) * | 2007-09-03 | 2008-01-16 | 华为技术有限公司 | A processing method and device for QinQ termination configuration |
US7343485B1 (en) * | 2003-09-03 | 2008-03-11 | Cisco Technology, Inc. | System and method for maintaining protocol status information in a network device |
CN101175080A (en) * | 2007-07-26 | 2008-05-07 | 杭州华三通信技术有限公司 | Method and system for preventing ARP message attack |
US20100191839A1 (en) * | 2009-01-28 | 2010-07-29 | Juniper Networks, Inc. | Synchronizing resource bindings within computer network |
CN101834870A (en) * | 2010-05-13 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for preventing deceptive attack of MAC (Medium Access Control) address |
CN102325202A (en) * | 2011-10-31 | 2012-01-18 | 杭州华三通信技术有限公司 | Method and equipment for managing customer address table |
US8230484B1 (en) * | 2007-05-01 | 2012-07-24 | Emc Corporation | Control of resource access privileges via agent authentication |
-
2016
- 2016-06-24 CN CN201610473552.3A patent/CN107547667A/en active Pending
-
2017
- 2017-05-10 WO PCT/CN2017/083812 patent/WO2017219777A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7343485B1 (en) * | 2003-09-03 | 2008-03-11 | Cisco Technology, Inc. | System and method for maintaining protocol status information in a network device |
CN1941722A (en) * | 2006-08-29 | 2007-04-04 | 杭州华为三康技术有限公司 | Method and device for maintaining DHCP safety property list by detecting customer terminal |
US8230484B1 (en) * | 2007-05-01 | 2012-07-24 | Emc Corporation | Control of resource access privileges via agent authentication |
CN101175080A (en) * | 2007-07-26 | 2008-05-07 | 杭州华三通信技术有限公司 | Method and system for preventing ARP message attack |
CN101106512A (en) * | 2007-09-03 | 2008-01-16 | 华为技术有限公司 | A processing method and device for QinQ termination configuration |
US20100191839A1 (en) * | 2009-01-28 | 2010-07-29 | Juniper Networks, Inc. | Synchronizing resource bindings within computer network |
CN101834870A (en) * | 2010-05-13 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for preventing deceptive attack of MAC (Medium Access Control) address |
CN102325202A (en) * | 2011-10-31 | 2012-01-18 | 杭州华三通信技术有限公司 | Method and equipment for managing customer address table |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111225080A (en) * | 2020-01-06 | 2020-06-02 | 博为科技有限公司 | Method for acquiring gateway down-hanging equipment information |
CN111225080B (en) * | 2020-01-06 | 2022-11-08 | 博为科技有限公司 | Method for acquiring gateway down-hanging equipment information |
CN112261173A (en) * | 2020-10-20 | 2021-01-22 | 四川天邑康和通信股份有限公司 | DHCP server allocation address conflict detection method relating to convergence gateway |
Also Published As
Publication number | Publication date |
---|---|
WO2017219777A1 (en) | 2017-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2843910B1 (en) | Address allocation method, device, and system | |
EP2066080B1 (en) | The method and device for managing route information and retransmitting data in accessing device | |
CN101577722B (en) | Method for realizing MAC forced forwarding function and device | |
CN101577675B (en) | Method and device for protecting neighbor table in IPv6 network | |
EP2477361B1 (en) | Ip address automatic assignment method, equipment and system | |
CN101562807B (en) | Mobile virtual private network (VPN) communication method and device and system thereof | |
CN112584393B (en) | Base station configuration method, device, equipment and medium | |
EP2458782A1 (en) | Method for multiplexing hot backup ports and network system thereof | |
CN103490969B (en) | Realize the system and method for VPWS redundancy protecting Fast Convergent | |
US8761173B2 (en) | Network configuring method, network system and relay apparatus | |
CN106936943A (en) | The distribution method and system of virtual machine address | |
CN101873320B (en) | Client information verification method based on DHCPv6 relay and device thereof | |
EP3319272B1 (en) | Communication method, device and system based on data link layer | |
US20120099598A1 (en) | Method, device and system for establishing a pseudo wire | |
EP2658206B1 (en) | Ip address configuration method, device and system | |
CN101562576B (en) | Route distribution method and equipment thereof | |
US20140032782A1 (en) | Method and apparatus for route selection of host in multihoming site | |
KR101311198B1 (en) | Method and apparatus for connecting subscriber devices to an ipv6-capable aggregation network | |
CN105281951A (en) | Double-main-device conflict detection method for VSU system, and network equipment | |
CN108206783A (en) | Address configuration method and its device in a kind of software defined network system | |
CN107547667A (en) | A kind of message processing method and device | |
CN106878481A (en) | A kind of Internet protocol IP address acquisition methods, device and system | |
CN101783819A (en) | System and method for supporting peer-to-peer network address translation (NAT) by adopting IPv6 transition protocol | |
CN102480476A (en) | Multi-service access method based on DHCP protocol extension | |
CN101888319A (en) | Method and device for acquiring network access information of terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180105 |