OSPF GR(Graceful Restart, Smooth restart ) technology

OSPF GR(Graceful Restart, Smooth restart ) technology

summary


GR(Graceful Restart, Smooth restart ) It is a mechanism to ensure that the forwarding service will not be interrupted when the master-slave switch or the protocol is restarted . Its core lies in : When the device restarts the protocol , Be able to inform its peripheral devices , Make the neighbor relationship and routing to the device at a certain time It's stable in the meantime . After the protocol restarts , Peripherals assist with information ( Including support GR Which is maintained by the agreement Various topologies 、 Routing and session information ) Sync , In the shortest possible time to restore to the state before restart . Not during protocol restart There will be route oscillations , There is no change in the forwarding path , The whole system can run continuously .
OSPF GR Can guarantee the operation of OSPF The router of the protocol is switching between the master and the standby OSPF When the protocol restarts , The forwarding service is in normal operation .

The background

A router OSPF After the protocol restarts , Will send Hello Message to find neighbors , And the neighbor router has been connected with The router establishes a neighbor relationship , So we received the Hello The router is then removed from the neighbor list , Disconnect from The neighbor relationship of the router , And notify other routers . When the router is reestablished with a neighbor router OSPF After the neighborhood , It will resynchronize all routing information data , And the peripheral router also needs to calculate the route again , This will cause network routing oscillation and forwarding interruption , For a large network , Especially the carrier network , These route oscillations and forwarding interruptions are intolerable .
How to restart the protocol without causing network oscillation and forwarding interruption ? Because the control and forwarding of distributed devices are separate , master control The board is responsible for the control and management of the whole equipment , Including protocol operation and routing calculation , The interface board is responsible for data forwarding . When this happens When the active / standby switch or protocol is restarted , Data forwarding can still be done without interruption . meanwhile , If the peripheral devices can keep the neighbor relationship unchanged and keep the routing stable during the restart , And it can help to set up after the device restarts To synchronize routing information , In the shortest possible time to make the device's routing information back to the state before restart , Then you can Keep the network topology stable , Does not cause network route oscillation .
To achieve this goal ,OSPF The routing protocol has been extended , namely OSPF GR. adopt OSPF GR, You can avoid the Internet Route oscillations and forwarding interruptions .

Technical advantages

  • Ensure that the forwarding service will not be interrupted in the process of protocol restart or active / standby handover
  • Reduce the impact of route oscillation on the whole network when the protocol is restarted or the master-slave handoff occurs
  • Reduce single point of failure , Improve the reliability of the entire network

    OSPF GR Technical details


The concept is introduced

