Summary of the invention
A kind of address recovery method and terminal are provided, can put forward higher ip address organic efficiency.
Adopt following technical scheme:
First aspect, provides a kind of address recovery method, comprising: Optical Network Terminal ONT detects the communication connection status of described ONT and dynamic host configuration protocol DHCP server; When the communication connection that described ONT detects described ONT and described Dynamic Host Configuration Protocol server is about to disconnect, to optical line terminal OLT, send the first message, trigger described OLT and according to described the first message, determine the IP address of described ONT, generate and to described Dynamic Host Configuration Protocol server, send second message of carrying described IP address, making described Dynamic Host Configuration Protocol server reclaim described IP address.
In the possible implementation of the first of first aspect, when described the first message is carried described IP address, described to optical line terminal OLT, send the first message before, also comprise: when the communication connection that described ONT detects described ONT and described Dynamic Host Configuration Protocol server is about to disconnect, generate described the first message, described the first message is carried described IP address; Or, when the communication connection that described ONT detects described ONT and described Dynamic Host Configuration Protocol server is about to disconnect, obtain described the first message prestoring, described the first message is carried described IP address.
In conjunction with the possible implementation of the first of first aspect, in the possible implementation of the second, comprise: if the power supply of described ONT is stopped power supply, apply dump energy and generate described the first message or apply dump energy and obtain described the first message prestoring; Correspondingly, describedly to optical line terminal OLT, send the first message and comprise: application dump energy sends described the first message by passive optical-fiber network PON interface to described OLT.
Second aspect, provides a kind of address recovery method, comprising: OLT receives the first message that ONT sends when the communication connection of described ONT and Dynamic Host Configuration Protocol server is about to disconnect; According to described the first message, determine the IP address of described ONT; The second message of described IP address is carried in generation; To described Dynamic Host Configuration Protocol server, send described the second message, make described Dynamic Host Configuration Protocol server reclaim described IP address.
In the possible implementation of the first of second aspect, the described IP address of determining described ONT according to described the first message, comprising: when described the first message is carried described IP address, resolve described the first message and obtain described IP address; Or, the IP address that obtains the described ONT prestoring in described OLT according to described the first message.
In the possible implementation of the second of second aspect, also comprise: the corresponding relation that records described ONT and described Dynamic Host Configuration Protocol server.
The third aspect, provides a kind of Optical Network Terminal, comprising: detecting unit, for detection of the communication connection status of Optical Network Terminal ONT and Dynamic Host Configuration Protocol server; Transmitting element, when the communication connection that described ONT and described Dynamic Host Configuration Protocol server detected for described detecting unit is about to disconnect, to optical line terminal OLT, send the first message, trigger described OLT and according to described the first message, determine the IP address of described ONT, generate and to described Dynamic Host Configuration Protocol server, send second message of carrying described IP address, making described Dynamic Host Configuration Protocol server reclaim described IP address.
In the possible implementation of the first of the third aspect, when the first message that described transmitting element sends is carried described IP address, described device comprises following arbitrary unit: generation unit, while being about to disconnect for the communication connection of described ONT and described Dynamic Host Configuration Protocol server, generate described the first message, described the first message is carried described IP address; Acquiring unit, when the communication connection that described ONT and described Dynamic Host Configuration Protocol server detected for described ONT is about to disconnect, obtains described the first message prestoring, and described the first message is carried described IP address.
In the possible implementation of the second of the third aspect, described generation unit specifically for, if the power supply of described ONT stop power supply, apply dump energy generate described the first message or application dump energy obtain described the first message prestoring; Correspondingly, described transmitting element specifically for, application dump energy by passive optical-fiber network PON interface, to described OLT, send described the first message.
Fourth aspect, a kind of Optical Network Terminal is provided, comprises processor and transmitter, wherein: described processor, for detection of the communication connection status of Optical Network Terminal ONT and Dynamic Host Configuration Protocol server, when being about to disconnect, the communication connection that described ONT and described Dynamic Host Configuration Protocol server detected notifies described transmitter; Described transmitter, for receiving the notice of described processor, after receiving the notice of described processor, to optical line terminal OLT, send the first message, trigger described OLT and according to described the first message, determine the IP address of described ONT, generate and to described Dynamic Host Configuration Protocol server, send second message of carrying described IP address, making described Dynamic Host Configuration Protocol server reclaim described IP address.
The 5th aspect, provides a kind of optical line terminal, comprising: receiving element, the first message sending when the communication connection of described ONT and Dynamic Host Configuration Protocol server is about to disconnect for receiving ONT; Determining unit, for determining the IP address of described ONT according to described first message of described receiving element reception; Generation unit, for generating second message of carrying described IP address; Transmitting element, for send described the second message to described Dynamic Host Configuration Protocol server, makes described Dynamic Host Configuration Protocol server reclaim described IP address.
In the possible implementation of the first aspect the 5th, described determining unit specifically for, when described the first message is carried described IP address, resolve described the first message and obtain described IP address;
Or described determining unit is specifically for, the IP address that obtains the described ONT prestoring in described OLT according to described the first message.
In the possible implementation of the second aspect the 5th, also comprise: record cell, for recording the corresponding relation of described ONT and described Dynamic Host Configuration Protocol server.
The 6th aspect, a kind of optical line terminal is provided, it is characterized in that, described device comprises receiver and transmitter, wherein: described receiver, for receiving the first message that ONT sends when the communication connection of described ONT and Dynamic Host Configuration Protocol server is about to disconnect, described the first message receiving according to described receiving element is determined the IP address of described ONT, and described IP address is sent to described transmitter; Described transmitter, the described IP address sending for receiving described receiver, generates second message of carrying described IP address, to described Dynamic Host Configuration Protocol server, sends described the second message, makes described Dynamic Host Configuration Protocol server reclaim described IP address.
By the address recovery method and the terminal that provide, when the communication connection by Optical Network Terminal and Dynamic Host Configuration Protocol server is about to disconnect, the mode that sends the IP address of Optical Network Terminal to Dynamic Host Configuration Protocol server through optical line terminal realizes the recovery of IP address, can put forward higher ip address organic efficiency.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Refer to Fig. 1, the structural representation of the network system that the address recovery method that it provides for the embodiment of the present invention and terminal can be applicable.This system comprises the English full name of Dynamic Host Configuration Protocol server 10, OLT(: Optical Line Terminal, referred to as optical line terminal) 20 and the English full name of a plurality of ONT(: Optical Network Termination, referred to as Optical Network Terminal) 30.Dynamic Host Configuration Protocol server 10 and OLT 20 communication connections, OLT 20 communicates to connect a plurality of ONT 30 with point-to-multipoint form.Wherein, from the direction of OLT 20 to ONT 30, be defined as down direction, and be up direction from the direction of ONT 30 to OLT 20.
A kind of address recovery method that the embodiment of the present invention provides, the method can realize by ONT as shown in Figure 1, and as shown in Figure 2, the method can comprise:
11, Optical Network Terminal ONT detects the communication connection status of this ONT and dynamic host configuration protocol DHCP server;
When the communication connection that 12, this ONT and this Dynamic Host Configuration Protocol server detected as this ONT is about to disconnect, to optical line terminal OLT, send the first message, trigger this OLT and according to this first message, determine the IP address of this ONT, and the second message of this IP address is carried in generation, be sent to again this Dynamic Host Configuration Protocol server, make this Dynamic Host Configuration Protocol server reclaim this IP address, wherein, can from this first message, obtain this IP address of carrying, or this IP address that obtains the ONT prestoring from this OLT.
Wherein, the situation that the communication connection of this ONT and this Dynamic Host Configuration Protocol server be about to disconnect generally comprises Power supply and is about to disconnect (as shutdown, accident power-off), is about to go offline etc.In practice, communication is normally connected to that communication connection disconnects completely need be through one excessive period (be generally several millisecond).Communication connection is about to disconnect and refers to that communication connection has started to disconnect but do not disconnected completely, in starting to be disconnected to the pilot process disconnecting completely.
The address recovery method of the embodiment of the present invention, when the communication connection of Optical Network Terminal and Dynamic Host Configuration Protocol server is about to disconnect, to optical line terminal, send the first message, trigger optical line terminal, by the second message, IP address is sent to Dynamic Host Configuration Protocol server, realize initiatively IP address is sent to Dynamic Host Configuration Protocol server, realize Dynamic Host Configuration Protocol server and reclaim in time IP address, can put forward higher ip address organic efficiency.
In the embodiment of the present invention, alternatively, when in above-mentioned 11, this first message is carried this IP address, before this sends the first message to optical line terminal OLT, can also comprise: when the communication connection that this ONT detects this ONT and this Dynamic Host Configuration Protocol server is about to disconnect, generate this first message, this first message is carried this IP address; Or, when the communication connection that this ONT detects this ONT and this Dynamic Host Configuration Protocol server is about to disconnect, obtain this first message prestoring, this first message is carried this IP address; Certainly, also can, this first message is not carried this IP address.
The form of this first message is the form of this OLT identification, and this OLT can confirm that this ONT wish sends to Dynamic Host Configuration Protocol server by the IP address of this ONT according to this form.During specific implementation, this ONT can consult to determine with this OLT the form of this first message; Can certainly in the first message, carry sign, this OLT can learn that according to this sign this ONT wish sends to Dynamic Host Configuration Protocol server by the IP address of this ONT.
Further, alternatively, if the power supply of this ONT is stopped power supply, apply dump energy and generate this first message or apply dump energy and obtain this first message prestoring.Wherein, this ONT have Dying Gasp(dead before testament) function setting has Dying Gasp circuit, dump energy can be provided by Dying Gasp circuit, particularly, Dying Gasp circuit comprises for storing the capacitor and inductor of electric weight.
Correspondingly, if the power supply of this ONT is stopped power supply, when ONT sends this first message to OLT in above-mentioned 12, can apply dump energy by the English full name of PON(: Passive Optical Networks, referred to as passive optical-fiber network) interface sends this first message to this OLT.
Like this, application dump energy generates and send the first message can realize the timely recovery of Dynamic Host Configuration Protocol server to the IP address of ONT, thereby puies forward higher ip address organic efficiency.
The another kind of address recovery method that the embodiment of the present invention provides, the method can realize by OLT as shown in Figure 1, and as shown in Figure 3, the method can comprise:
21, receive the first message that ONT sends when the communication connection of this ONT and Dynamic Host Configuration Protocol server is about to disconnect;
Wherein, the form of this first message is the form of this OLT identification, and this OLT can confirm that this ONT wish sends to Dynamic Host Configuration Protocol server by the IP address of this ONT according to this form.During specific implementation, this ONT can consult to determine with this OLT the form of this first message; Can certainly in the first message, carry sign, this OLT can learn that according to this sign this ONT wish sends to Dynamic Host Configuration Protocol server by the IP address of this ONT.
22, according to this first message, determine the IP address of this ONT;
23, generate second message of carrying this IP address;
Particularly, this second message can be DHCP Rlease message.
24, to this Dynamic Host Configuration Protocol server, send this second message, make this Dynamic Host Configuration Protocol server reclaim this IP address.
The address recovery method of the embodiment of the present invention, receives the first message generating and sending after the communication connection disconnection of this Optical Network Terminal and Dynamic Host Configuration Protocol server, determines the IP address of this ONT according to this first message; Generate and send and comprise this IP address the second message to Dynamic Host Configuration Protocol server, realize Dynamic Host Configuration Protocol server and reclaim in time IP address, can put forward higher ip address organic efficiency.
In the embodiment of the present invention, alternatively, according to this first message, determine that the method for the IP address of this ONT comprises in above-mentioned 22: resolve this first message; If this first message is carried the IP address of this ONT, can resolve the IP address that this first message obtains this ONT; Or, if this first message is not carried the IP address of this ONT, resolve this first message while not obtaining the IP address of this ONT, the IP address that can obtain this ONT prestoring in OLT.In the present embodiment, the OLT Dynamic Host Configuration Protocol server that can prestore is at any time the IP address that ONT distributes, and is understandable that, the IP address of this ONT prestoring in OLT is identical with the IP address of ONT.
In the embodiment of the present invention, alternatively, before sending this second message to this Dynamic Host Configuration Protocol server, can also record the corresponding relation of this ONT and this Dynamic Host Configuration Protocol server, determine the Dynamic Host Configuration Protocol server that ONT is corresponding.Particularly, can adopt the form of form to record the corresponding relation of ONT and Dynamic Host Configuration Protocol server.
In the embodiment of the present invention, alternatively, during due to this ONT power-off, can send this first message by passive optical-fiber network PON interface, correspondingly, can receive this ONT by passive optical-fiber network PON interface herein and send this first message.
Specific implementation process below in conjunction with the address recovery method of the example in detail embodiment of the present invention, refers to Fig. 4, and the interaction flow that reclaim embodiment of the present invention address can comprise:
When 41, ONT detects communication connection with Dynamic Host Configuration Protocol server and is about to disconnect, application dump energy generates the first message (the first message), and this first message carries the IP address of this ONT;
Particularly, apply storage in Dying Gasp(dead before testament) dump energy in the capacitor and inductor of circuit generates DyingGasp signal and triggers CPU hardware interrupts, application dump energy generates the first message that carries IP address; For example, hook subfunction in soft interrupt function is processed, structure carries the first message of IP address, particularly, the L2 message (data link layer) that this first message can be Ethernet.Optionally, this first message also can not carry the IP address of this ONT.
Wherein, the principle of Dying Gasp is when system input voltage cannot meet the normal work of system (as power-off), utilize electric weight that capacitor and inductor in Dying Gasp circuit discharges for whole core circuit work a period of time again (being generally several milliseconds) carry out some important process, as alarm report, data preservation etc.
During specific implementation, the capacitor and inductor device that in the scope that can allow in performance in the hardware designs of this ONT, application is larger forms Dying Gasp circuit, to increase the dump energy of Dying Gasp circuitry stores, to optimize hardware, be configured to shorten the time that hardware signal is caught triggered time and the hard soft interruption context switching of operating system.
In addition, according to this first message of different application scene, except carrying the IP address of this ONT, can also carry other information, as this ONT geographical location information etc.
42, this ONT sends this first message by PON interface to OLT;
During specific implementation, the configuration of can optimizing hardware makes CPU network interface can within the Dying Gasp time, send the first message.
43, this OLT receives this first message that this ONT sends, and resolves the IP address that this first message is known this ONT;
Particularly, this OLT can create the message process of intercepting the first message that this ONT Dying Gasp puts forward, carries out poll packet receiving, receives this first message.
44, this OLT generates second message (the second message) of the IP address of carrying this ONT;
Particularly, this second message can be DHCP Release message.
45, this OLT is to sending this second message for the Dynamic Host Configuration Protocol server of ONT distributing IP address;
Particularly, this OLT is detected and is ONT and is the corresponding relation between the Dynamic Host Configuration Protocol server of this ONT distributing IP address by Snooping mode, and records this corresponding relation.
46, this Dynamic Host Configuration Protocol server receives this second message that this OLT sends, and resolves the IP address that this second message is known this ONT, and reclaims the IP address of this ONT.
So far, realize the recovery of the IP of this ONT.
Should be understood that the interaction flow shown in Fig. 4 should not be considered as the restriction to the embodiment of the present invention, in practice, can carry out as required the increase and decrease of interactive step.
Address recovery method shown in Fig. 4, after the communication connection of Optical Network Terminal and Dynamic Host Configuration Protocol server disconnects, IP address is carried in message, and send this message to optical line terminal, trigger optical line terminal, by message, IP address is sent to Dynamic Host Configuration Protocol server, realize Dynamic Host Configuration Protocol server and reclaim this IP address, can put forward higher ip address organic efficiency, save IP address resource.
In addition, because Dynamic Host Configuration Protocol server carries out the recovery of IP address by receiving the method for the spontaneous IP of returning of Optical Network Terminal address, Dynamic Host Configuration Protocol server is without send the service condition that probe messages is surveyed IP address to Optical Network Terminal, thereby can reduce the load of Dynamic Host Configuration Protocol server and link.
It should be noted that the first message of the IP address of carrying this ONT of can also prestoring in other embodiment of the present invention calls without generating this first message the first message prestoring in above-mentioned 41, to save time.
In addition, in other embodiment of the present invention, the IP address of this ONT can also be stored in this OLT, this first message in above-mentioned 41-42 carries and triggers the sign that this OLT sends this second message, without the IP address of carrying this ONT, when in above-mentioned 43, this OLT generates the second message, call the IP address of this ONT prestoring, to save time.
A kind of Optical Network Terminal that the embodiment of the present invention provides, as shown in Figure 5, this Optical Network Terminal can comprise: detecting unit 51, transmitting element 52, wherein:
Detecting unit 51, can be for detection of the communication connection status of Optical Network Terminal ONT and Dynamic Host Configuration Protocol server;
Transmitting element 52, can be when the communication connection of this ONT and this Dynamic Host Configuration Protocol server being detected when detecting unit 51 and be about to disconnect, to optical line terminal OLT, send the first message, to trigger this OLT, according to this first message, determine the IP address of this ONT, generate and to this Dynamic Host Configuration Protocol server, send second message of carrying this IP address, making this Dynamic Host Configuration Protocol server reclaim this IP address, wherein, this IP address can be carried in the first message, also can prestore and be stored in this OLT.
Alternatively, as shown in Figure 6, when the first message that transmitting element 52 sends is carried this IP address, this device can comprise following arbitrary unit: generation unit 521, while being about to disconnect for the communication connection of this ONT and this Dynamic Host Configuration Protocol server, generate this first message, this first message is carried this IP address;
Acquiring unit 522, when the communication connection that this ONT and this Dynamic Host Configuration Protocol server detected for this ONT is about to disconnect, obtains this first message prestoring, and this first message is carried this IP address.
Further alternatively, generation unit 521 can be specifically for, if the power supply of this ONT is stopped power supply, applies that dump energy generates this first message or application dump energy obtains this first message prestoring;
Correspondingly, transmitting element 52 can be specifically for, and application dump energy sends this first message by passive optical-fiber network PON interface to this OLT.
The another kind of Optical Network Terminal that the embodiment of the present invention provides, as shown in Figure 7, this Optical Network Terminal can comprise processor 1 and transmitter 2, wherein:
Processor 1, for detection of the communication connection status of Optical Network Terminal ONT and Dynamic Host Configuration Protocol server, notifies this transmitter when the communication connection that this ONT and this Dynamic Host Configuration Protocol server detected is about to disconnect;
Transmitter 2, notice for receiving processor 1, after receiving the notice of this processor 1, to optical line terminal OLT, send the first message, trigger this OLT and according to this first message, determine the IP address of this ONT, generate and send to this Dynamic Host Configuration Protocol server second message of carrying this IP address, make this Dynamic Host Configuration Protocol server reclaim this IP address, wherein, this first message carries this IP address or this OLT stores this IP address.
The Optical Network Terminal of the embodiment of the present invention, when the communication connection with Dynamic Host Configuration Protocol server is about to disconnect, to optical line terminal, send the first message, trigger optical line terminal, by the second message, IP address is sent to Dynamic Host Configuration Protocol server, realize initiatively IP address is sent to Dynamic Host Configuration Protocol server, realize Dynamic Host Configuration Protocol server and reclaim in time IP address, can put forward higher ip address organic efficiency.
A kind of optical line terminal that the embodiment of the present invention provides, as shown in Figure 8, this optical line terminal can comprise: receiving element 71, determining unit 72, generation unit 73, transmitting element 74, wherein:
Receiving element 71, first message that can send when the communication connection of this ONT and Dynamic Host Configuration Protocol server is about to disconnect for receiving ONT;
Determining unit 72, can determine for this first message receiving according to this receiving element the IP address of this ONT;
Generation unit 73, can be for generating second message of carrying this IP address;
Transmitting element 74, can, for send this second message to this Dynamic Host Configuration Protocol server, make this Dynamic Host Configuration Protocol server reclaim this IP address.
Alternatively, this determining unit can be specifically for, when this first message is carried this IP address, resolves this first message and obtain this IP address; Or this determining unit can be specifically for, obtains this IP address prestoring according to this first message.
Alternatively, as shown in Figure 9, this optical line terminal can also comprise record cell 75, can be for recording the corresponding relation of this ONT and this Dynamic Host Configuration Protocol server.Particularly, can adopt the form of form to record the corresponding relation of ONT and Dynamic Host Configuration Protocol server.
Preferably, during due to ONT power-off, by passive optical-fiber network PON interface, send this first message, correspondingly, this receiving element 71 can receive this ONT by passive optical-fiber network PON interface and send this first message.
The another kind of optical line terminal that the embodiment of the present invention provides, as shown in figure 10, this optical line terminal can comprise: receiver 91, processor 92 and transmitter 93, wherein:
Receiver 91, the first message sending when the communication connection of described ONT and Dynamic Host Configuration Protocol server is about to disconnect for receiving ONT, and send described the first message to processor 92;
Processor 92, described the first message sending for receiving receiver 91, described the first message receiving according to receiver 91 is determined the IP address of described ONT, generates second message of carrying described IP address, and sends described the second message to transmitter 93;
Transmitter 93, described the second message sending for receiving processor 92, sends described the second message to described Dynamic Host Configuration Protocol server, makes described Dynamic Host Configuration Protocol server reclaim described IP address.
The optical line terminal of the embodiment of the present invention, receives the first message generating and sending after the communication connection disconnection of this Optical Network Terminal and Dynamic Host Configuration Protocol server, determines the IP address of this ONT according to this first message; Generate and send and comprise this IP address the second message to Dynamic Host Configuration Protocol server, realize Dynamic Host Configuration Protocol server and reclaim in time IP address, can put forward higher ip address organic efficiency.
It should be noted that: the terminal that above-described embodiment provides belongs to same design with corresponding method, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, the identical similar part of each embodiment mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for device embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.Device embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skills, in the situation that not paying creative work, are appreciated that and implement.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that disclosed system, apparatus and method can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.
These are only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.