Background technology
GPON (gigabit passive optical network) system belongs to uses a kind of wide light network transmission system, future at present
Also it would is that the intelligent acess solution of main flow.The topological structure citation form of GPON systems is bus-type, i.e. an OLT
(local side apparatus) connects multiple ONU (ustomer premises access equipment), for some user, the data of other users be all it is visible,
Therefore using cipher mode significant data must be avoided to be monitored.
GPON systems encryption and decryption has had in GPON standard agreements to be explicitly defined, and is just repeated no more here.
Actual user's usage scenario is often that multinomial business is used in conjunction with.For example, certain user sees TV using IPTV simultaneously,
Internet surfs the Net, the multinomial business such as VOIP makes a phone call.From the point of view of technological layer, each business can be carried on different
On Port, identified by Port-ID.
But there is the problem of following in agreement regulation in actual use.Make when a certain business performs Port-ID encryption and decryption
Can and enabled switching when, due to OLT encryption times and ONU decryption times can not Complete Synchronization, cause partial data without
Method is correctly decrypted, and causes the phenomenon of data packet discarding.
It is as shown in Figure 1 that existing GPON systems Port-ID encryption and decryption enables switching flow.
As shown in Figure 1, OLT sends Configure Port-ID message first, belongs to the ONU to some ONU distribution
Port-ID, ONU, which is received, returns to an Acknowledge message after the message, represents to confirm to have received distribution
Port-ID message.
Then, OLT sends Encrypted Port-ID message, gives ONU configuration Port-ID decryption enabled switching,
ONU returns to an Acknowledge message after receiving the message, represents to confirm that having received Port-ID decrypts enabled cut
The message changed.
As shown in Figure 1, for ONU, any time since the TE0 moment can be carried out Port-ID and decrypt enabled cut
The operation changed.For OLT, any time since the TE1 moment can be carried out the enabled switching of Port-ID encryptions.But
It is not aware that other side has carried out the enabled switching of Port-ID encryption and decryption at what moment between OLT and ONU.
The occurrence of causing following three:
1) OLT first completes the enabled switching of certain Port-ID encryptions, and is encrypted to sending data, but ONU and does not complete
The enabled switching of Port-ID decryption, therefore, not to the data deciphering of encryption, causes data transfer to malfunction.
2) before OLT completes the enabled switching of certain Port-ID encryptions, ONU has completed the Port-ID and has decrypted enabled cut
Change, therefore the data that be not encrypted can be decrypted by ONU, cause data transfer to malfunction;
3) OLT and ONU completes the enabled switchings of certain Port-ID, no data encryption and decryption mistake simultaneously.
But situation 3) can only occur under minimum probability, therefore, in most cases mistake can all occur in data transfer
By mistake, that is, the technical problem of packet loss be present.
The content of the invention
It is an object of the invention to provide for solving the problems, such as a kind of above-mentioned light network transmission system for losing packet technology
The method of the enabled switching of port id encryption and decryption.
It is a further object of the present invention to provide a kind of device that can implement the above method.
According to a first aspect of the present invention, there is provided a kind of side of the enabled switching of light network transmission system port id encryption and decryption
Method, comprise the following steps:
Local side apparatus OLT is obtained the port id encryption and decryption that ONU is supported and enabled by the negotiation with ustomer premises access equipment ONU
Switch mode;
The OLT is activated after the enabled switch mode of port id encryption and decryption that ONU is supported is obtained by being sent to ONU
Request, make the ONU that its port id encryption and decryption is enabled into switch mode and be adjusted to the enabled switch mode of synchronous encryption and decryption;
In the case where the synchronous encryption and decryption enables switch mode, OLT and ONU determine to carry out that encryption and decryption port id is enabled to be cut simultaneously
The switching instant changed, to complete the enabled switching of encryption and decryption port id simultaneously in the switching instant.
The step of above-mentioned OLT enables switch mode by the encryption and decryption supported of the negotiation acquisition ONU with ONU includes:
Above-mentioned OLT initiates switching type to the ONU and reports request message;
Above-mentioned ONU responds the switching type within the defined time and reports request message, returns to a switching type
Message report, to illustrate that the port id encryption and decryption switching that current ONU is supported enables pattern.
Above-mentioned is asked by sending activation to ONU, makes the ONU that its port id encryption and decryption is enabled into switch mode adjustment
The step of enabling switch mode to synchronous encryption and decryption includes:
If the switching type message report shows that ONU supports synchronous encryption and decryption to enable switch mode, OLT is sent out to ONU
Activation port id encryption and decryption is sent to enable switch mode request;
The ONU returns to response to OLT in the given time, and enables switch mode according to activation port id encryption and decryption and ask
The description content asked, its port id encryption and decryption is enabled into switch mode and is adjusted to the enabled switch mode of synchronous encryption and decryption.
Above-mentioned is asked by sending activation to ONU, makes the ONU that its port id encryption and decryption is enabled into switch mode adjustment
The step of enabling switch mode to synchronous encryption and decryption also includes:
If the ONU does not return to response to OLT in the given time, OLT sends activation port id encryption and decryption again to be made
Can switch mode request, if OLT sends the request more times and do not receive the response of OUN returns still, lead to from described OLT
The step of enabling switch mode with the ONU negotiation acquisition ONU encryption and decryption supported is crossed to start to re-start processing.
Above-mentioned OLT and ONU determines to include the step of carrying out the switching instant of the enabled switching of encryption and decryption simultaneously:
OLT sends encryption port id message to ONU;
ONU parses message content after receiving the encryption port id message, prepares that some port id encryption and decryption is enabled to cut
Change, then send encryption port id confirmation message to OLT, made with representing that ONU is received and is ready for port id encryption and decryption
Can switching.
Above-mentioned OLT and ONU determines also to include the step of carrying out the switching instant of the enabled switching of encryption and decryption simultaneously:
After the encryption port id confirmation message of ONU transmissions is received, OLT sends the encryption port switching containing switching instant
Time message prepares to carry out enabled switching when the switching instant reaches to ONU;
After ONU receives encryption port switching time message, the switching instant is obtained by parsing, and activate its encryption and decryption
Enabled handoff procedure, while encryption port switching instant confirmation message is sent to OLT;
After OLT receives the encryption port switching instant confirmation message, and activate its encryption and decryption and enable handoff procedure.
In addition, OLT carries out framing processing with shape in the enabled switching of progress encryption and decryption port id after being encrypted to payload data
Into payload frames, it is then packaged as downlink data and is sent to ONT;ONU when carrying out the enabled switching of encryption and decryption port id, to from
After OLT downlink data carries out down-going synchronous processing, payload frames are dressed up in deblocking, and processing is then decrypted again.
According to a second aspect of the present invention, there is provided a kind of dress of the enabled switching of light network transmission system port id encryption and decryption
Put, including:
Enabled switch mode acquisition module, for the negotiation by OLT and ONU, obtain the port id that ONU is supported and add solution
Secret emissary can switch mode;
Enabled switching active module, activation request message is sent to ONU for OLT, so that the ONU asks according to activation
Description, by its port id encryption and decryption enable switch mode be adjusted to synchronous encryption and decryption enable switch mode;
Switching instant determining module, it is used for determining to carry out the enabled switching of encryption and decryption port id simultaneously to ONU initiations for OLT
Switching instant processing, so that OLT and ONU completes the enabled switching of encryption and decryption port id in the switching instant simultaneously.
Wherein, the switching instant determining module includes:For calculating the timer of the switching instant.
Relative to prior art, the solution have the advantages that:Determine that Port-ID encryption and decryption makes by OLT and ONU interactions
Can switching time, and OLT and ONU (identical supercounter) same at the time of completes the mode of enabled switching, can
The problem of to avoid OLT and ONU both sides interaction message from causing switching time inconsistent, realize that Port-ID encryption and decryption is enabled and cut
Not packet loss is changed, ensures downstream data flow not packet loss.
The present invention is described in detail below in conjunction with the accompanying drawings.
Embodiment
The method that Fig. 2 shows the enabled switching of the light network transmission system port id encryption and decryption of the present invention, as shown in figure 1,
The method of the present invention comprises the following steps:
Local side apparatus OLT is obtained the port id encryption and decryption that ONU is supported and enabled by the negotiation with ustomer premises access equipment ONU
Switch mode;
OLT is after the enabled switch mode of port id encryption and decryption that ONU is supported is obtained, by sending activation request to ONU,
Make the ONU that the enabled switch mode of its port id encryption and decryption to be adjusted to the synchronous encryption and decryption of the present invention and enable switch mode;
In the case where the synchronous encryption and decryption enables switch mode, OLT and ONU determine to carry out that encryption and decryption port id is enabled to be cut simultaneously
The switching instant changed, to complete the enabled switching of encryption and decryption port id simultaneously in the switching instant.
The present invention synchronous encryption and decryption enable switch mode and traditional protocol mode shown in Fig. 1 difference be, OLT
Identical switching instant is determined by interaction to ONU, then this switching instant carries out both encryption and decryption port ids simultaneously again
Enabled switching, so as to avoid in the prior art there are problems that because switching time is asynchronous and caused by packet loss technique.
The step of above-mentioned OLT enables switch mode by the encryption and decryption supported of the negotiation acquisition ONU with ONU includes:
OLT initiates switching type to ONU and reports request message;ONU responds the switching type within the defined time and reports request to disappear
Breath, a switching type message report is returned to, to illustrate that the port id encryption and decryption switching that current ONU is supported enables pattern.
Above-mentioned is asked by sending activation to ONU, is made ONU that its port id encryption and decryption is enabled into switch mode and is adjusted to same
The step of step encryption and decryption enables switch mode includes:If the switching type message report shows that ONU supports synchronous encryption and decryption to make
Energy switch mode, then OLT is sent to ONU activates the enabled switch mode request of port id encryption and decryption;The ONU is in the given time
Response is returned to OLT, and the description content of switch mode request is enabled according to activation port id encryption and decryption, its port id is added into solution
Secret emissary's energy switch mode is adjusted to synchronous encryption and decryption and enables switch mode.
Above-mentioned is asked by sending activation to ONU, makes the ONU that its port id encryption and decryption is enabled into switch mode adjustment
The step of enabling switch mode to synchronous encryption and decryption also includes:If the ONU does not return to response to OLT in the given time,
OLT sends activation port id encryption and decryption and enables switch mode request again, if OLT sends the request and do not received still for more times
The response that OUN is returned, then obtain the enabled switch mode of encryption and decryption that ONU supported from described OLT by negotiations with ONU
Step starts to re-start processing.
Above-mentioned OLT and ONU determines to include the step of carrying out the switching instant of the enabled switching of encryption and decryption simultaneously:OLT is sent
Port id message is encrypted to ONU;ONU parses message content after receiving the encryption port id message, prepares some port id and adds
The enabled switching of decryption, encryption port id confirmation message is then sent to OLT, to represent that ONU is received and is ready for holding
The enabled switching of mouth ID encryption and decryption.
Above-mentioned OLT and ONU determines also to include the step of carrying out the switching instant of the enabled switching of encryption and decryption simultaneously:Receiving
After the encryption port id confirmation message that ONU is sent, OLT sends the encryption port switching time message containing switching instant to ONU,
Prepare to carry out enabled switching when the switching instant reaches simultaneously;After ONU receives encryption port switching time message, pass through solution
Analysis obtains the switching instant, and activates its encryption and decryption and enable handoff procedure, while encryption port switching instant confirmation message
It is sent to OLT;After OLT receives the encryption port switching instant confirmation message, and activate its encryption and decryption and enable handoff procedure.
In addition, OLT carries out framing processing with shape in the enabled switching of progress encryption and decryption port id after being encrypted to payload data
Into payload frames, it is then packaged as downlink data and is sent to ONT.ONU when carrying out the enabled switching of encryption and decryption port id, to from
After OLT downlink data carries out down-going synchronous processing, payload frames are dressed up in deblocking, and processing is then decrypted again.
Fig. 3 shows a kind of device of the enabled switching of light network transmission system port id encryption and decryption of the present invention, the device
It can be separately positioned on OLT and OUN, each of which device includes:
Enabled switch mode acquisition module, for the negotiation by OLT and ONU, obtain the port id that ONU is supported and add solution
Secret emissary can switch mode;
Enabled switching active module, activation request message is sent to ONU for OLT, so that the ONU asks according to activation
Description, by its port id encryption and decryption enable switch mode be adjusted to synchronous encryption and decryption enable switch mode;
Switching instant determining module, it is used for determining to carry out the enabled switching of encryption and decryption port id simultaneously to ONU initiations for OLT
Switching instant processing, so that OLT and ONU completes the enabled switching of encryption and decryption port id in the switching instant simultaneously.
In addition, switching instant determining module includes being used for the timer for calculating the switching instant, as described below
supercounter。
In order to be more fully understood by the present invention, below in conjunction with the specific embodiment shown in Fig. 3 to Fig. 4, accompanying drawing is to the present invention
It is described further.
In an embodiment of the present invention, the above method is realized by step 1 and step 2.
Step 1
OLT and all ONU consults the pattern for the enabled switching of Port-ID encryption and decryption supported, negotiations process can use
PLOAM message channels either OMCI passages or other information passage.
Negotiations process is as shown in Figure 4.
1st, OLT is initiated, and ONU reports the negotiations process of the enabled switch mode of spontaneous Port-ID encryption and decryption;
OLT initiates switching type message request (Decription Switch Tpye to each ONU successively first
Requst PLOAM).In defined time TO3, ONU should return to a switching type and confirm report (Desription
Switch Tpye Report PLOAM), illustrate the decryption switch mode that current ONU is supported.If in defined time TO3
Do not reply, OLT can initiate the ONU same situation again, and this process can repeat M times.
If the M equal dont answer of request, represent that the ONU can not support to report the enabled switching mould of Port-ID decryption of oneself
Formula, then to the ONU, switching method is enabled using the Port-ID encryption and decryption of consensus standard.
After completing the mode negotiation that all ONU are supported, OLT, which can be grasped accurately, to be currently accessed OLT all ONU and is propped up
The enabled switch mode of Port-ID decryption held.
According to the support situation of ONU in system, it can select which type of mode used by OLT:For only supported protocol
The ONU of standard, then using consensus standard Port-ID encryption and decryption enabled methods, if there is i.e. supported protocol standard, support again
The synchronous encryption and decryption of the present invention enables switch mode, then has OLT configuration ONU work and which pattern.
System can support standard and the present invention while coexist.
2nd, OLT is initiated, and ONU completes Port-ID encryption and decryption and enables pattern switching and respond OLT.
After the mode negotiation process for completing the enabled switching of Port-ID encryption and decryption, if enabling the switching mode of the present invention, that
OLT needs to send the request of the pattern of the enabled switching of activation Port-ID encryption and decryption to all ONU successively, within the TO4 times
OLT should can normally receive the response of ONU transmissions.If do not receive response within TO4 time, then OLT is again
Activation request is sent, after the process repeats n times, if ONU does not still have response, then OLT, which is re-started, reports ONU's
Port-ID encryption and decryption enables the process of the request of switch mode.
If receiving and parsing switching type report (the Decription Switch of OLT transmissions for ONU
Tpye Report), illustrate that current OLT can support Port-ID encryption and decryption of the present invention to enable switching method.Receiving
After OLT activation request, according to activation request description, the Port-ID encryption and decryption of oneself is enabled into switch mode and is switched to this hair
Bright synchronous encryption and decryption is enabled under switch mode either switch mode as defined in agreement, otherwise keeps present mode.
Controlled by OLT, after the enabled switch mode of Port-ID encryption and decryption for completing all ONU, whole system configures
Into.
Step 2
The Port-ID synchronizations encryption and decryption of the present invention is enabled switching method and led to using PLOAM message channels or other information
The Port-ID encryption and decryption that OLT and ONU is consulted in road enables switching time.It is assumed here that system has completed the enabled switching of encryption and decryption
Pattern, and under the ONU work specified and the pattern of the present invention.
Process 1:Port-ID encryption and decryption enables switching value interaction, including two kinds of situations:A, by it is not enabled be switched to it is enabled;
B, do not enabled by enabled be switched to, behind detailed process it is as follows:
Referring to Fig. 5, being initiated first by OLT, OLT sends encryption port id message (Encrypted_Port-ID) and gives ONU,
Start simultaneously at SW0 timing.ONU parses message content after receiving message, prepares the enabled switching of some Port-ID encryption and decryption, so
Send encryption port id confirmation message (Encrypted_Port-ID_ACK) afterwards and give OLT, expression ONU it is received and prepare into
The enabled switching of row Port-ID encryption and decryption.
If OLT never receives Encrypted_Port-ID_ACK message by the SW0 times, then OLT is initiated again
Encrypted_Port-ID message is to ONU, if not receiving ACK message (by taking 10s as an example) in SW0 times timing to 10s, weight
Said process P times again.If P times process all fails, then OLT thinks that ONU does not support this function, and whole system returns to former agreement
Processing mode.
If OLT receives Encrypted_Port-ID_ACK message within the 10s times, represent that ONU has been prepared for carrying out
The enabled switching of Port-ID encryption and decryption.Enter process 2.
Process 2:Port-ID encryption and decryption enables switching time interaction, determines switching instant, and detailed process is as follows:
OLT sends encryption port switching instant message (Encrypted_Port-ID_Switch_Time) to ONU first,
Message content includes switching time supercounter value, and starts SW1 timing.
After ONU receives Encrypted_Port-ID_Switch_Time message, switching time therein is parsed, with
Supercounter values identify switching instant, while configuration register.ONU systems are in current time (current supercounter
Value) Port-ID enabled switchings are carried out at the time of be equal to switching time (the supercounter values parsed).Meanwhile ONU is sent
Encryption port id switching instant confirmation message (Encrypted_Port-ID_Switch_Time_ACK) gives OLT.
OLT thinks that ONU correctly starts after receiving Encrypted_Port-ID_Switch_Time_ACK message
Port-ID encryption and decryption enables process.Then, OLT starts oneself Port-ID encryption and decryption enabled moment, i.e. OLT is also required in OLT
Current time in system (current supercounter values) enters at the time of being equal to switching time (the supercounter values parsed)
The enabled switchings of row Port-ID.
In this way, the synchronism of OLT and ONU in the enabled switchings of Port-ID can be ensured.
Generally speaking, OLT and ONU carries out the enabled switchings of Port-ID in identical system time (superconter values),
Switching not packet loss can be ensured.
If OLT is equal in 10s (by taking the 10s as an example) times in the SW1 times does not all receive Encrypted_Port-ID_
Switch_Time_ACK message, then OLT needs to enable switching time interaction from new Port-ID encryption and decryption of initiating, if
Do not receive ACK message Q times, then think that current ONU can not be normally carried out the enabled switching of Port-ID encryption and decryption, it is necessary to from step
Suddenly whole process is restarted at the beginning.
In summary, the method for the enabled switching of light network transmission system port id encryption and decryption of the invention may be summarized to be:
First, OLT initiates Decription Switch Tpye Report requests, it is desirable to which ONU reports what oneself was supported
Port-ID encryption and decryption enables switch mode.Method according to different ONU using the enabled switching of different Port-ID encryption and decryption;
Then, the ONU that OLT is specified by PLOAM message channels or the activation of other information passage enters the present invention's
Port-ID encryption and decryption enables switch mode;
Then, OLT is being received by PLOAM message channels or other message by issuing Port-ID switching commands, ONU
The enabled switchings of Port-ID are ready for switching command, ACK message is sent to OLT after the completion of preparation.
Then, OLT issues Port-ID encryption and decryption after the ACK message that ONU beams back is received and enables switching time message, disappears
Switching instant is included in breath, by supercounter values as switching instant, while OLT prepares to enter in switching time due in
Enforcement can switch, and the ACK message for waiting ONU to return activates the enabled switching of this Port-ID encryption and decryption;If do not receive ONU to return
The ACK message returned, then cancel the enabled switching of this Port-ID encryption and decryption.
Then, ONU parses switching time therein after receiving Port-ID encryption and decryption and enabling switching time message, and
It is ready to carry out enabled switching in the time;ACK PLOAM message is sent after the completion of preparation to OLT, represents that ONU has been cut
Changing the time is already prepared to.
Finally, after OLT receives the ACK message returned from ONU, activation OLTPort-ID encryption and decryption enables handoff procedure.
(switching supercounter values) switching Port-ID encryption and decryption enables OLT and ONU at the time of agreement simultaneously.
So far, whole GPON realizes will not occur packet loss problem in Port-ID encryption and decryption enables handoff procedure;Meanwhile
The system also OLT and ONU as defined in supported protocol access.
Fig. 6 shows the data processing stream of the OLT and ONU of the present invention when carrying out encryption and decryption port id and enabling switching
Journey.Wherein OTL carries out framing processing to form payload in the enabled switching of progress encryption and decryption port id after being encrypted to payload data
Frame, it is then packaged as downlink data and is sent to ONT.ONU is in the enabled switching of progress encryption and decryption port id, under OLT
After row data carry out down-going synchronous processing, payload frames are dressed up in deblocking, and processing is then decrypted again.
In addition, in figure 6, SDU is initial data message;En is enabled;GTC is Gigabit PON Transmission
Convergence gigabit passive optical network transmission convergence layers;PLOAM:Physical layer OAM physical layer operations, management
And maintenance level.
In summary, the present invention determines that Port-ID encryption and decryption enables switching time, and OLT by OLT and ONU interactions
(identical supercounter) completes the mode of enabled switching same at the time of with ONU, can avoid OLT and ONU both sides
The problem of interaction message causes switching time inconsistent, the enabled switching of Port-ID encryption and decryption not packet loss is realized, ensure lower line number
According to stream not packet loss.
It is also possible to compatible existing GPON systems, including the existing OLT of compatibility and existing ONU equipment.
And ONU and consensus standard ONU of the present invention can be supported simultaneously using different patterns while be present in system, and using different
Mode carries out the enabled switching of Port-ID encryption and decryption.
Although the present invention is described in detail above, the invention is not restricted to this, those skilled in the art of the present technique
Various modifications can be carried out according to the principle of the present invention.Therefore, all modifications made according to the principle of the invention, all should be understood to
Fall into protection scope of the present invention.