Background technology
OSPF (Open Shortest Path First, ospf) is a kind of dynamic routing protocol based on Link State, for finding route on the computer network, calculating route.The basic ideas of agreement are as follows: in autonomous system, each router running OSPF can collect respective interface/adjacency information (being called Link State), in whole region, broadcasted the Link State of oneself by Flooding algorithm, make to safeguard a synchronous LSD at whole intra-zone.According to this database, router calculates with oneself for root, and other network node is a path tree the shortest of leaf, thus calculates the shortest path that oneself arrives each node of intra-zone.
Neighbours' foundation of OSPF is the process of a link exchange state information, and ospf neighbor is set up can be divided into three processes: one is the process finding neighbours, and the object in this stage is find neighbours all on link, and mainly mutual message is hello packet; Two is processes of mutual LSDB (link-state information database) Global Information, the object in this stage grasps in neighbours LSDB to have which LSA (Link StateAdvertisement, link-state information is announced), mainly mutual message is DD (DatabaseDescription, link-state information storehouse describes) message; Three is processes of the mutual LSA needed separately, the object in this stage is the LSA needed to neighbor request, and respond the solicited message of neighbours, mainly mutual message is LSR (Link State Requestionpackets, Link State request bag) and LSU (LinkState Update, link-state information upgrades) message.After completing the process of establishing of neighbours, OSPF starts to carry out calculating route.
Network today also exists a large amount of distributed apparatus.Control software design and reflecting software strictly separate by this kind equipment, control software design be responsible for the control of whole equipment and management (comprise route discovery and issue transmit interface board etc.), and reflecting software is responsible for simple data retransmission business, two kinds of softwares are processed by respective processor, and function is completely independent.As the software version on master control borad belongs to control software design, it is responsible for the various configuration information of process user and runs respective agreement, such as, run the Routing Protocols such as OSPF and find to brush to each interface board under route also.And the software version on total interface plate belongs to reflecting software, they safeguard transmitting of oneself according to the notification message of master control borad, and forward data according to transmitting.
In theory, after the distributed frame adopting above this control and forwarding to be separated, when control software design is restarted or reload, forwarding service can not interrupt.But in practice, control software design is restarted or is reloaded successfully, all Routing Protocols need to rerun, due to now the machine to external world topology situation know nothing, so it is mutual to need to re-start route with the external world, according to the normal flow of original Routing Protocol, the neighborhood of peripheral equipment and the machine now can be caused to rebuild, and all routing iinformation data of re-synchronization.Like this, peripheral equipment can trigger router-level topology due to the short interruption of neighborhood, therefore can cause the route flapping on network and forward interrupting.
In order to address this problem, IETF (Internet Engineering Task Force, Internet engineering duty group) propose a series of enhancing agreement respectively for various Routing Protocol, strengthen in agreement at these, by the transformation to original agreement flow process, make to notify that when the machine control software design is restarted the neighborhood and route that arrive the machine are kept stable by peripheral equipment within a certain period of time, and it is synchronous to assist the machine to carry out routing iinformation, within the as far as possible short time, make the machine that various routing iinformation is returned to the state before restarting, in whole process, network route and forwarding keep highly stable, message forwarding path is also without any change, from the aspect of whole network, with that reboot event does not occur is the same.This enhancing agreement is collectively referred to as GR (Graceful Restart, smooth restarting).
In OSPF GR flow process, router has following role: GR restarter: restarter, namely agreement reboot event occurs and has the equipment of GR ability; GR helper: help restarter, namely has neighborhood (i.e. adjacency also claims adjacent body relation), has assisted the equipment of GR flow process with GR restarter.Under normal operating conditions, between GR restarter and GR helper, foundation has GR session; When GR restarter restarts, when each GR helper finds that its opposite end GR restarter is in rebooting status, not only continue to keep GR session, and the topology still retained in GR Time (GR retention time) from GR restarter or routing iinformation; After GR restarter has restarted, send hello packet to each GR helper, thus re-established GR session.
There are two kinds of widely used OSPF GR schemes in current industry: ietf standard GR scheme and the scheme being referred to as Nonstandard GR, and two kinds of GR schemes cannot be compatible.Like this, in mixed networking, two kinds of GR equipment are all deposited in case, cannot carry out GR operation by configuration device, in network failure or software upgrade process, equipment will there will be the situation of service traffics interruption, and this is not usually allowed in actual applications.
Embodiment
As stated in the Background Art, there are two kinds of different standards in current OSPF GR, and there is different equipment and support different GR standards.Under mixed networking, single and the GR standard of mutual exclusion cannot adapt to user demand.Given this, the embodiment of the present invention proposes the scheme of the different GR standard of a kind of compatibility, under mixed networking environment, can take into account different GR standards, realize OSPF GR flow process.
In the embodiment of the present invention, by adding ospf interface state information on three layer interfaces of GR restarter equipment, with the GR standard that the ospf neighbor (i.e. GR helper) connected under identifying this interface is supported, like this, when device start GR flow process, can according to the ospf interface state on its three layer interface, the GR flow process under adopting corresponding mechanism to realize this interface.Wherein, need on an ospf interface situation realizing two kinds of GR standards, the embodiment of the present invention give also respective handling scheme, and to make the GR helper of the different GR standard of support can normally complete GR flow process, guaranteed flow does not interrupt.
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
According to the difference of mixed networking structure, two kinds of situations can be divided into.In a kind of situation, as shown in Figure 1a, an enable interface of OSPF (hereinafter referred to as ospf interface) only exist the GR helper neighbours of a type, or for adopting the GR helper neighbours (being expressed as IETF helper in figure) of ietf standard, or for adopting the GR helper neighbours (being expressed as Nonstandard helper in figure) of Nonstandard standard; In another kind of situation, as shown in Figure 1 b, an ospf interface exist the GR helper neighbours of two types, namely adopt the GR helper neighbours of ietf standard (being expressed as IETF helper in figure) and adopt the GR helper neighbours (being expressed as Nonstandard helper in figure) of Nonstandard standard in same radio network or in NBMA (Non-Broadcast Multiple Access, non-broadcast multipath access network).
In the embodiment of the present invention, the ospf interface of GR restarter equipment adds new Interface status mark GR-State, is used for showing the type (the GR standard that the GR helper namely connected under this interface supports) of the GR helper under this ospf interface.Consider above-mentioned various networking situation, Interface status mark GR-State can compose three state value, is respectively IETF, Nonstandard and Mix.Neighbours under IETF state representation ospf interface all support ietf standard; Neighbours under Nonstandard state representation ospf interface all support Nonstandard standard; There are neighbours only to support ietf standard in neighbours under Mix state representation ospf interface, have neighbours only to support Nonstandard standard.
Consider that neighbours under the ospf interface of GR restarter equipment may not enable GR ability, for this situation, the embodiment of the present invention also increases state value None on the basis of above-mentioned three kinds of state values, has the not enable GR ability of neighbours under None state representation ospf interface.
Consider a kind of special circumstances, that is, GR helper not only may enable IETP GR ability but also enable Nonstandard GR ability, and the embodiment of the present invention determines Interface status by priority mechanism.Concrete, embodiment of the present invention regulation None priority of status is the highest, and IETF priority of status is greater than Nonstandard state, and Nonstandard priority of status is greater than Mix priority.According to above priority principle, if having one in the neighbours under ospf interface do not support GR helper ability, then the Interface status mark GR-State of this ospf interface is None; If the neighbours under GR restarter equipment ospf interface all enable GR ability, and all support ietf standard and Nonstandard standard, then according to priority principle, the Interface status mark GR-State of this ospf interface is set to IETF.
The setting principle of the Interface status mark of above ospf interface, is summed up and can comprises:
(1) as long as there is not enable GR ability in the GR helper under ospf interface, then the state of this interface is set to None;
(2) when the GR helper under ospf interface all enables GR ability:
When i. only there is 1 GR helper under ospf interface: if these neighbours only support a certain GR standard, then the Status Flag of this ospf interface is set to a single state mark that can show the GR standard that these neighbours support; If these neighbours support multiple GR standard, then corresponding according to each GR standard priority, is set to a single state mark that can show the limit priority GR standard that these neighbours support by the Status Flag of this ospf interface.
Such as, if this GR helper only supports IETF GR standard, then the Status Flag of this ospf interface is set to IETF; If this GR helper only supports Nonstandard GR standard, then the Status Flag of this ospf interface is set to Nonstandard; If this GR helper not only supports IETF GR standard but also can support Nonstandard GR standard, then according to the priority pre-set, the Status Flag of this ospf interface is set to IETF;
When ii. there is at least 2 GR helper under ospf interface:
If the GR standard that each neighbours support jointly is only a kind of, then the Status Flag of this ospf interface is set to a single state mark that can show the GR standard that the neighbours of this ospf interface support jointly; If the GR standard that each neighbours support jointly at least comprises two kinds, then corresponding according to each GR standard priority, is set to a single state mark that can show the limit priority GR standard that each neighbours support jointly by the Status Flag of this ospf interface; If the GR standard that each neighbours do not support jointly, be then set to admixture mark by the Status Flag of this ospf interface.
Such as, when there is at least 2 GR helper under ospf interface: if all GR helper all support IETF GR standard, then the Status Flag of this ospf interface is set to IETF; If all GRhelper all support Nonstandard GR standard, and wherein there is GR helper only to support Nonstandard GR standard, then the Status Flag of this ospf interface is set to Nonstandard; If there is GR helper only to support IETF GR standard, there is GR helper only to support Nonstandard GR, then the Status Flag of this ospf interface is set to Mix.
The Interface status mark GR-State of ospf interface sets up in the process of ospf neighbor relation and maintenance of neighbor relation at GR restarter equipment and GR helper equipment to arrange and safeguard.According to prior art, GR restarter equipment and GR helper equipment are set up and safeguard in the process of ospf neighbor, need mutual hello packet each other, device-dependent message is carried in hello packet, GR ability whether is supported comprising equipment self, and when supporting GR ability, its GR standard supported (IETF GR standard still supports Nonstandard GR standard as supported).GR restarter equipment knows the GR ability of neighbours by the hello packet that neighbours send, and according to the above-mentioned principle arranging ospf interface state, the Interface status mark GR-State of the corresponding ospf interface of self is set, and preserves the Interface status mark GR-State of each ospf interface.
The GR type of GR restarter equipment comprises planned GR and unplanned property GR.When so-called planned GR usually occurs in and needs carry out software restarting (as restarting certain process) and back up relevant information before the restart, for the embodiment of the present invention, GR restarter had backed up the Interface status mark GR-State of each ospf interface before planned GR; Under so-called unplanned property GR usually occurs in abnormal conditions, do not back up relevant information before the restart, such as GR restarter did not back up the Interface status mark GR-State of each ospf interface before unplanned property GR.
The embodiment of the present invention, for above-mentioned various Interface status, is provided with corresponding GR processing policy.As shown in Figure 2, when GR restarter equipment carries out planned GR, Interface status mark GR-State (step 201) of each ospf interface can be read before performing GR flow process, thus according to the Interface status mark GR-State of each ospf interface, the corresponding interface adopts corresponding GR treatment mechanism (step 202), concrete:
If the GR-State of ospf interface is None, then GR restarter is by the failure automatically of GR under this ospf interface, namely GR flow process (not notifying that the GR helper under this ospf interface enters GR state) is not performed to this interface, thus make the ospf neighbor relation of GR helper conveniently between flow process reconstruction with this GRrestarter under this interface;
If the GR-State of ospf interface is IETF, then GR restarter performs the GR flow process of ietf standard to this interface, namely sends Grace-LSA message to each neighbours by this interface, according to IETF GR specification, completes GR flow process;
If the GR-State of ospf interface is Nonstandard, then GR restarter performs the GR flow process of Nonstandard standard to this interface, namely by the hello packet of this interface transmit band special sign position, according to Nonstandard GR specification, completes GR flow process;
If the GR-State of ospf interface is Mix, then first GR restarter performs the GR flow process of ietf standard to this interface, then this interface is performed to the GR flow process of Nonstandard standard, thus make the IETF helper under this interface and Nonstandard helper all can carry out GR process.Concrete, first GRrestarter sends Grace LSA by this interface, IETF helper is made to enter GR state, then before system restart (or after system restart), the hello packet of transmit band special sign position, Nonstandard helper is made to enter GR state, special sign position is all carried in the protocol massages of follow-up transmission, until GR flow process terminates, but GR restarter no longer carries out flag bit detection, all neighbor states under this interface show the success of GR flow performing when reaching FULL, now aging fall the GraceLSA of all IETF helper.
If the planned GR of right and wrong that GR restarter equipment carries out, GR restarter equipment restart after before also not setting up neighborhood with its ospf neighbor, the interface status information of each ospf interface is empty, now, GR restarter equipment is given tacit consent to all ospf interface states and is Mix state, and performs corresponding GR flow process.
In order to the clearer explanation embodiment of the present invention, below for Fig. 3, the flow process of GR restarter equipment executive plan GR is described in detail.
As shown in Figure 3, as GR restarter equipment executive plan GR, for each ospf interface, perform following steps:
Step 301, GR restarter equipment reads the Interface status mark GR-State of ospf interface, according to the value of its GR-State, performs a step in subsequent step 302 ~ 305:
Step 302, if GR-State=None, then has at least a GRhelper not have GR ability under showing current ospf interface, in such cases, GR restarter equipment does not perform GR flow process at this interface, but performs conventional neighbours' Establishing process.
Concrete, GR restarter equipment is after completing and restarting, hello packet is sent by this interface, start neighbours' process of establishing, and when the GR helper state under this interface reaches full state, according to the GR standard whether the GR helper under this interface supports GR and support, according to aforementioned principle, the GR-State of this interface is set.Wherein, completed LSDB synchronously when setting up adjacent neighbours, when their all LSA information are all synchronous, equipment enters full state.
Step 303, if GR-State=IETF, then shows that the GR helper under current ospf interface all supports ietf standard, and in such cases, GR restarter equipment performs the GR flow process of ietf standard at this interface.
Concrete, GR restarter sends Grace-LSA message by this interface, is used for notifying that GR helper there occurs and restarts, need GR helper to assist to carry out GR flow process.After GR helper receives Grace-LSA message, using GR cycle of wherein comprising as the Dead Time time of this equipment, mark its neighbours GRrestarter and carry out GR, return response message.GR restarter finds neighbours according to the response message received, and carries out syntople process of establishing with these neighbours after discovery neighbours.After GR flow process terminates, GR restarter sends the Grace-LSA of Maxage, to notify that the GRHelper under this interface exits GR state by this interface.The signalling interactive process of the GR flow process of ietf standard can be as shown in Figure 4.
Step 304, if GR-State=Nonestandard, then the GRhelper connected under showing current ospf interface all supports Nonestandard standard, and in such cases, GR restarter equipment performs the GR flow process of Nonestandard standard at this interface.
Concrete, GR restarter sends the hello packet carrying specific markers by this interface, be used for notifying that GR helper there occurs and restart, need GR helper to assist to carry out GR flow process.After GR helper receives this hello packet, mark its neighbours GR restarter and carry out GR, return the hello packet carrying specific markers.GR restarter finds neighbours according to the response message received, and carries out syntople process of establishing with these neighbours after discovery neighbours.After GR flow process terminates, GR restarter sends the hello packet not carrying specific markers by this interface, to notify that the GR helper under this interface exits GR state.The signalling interactive process of the GR flow process of Nonestandard standard can be as shown in Figure 5.
Step 305, if GR-State=Mix, then show have equipment only to support ietf standard in the GR helper under current ospf interface, equipment is had only to support Nonestandard standard, in such cases, GRrestarter, according to the priority principle of ietf standard priority higher than Nonestandard standard, first initiates the GR flow process of ietf standard at this interface, then initiates the GR flow process of Nonestandard standard.Further, when GR restarter terminates GR, Grace-LSA message is sent by the ospf interface of this GR-State=Mix, to notify to support that the neighbours of IETF GR standard exit GR state, by sending the hello packet not carrying special sign, to notify to support that the neighbours of Nonstandard GR standard exit GR state.
Specifically, first GR restarter sends Grace-LSA message by this interface, is used for notifying that IETFHelper enters GR state, then sends the hello packet carrying specific markers, is used for notifying that Nonestandard helper enters GR state.After IETF helper receives Grace-LSA message, mark its neighbours GR restarter and carry out GR, return response message; After Nonestandard helper receives this hello packet, mark its neighbours GR restarter and carry out GR, return the response message carrying specific markers.GR restarter finds neighbours according to the response message received, and carries out syntople process of establishing with these neighbours after discovery neighbours.After GR flow process terminates, GR restarter sends the Grace-LSA of Maxage by this interface, to notify that the IETF helper under this interface exits GR state, the hello packet that GR restarter is sent by this interface no longer carries specific markers, to notify that the Nonestandardhelper under this interface exits GR state.The signalling interactive process of above-mentioned flow process can be as shown in Figure 6.
It should be noted that, the above embodiment of the present invention describes for the priority orders of the priority of ietf standard higher than Nonestandard standard, in fact, according to networking structure, if the equipment adopting Nonestandard standard is main, also the priority of Nonestandard standard can be set to the priority higher than ietf standard, so corresponding, need when arranging the Interface status GR-State of ospf interface according to priority suitably to adjust, and, GR treatment mechanism when being Mix for GR-State also needs suitably to adjust, namely, first initiate the GR flow process of Nonestandard standard, initiate the GR flow process of ietf standard again.
It should be noted that in addition, the OSPF GR scheme that the embodiment of the present invention is only supported for equipment comprises ietf standard GR scheme and Nonestandard standard GR scheme describes, it will be appreciated by those skilled in the art that, if mixed networking comprises the GR scheme of other standard, embodiment of the present invention principle also can be adopted to realize the compatibility of each class standard GR scheme.
GR restarter equipment in the embodiment of the present invention and GR helper equipment can be routers or support three layers of switch forwarded.
Based on identical technical conceive, the embodiment of the present invention additionally provides a kind of routing device that can be applicable to above-mentioned flow process.
See Fig. 7, be the structural representation of the routing device that the embodiment of the present invention provides, this routing device corresponds to the GR restarter equipment in foregoing schemes, and as shown in the figure, this equipment can comprise: Interface status arranges module 701, GR processing module 702, wherein:
Interface status arranges module 701, for the GR ability according to the neighbours under this equipment ospf interface, arranges the Status Flag of ospf interface; Wherein, described Status Flag comprises a single state mark of the GR standard that the neighbours for identifying under ospf interface support jointly, and the admixture mark of GR standard that the neighbours for identifying under ospf interface do not support jointly;
GR processing module 702, for occur when this equipment planned restart time, obtain the Status Flag of ospf interface, and on corresponding ospf interface, perform corresponding GR handling process according to the Status Flag of described corresponding ospf interface; Wherein, if the Status Flag of ospf interface is a single state mark, then the GR normal process that this single state mark identifies is performed; If the Status Flag of ospf interface is admixture mark, then corresponding according to each GR standard priority performs each GR normal process respectively.
Concrete, Interface status arranges module 701 under ospf interface, only there are neighbours, and when these neighbours only support a kind of GR standard, the Status Flag of this ospf interface is set to a single state mark that can show the GR standard that these neighbours support; Only there are neighbours under ospf interface, and these neighbours are when supporting multiple GR standard, the priority corresponding according to each GR standard, is set to a single state mark that can show the limit priority GR standard that these neighbours support by the Status Flag of this ospf interface.
Concrete, Interface status arranges module 701 and there are at least 2 neighbours under ospf interface, and the GR standard that each neighbours support jointly is when being only a kind of, the Status Flag of this ospf interface is set to a single state mark that can show the GR standard that the neighbours of this ospf interface support jointly; There are at least 2 neighbours under ospf interface, and the GR standard that each neighbours support jointly is when at least comprising two kinds, the priority corresponding according to each GR standard, is set to a single state mark that can show the limit priority GR standard that each neighbours support jointly by the Status Flag of this ospf interface; Under ospf interface, there are at least 2 neighbours, and each neighbours jointly do not support GR standard when, the Status Flag of this ospf interface is set to admixture mark.
Further, Interface status arrange module 701 also for: if having at least one neighbour not possess GR ability in the neighbours under ospf interface, then the Status Flag of this ospf interface is set to the Status Flag showing to forbid carrying out GR flow process.Accordingly, GR processing module 702 also for: when this equipment occur planned restart time, if the Status Flag of the ospf interface got is the Status Flag showing to forbid carrying out GR flow process, then forbid performing GR flow process under this ospf interface.
Further, GR processing module 702 also for: when this equipment occur unplanned property restart time, the priority corresponding according to each GR standard at its ospf interface performs each GR normal process respectively.
Concrete, Interface status arranges module 701 in neighbor uni-cast and neighbours' maintenance process, according to the GR ability of the neighbours under its ospf interface, can arrange the Status Flag of ospf interface.
Above-mentioned routing device is applied in the networking comprising IETF GR standard and Nonstandard GR standard, and time when the priority of the priority of IETF GR standard higher than Nonstandard GR standard, GR processing module 702 is when the Status Flag getting ospf interface is admixture mark, specifically for: the ospf interface being admixture mark by Status Flag first sends Grace-LSA message, to notify to support that the neighbours of IETF GR standard enter GR state, send the hello packet carrying special sign again, to notify to support that the neighbours of Nonstandard GR standard enter GR state, and in GR flow process subsequently, described special sign is carried in the message that the ospf interface by described Status Flag being admixture mark sends, when described level and smooth starting device terminates GR, the ospf interface being admixture mark by described Status Flag sends Grace-LSA message, to notify to support that the neighbours of IETF GR standard exit GR state, by sending the hello packet not carrying special sign, to notify to support that the neighbours of Nonstandard GR standard exit GR state.
In sum, the compatible scheme of the GR that the embodiment of the present invention provides, make in mixed networking situation, equipment, when carrying out GR, no matter GR helper which kind of GR ability enable, can complete the flow process of GR, not interrupting of guaranteed flow.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a station terminal equipment (can be mobile phone, personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.