OSPF GR Basic terminology :

  • GR Restarter: A protocol restart event occurred with GR The ability of the device .
  • GR Helper: and GR Restarter Have a neighbor relationship , To assist in the completion of GR Process equipment .
  • GR Session:OSPF When a neighbor is set up, it's about GR Negotiation of capabilities , Generally put GR The capacity negotiation process is called GR Session. The contents of the negotiation include whether both parties have GR Ability, etc . once GR Capacity negotiation passed , When the protocol restarts You can enter GR technological process .
    explain : Distributed devices can act as GR Restarter and GR helper; And centralized devices can only act as GR Helper, assist GR Restarter complete GR technological process .
    at present H3C There are two ways to do this OSPF GR technology :
  • One is based on IETF standard ,Restarter Through to the Helper Send a type called Grace LSA(Link state advertisement, Link status information announcement ) Of 9 class Opaque LSA To control GR Interaction process of .
  • Another kind of right and wrong IETF standard ,Restarter And Helper They are carried by sending each other LLS(Link local signaling, Local link signaling ) And OOB(Out-of-band LSDB Resynchronization, Out of band link like State information base resynchronization ) Expanding information OSPF Message to complete GR Interaction process of .
    explain :GR Restarter You can only configure IETF Standard and non IETF One of the capabilities of standards , The two ways are mutually exclusive .

    IETF standard OSPF GR Implementation mechanism

    Yes OSPF The protocol is extended as follows : Add a kind of 9 class Opaque LSA――Grace LSA, For use in GR Restarter Restart time , Inform the neighbors to enter GR Helper technological process .
    Grace LSA
    Grace LSA The format is as shown in the figure 1 Shown .
    chart 1 Grace LSA Format
    OSPF GR(Graceful Restart, Smooth restart ) technology
    among , Several major TLV The meaning is as follows :

  • Grace Period TLV:Type The value is 1, The length is 4 byte , Indicates that a neighbor device enters GR Helper Processing flow The longest retention time of . If it goes beyond that time GR Restarter Not finished yet GR Processing flow , Then the neighbors don't Reappointment GR Helper role . The TLV yes Grace LSA Must carry .
  • Graceful Restart Reason TLV:Type The value is 2, The length is 1 byte , Tell the neighbors that the device GR Restarter The reason for the restart of .Value The value is 0 The reason is unknown , The value is 1 Software restart , The value is 2 It means that the software is new load ( upgrade ), The value is 3 Express GR Restarter Perform active / standby switching .Grace LSA You must carry the TLV.
  • IP Interface Address TLV:Type The value is 3, The length is 4 byte , Used to tell you to send Grace LSA The interface of Of IP Address , You need to use it on the Internet IP Address to uniquely identify a restart device .

    IETF standard OSPF GR Operation process

    Pictured 2 Shown , hypothesis Router A and Router B It turns out that there is a stable OSPF Neighborhood , also Router A Enabled GR Ability , here Router A restart , The following process will be followed for routing information interaction :
    1.Router A After the restart to Router B send out Grace LSA.
    2.Router B received Router A Emitted Grace LSA after , Will keep up with Router A The neighborhood is the same .
    3.Router A And Router B Conduct Hello Message and DD(Database Description, Link state information base description ) Message interaction and LSDB Sync . because GR Cannot be generated in the process LSA, So in LSDB During synchronization , If Router A from Router B Receive your own creation LSA, Store it directly and put it on Stale sign .
    4. complete LSDB After the synchronization of ,Router A send out Grace LSA(Grace Period TLV Of Type The value is 0) through know Router B end GR technological process .Router A Into normal OSPF technological process , then Router A To regenerate the LSA, And delete those that have been set Stale Marked and not regenerated LSA.
    5.Router A After recovering all the routing information, the routing calculation is repeated , Refresh FIB surface .
    chart 2 IETF standard OSPF GR Operation diagram
    OSPF GR(Graceful Restart, Smooth restart ) technology
    Not IETF standard OSPF GR Implementation mechanism
    And IETF The standard OSPF GR comparison , Not IETF standard GR It is mainly supported by the following two capability extensions OSPF GR:

  • Link-Local Signaling:OSPF Local link notification extension , Used to identify the current router and other routers Communication of some optional information .
  • Out-of-band LSDB Resynchronization: Out of band LSDB To resynchronize , Complete without adjacency change LSDB To resynchronize .
  • LLS Ability to expand
  • stay OSPF Of Hello Message and DD At the end of the message LLS Data. At the same time Hello Message and DD The message Option Field extension , To identify whether or not to carry LLS. Extended Option The fields are shown in the figure 3 Shown , If L Location 1 It means that you have carried LLS Data.
    chart 3 Option Field
    OSPF GR(Graceful Restart, Smooth restart ) technology
    The expanded message format is shown in the figure 4 Shown .
    chart 4 LLS Extended OSPF Message format chart
    OSPF GR(Graceful Restart, Smooth restart ) technology
    LLS Data The specific format is shown in the figure 5 Shown .
    chart 5 LLS Data Field
    OSPF GR(Graceful Restart, Smooth restart ) technology
    LLS Data Medium TLV Can be used for different OSPF Expand . For example, to support GR, The type used is 1 Of TLV, namely Extended Option TLV(EO TLV). Let's talk about EO TLV Two important fields in :
    LR Field : To achieve OOB Negotiation of capabilities ,LR stay EO TLV The position in the picture is shown in the figure 6 Shown . If the current router Have OOB Ability , It's sending Hello and DD The message will be LR(LSDB Resynchronization) Set it ; Otherwise it's not right LR Set it .
    chart 6 EO TLV LR Bit diagram
    OSPF GR(Graceful Restart, Smooth restart ) technology
    RS Field : Used to inform neighbors that the current router is entering GR technological process ,RS stay EO TLV The position in the picture is shown in the figure 7 Shown . When When the router needs to leave the network for a short time , It can be done by putting Hello In the message RS(Restart Signal) Set to the periphery Neighbors inform themselves that they need to enter GR technological process , In this way, the neighboring neighbors will keep the neighbor relationship with this router unchanged ; Otherwise not Yes RS Set it .
    chart 7 EO TLV RS Bit diagram
    OSPF GR(Graceful Restart, Smooth restart ) technology
    OOB Ability to expand
    When the router passes LLS complete OOB Capacity negotiation , Confirm that both parties have OOB After ability , In the neighborhood relationship and When the network topology is stable LSDB Sync , Enter OOB technological process . You need to send the DD In the message Option In the field R Set it ,R stay Option The position in the field is shown in the figure 8 Shown .
    chart 8 DD message
    OSPF GR(Graceful Restart, Smooth restart ) technology
    Not IETF standard OSPF GR Operation process
    Pictured 9 Shown , hypothesis Router A and Router B It turns out that there is a stable OSPF Neighborhood , also Router A Enabled GR Ability , here Router A restart , The following process will be followed for routing information interaction :
    1.Router A Restart backward Router B send out LR and RS It's all set Hello message , towards Router B Tell yourself it's just If you disconnect it for a while, it will return to normal soon , And I have OOB Ability ;
    Router B received Hello After the message , Also will Router A Reply to one LR It's still set, but RS Bits have been cleared Hello message , towards Router A Tell yourself that you already know it's about to leave for a short time , And I have OOB Ability ;
    2.Router A towards Router B send out R In place DD message , towards Router B launch LSDB Synchronization request , stay LSDB Synchronization period ,Router B Will not Router A Remove from your neighbor list , In the self generated Router LSA (Network LSA) in , And Router A The neighborhood is still Full. because GR Cannot be generated in the process LSA, So in LSDB During synchronization , If Router A from Router B Receive your own creation LSA, Store it directly Juxtapose Stale sign .
    3. complete LSDB After the synchronization of ,Router A end GR technological process , Into normal OSPF technological process , then Router A again Generate LSA, And delete those that have been set Stale Marked and not regenerated LSA.Router B In the and Router A The neighborhood is back to Full Exit after status GR technological process , Into normal OSPF technological process .
    4.Router A After recovering all the routing information, the routing calculation is repeated , Refresh FIB surface .
    chart 9 Not IETR standard GR Synchronization process
    OSPF GR(Graceful Restart, Smooth restart ) technology

    Typical networking applications


