Summary of the invention
The technical problem to be solved is: for the problem of above-mentioned existence, message simulation exchange method in a kind of Ethernet passive optical network and message simulation interactive unit are provided, the consumption of ONU can be reduced, improve test reliability, simplify test complexity and reduce testing cost.
The technical solution used in the present invention is as follows:
Message simulation exchange method in a kind of Ethernet passive optical network is provided, including: obtain the test ONU of the particular fiber interface connecting OLT with the original message that sent by described test ONU in described OLT interaction, described original message has keyword message, for identifying described test ONU for described OLT;Keyword message in described original message is repeatedly changed according to predetermined policy, obtain multiple amendment message, keyword message in described multiple amendment message is different, and the optical fiber interface quantity that the kind quantity of described amendment message is at least equal to described OLT;Each optical fiber interface for described OLT configures one amendment message, and each optical fiber interface of described OLT is detected, after the optical fiber interface described OLT being detected sends mutual message, the amendment message described optical fiber interface correspondence configured sends to described OLT, to simulate the interaction of described OLT Yu ONU.
Wherein, the described test ONU obtaining the particular fiber interface connecting OLT is including with the step of original message that sent by described test ONU in described OLT interaction: mapped with described particular fiber interface by the specific gigabit Ethernet GE interface of described OLT, by the described specific GE interface described original message of acquisition.
Wherein, described keyword message includes MAC address.
Additionally also provide for the message simulation interactive unit in a kind of Ethernet passive optical network, described message simulation interactive unit includes Receive message module, message modified module and message interaction module, wherein, described Receive message module for obtain the test ONU of the particular fiber interface connecting OLT with the original message that sent by described test ONU in described OLT interaction, described original message has keyword message, for identifying described test ONU for described OLT;Described message modified module is for repeatedly changing according to predetermined policy the keyword message in described original message, obtain multiple amendment message, keyword message in described multiple amendment message is different, and the optical fiber interface quantity that the kind quantity of described amendment message is at least equal to described OLT;Described message interaction module is for configuring one amendment message for each optical fiber interface of described OLT, and each optical fiber interface of described OLT is detected, after the optical fiber interface described OLT being detected sends mutual message, the amendment message described optical fiber interface correspondence configured sends to described OLT, to simulate the interaction of described OLT Yu ONU.
Wherein, described Receive message module, specifically for being mapped with described particular fiber interface by the specific gigabit Ethernet GE interface of described OLT, obtains described original message by described specific GE interface.
Wherein, described keyword message includes MAC address.
Wherein, described message interaction module includes multiple test interface, and each described test interface is corresponding with each optical fiber interface of described OLT to be connected.
Wherein, each described test interface connects by optical-electrical converter is corresponding with each optical fiber interface of described OLT.
In sum, owing to have employed technique scheme, the invention has the beneficial effects as follows: by the keyword message in the original message that amendment test ONU sends, obtaining multiple amendment message, the keyword message of each amendment message is different so that when OLT receives different amendment messages, different ONU can be judged as, it is thus possible to reduce the consumption of ONU, improve test reliability, simplify test complexity and reduce testing cost.
Detailed description of the invention
All features disclosed in this specification, or disclosed all methods or during step, in addition to mutually exclusive feature and/or step, all can combine by any way.
Any feature disclosed in this specification, unless specifically stated otherwise, all can be by other equivalences or there is the alternative features of similar purpose replaced.I.e., unless specifically stated otherwise, an example during each feature is a series of equivalence or similar characteristics.
As it is shown in figure 1, be the schematic flow sheet of message simulation exchange method one embodiment in Ethernet passive optical network of the present invention.The flow process of message simulation exchange method is as follows:
S11: obtain the test ONU of the particular fiber interface connecting OLT with OLT interaction in by the test original message that sends of ONU, original message has keyword message, tests ONU for identifying for OLT.
Wherein, OLT typically has multiple optical fiber interface, and this particular fiber interface is any one in multiple optical fiber interface, and this test ONU can interact with OLT after being connected with this particular fiber interface.Test ONU, with the interaction of test ONU, can be differentiated with other ONU by OLT by the keyword message in original message.In the present embodiment, keyword message can include MAC (Media Access Control, media interviews control) address.It is of course also possible to include that other is for the information identifying test ONU.
In the present embodiment, step S11 includes: mapped with particular fiber interface by specific GE (Gigabit Ethernet, the gigabit Ethernet) interface of OLT, obtains original message by specific GE interface.Wherein, original message is not directly to obtain on ONU, but in the specific GE interface acquisition of OLT.Also having multiple GE interface on OLT, specific GE interface is any one in multiple GE interface.After this specific GE interface and this particular fiber interface mappings, from particular fiber interface, the message of transmission can obtain from GE interface.
S12: repeatedly change the keyword message in original message according to predetermined policy, obtains multiple amendment message, and the keyword message in multiple amendment message is different, and the optical fiber interface quantity that the kind quantity of amendment message is at least equal to OLT.
Wherein, an often original message of amendment, all can obtain a kind of amendment message.These amendment messages are compared with original message, and except keyword message is different, other content can be the most identical.Predetermined policy defines the amendment mode of keyword message, such as, when keyword message is MAC Address, predetermined policy is that the MAC Address of amendment every time adds one relative to the MAC Address that the last time revises or subtracts one.
S13: each optical fiber interface for OLT configures one amendment message, and each optical fiber interface of OLT is detected, after optical fiber interface OLT being detected sends mutual message, amendment message optical fiber interface correspondence configured sends to OLT, to simulate the interaction of OLT Yu ONU.
Wherein, mutual message can be request message, and amendment message can be the response message of response request message.Due to each optical fiber interface configuration modification message, and all modifications message is all to modify according to original message, original message is obtained when being interacted by real test ONU Yu OLT, so each optical fiber interface of OLT has simulated an ONU, OLT is after receiving amendment message, will be considered that send amendment message be real ONU, thus reach simulate interaction purpose.
In the message simulation exchange method of the embodiment of the present invention, owing to original message comes from real ONU, the amendment message obtained by original message amendment can simulate true ONU, rather than generate virtual ONU without foundation, so amendment message is less relative to the differentiation of original message, it is thus possible to reduce the consumption of ONU, improve test reliability, simplify test complexity and reduce testing cost.
As in figure 2 it is shown, be the structural representation of message simulation interactive unit one embodiment in Ethernet passive optical network of the present invention.Message simulation interactive unit includes Receive message module 21, message modified module 22 and message interaction module 23.
Receive message module 21 for obtain the test ONU of the particular fiber interface connecting OLT with the original message that sent by test ONU in OLT interaction, original message has keyword message, tests ONU for identifying for OLT.Wherein, OLT typically has multiple optical fiber interface, and this particular fiber interface is any one in multiple optical fiber interface, and this test ONU can interact with OLT after being connected with this particular fiber interface.Test ONU, with the interaction of test ONU, can be differentiated with other ONU by OLT by the keyword message in original message.In the present embodiment, keyword message can include MAC Address.It is of course also possible to include that other is for the information identifying test ONU.In the present embodiment, Receive message module 23, specifically for being mapped with particular fiber interface by the specific GE interface of LT, obtains original message by specific GE interface.
Message modified module 22 is for repeatedly changing according to predetermined policy the keyword message in original message, obtain multiple amendment message, keyword message in multiple amendment message is different, and the optical fiber interface quantity that the kind quantity of amendment message is at least equal to OLT.Wherein, an often original message of amendment, message modified module 22 all can obtain a kind of amendment message.These amendment messages are compared with original message, and except keyword message is different, other content can be the most identical.Predetermined policy defines the amendment mode of keyword message, such as, when keyword message is MAC Address, predetermined policy is that the MAC Address of amendment every time adds one relative to the MAC Address that the last time revises or subtracts one.
Message interaction module 23 is for configuring one amendment message for each optical fiber interface of OLT, and each optical fiber interface of OLT is detected, after optical fiber interface OLT being detected sends mutual message, amendment message optical fiber interface correspondence configured sends to OLT, to simulate the interaction of OLT Yu ONU.Wherein, mutual message can be request message, and amendment message can be the response message of response request message.Due to each optical fiber interface configuration modification message, and all modifications message is all to modify according to original message, original message is obtained when being interacted by real test ONU Yu OLT, so each optical fiber interface of OLT has simulated an ONU, OLT is after receiving amendment message, will be considered that send amendment message be real ONU, thus reach simulate interaction purpose.In the present embodiment, message interaction module 23 includes multiple test interface, and each test interface is corresponding with each optical fiber interface of OLT to be connected.Preferably, each test interface connects by optical-electrical converter is corresponding with each optical fiber interface of OLT.
In conjunction with seeing Fig. 3 and Fig. 4, a kind of application scenarios of the present embodiment message simulation interactive unit is explained below.In figure 3, message simulation interactive unit is integrated in computer, and the GE interface that computer is connected on OLT connects ONU on one optical fiber interface (PON) of OLT.The optical fiber interface connecting ONU is mapped on GE interface by computer so that computer can obtain all messages received and dispatched by optical fiber interface from GE interface.
After getting message, can modify in batches.I.e. obtain multiple amendment message by predetermined policy amendment original message simultaneously.
After obtaining revising message, by the most idle for the optical fiber interface on OLT, again each optical fiber interface of computer with OLT is attached by optical-electrical converter, and be each optical fiber interface configuration one amendment message of OLT, thus the optical fiber interface of OLT is when sending mutual message, corresponding amendment message can be sent to OLT by computer, the most just simulates the interaction of OLT Yu ONU.
By the way, message simulation exchange method and message simulation interactive unit in the Ethernet passive optical network of the present invention test the keyword message in the original message that ONU sends by amendment, obtain multiple amendment message, the keyword message of each amendment message is different, when making OLT receive different amendment messages, different ONU can be judged as such that it is able to reduce the consumption of ONU, improve test reliability, simplify test complexity and reduce testing cost.
The invention is not limited in aforesaid detailed description of the invention.The present invention expands to any new feature disclosed in this manual or any new combination, and the arbitrary new method that discloses or the step of process or any new combination.