Summary of the invention
In order to solve the problem of prior art, embodiments provide a kind of message send and process methods, devices and systems.Described technical scheme is as follows:
First aspect, provides a kind of method of Message processing, described method comprises:
DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends;
Described DHCP relay obtains the server state information of the described Dynamic Host Configuration Protocol server carried in described first message, and described server state information comprises address state information;
When receiving DHCP request message, described DHCP relay according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the first possible implementation of described first aspect, described server state information, also comprises: running state information.
In the implementation that the second of described first aspect is possible, the request message distribution mechanism that described DHCP relay adopts is active/standby server distribution mechanism, and described Dynamic Host Configuration Protocol server is primary Dynamic Host Configuration Protocol server or Dynamic Host Configuration Protocol server for subsequent use;
Described when receiving DHCP request message, described DHCP relay, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, comprising:
When receiving DHCP request message, described DHCP relay according to described server state information, in described primary Dynamic Host Configuration Protocol server and Dynamic Host Configuration Protocol server for subsequent use, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the third possible implementation of described first aspect, the request message distribution mechanism that described DHCP relay adopts is server loading sharing distribution mechanism;
Described DHCP relay also comprises after obtaining the server state information of the described Dynamic Host Configuration Protocol server carried in described first message:
Described DHCP relay, according to described server state information, arranges the load balancing ratio of each Dynamic Host Configuration Protocol server;
Described when receiving DHCP request message, described DHCP relay, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, comprising:
When receiving DHCP request message, described DHCP relay according to the load balancing ratio of described each Dynamic Host Configuration Protocol server, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
Second aspect, provide a kind of method that message sends, described method comprises:
The server state information of Dynamic Host Configuration Protocol server acquisition self, described server state information comprises address state information;
Described server state information is carried in the first message and sends to DHCP relay by described Dynamic Host Configuration Protocol server.
In the first possible implementation of described second aspect, the server state information of described Dynamic Host Configuration Protocol server acquisition self, be specially: described Dynamic Host Configuration Protocol server, when receiving the DHCP request message that described DHCP relay sends, obtains the server state information of self;
Described server state information is carried in the first message and sends to DHCP relay by described Dynamic Host Configuration Protocol server, is specially: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay by described Dynamic Host Configuration Protocol server.
In the implementation that the second of described second aspect is possible, the server state information of described Dynamic Host Configuration Protocol server acquisition self, be specially: described Dynamic Host Configuration Protocol server is receiving the DHCP request message of described DHCP relay transmission, and when carrying server state request in described DHCP request message, obtain the server state information of self;
Described server state information is carried in the first message and sends to DHCP relay by described Dynamic Host Configuration Protocol server, is specially: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay by described Dynamic Host Configuration Protocol server.
In the third possible implementation of described second aspect, if described Dynamic Host Configuration Protocol server is the failure of described DHCP request message allocation address, then described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay by described Dynamic Host Configuration Protocol server, is specially: the failure cause information of described server state information and allocation address failure is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay by described Dynamic Host Configuration Protocol server.
In the 4th kind of possible implementation of described second aspect, the server state information of described Dynamic Host Configuration Protocol server acquisition self, is specially:
When reaching the default cycle, the server state information of described Dynamic Host Configuration Protocol server acquisition self.
In the 5th kind of possible implementation of described second aspect, the server state information of described Dynamic Host Configuration Protocol server acquisition self, is specially:
When described server state information reaches default threshold condition, the server state information of described Dynamic Host Configuration Protocol server acquisition self.
In the 6th kind of possible implementation of described second aspect, described server state information, also comprises: running state information.
The third aspect, provides a kind of DHCP relay, and described DHCP relay comprises:
Receiver module, for receiving the first message that Dynamic Host Configuration Protocol server sends;
Acquisition module, for obtaining the server state information of the described Dynamic Host Configuration Protocol server carried in described first message, described server state information comprises address state information;
Distribution module, for when receiving DHCP request message, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the first possible implementation of the described third aspect, described server state information, also comprises: running state information.
In the implementation that the second of the described third aspect is possible, the request message distribution mechanism that described DHCP relay adopts is active/standby server distribution mechanism, and described Dynamic Host Configuration Protocol server is primary Dynamic Host Configuration Protocol server or Dynamic Host Configuration Protocol server for subsequent use;
Described distribution module, for:
When receiving DHCP request message, according to described server state information, in described primary Dynamic Host Configuration Protocol server and Dynamic Host Configuration Protocol server for subsequent use, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the third possible implementation of the described third aspect, the request message distribution mechanism that described DHCP relay adopts is server loading sharing distribution mechanism;
Described distribution module, for:
After the server state information of the described Dynamic Host Configuration Protocol server carried in described first message of described acquisition, according to described server state information, the load balancing ratio of each Dynamic Host Configuration Protocol server is set;
When receiving DHCP request message, according to the load balancing ratio of described each Dynamic Host Configuration Protocol server, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
Fourth aspect, provides a kind of Dynamic Host Configuration Protocol server, and described Dynamic Host Configuration Protocol server comprises:
Acquisition module, for obtaining the server state information of described Dynamic Host Configuration Protocol server, described server state information comprises address state information;
Sending module, sends to DHCP relay for described server state information being carried in the first message.
In the first possible implementation of described fourth aspect, described acquisition module, for: when receiving the DHCP request message that described DHCP relay sends, obtain the server state information of described Dynamic Host Configuration Protocol server;
Described sending module, for: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
In the implementation that the second of described fourth aspect is possible, described acquisition module, for: receive the DHCP request message of described DHCP relay transmission, and when carrying server state request in described DHCP request message, obtain the server state information of described Dynamic Host Configuration Protocol server;
Described sending module, for: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
In the third possible implementation of described fourth aspect, described sending module, for:
If described Dynamic Host Configuration Protocol server is the failure of described DHCP request message allocation address, then the failure cause information of described server state information and allocation address failure is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
In the 4th kind of possible implementation of described fourth aspect, described acquisition module, for:
When reaching the default cycle, obtain the server state information of described Dynamic Host Configuration Protocol server.
In the 5th kind of possible implementation of described fourth aspect, described acquisition module, for:
When described server state information reaches default threshold condition, obtain the server state information of described Dynamic Host Configuration Protocol server.
In the 6th kind of possible implementation of described fourth aspect, described server state information, also comprises: running state information.
5th aspect, provide the system that a kind of message sends and processes, described system comprises Dynamic Host Configuration Protocol server and DHCP relay, wherein:
Described Dynamic Host Configuration Protocol server, for obtaining the server state information of self, and described server state information be carried in the first message and send to described DHCP relay, described server state information comprises address state information;
Described DHCP relay, for receiving the first message that described Dynamic Host Configuration Protocol server sends, obtain the server state information of the described Dynamic Host Configuration Protocol server carried in described first message, when receiving DHCP request message, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
In the embodiment of the present invention, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends, and obtain the server state information of this Dynamic Host Configuration Protocol server carried in the first message, server state information comprises address state information, when receiving DHCP request message, DHCP relay is according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, like this, DHCP relay can get the address state information of Dynamic Host Configuration Protocol server accurately, the impact on address dispensing rate caused because of not mating of address state information can be reduced, thus, the speed of terminal distribution IP address can be risen to.Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only 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 method flow diagram of the message transmission that the embodiment of the present invention provides;
Fig. 2 is the method flow diagram of the Message processing that the embodiment of the present invention provides;
Fig. 3 is the message transmission that the embodiment of the present invention provides and the method flow diagram processed;
Fig. 4 is the structural representation of the Dynamic Host Configuration Protocol server that the embodiment of the present invention provides;
Fig. 5 is the structural representation of the DHCP relay that the embodiment of the present invention provides;
Fig. 6 is the message transmission that the embodiment of the present invention provides and the system architecture schematic diagram processed.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments provide a kind of method that message sends and processes, the method can be realized jointly by DHCP relay and Dynamic Host Configuration Protocol server.As shown in Figure 1, the handling process of file transmitting method that the method performs in Dynamic Host Configuration Protocol server side can be as follows:
101, the server state information of Dynamic Host Configuration Protocol server acquisition self, server state information comprises address state information.
102, server state information is carried in the first message and sends to DHCP relay by Dynamic Host Configuration Protocol server.
As shown in Figure 2, the handling process of message processing method that the method performs in DHCP relay side can be as follows:
201, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends.
202, DHCP relay obtains the server state information of the Dynamic Host Configuration Protocol server carried in the first message, and server state information comprises address state information;
203, when receiving DHCP request message, DHCP relay according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the embodiment of the present invention, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends, and obtain the server state information of this Dynamic Host Configuration Protocol server carried in the first message, server state information comprises address state information, when receiving DHCP request message, DHCP relay is according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, like this, DHCP relay can get the address state information of Dynamic Host Configuration Protocol server accurately, the impact on address dispensing rate caused because of not mating of address state information can be reduced, thus, the speed of terminal distribution IP address can be risen to.
Embodiment two
Embodiments provide a kind of method that message sends and processes, the method can be realized jointly by DHCP relay and Dynamic Host Configuration Protocol server.Dynamic Host Configuration Protocol server can be the server for terminal distribution IP address, and DHCP relay can be for the DHCP request message of terminal distributes Dynamic Host Configuration Protocol server, and the DHCP response message of Dynamic Host Configuration Protocol server is transmitted to the gateway device of terminal.
The handling process of the method that the message that the embodiment of the present invention provides sends and processes as shown in Figure 3, can comprise following process:
301, the server state information of Dynamic Host Configuration Protocol server acquisition self, server state information comprises address state information.
Wherein, address state information can be the information of the Address Allocation's Situation for recording Dynamic Host Configuration Protocol server.Address state information can be the address space left number of one or more network segment, and each Dynamic Host Configuration Protocol server can be multiple network segment allocation address, and the address space left number of certain network segment is responsible for distributing and the number of unappropriated address by this Dynamic Host Configuration Protocol server in this network segment.Address state information also can be the address space left ratio of one or more network segment, and namely in this network segment, address space left number accounts for the ratio of address sum in this network segment (allocation address number and address space left number sum).The number of allocation address of certain network segment is responsible for distributing and the number of the address distributed by this Dynamic Host Configuration Protocol server in this network segment.Address state information can also be other parameter, does not enumerate at this.
In addition, server state information can also comprise running state information.Running state information is the information of the running status for representing Dynamic Host Configuration Protocol server, can comprise one or more in following parameter information: the actual access rate of CPU usage, DHCP, DHCP Committed Access Rate, overstocked DHCP message number etc.
Preferably, running state information can also be carry out to above-mentioned one or more parameter informations the parameter information that comprehensive quantification obtains according to the algorithm preset, and this parameter information can be called health index.Cite a plain example, health index can have 1,2,3 three kind of value, 1 represents that Dynamic Host Configuration Protocol server is normal, and 2 represent early warning (continue use and will there is certain risk), and 3 represent alarm (Dynamic Host Configuration Protocol server fault).
302, server state information is carried in the first message and sends to DHCP relay by Dynamic Host Configuration Protocol server.
Wherein, the first message can be any message that Dynamic Host Configuration Protocol server sends to DHCP relay, can be the DHCP response message of corresponding DHCP request message feedback, also can be the message that Dynamic Host Configuration Protocol server initiatively sends.Preferably, if the first message is DHCP response message, as DHCP OFFER, DHCP ACK, DHCP NAK etc., new option (option) can be increased at DHCP response message, for carrying server state information; If the first message is the message that Dynamic Host Configuration Protocol server initiatively sends, the type of message of new definition can be adopted, for carrying server state information.Option new accordingly and new type of message, can be described in detail in the content below.
Preferably, can arrange trigger event for the implementation of 301-302, trigger event can be arranged arbitrarily according to real needs, shown below is several preferred triggering mode, and the corresponding process of 301,302 can be as follows:
Mode one
Dynamic Host Configuration Protocol server can be receive DHCP relay send DHCP request message after reply time, in DHCP response message, carry server state information.Concrete, when execution 301, Dynamic Host Configuration Protocol server, when receiving the DHCP request message that DHCP relay sends, obtains the server state information of self; When execution 302, server state information is carried in the DHCP response message of corresponding DHCP request message and sends to DHCP relay by Dynamic Host Configuration Protocol server.
Wherein, DHCP request message can be DHCP Discover (exploration) message, DHCP Request (request) message etc., DHCP response message can be DHCP Offer (providing) message, DHCP ACK (Acknowledgement, confirm) message, DHCP NAK (Negative Acknowledgement, refusal confirms) message etc.DHCP response message, except comprising the normal reply content to DHCP request message, can increase extra option and carry server state information.In this case, the first message is DHCP response message.
In DHCP request message, the network segment of request can be carried, accordingly, preferably, in the server state information of carrying in DHCP response message, address state information can be the address state information that this network segment is corresponding, such as, the address space left number that this network segment is corresponding, or the address space left ratio etc. that this network segment is corresponding.
Mode two
DHCP relay can carry server state request in DHCP request message, is used to indicate server and carries server state information in DHCP response message.Concrete, when execution 301, Dynamic Host Configuration Protocol server is receiving the DHCP request message of DHCP relay transmission, and when carrying server state request in DHCP request message, obtains the server state information of self; When execution 302, server state information is carried in the DHCP response message of corresponding DHCP request message and sends to DHCP relay by Dynamic Host Configuration Protocol server.
Wherein, DHCP response message, except comprising the normal reply content to DHCP request message, can increase extra option and carry server state information.In this case, the first message is DHCP response message.For the DHCP request message not carrying server state request, Dynamic Host Configuration Protocol server can not carry server state information in corresponding DHCP response message.
In DHCP request message, the network segment of request can be carried, accordingly, preferably, in the server state information of carrying in DHCP response message, address state information can be the address state information that this network segment is corresponding, such as, the address space left number that this network segment is corresponding, or the address space left ratio etc. that this network segment is corresponding.
For aforesaid way one and mode two, if Dynamic Host Configuration Protocol server is the failure of DHCP request message allocation address, then when execution 302, the failure cause information of server state information and allocation address failure is carried in the DHCP response message of corresponding DHCP request message and sends to DHCP relay by Dynamic Host Configuration Protocol server.Wherein, failure cause information can be without address space left or to DHCP request message authentication unsuccessfully etc.In addition, failure cause information also can be recorded as the form of identification code (also can be called error code), the failure cause that different identification codes is corresponding different.
Mode three
Dynamic Host Configuration Protocol server according to the cycle of presetting, can obtain server state information, and sends to DHCP relay by the first message.Concrete, when execution 301, Ke Yishi, when reaching the default cycle, the server state information of Dynamic Host Configuration Protocol server acquisition self.Then, server state information is carried in the first message and sends to DHCP relay by Dynamic Host Configuration Protocol server.Wherein, this cycle can be arranged arbitrarily according to the actual requirements, as 30 seconds.
Mode four
When one or more parameter informations in server state information reach corresponding parameter threshold, Dynamic Host Configuration Protocol server can obtain server state information, and sends to DHCP relay by the first message.Concrete, when execution 301, Ke Yishi, when server state information reaches default threshold condition, the server state information of Dynamic Host Configuration Protocol server acquisition self.
Server state information is only included to the situation of address state information, when can work as the first threshold that address state information reaches default in change procedure, Dynamic Host Configuration Protocol server obtains self server state information.Such as, when the address space left number of certain network segment reaches 5, Dynamic Host Configuration Protocol server obtains server state information, and sends to DHCP relay by the first message.
Server state information is only included to the situation of address state information and running state information (as health index), when can work as the first threshold that address state information reaches default in change procedure, and/or when health index reaches default Second Threshold in change procedure, the server state information of Dynamic Host Configuration Protocol server acquisition self.Such as, the value of health index is 1-10 (supposing that the operation conditions of numerical value more servlets is poorer), and can work as health index when reaching 3, Dynamic Host Configuration Protocol server obtains server state information, and sends to DHCP relay by the first message.
303, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends.
Wherein, the first message can be any message that Dynamic Host Configuration Protocol server sends to DHCP relay, can be the DHCP response message of corresponding DHCP request message feedback, also can be the message that Dynamic Host Configuration Protocol server initiatively sends.
304, DHCP relay obtains the server state information of the Dynamic Host Configuration Protocol server carried in the first message, and server state information comprises address state information.Server state information can also comprise running state information.The content of address state information and running state information can see explanation above.The server state information of acquisition can store by DHCP relay.
305, when receiving DHCP request message, DHCP relay according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.Also namely, DHCP relay can carry out the distribution of follow-up DHCP request message according to server state information.
Request message distribution mechanism for DHCP relay employing is the situation (above-mentioned Dynamic Host Configuration Protocol server can be primary Dynamic Host Configuration Protocol server or Dynamic Host Configuration Protocol server for subsequent use) of active/standby server distribution mechanism, DHCP relay carries out the process of the distribution of DHCP request message can be as follows: when receiving DHCP request message, DHCP relay is according to server state information, in primary Dynamic Host Configuration Protocol server and Dynamic Host Configuration Protocol server for subsequent use, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
Concrete, DHCP relay can obtain the server state information of primary Dynamic Host Configuration Protocol server and Dynamic Host Configuration Protocol server for subsequent use respectively according to the processing mode of above-mentioned flow process, and preserves server state information.When receiving DHCP request message, DHCP first can judge whether primary Dynamic Host Configuration Protocol server meets default condition (such as, judge whether address state information is greater than the 3rd default threshold value, and/or whether health index is less than the 4th default threshold value), if met, then send to primary Dynamic Host Configuration Protocol server to process DHCP request message, if do not met, then send to Dynamic Host Configuration Protocol server for subsequent use to process DHCP request message.In multiple Dynamic Host Configuration Protocol server for subsequent use, also by judging whether the mode meeting above-mentioned default condition, the Dynamic Host Configuration Protocol server for subsequent use that DHCP request message is processed can be selected.
Request message distribution mechanism for DHCP relay employing is the situation of server loading sharing distribution mechanism, and DHCP relay according to server state information, can arrange the load balancing ratio of each Dynamic Host Configuration Protocol server.Then, when receiving DHCP request message, DHCP relay can according to the load balancing ratio of each Dynamic Host Configuration Protocol server, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, by the load balancing ratio of follow-up DHCP request message according to each Dynamic Host Configuration Protocol server, distribute to each Dynamic Host Configuration Protocol server respectively.
Concrete, DHCP relay can determine corresponding load balancing ratio according to address state information and/or running state information, can be that the more Dynamic Host Configuration Protocol server of address space left number arranges higher load balancing ratio, can be the higher load balancing ratio of the Dynamic Host Configuration Protocol server setting of running status better (as lower in CPU usage, DHCP access rate is higher, health index is more high).
In the embodiment of the present invention, the format and content of the above-mentioned option (option) newly-increased at DHCP response message can be as follows:
Wherein, Code is option coding, and in the embodiment of the present invention, the value of Code can select 53, and namely newly-increased option is option53, Len is option, and sub-option is sub-option.The content of sub-option and form can be as follows:
Wherein, subopt-code is sub-option coding, and subopt-len is sub-option, and sub-option-data is suboption-value, and the concrete definition of each sub-option can with reference to the content in such as following table 1(following table only for illustrating).
Table 1
Newly-increased type of message can be defined as DHCP STATEINFORM (state notifying) message, at least can comprise above-mentioned newly-increased option in this message.
In the embodiment of the present invention, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends, and obtain the server state information of this Dynamic Host Configuration Protocol server carried in the first message, server state information comprises address state information, when receiving DHCP request message, DHCP relay is according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, like this, DHCP relay can get the address state information of Dynamic Host Configuration Protocol server accurately, the impact on address dispensing rate caused because of not mating of address state information can be reduced, thus, the speed of terminal distribution IP address can be risen to.
Embodiment three
Based on identical technical conceive, the embodiment of the present invention additionally provides a kind of Dynamic Host Configuration Protocol server, and as shown in Figure 4, described Dynamic Host Configuration Protocol server comprises:
Acquisition module 410, for obtaining the server state information of described Dynamic Host Configuration Protocol server, described server state information comprises address state information;
Sending module 420, sends to DHCP relay for described server state information being carried in the first message.
Preferably, described acquisition module 410, for: when receiving the DHCP request message that described DHCP relay sends, obtain the server state information of described Dynamic Host Configuration Protocol server;
Described sending module 420, for: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
Preferably, described acquisition module 410, for: receive the DHCP request message of described DHCP relay transmission, and when carrying server state request in described DHCP request message, obtain the server state information of described Dynamic Host Configuration Protocol server;
Described sending module 420, for: described server state information is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
Preferably, described sending module 420, for:
If described Dynamic Host Configuration Protocol server is the failure of described DHCP request message allocation address, then the failure cause information of described server state information and allocation address failure is carried in the DHCP response message of corresponding described DHCP request message and sends to described DHCP relay.
Preferably, described acquisition module 410, for:
When reaching the default cycle, obtain the server state information of described Dynamic Host Configuration Protocol server.
Preferably, described acquisition module 410, for:
When described server state information reaches default threshold condition, obtain the server state information of described Dynamic Host Configuration Protocol server.
Preferably, described server state information, also comprises: running state information.
Based on identical technical conceive, the embodiment of the present invention additionally provides a kind of DHCP relay, and as shown in Figure 5, described DHCP relay comprises:
Receiver module 510, for receiving the first message that Dynamic Host Configuration Protocol server sends;
Acquisition module 520, for obtaining the server state information of the described Dynamic Host Configuration Protocol server carried in described first message, described server state information comprises address state information;
Distribution module 530, for when receiving DHCP request message, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
Preferably, described server state information, also comprises: running state information.
Preferably, the request message distribution mechanism that described DHCP relay adopts is active/standby server distribution mechanism, and described Dynamic Host Configuration Protocol server is primary Dynamic Host Configuration Protocol server or Dynamic Host Configuration Protocol server for subsequent use;
Described distribution module 530, for:
When receiving DHCP request message, according to described server state information, in described primary Dynamic Host Configuration Protocol server and Dynamic Host Configuration Protocol server for subsequent use, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
Preferably, the request message distribution mechanism that described DHCP relay adopts is server loading sharing distribution mechanism;
Described distribution module 530, for:
After the server state information of the described Dynamic Host Configuration Protocol server carried in described first message of described acquisition, according to described server state information, the load balancing ratio of each Dynamic Host Configuration Protocol server is set;
When receiving DHCP request message, according to the load balancing ratio of described each Dynamic Host Configuration Protocol server, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the embodiment of the present invention, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends, and obtain the server state information of this Dynamic Host Configuration Protocol server carried in the first message, server state information comprises address state information, when receiving DHCP request message, DHCP relay is according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, like this, DHCP relay can get the address state information of Dynamic Host Configuration Protocol server accurately, the impact on address dispensing rate caused because of not mating of address state information can be reduced, thus, the speed of terminal distribution IP address can be risen to.
Embodiment four
Based on identical technical conceive, the embodiment of the present invention additionally provides the system that a kind of message sends and processes, and as shown in Figure 6, described system comprises Dynamic Host Configuration Protocol server 610 and DHCP relay 620, wherein:
Described Dynamic Host Configuration Protocol server 610, for obtaining the server state information of self, and described server state information be carried in the first message and send to described DHCP relay 620, described server state information comprises address state information;
Described DHCP relay 620, for receiving the first message that described Dynamic Host Configuration Protocol server 610 sends, obtain the server state information of the described Dynamic Host Configuration Protocol server carried in described first message, when receiving DHCP request message, according to described server state information, for described DHCP request message selects the Dynamic Host Configuration Protocol server that processes it.
In the embodiment of the present invention, DHCP relay receives the first message that Dynamic Host Configuration Protocol server sends, and obtain the server state information of this Dynamic Host Configuration Protocol server carried in the first message, server state information comprises address state information, when receiving DHCP request message, DHCP relay is according to server state information, for DHCP request message selects the Dynamic Host Configuration Protocol server that processes it, like this, DHCP relay can get the address state information of Dynamic Host Configuration Protocol server accurately, the impact on address dispensing rate caused because of not mating of address state information can be reduced, thus, the speed of terminal distribution IP address can be risen to.
It should be noted that: the device that the message that above-described embodiment provides sends and processes is when sending and process message, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by device is divided into different functional modules, to complete all or part of function described above.In addition, the device that the message that above-described embodiment provides sends and processes and the embodiment of the method that message sends and processes belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that realizing all or part of of above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.