Summary of the invention
In view of this, the invention provides a kind of backup method of LSA, when carrying out the LSA backup, the nonsynchronous problem of the LSA that not only can avoid the LSA backup failure to cause, but also can reduce the operation complexity of mainboard, and improve LSA backup efficient, realize load balancing.
The present invention also provides a kind of alternate device of LSA, carrying out LSA when backup, the nonsynchronous problem of the LSA that not only can avoid the LSA backup failure to cause, but also can reduce the operation complexity of mainboard, improve LSA backup efficient, realize load balancing.
In order to achieve the above object, the technical scheme of the present invention's proposition is:
A kind of backup method of LSA is applied to implement in the distributed apparatus of uninterrupted route NSR, and described distributed apparatus comprises that the method comprises as the mainboard of main control board with as the slave board of slave control board:
Slave board receives the first LSA LSA that mainboard generates and sends, and wherein a LSA is that described mainboard sends after recording the inundation information of a described LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Slave board is stored a described LSA who receives;
After slave board is stored a described LSA who receives, substitute described mainboard a described LSA is carried out the inundation processing, so that described mainboard after receiving the affirmation response for a described LSA that neighbor device returns, is removed the inundation information of a local described LSA who preserves.
Behind the described LSA of described slave board inundation, the method also comprises: slave board receives the neighbor device of mainboard forwarding for the affirmation response of a described LSA, finishes the inundation processing procedure of a described LSA.
The method also comprises:
Slave board receives the 2nd LSA that mainboard is transmitted, and described the 2nd LSA is mainboard from the LSA that neighbor device receives and non-described mainboard generates;
Slave board is stored described the 2nd LSA that receives;
After slave board is stored described the 2nd LSA that receives, substitute described mainboard and respond to the affirmation that neighbor device returns for described the 2nd LSA.
A kind of alternate device of LSA, this alternate device in the distributed apparatus of implementing uninterrupted route NSR as the slave board of slave control board, this distributed apparatus also comprises the mainboard as main control board, this alternate device comprises: receiving element, memory cell and processing unit, wherein
Described receiving element, be used for receiving the first LSA LSA that mainboard generates and sends, wherein a LSA is that described mainboard sends after recording the inundation information of a described LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Described memory cell, a described LSA who is used for receiving element is received stores;
Described processing unit, be used for after memory cell is stored a described LSA who receives, substitute described mainboard a described LSA is carried out the inundation processing, so that described mainboard after receiving the affirmation response for a described LSA that neighbor device returns, is removed the inundation information of a local described LSA who preserves.
This alternate device also comprises: the end process unit, then,
Described receiving element also is used for receiving the neighbor device of mainboard forwarding for the affirmation response of a described LSA;
Described end process unit is used for finishing the inundation processing procedure of a described LSA after receiving element receives the affirmation response of a described LSA.
This alternate device also comprises response unit, then,
Described receiving element also be used for to receive the 2nd LSA that mainboard is transmitted, and described the 2nd LSA is mainboard from the LSA that neighbor device receives and non-described mainboard generates;
Described memory cell, described the 2nd LSA that also is used for receiving element is received stores;
Described response unit is used for after memory cell is stored described the 2nd LSA that receives, and substitutes described mainboard and responds to the affirmation that neighbor device returns for described the 2nd LSA.
A kind of backup method of LSA is applied to implement in the distributed apparatus of uninterrupted route NSR, and described distributed apparatus comprises that the method comprises as the mainboard of main control board with as the slave board of slave control board:
Mainboard generates the first LSA LSA, and records the inundation information of a LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Mainboard sends a described LSA to slave board, stores a described LSA to indicate described slave board, and alternative described mainboard carries out the inundation processing to a described LSA;
Mainboard receives the affirmation response for a described LSA that neighbor device returns;
Mainboard responds according to described affirmation, removes the inundation information of a described LSA of record.
The method also comprises:
Mainboard is transmitted neighbor device for the affirmation response of a described LSA, so that slave board finishes the inundation processing procedure of a described LSA to slave board.
The method also comprises:
When mainboard detects the slave board abnormal, and mainboard is when recording the inundation information of a LSA, and mainboard carries out inundation according to described inundation information to a described LSA to be processed.
The method also comprises:
Mainboard receives the 2nd LSA that neighbor device sends, and described the 2nd LSA is the LSA that is generated by other outer equipment of described mainboard;
Described the 2nd LSA that mainboard will receive is transmitted to slave board, so that after described slave board stores described the 2nd LSA, substitutes described mainboard and returns affirmation response for described the 2nd LSA to neighbor device.
The method also comprises:
When mainboard receives the 2nd LSA that neighbor device repeats to send, and when detecting the slave board abnormal, mainboard returns affirmation response for described the 2nd LSA to neighbor device.
A kind of alternate device of LSA, this alternate device in the distributed apparatus of implementing uninterrupted route NSR as the mainboard of main control board, this distributed apparatus also comprises the slave board as slave control board, this alternate device comprises: generate record cell, transmitting element, receiving element and clearing cell, wherein
Described generation record cell is used for generating the first LSA LSA, and records the inundation information of a LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Described transmitting element generates the described LSA that record cell generates for sending to slave board, stores a described LSA to indicate described slave board, and alternative described mainboard carries out the inundation processing to a described LSA;
Described receiving element, the affirmation response of a LSA who sends for described transmitting element who be used for to receive that neighbor device returns;
Described clearing cell, the affirmation that is used for receiving according to described receiving element responds, and removes the inundation information of a described LSA who generates recording unit records.
Described transmitting element is also for the affirmation response of the neighbor device that receives to slave board forwarding receiving element for a described LSA, so that slave board finishes the inundation processing procedure of a described LSA.
This equipment also comprises processing unit, is used for when detecting the slave board abnormal, and when generating recording unit records the inundation information of the one LSA being arranged, according to the inundation information of described generation recording unit records a described LSA is carried out inundation and process.
Described receiving element also is used for receiving the 2nd LSA that neighbor device sends, and described the 2nd LSA is the LSA that is generated by other outer equipment of described mainboard;
Described transmitting element, described the 2nd LSA that also is used for receiving element is received is transmitted to slave board, so that after described slave board stores described the 2nd LSA, substitutes described mainboard and returns affirmation response for described the 2nd LSA to neighbor device.
Described transmitting element also is used for receiving the 2nd LSA that neighbor device repeats to send when receiving element, and when detecting the slave board abnormal, returns affirmation response for described the 2nd LSA to neighbor device.
In sum, the backup method of LSA of the present invention is after being stored by the LSA that slave board sends mainboard, and alternative mainboard carries out the inundation processing or replys LSAACK the LSA of described storage.On the one hand, because the present invention is after by slave board LSA being stored, just the LSA of storage is carried out inundation or replied LSAACK, the nonsynchronous problem of the LSA that also just can avoid the LSA backup failure to cause; On the other hand, because the inventive method is not by mainboard described LSA to be carried out inundation or replys LSAACK, but after slave board is stored LSA, by slave board described LSA is carried out inundation or replys LSA ACK, just so that the operation of mainboard is not subjected to the impact of slave board yet, not only reduce the operation complexity of mainboard, and can improve the backup efficient of LSA, realized load balancing.
Embodiment
The technical problem that proposes in order to solve the present invention, the specific implementation of the described scheme of the embodiment of the invention comprises:
Slave board receives the LSA that mainboard generates and sends, and wherein a LSA is that described mainboard sends after recording the inundation information of a described LSA, and this inundation information is used to indicate a described LSA and is in the inundation state; Slave board is stored a described LSA who receives; After slave board is stored a described LSA who receives, substitute described mainboard a described LSA is carried out the inundation processing, so that described mainboard after receiving the affirmation response for a described LSA that neighbor device returns, is removed the inundation information of a local described LSA who preserves.
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
Fig. 1 is the workflow diagram of embodiment of the invention LSA backup method, the method is applied to implement in the distributed apparatus of NSR, described distributed apparatus comprises as the mainboard of main control board with as the slave board of slave control board, and described distributed apparatus externally presents an equipment.Concrete, this distributed apparatus can move ospf protocol or Intermediate System to Intermediate System.LSA hereinafter can be based on the LSA of ospf protocol or Intermediate System to Intermediate System.As shown in Figure 1, this flow process comprises the steps:
Step 101: mainboard generates a LSA, records the inundation information of a described LSA, and this inundation information is used to indicate a described LSA and is in the inundation state.
Step 102: mainboard sends a described LSA to slave board, stores a LSA to indicate described slave board.
Step 103: slave board receives the LSA that mainboard sends, and a described LSA who receives is stored.
Step 104: after slave board is stored a described LSA who receives, substitute described mainboard a described LSA is carried out the inundation processing.
Step 105: mainboard receives the affirmation response for a described LSA that neighbor device returns, and removes the inundation information of a local described LSA who preserves according to described affirmation response.
Step 106: mainboard is transmitted neighbor device for the affirmation response of a described LSA to slave board.
Step 107: slave board receives the neighbor device of mainboard forwarding for the affirmation response of a described LSA, finishes the inundation processing procedure of a described LSA.
Wherein, when mainboard detects the slave board abnormal, if local inundation information of preserving a LSA, then according to described inundation information a described LSA being carried out inundation processes, and after receiving the affirmation response for a described LSA that neighbor device returns, remove the inundation information of a local described LSA who preserves.
Further, the method also comprises:
Mainboard receives the 2nd LSA that neighbor device sends, and described the 2nd LSA that will receive is transmitted to slave board, so that after described slave board stores described the 2nd LSA, substitutes described mainboard and returns affirmation response for described the 2nd LSA to neighbor device.At this moment, when mainboard receives the 2nd LSA that neighbor device repeats to send, if detect the slave board abnormal, then return affirmation response for described the 2nd LSA to neighbor device.Here, the 2nd LSA is the LSA that is generated by other equipment outside the described mainboard.
So far, namely finished the whole workflow of embodiment of the invention LSA backup method.
Based on said method, Fig. 2 and Fig. 3 have provided respectively and have been the structural representation of LSA alternate device embodiment of the present invention.The alternate device that at first provides referring to Fig. 2, as shown in Figure 2, this alternate device in the distributed apparatus of implementing NSR as the slave board of slave control board, this distributed apparatus also comprises the mainboard as main control board, then this alternate device comprises: receiving element 21, memory cell 22 and processing unit 23, wherein
Described receiving element 21 be used for to receive the LSA that mainboard generates and sends, and wherein a LSA is that described mainboard sends after recording the inundation information of a described LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Described memory cell 22, a described LSA who is used for receiving element 21 is received stores;
Described processing unit 23, be used for after a described LSA that 22 pairs of memory cell receive stores, substitute described mainboard a described LSA is carried out the inundation processing, so that described mainboard after receiving the affirmation response for a described LSA that neighbor device returns, is removed the inundation information of a local described LSA who preserves.
This alternate device also comprises: end process unit 24, then,
Described receiving element 21 also is used for receiving the neighbor device of mainboard forwarding for the affirmation response of a described LSA;
Described end process unit 24 is used for finishing the inundation processing procedure of a described LSA after receiving element 21 receives the affirmation response of a described LSA.
Further, this alternate device also comprises response unit 25, then,
Described receiving element 21 also be used for to receive the 2nd LSA that mainboard is transmitted, and described the 2nd LSA is mainboard from the LSA that neighbor device receives and non-described mainboard generates;
Described memory cell 22, described the 2nd LSA that also is used for receiving element 21 is received stores;
Described response unit 25 is used for substituting described mainboard and responding to the affirmation that neighbor device returns for described the 2nd LSA after described the 2nd LSA that 22 pairs of memory cell receive stores.
So far, namely obtained the alternate device that present embodiment adopts.
The alternate device that Fig. 3 provides in the distributed apparatus of implementing NSR as the mainboard of main control board, this distributed apparatus also comprises the slave board as slave control board, then this alternate device comprises generation record cell 31, transmitting element 32, receiving element 33 and clearing cell 34, wherein
Described generation record cell 31 is used for generating a LSA, and records the inundation information of a LSA, and this inundation information is used to indicate a described LSA and is in the inundation state;
Described transmitting element 32 generates the described LSA that record cell 32 generates for sending to slave board, store a described LSA to indicate described slave board, and alternative described mainboard carries out the inundation processing to a described LSA;
Described receiving element 33, what be used for to receive that neighbor device returns sends out the affirmation response of 32 LSA that send for described transmitting element;
Described clearing cell 34 is used for responding according to the affirmation that described receiving element 33 receives, and removes the inundation information of a described LSA who generates record cell 31 records.
Wherein, described transmitting element 32 is also for the affirmation response of the neighbor device that receives to slave board forwarding receiving element 33 for a described LSA, so that slave board finishes the inundation processing procedure of a described LSA.
Particularly, this equipment also comprises processing unit 35, be used for when detecting the slave board abnormal, and when generating record cell 31 and recording the inundation information of a LSA, according to the inundation information of described generation record cell 31 records a described LSA carried out inundation and process.
Further, described receiving element 33 also is used for receiving the 2nd LSA that neighbor device sends, and described the 2nd LSA is the LSA that is generated by other outer equipment of described mainboard;
Described transmitting element 32, described the 2nd LSA that also is used for receiving element 33 is received is transmitted to slave board, so that after described slave board stores described the 2nd LSA, substitutes described mainboard and returns affirmation response for described the 2nd LSA to neighbor device.
Further, described transmitting element 32 also is used for receiving the 2nd LSA that neighbor device repeats to send when receiving element 33, and when detecting the slave board abnormal, returns affirmation response for described the 2nd LSA to neighbor device.
So far, namely obtained the alternate device that present embodiment adopts.The specific works flow process of Fig. 2 and the described alternate device of Fig. 3 can referring to Fig. 1, repeat no more here.
Particularly, for the alternate device in the distributed apparatus, the LSA on it can be divided into two classes: the one, and the LSA that other equipment generate is such as the mainboard LSA that non-mainboard generates from the LSA that other equipment receive; The one, the LSA that self generates.The below describes in detail with the backup method of specific embodiment to these two kinds of LSA respectively.
Embodiment one
Referring to the schematic flow sheet of Link State backup method specific embodiment one of the present invention shown in Figure 4, as shown in Figure 4, this flow process comprises:
Mainboard oneself generates LSA, records inundation information, and this LSA is sent to slave board;
After the LSA that slave board sends described mainboard stores, substitute described mainboard described LSA is carried out the inundation processing;
Mainboard is removed the inundation information of local this LSA that preserves after receiving the affirmation response for this LSA that other equipment return, and will confirm that response is forwarded to slave board, after being received this affirmation and responded by slave board, finishes the inundation processing procedure of this LSA.
Thus, the mainboard abnormal causes the LSA backup failure when slave board storage LSA, after slave board is converted to mainboard, regenerate LSA, at this moment, because the LSA formation condition of backup does not exist, can not produce this LSA yet, neighbours have just guaranteed also that also without LSA information LSDB is correct, thus the problem of having avoided the LSA backup failure to bring.
Further, when unusual after slave board is being converted to mainboard, if the inundation information of LSA is preserved in mainboard this locality originally, then according to described inundation information described LSA being carried out inundation processes, and after receiving the affirmation response for described LSA that neighbor device returns, remove the inundation information of the local described LSA that preserves.
So far, namely finished the whole workflow of present embodiment Link State backup method.
Embodiment two
Fig. 5 is the schematic flow sheet of Link State backup method specific embodiment two of the present invention, and as shown in Figure 5, this flow process comprises:
Mainboard sends to slave board with this LSA after receiving the LSA of other equipment transmissions;
After the LSA that slave board sends described mainboard stores, substitute described mainboard and respond to the affirmation that neighbor device returns for described the 2nd LSA.
Thus, the mainboard abnormal causes the LSA backup failure when slave board storage LSA, after slave board is converted to mainboard, receives the LSA that other equipment send, and has just guaranteed that also LSDB is correct, thus the problem of having avoided the LSA backup failure to bring.
Need to prove, in the present embodiment, when the rear abnormal of slave board storage LSA success, then responded to the affirmation that neighbor device returns for described the 2nd LSA by mainboard.
So far, namely finished the whole workflow of present embodiment Link State backup method.
In a word, the backup method of LSA of the present invention after the LSA that mainboard is sent by slave board stores, substitutes mainboard and the LSA of described storage is carried out inundation processes or reply LSA ACK.On the one hand, because the present invention is after by slave board LSA being stored, just the LSA of storage is carried out inundation or replied LSAACK, the nonsynchronous problem of the LSA that also just can avoid the LSA backup failure to cause; On the other hand, because the inventive method is not by mainboard described LSA to be carried out inundation or replys LSAACK, but after slave board is stored LSA, by slave board described LSA is carried out inundation or replys LSAACK, just so that the operation of mainboard is not subjected to the impact of slave board yet, not only reduce the operation complexity of mainboard, and can improve the backup efficient of LSA, realized load balancing
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.