Disclosure of Invention
The technical problem solved by the scheme provided by the embodiment of the invention is that the risk of unexpected service switching exists when OAM is deployed after the service is opened.
The method for negotiating synchronization provided by the embodiment of the invention comprises the following steps:
the first device sends a CCM (Continuity Check Message) Message containing negotiation synchronization information to the second device, so that the second device generates the CCM Message containing the synchronization information according to the negotiation synchronization information in the CCM Message, and sends the CCM Message containing the synchronization information to the first device;
the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information;
wherein the CCM refers to a continuity check message.
Preferably, the sending, by the first device, the CCM message including the negotiation synchronization information to the second device includes:
when an OAM instance is created, the first equipment judges whether the configuration parameters of the OAM instance contain negotiation synchronization parameters;
if the OAM instance configuration parameters contain the negotiation synchronization parameters, the first device enters an initialization state and sends a CCM message containing the negotiation synchronization information of the initialization state to the second device;
wherein, the OAM refers to operation, management and maintenance.
Preferably, the sending, by the first device, the CCM message including the negotiation synchronization information to the second device includes:
when an OAM instance is deleted, the first equipment judges whether the configuration parameters of the OAM instance contain negotiation synchronization parameters;
and if the OAM instance configuration parameters contain the negotiation synchronization parameters, the first device enters a Down state, and a CCM message containing the negotiation synchronization information of the Down state is sent to the second device.
The method for negotiating synchronization provided by the embodiment of the invention comprises the following steps:
the second equipment receives a CCM message which is sent by the first equipment and contains negotiation synchronization information;
the second device generates a CCM message containing the synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing the synchronization information to the first device, so that the first device performs synchronous detection with the second device according to the CCM message containing the synchronization information;
wherein the CCM refers to a continuity check message.
Preferably, the second device generates a CCM message containing synchronization information according to the negotiated synchronization information in the CCM message, and sends the CCM message containing synchronization information to the first device, so that the step of the first device performing synchronization detection with the second device according to the CCM message containing synchronization information includes:
when an OAM instance is created, the second device enters an Up state from an initialization state according to the negotiation synchronization information containing the initialization state in the CCM message, and generates the CCM message containing the synchronization information of the Up state;
and the second device sends the CCM message containing the synchronization information of the Up state to the first device, so that the first device enters the Up state from the initialization state according to the synchronization information of the Up state contained in the CCM message, and starts synchronous detection with the second device.
Preferably, the second device generates a CCM message containing synchronization information according to the negotiated synchronization information in the CCM message, and sends the CCM message containing synchronization information to the first device, so that the step of the first device performing synchronization detection with the second device according to the CCM message containing synchronization information includes:
when the OAM instance is deleted, the second device enters an initialization state from a Down state according to the negotiation synchronization information containing the Down state in the CCM message, and generates the CCM message containing the initialization state synchronization information;
and the second device sends the CCM message containing the synchronization information of the initialization state to the first device, so that the first device enters the initialization state from the Down state according to the synchronization information of the initialization state contained in the CCM message, and deletes the OAM instance.
Preferably, the negotiation synchronization information in the CCM message includes a self-defined TLV (Type-Length-Value) field in a PDU (Protocol Data Unit) field in the CCM message, or a reserved field in the CCM message.
The device for negotiating synchronization provided by the embodiment of the invention comprises:
the first device is used for sending a CCM message containing negotiation synchronization information to the second device and carrying out synchronous detection with the second device according to the CCM message containing the synchronization information;
the second device is used for generating a CCM message containing the synchronous information according to the negotiation synchronous information in the CCM message and sending the CCM message containing the synchronous information to the first device;
wherein the CCM refers to a continuity check message.
Preferably, the first device is specifically configured to, when an OAM instance is created, determine whether a negotiation synchronization parameter is included in the OAM instance configuration parameter, and enter an initialization state when it is determined that the OAM instance configuration parameter includes the negotiation synchronization parameter, and send a CCM packet including negotiation synchronization information in the initialization state to the second device;
wherein, the OAM refers to operation, management and maintenance.
According to an embodiment of the present invention, an electronic device for negotiating synchronization includes: a processor and a memory, wherein the memory is to store executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing the steps of:
the first equipment sends a CCM message containing negotiation synchronization information to the second equipment, so that the second equipment generates the CCM message containing the synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing the synchronization information to the first equipment;
the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information;
wherein the CCM refers to a continuity check message.
According to a computer storage medium provided by an embodiment of the present invention, a program for negotiating synchronization is stored, and when executed by a processor, the program for negotiating synchronization includes:
the first equipment sends a CCM message containing negotiation synchronization information to the second equipment, so that the CCM message containing the synchronization information is generated according to the negotiation synchronization information in the CCM message, and the CCM message containing the synchronization information is sent to the first equipment;
the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information;
wherein the CCM refers to a continuity check message.
According to the scheme provided by the embodiment of the invention, a new synchronization negotiation mechanism is added on the premise of not influencing the communication with the original standard, and the synchronous opening and synchronous deletion of the OAM instance of the double-end equipment are realized through the new synchronization mechanism, so that the condition of false alarm LOC alarm is avoided.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, and it should be understood that the preferred embodiments described below are only for the purpose of illustrating and explaining the present invention, and are not to be construed as limiting the present invention.
Fig. 1 to fig. 3 show values and formats of a CCM packet and a custom TLV field. The TLV adopts 39 reserved by the original standard, wherein 8 bits are state, and the values are (0-Init, 1-Up, 2-Down) respectively. Regarding the way of self-defining TLV, other ways may be used instead, for example, directly using the reserved field in the original CCM message to carry this status information.
Fig. 4 is a flowchart of a method for negotiating synchronization according to an embodiment of the present invention, as shown in fig. 4, including:
step S401: the first equipment sends a CCM message containing negotiation synchronization information to the second equipment, so that the second equipment generates the CCM message containing the synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing the synchronization information to the first equipment;
step S402: and the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information.
Wherein, the sending, by the first device, the CCM message including the negotiation synchronization information to the second device includes: when an OAM instance is created, the first equipment judges whether the configuration parameters of the OAM instance contain negotiation synchronization parameters; and if the OAM instance configuration parameters contain the negotiation synchronization parameters, the first device enters an initialization state and sends a CCM message containing the negotiation synchronization information of the initialization state to the second device.
Wherein, the sending, by the first device, the CCM message including the negotiation synchronization information to the second device includes: when an OAM instance is deleted, the first equipment judges whether the configuration parameters of the OAM instance contain negotiation synchronization parameters; and if the OAM instance configuration parameters contain the negotiation synchronization parameters, the first device enters a Down state, and a CCM message containing the negotiation synchronization information of the Down state is sent to the second device.
The method for negotiation synchronization provided by the embodiment of the invention comprises the following steps:
the second equipment receives a CCM message which is sent by the first equipment and contains negotiation synchronization information;
the second device generates a CCM message containing the synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing the synchronization information to the first device, so that the first device performs synchronous detection with the second device according to the CCM message containing the synchronization information;
wherein the CCM refers to a continuity check message.
The second device generates a CCM message containing synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing synchronization information to the first device, so that the first device performs synchronization detection with the second device according to the CCM message containing synchronization information, including: when an OAM instance is created, the second device enters an Up state from an initialization state according to the negotiation synchronization information containing the initialization state in the CCM message, and generates the CCM message containing the synchronization information of the Up state; and the second device sends the CCM message containing the synchronization information of the Up state to the first device, so that the first device enters the Up state from the initialization state according to the synchronization information of the Up state contained in the CCM message, and starts synchronous detection with the second device.
The second device generates a CCM message containing synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing synchronization information to the first device, so that the first device performs synchronization detection with the second device according to the CCM message containing synchronization information, including: when the OAM instance is deleted, the second device enters an initialization state from a Down state according to the negotiation synchronization information containing the Down state in the CCM message, and generates the CCM message containing the initialization state synchronization information; and the second device sends the CCM message containing the synchronization information of the initialization state to the first device, so that the first device enters the initialization state from the Down state according to the synchronization information of the initialization state contained in the CCM message, and deletes the OAM instance.
The negotiation synchronization information in the CCM message includes a self-defined TLV (Type-Length-Value) field in a PDU (Protocol Data Unit) field in the CCM message, or a reserved field in the CCM message.
Fig. 5 is a flowchart of an apparatus for negotiating synchronization according to an embodiment of the present invention, as shown in fig. 5, including: thefirst device 501 is configured to send a CCM packet including negotiation synchronization information to the second device, and perform synchronization detection with the second device according to the CCM packet including synchronization information; thesecond device 502 is configured to generate a CCM message including synchronization information according to the negotiation synchronization information in the CCM message, and send the CCM message including synchronization information to the first device.
Thefirst device 501 is specifically configured to, when creating an OAM instance, determine whether a configuration parameter of the OAM instance includes a negotiation synchronization parameter, and enter an initialization state when it is determined that the configuration parameter of the OAM instance includes the negotiation synchronization parameter, and send a CCM packet including negotiation synchronization information in the initialization state to a second device.
The embodiment of the invention provides electronic equipment for negotiation synchronization, which comprises: a processor and a memory, wherein the memory is to store executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing the steps of:
the first equipment sends a CCM message containing negotiation synchronization information to the second equipment, so that the second equipment generates the CCM message containing the synchronization information according to the negotiation synchronization information in the CCM message, and sends the CCM message containing the synchronization information to the first equipment;
and the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information.
The embodiment of the invention provides a computer storage medium, which stores a program for negotiating synchronization, and the program for negotiating synchronization comprises the following steps when executed by a processor:
the first equipment sends a CCM message containing negotiation synchronization information to the second equipment, so that the CCM message containing the synchronization information is generated according to the negotiation synchronization information in the CCM message, and the CCM message containing the synchronization information is sent to the first equipment;
the first equipment carries out synchronous detection with the second equipment according to the CCM message containing the synchronous information;
wherein the CCM refers to a continuity check message.
The embodiment of the invention discloses a TP-OAM/CFM expanded synchronous negotiation method, which is divided into 3 parts to describe corresponding steps.
1. When a new device is docked and an OAM instance is created, as shown in fig. 6, the corresponding steps are as follows:
1) when configuring an OAM instance, a user adds a new parameter to an original OAM instance configuration parameter to indicate whether the creation synchronization of the dual-end device is required to be realized. If the parameter exists, the equipment initializes the state of the equipment to be an INIT (initialization) state, firstly closes the alarm detection, regularly sends a CCM message to the opposite end, and a PDU field of the CCM message carries a self-defined TLV field with the value of INIT.
2) If the peer device also supports this parameter, the peer device initializes a state that is also at INIT and does not detect an alarm. After receiving the CCM message carrying the Init mark sent by the local terminal equipment, the opposite terminal enters an UP state, and the CCM message sent to the local terminal carries a value of a self-defined TLV field as Up.
3) After receiving CCM message carrying Up field from opposite end, the home end enters UP state and starts normal detection alarm. The dual ended device establishes a normal detection.
2. The new device is docked, and when the OAM instance is deleted, as shown in fig. 6, the corresponding steps are as follows:
1) when deleting the OAM instance, a user adds a new parameter to the original OAM instance configuration parameter to indicate whether the deletion synchronization of the double-end equipment needs to be realized. If the parameter exists, stopping the alarm detection, and sending the CCM message to the opposite terminal, wherein the PDU field of the CCM message carries a self-defined TLV field, and the value is Down Request.
2) And after receiving the CCM message carrying the Down Request mark, the opposite terminal equipment enters an INIT state and stops detection and alarm. And responding the CCM message to the local terminal, wherein a PDU field of the CCM message carries a self-defined TLV field, and the value is Down Response.
3) And after the local terminal receives the CCM message in the Down Response state, deleting the OAM instance of the local terminal.
3. When a new device and an old device are docked and an OAM instance is created, as shown in FIGS. 7 and 8, the corresponding steps are as follows:
1) when configuring an OAM instance, a user adds a new parameter to an original OAM instance configuration parameter to indicate whether the creation synchronization of the dual-end device is required to be realized. If the parameter exists, the equipment initializes the state of the equipment to be an INIT state, firstly closes the alarm detection, and sends the CCM message to the opposite end at regular time, wherein a PDU field of the CCM message carries a self-defined TLV field to indicate that a state machine of the local end is the INit.
2) The opposite terminal device does not support the parameter, does not perform any processing after receiving the parameter, and sends CCM without a state machine to the local terminal according to an old standard mode.
3) After receiving the CCM message not carrying the Up state at the opposite end, the home end gives Up negotiation, sends the CCM message not carrying the TLV mark in an old mode, and starts normal detection and alarm. The dual ended device establishes a normal detection.
4. When the OAM instance is deleted, as shown in fig. 9, the corresponding steps are as follows:
1) because the new device and the old device are connected in a butt joint mode, the new device can be processed according to an old standard mode, and therefore when the OAM instance is deleted, the processing mode is the same as that of the old device.
Example 1
As shown in fig. 10, when both ends of the device need to support negotiation synchronization, when a user sets a and Z to respectively enable CCM detection of OAM, the operation steps are as follows:
1. and expanding the message format of the CCM in a self-defined TLV mode. The specific format is described with reference to the previous figures.
2. And the user sends and releases the function of CCM detection of thetunnel 1 based on TP-OAM on the A equipment and the Z equipment respectively. And configuring both devices requires support for negotiating synchronization. Then the devices a and Z enter the INIT state of the state machine after receiving the configuration command, and the devices in the INIT state only send packets and do not perform alarm detection.
3. Assuming that the device a is configured first, the device a preferentially sends a CCM message to the device Z, and the CCM message carries a custom TLV whose value is Init. Assume that the packetization period is 3.3ms fast.
4. After receiving the CCM message, the device Z enters the UP state from the INIT state, starts normal detection and alarm, and the CCM message sent to the a end carries UP state information.
5. After receiving the CCM message, device a detects that the self-defined TLV field is in the Up state, and then enters the Up state machine to start normal alarm detection. And then the CCM message sent to the Z device carries a self-defined TLV field, and the value is Up.
6. The two devices normally communicate and detect thetunnel 1, except that a self-defined TLV field is added in the CCM message, the value is Up, and other processing is the same as the original standard.
7. When the user wants to delete the session, a delete command is issued on device a and device Z, respectively.
8. And if the device A receives the deletion command, stopping the alarm detection of the local terminal, and still sending a CCM message to the opposite terminal according to the packet sending period, wherein the CCM message carries a user-defined TLV field and takes the value as Down.
9. After receiving the command, the Z device at the opposite terminal detects that the self-defined TLV field in the CCM message is Down, stops the alarm detection of the local terminal and enters an INIT state machine. And simultaneously responding to the user-defined information of Down carried by the CCM message.
10. And after the A equipment receives the CCM message carrying the Down, the sending of the CCM message is stopped, and the OAM instance of the local end is deleted.
11. After receiving the command for deleting the OAM instance issued by the user, the opposite terminal equipment judges that the state of the opposite terminal equipment is INIT, and then directly deletes the OAM instance.
Example 2
Besides the CCM message, in the OAM protocol, there are some other messages that also have a problem of negotiation synchronization, for example, the LM function of CCM, when both ends do not start CCM-LM simultaneously, there is also a problem that the counted packet receiving and sending information is inaccurate when not started simultaneously. The embodiment can solve the synchronization problem of CCM-LM by adopting a similar method.
1. And directly adopting a reserved field reserved (0) of CCM to define state information, wherein the value is ((0-Init, 1-Up, 2-Down).
2. And the user sends and enables the function of CCM pre-activation LM detection based on thepseudo wire 1 on the A device and the Z device respectively. And configuring both devices requires support for negotiating synchronization. Then both devices a and Z enter the state machine INIT state upon receiving the configuration command. The packet-only count statistics are not made until synchronization is not achieved.
3. Assuming that the device a is configured first, the device a preferentially sends a CCM message to the device Z, where the CCM message carries Init flag information, and it is assumed that a packet sending period is fast 3.3 ms.
4. After receiving the CCM message, the device Z enters the UP state from the INIT state and starts to perform packet receiving and sending counting processing. The CCM message sent to the A end carries the mark information of the Up.
5. After receiving the CCM packet, the device a detects the Up flag, and then enters the Up state machine. And starting to normally process the receiving and sending packet. And then the CCM message sent to the Z device carries the Up mark.
6. The two devices communicate normally and carry out the packet receiving and sending detection on thepseudo wire 1, except that one more mark field is added in the CCM message, other processing is the same as the original standard.
7. When the user wants to stop the statistics of the received and transmitted packets, a command for stopping the pre-activation of LM is issued on the device A and the device Z respectively.
8. If the device a receives the delete command first, the packet statistics of the local terminal is stopped, and the CCM message is still sent to the opposite terminal according to the packet sending period, where the CCM message carries a Down flag.
9. After receiving the command, the Z device at the opposite end detects that the flag in the CCM message is Down, stops the packet statistics of the local end, and enters the INIT state machine. And simultaneously responding to the sign of Down carried by the CCM message.
10. By the deletion process, the performance detection of the two devices does not have the problem of inaccuracy in starting and stopping.
According to the scheme provided by the embodiment of the invention, a simple negotiation mechanism is added on the basis of the original OAM standard without the negotiation mechanism, and the problems of unexpected alarm and protection switching of equipment caused by asynchronous starting and asynchronous deletion of double-end equipment can be solved.
Although the present invention has been described in detail hereinabove, the present invention is not limited thereto, and various modifications can be made by those skilled in the art in light of the principle of the present invention. Thus, modifications made in accordance with the principles of the present invention should be understood to fall within the scope of the present invention.