OSPF GR Typical networking applications
Networking diagram
chart 10 OSPF GR Configuration network diagram
OSPF GR(Graceful Restart, Smooth restart ) technology
Networking requirements

  • Router A、Router B、Router C、Router D、Router E、Router F、Router G、Router H、 Router I、Router J、Router K、Router L function OSPF agreement .
  • Router A、Router B Connected to the backbone , It belongs to the backbone node .
  • Router G、Router H、Router I、Router J、Router K、Router L It's a branch node , Through the core node Router C、Router D、Router E Connected to the backbone node , Connect to backbone network through backbone node .
  • Use GR Ensure that the backbone nodes and core nodes in the network will not interrupt the forwarding service when the protocol restarts , Avoid the appearance of No Necessary route oscillations .
  • The backbone node and the core node act as GR Restarter( At the same time, default is also used as GR Helper), The branch node acts as GR Helper. In this way, when the backbone node switches or restarts OSPF Process time , The core node can be used as GR Helper To help them with LSDB Resynchronization , And keep forwarding uninterrupted ; When the core node switches or restarts OSPF Into the Travel time , Both backbone node and branch node can be used as GR Helper To help them with LSDB Resynchronization , And keep forwarding uninterrupted .

Technology
Technique
yes
use
Come on
learn
Of
,
No
yes
use
Come on
closed
hidden
Of