Summary of the invention
The invention provides a kind of Border Gateway Protocol neighbours' maintaining method and equipment, alleviating stacking link burden, and reduce Master equipment and need keepalive message amount to be processed.
In order to achieve the above object, the embodiment of the invention provides a kind of Border Gateway Protocol neighbours' maintaining method, is applied to comprise main Master equipment and from the intelligent elastic framework IRF network of Slave equipment, the method may further comprise the steps:
Described Slave equipment is the bgp neighbor startup maintenance timer of this equipment after starting the Border Gateway Protocol (BGP) agent process; Wherein, before described maintenance timer expired, between described Slave equipment and the described bgp neighbor maintenance there is neighborhood;
Before described maintenance timer expired, described Slave equipment periodic sends the keepalive message to described bgp neighbor; And, if described Slave equipment is received the keepalive message from described bgp neighbor, the described maintenance timer of described Slave renewal of the equipment then; And/or,
Before described maintenance timer expired, if described Slave equipment is received the update message from described bgp neighbor, the described maintenance timer of described Slave renewal of the equipment then.
The bgp neighbor that described Slave equipment is this equipment starts the maintenance timer, also comprises afterwards:
After described maintenance timer expired, described Slave equipment determines that the neighborhood between this equipment and the described bgp neighbor disconnects, and the information that the neighborhood between this equipment and the described bgp neighbor disconnects is notified to described Master equipment.
Described method further comprises: if described Slave equipment does not start the BGP agent process, then after the keepalive message and/or update message received from the bgp neighbor of this equipment, described keepalive message and/or update message are sent to the Slave equipment of acting on behalf of of this equipment, the described Slave equipment of acting on behalf of is the Slave equipment of startup BGP agent process, and is used to described Slave proxy for equipment bgp neighbor maintenance process; Perhaps,
Described Slave equipment is after starting the BGP agent process, if need to be other Slave proxy for equipment bgp neighbor maintenance process, then this Slave equipment starts and keeps timer as acting on behalf of the bgp neighbor of Slave equipment for the Slave equipment acted on behalf of; Before keeping timer expired, this Slave equipment periodic sends the keepalive message to the bgp neighbor of the Slave equipment that quilt is acted on behalf of; And, if this Slave equipment is received the keepalive message of the bgp neighbor of the Slave equipment of being acted on behalf of from this by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer; And/or, if this Slave equipment is received the update message of the bgp neighbor of the Slave equipment of being acted on behalf of from this by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer, and described update message is sent to described Master equipment.
Described method further comprises: described Slave equipment receives the information of the startup BGP agent process of described Master equipment notice;
Described Slave equipment utilizes the current CPU information of this equipment and/or memory usage information to determine whether this equipment starts the BGP agent process after receiving the information that starts the BGP agent process;
If so, described Slave device start BGP agent process then, and send this equipment to described Master equipment and started the information of BGP agent process and the identification information of this equipment;
If not, then described Slave equipment does not start the BGP agent process, and sends this equipment to described Master equipment and do not start the information of BGP agent process and the identification information of this equipment, does not perhaps send response message to described Master equipment;
Described Slave equipment is after starting the BGP agent process, and what receive described Master equipment notice need to be the information of other Slave proxy for equipment bgp neighbor maintenance process.
The embodiment of the invention provides a kind of Border Gateway Protocol neighbours' maintaining method, is applied to comprise main Master equipment and from the intelligent elastic framework IRF network of Slave equipment, the method may further comprise the steps:
Described Master equipment is after starting the Border Gateway Protocol (BGP) agent process, send the information that starts the BGP agent process to Slave equipment, determine by CPU information and/or memory usage information that described this equipment of Slave equipment utilization is current whether this equipment starts the BGP agent process;
When described Master equipment receives the identification information of the information that starts the BGP agent process that described Slave equipment returns and Slave equipment, determine described Slave device start BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer;
When described Master equipment receives the information that does not start the BGP agent process that described Slave equipment returns and the identification information of Slave equipment, when perhaps described Master equipment does not receive the response message of described Slave equipment in Preset Time, determine that described Slave equipment does not start the BGP agent process, and the Slave proxy for equipment bgp neighbor maintenance process of notifying the Slave equipment that starts the BGP agent process need to not start for other BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer.
The embodiment of the invention provides a kind of Border Gateway Protocol neighbours' service equipment, comprises that as being applied to from Slave equipment described Slave equipment comprises the intelligent elastic framework IRF network of main Master equipment and described Slave equipment:
Maintenance module is used for after starting the Border Gateway Protocol (BGP) agent process, is the bgp neighbor startup maintenance timer of this equipment; Wherein, before described maintenance timer expired, between this equipment and the described bgp neighbor maintenance there is neighborhood;
Communication module is used for periodically sending the keepalive message to described bgp neighbor before described maintenance timer expired; And, if receive keepalive message from described bgp neighbor, then upgrade described maintenance timer; And/or,
Before described maintenance timer expired, if receive update message from described bgp neighbor, then upgrade described maintenance timer.
Described communication module also is used for after described maintenance timer expired, determines that the neighborhood between this equipment and the described bgp neighbor disconnects, and the information that the neighborhood between this equipment and the described bgp neighbor disconnects is notified to described Master equipment.
Described communication module, also be used for when this equipment does not start the BGP agent process, after the keepalive message and/or update message received from the bgp neighbor of this equipment, described keepalive message and/or update message are sent to the Slave equipment of acting on behalf of of this equipment, the described Slave of agency equipment has started the BGP agent process, and is used to this proxy for equipment bgp neighbor maintenance process; Perhaps,
After starting the BGP agent process, if need to be other Slave proxy for equipment bgp neighbor maintenance process, then start and keep timer as acting on behalf of the bgp neighbor of Slave equipment for the Slave equipment acted on behalf of; Before keeping timer expired, periodicity sends the keepalive message to the bgp neighbor of the Slave equipment that quilt is acted on behalf of; And, if receive the keepalive message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer; And/or, if receive the update message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer, described update message is sent to described Master equipment.
Described communication module also is used for receiving the information of the startup BGP agent process of described Master equipment notice; The CPU information that this equipment of utilization is current and/or memory usage information determine whether this equipment starts the BGP agent process;
If so, then start the BGP agent process, and send this equipment to described Master equipment and started the information of BGP agent process and the identification information of this equipment;
If not, then do not start the BGP agent process, and send this equipment to described Master equipment and do not start the identification information of the information of BGP agent process and this equipment or do not send response message to described Master equipment; And after starting the BGP agent process, what receive described Master equipment notice need to be the information of other Slave proxy for equipment bgp neighbor maintenance process.
The embodiment of the invention provides a kind of Border Gateway Protocol neighbours' maintaining method, is applied to comprise described Master equipment and from the intelligent elastic framework IRF network of Slave equipment, described Master equipment comprises as main Master equipment:
Sending module, be used for after starting the Border Gateway Protocol (BGP) agent process, send the information that starts the BGP agent process to Slave equipment, determine by CPU information and/or memory usage information that described this equipment of Slave equipment utilization is current whether this equipment starts the BGP agent process;
Processing module, be used for when receiving the identification information of the information that starts the BGP agent process that described Slave equipment returns and Slave equipment, determine described Slave device start BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer;
When receiving the information that does not start the BGP agent process that described Slave equipment returns and the identification information of Slave equipment, when perhaps in Preset Time, not receiving the response message of described Slave equipment, determine that described Slave equipment does not start the BGP agent process, and the Slave proxy for equipment bgp neighbor maintenance process of notifying the Slave equipment that starts the BGP agent process need to not start for other BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer.
Compared with prior art, the embodiment of the invention has the following advantages at least: in the embodiment of the invention, Slave equipment is after starting the BGP agent process, can process the keepalive message of this equipment, not needing keepalive message with this equipment to send to Master equipment processes, thereby can alleviate stacking link burden, reduce the mutual of keepalive message on the stacking link; And can reduce Master equipment need keepalive message amount to be processed, reduce the pressure of Master equipment, and improve Business Processing efficient.
Embodiment
For problems of the prior art, the embodiment of the invention provides a kind of maintaining method of bgp neighbor, the method is applied to comprise in the IRF network of Master equipment and Slave equipment, and move BGP in the IRF network, application scenarios schematic diagram take Fig. 1 as the embodiment of the invention, the member devices such as RTA, RTB, RTC, RTD form the IRF network, RTA is Master equipment, RTB, RTC, RTD are Slave equipment, RTE, RTG, RTF, RTH carry out networking with the interface board at RTA, RTB, RTC, RTD place respectively and dock, and the configuration bgp neighbor; As shown in Figure 2, the method may further comprise the steps:
Step 201, Master equipment send the information that starts the BGP agent process to each Slave equipment after starting the BGP agent process.
In the embodiment of the invention, when behind Master equipment configuration BGP agent functionality, this Master equipment can be enabled the BGP agent process, and sends the information that starts the BGP agent process to each Slave equipment by this BGP agent process.In the specific implementation process, can be by the command line switch control mode at Master equipment configuration BGP agent functionality, as under the BGP view, enabling bgp-agent enable(BGP agent functionality by order line) so that configuration BGP agent functionality on the Master equipment.
Step 202, Slave equipment is after the information of the startup BGP agent process of receiving Master equipment notice, the CPU(Central Processing Unit that this equipment of utilization is current, CPU) information and/or memory usage information determine whether this equipment starts the BGP agent process.
Wherein, when cpu resource and/or memory source can support that Slave equipment carries out subsequent treatment, then Slave equipment determined that this equipment can start the BGP agent process.
Concrete, the current CPU information of this equipment of Slave equipment utilization determines whether this equipment starts the BGP agent process and comprise: when the current cpu busy percentage of this equipment is lower than preset first threshold value, determine that then this equipment can start the BGP agent process, otherwise determine that this equipment cannot start the BGP agent process.
The current memory usage information of this equipment of Slave equipment utilization determines whether this equipment starts the BGP agent process and comprise: when the current memory usage of this equipment is lower than default Second Threshold, determine that then this equipment can start the BGP agent process, otherwise determine that this equipment cannot start the BGP agent process.
The CPU information that this equipment of Slave equipment utilization is current and/or memory usage information determine whether this equipment starts the BGP agent process and comprise: when the current cpu busy percentage of this equipment is lower than default the 3rd threshold value, and when the current memory usage of this equipment is lower than default the 4th threshold value, determine that then this equipment can start the BGP agent process, otherwise determine that this equipment cannot start the BGP agent process.
Step 203, Slave equipment start the BGP agent process when definite this device start BGP agent process, send this equipment to Master equipment and started the information of BGP agent process and the identification information of this equipment; When definite this equipment does not start the BGP agent process, do not start the BGP agent process, send this equipment to Master equipment and do not start the information of BGP agent process and the identification information of this equipment.
In the embodiment of the invention, when Slave equipment does not start the BGP agent process at definite this equipment, also can not send this equipment to Master equipment and not start the information of BGP agent process and the identification information of this equipment, and Master equipment can determine that this Slave equipment does not start the BGP agent process when not receiving the identification information of the information that does not start the BGP agent process that Slave equipment returns and Slave equipment.
Step 204, if Master equipment is received the information that starts the BGP agent process that Slave equipment returns and the identification information of Slave equipment, then determine this Slave device start BGP agent process, and do not need to determine the bgp neighbor for this Slave equipment to start the maintenance timer.
In addition, if Master equipment is received the information that does not start the BGP agent process that Slave equipment returns and the identification information of Slave equipment, determine that then this Slave equipment does not start the BGP agent process, and the Slave proxy for equipment bgp neighbor maintenance process of notifying the Slave equipment that starts the BGP agent process need to not start for other BGP agent process, and do not need to determine the bgp neighbor for this Slave equipment to start the maintenance timer; Further, Slave equipment is after starting the BGP agent process, if that can receive Master equipment notice need to be the information of other Slave proxy for equipment bgp neighbor maintenance process, then this Slave equipment need to be other Slave proxy for equipment bgp neighbor maintenance process.
In the embodiment of the invention, Master equipment is after sending the information that starts the BGP agent process to Slave equipment, start the BGP agent process and start affirmation timer (time-out time is defaulted as 60 seconds), behind this timer expiry, if Master equipment is not received the echo message (started the information of BGP agent process or do not started the information of BGP agent process) of Slave equipment, determine that then this Slave equipment does not start the BGP agent process, and the Slave proxy for equipment bgp neighbor maintenance process of notifying the Slave equipment that starts the BGP agent process need to not start for other BGP agent process, and do not need to determine the bgp neighbor for this Slave equipment to start the maintenance timer; Further, Slave equipment is after starting the BGP agent process, if that receives Master equipment notice need to be the information of other Slave proxy for equipment bgp neighbor maintenance process, then this Slave equipment need to be other Slave proxy for equipment bgp neighbor maintenance process.
It should be noted that when Master equipment is not received the echo message of Slave equipment, can be by the definite identification information of not receiving the Slave equipment of echo message of identification information of the identification information of all Slave equipment and the Slave equipment of receiving echo message; For example, record the identification information of four Slave equipment on the Master equipment, identification information is respectively sign 1, sign 2, sign 3 and identifies 4; If receive the echo message that carries sign 1 and sign 2, then Master equipment can determine that the identification information of the Slave equipment of echo message is not sign 3 and sign 4.
Based on above-mentioned layoutprocedure, Slave equipment need to be safeguarded the bgp neighbor state of this equipment after starting the BGP agent process, and is the bgp neighbor startup maintenance timer (being the holdtime timer) of this equipment; And Master equipment does not need to start the maintenance timer for the bgp neighbor of this Slave equipment when safeguarding the bgp neighbor state of this Slave equipment; Wherein, before keeping timer expired, between this Slave equipment and its bgp neighbor maintenance there is neighborhood; After keeping timer expired, the neighborhood between this Slave equipment and its bgp neighbor will disconnect.
Further, Slave equipment is before the maintenance timer expired that the bgp neighbor that is this equipment starts, and the method can also may further comprise the steps:
Step 205, the Slave equipment periodic sends the keepalive message to bgp neighbor; And, if Slave equipment is received the keepalive message from bgp neighbor, then upgrade maintenance timer (namely to keeping the timer reclocking); And/or, if Slave equipment is received the update message from bgp neighbor, then upgrade the maintenance timer, and the update message is sent to Master equipment.
Concrete, the interface board of Slave equipment is processed the keepalive message up sending behind the keepalive message of receiving from bgp neighbor to the master control borad of this equipment, by the master control borad renewal maintenance timer of this equipment; The interface board of Slave equipment is behind the update message of receiving from bgp neighbor, master control borad by this equipment upgrades the maintenance timer, but this update message of dissection process not, according to existing procedure this update message being passed through Master equipment by stacking link processes, Master equipment is processed this update message according to existing procedure after receiving this update message.
In addition, except keepalive message and update message, other protocol massages (such as open message, notification message, route refresh message etc.) for BGP, Slave equipment and Master equipment need to be processed according to existing procedure, and concrete processing mode does not repeat them here.
In the embodiment of the invention, Slave equipment is after the maintenance timer expired that the bgp neighbor that is this equipment starts, Slave equipment can determine that the neighborhood between this equipment and its bgp neighbor disconnects, and notifies the equipment to Master with the information that the neighborhood between this equipment and its bgp neighbor disconnects; Further, Master equipment can carry out subsequent treatment according to existing procedure after the information that the neighborhood of receiving between Slave equipment and its bgp neighbor disconnects, and this processing does not repeat them here.
In the embodiment of the invention, if Slave equipment does not start the BGP agent process, then after the keepalive message and/or update message received from the bgp neighbor of this equipment, keepalive message and/or update message are sent to the Slave equipment of acting on behalf of (for starting the Slave equipment of BGP agent process) of this equipment, act on behalf of Slave equipment by this and be this Slave proxy for equipment bgp neighbor maintenance process.
If Slave equipment (for starting the Slave equipment of BGP agent process) need to be other Slave proxy for equipment bgp neighbor maintenance process, then this Slave equipment starts and keeps timer as acting on behalf of the bgp neighbor of Slave equipment for the Slave equipment acted on behalf of; Before keeping timer expired, this Slave equipment periodic sends the keepalive message to the bgp neighbor of the Slave equipment that quilt is acted on behalf of; If this Slave equipment is received the keepalive message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer; And/or, if this Slave equipment is received the update message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer, and the update message is sent to Master equipment.
Based on the inventive concept same with said method, a kind of Border Gateway Protocol neighbours' service equipment also is provided in the embodiment of the invention, as be applied to comprise the intelligent elastic framework IRF network of main Master equipment and described Slave equipment from Slave equipment, as shown in Figure 3, described Slave equipment comprises:
Maintenance module 11 is used for after starting the Border Gateway Protocol (BGP) agent process, is the bgp neighbor startup maintenance timer of this equipment; Wherein, before described maintenance timer expired, between this equipment and the described bgp neighbor maintenance there is neighborhood;
Communication module 12 is used for periodically sending the keepalive message to described bgp neighbor before described maintenance timer expired; And, if receive keepalive message from described bgp neighbor, then upgrade described maintenance timer; And/or,
Before described maintenance timer expired, if receive update message from described bgp neighbor, then upgrade described maintenance timer.
Described communication module 12 also is used for after described maintenance timer expired, determines that the neighborhood between this equipment and the described bgp neighbor disconnects, and the information that the neighborhood between this equipment and the described bgp neighbor disconnects is notified to described Master equipment.
Described communication module 12, also be used for when this equipment does not start the BGP agent process, after the keepalive message and/or update message received from the bgp neighbor of this equipment, described keepalive message and/or update message are sent to the Slave equipment of acting on behalf of of this equipment, the described Slave of agency equipment has started the BGP agent process, and is used to this proxy for equipment bgp neighbor maintenance process; Perhaps,
After starting the BGP agent process, if need to be other Slave proxy for equipment bgp neighbor maintenance process, then start and keep timer as acting on behalf of the bgp neighbor of Slave equipment for the Slave equipment acted on behalf of; Before keeping timer expired, periodicity sends the keepalive message to the bgp neighbor of the Slave equipment that quilt is acted on behalf of; And, if receive the keepalive message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer; And/or, if receive the update message of the bgp neighbor of the Slave equipment of being acted on behalf of from quilt by the Slave equipment of being acted on behalf of, then upgrade corresponding maintenance timer, described update message is sent to described Master equipment.
Described communication module 12 also is used for receiving the information of the startup BGP agent process of described Master equipment notice; The CPU information that this equipment of utilization is current and/or memory usage information determine whether this equipment starts the BGP agent process;
If so, then start the BGP agent process, and send this equipment to described Master equipment and started the information of BGP agent process and the identification information of this equipment;
If not, then do not start the BGP agent process, and send this equipment to described Master equipment and do not start the identification information of the information of BGP agent process and this equipment or do not send response message to described Master equipment; And after starting the BGP agent process, what receive described Master equipment notice need to be the information of other Slave proxy for equipment bgp neighbor maintenance process.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can separate deployment.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Based on the inventive concept same with said method, a kind of Border Gateway Protocol neighbours' maintaining method also is provided in the embodiment of the invention, be applied to comprise described Master equipment and from the intelligent elastic framework IRF network of Slave equipment as main Master equipment, as shown in Figure 4, described Master equipment comprises:
Sending module 21, be used for after starting the Border Gateway Protocol (BGP) agent process, send the information that starts the BGP agent process to Slave equipment, determine by CPU information and/or memory usage information that described this equipment of Slave equipment utilization is current whether this equipment starts the BGP agent process;
Processing module 22, be used for when receiving the identification information of the information that starts the BGP agent process that described Slave equipment returns and Slave equipment, determine described Slave device start BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer;
When receiving the information that does not start the BGP agent process that described Slave equipment returns and the identification information of Slave equipment, when perhaps in Preset Time, not receiving the response message of described Slave equipment, determine that described Slave equipment does not start the BGP agent process, and the Slave proxy for equipment bgp neighbor maintenance process of notifying the Slave equipment that starts the BGP agent process need to not start for other BGP agent process, and do not need to determine the bgp neighbor for described Slave equipment to start the maintenance timer.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can separate deployment.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode in a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
Above disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.