Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
High Availability User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Graceful Restart

date_range 20-Dec-24

Follow these steps to configure graceful restart on your device.

Enabling Graceful Restart

Graceful restart is disabled by default. You must configure graceful restart at the [edit routing-options] or [edit routing-instances instance-name routing-options] hierarchy level to enable the feature globally.

For example:

content_copy zoom_out_map
routing-options {
    graceful-restart;
}

You can, optionally, modify the global settings at the individual protocol level or, as of Junos OS 15.1, at the individual routing instance level.

Note:

If you configure graceful restart after a BGP or LDP session has been established, the BGP or LDP session restarts and the peers negotiate graceful restart capabilities.

To disable graceful restart, include the disable statement. You can do this globally for all protocols by including the disable statement at the [edit routing-options] hierarchy level, or you can disable graceful restart for a single protocol by including the disable statement at the [edit protocols protocol graceful-restart] hierarchy level. To configure a time period for complete restart, include the restart-duration statement. You can specify a number between 120 and 900.

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

When you include the graceful-restart statement at the [edit routing-options] hierarchy level, graceful restart is also enabled for aggregate and static routes.

Configuring Graceful Restart

To enable graceful restart, include the graceful-restart statement at the [edit routing-instance instance-name routing-options] or [edit routing-options] hierarchy level. This enables graceful restart globally for all routing protocols. You can, optionally, modify or supplement the global settings at the individual protocol level.

Note:

When set protocols bgp group group-name allow network is configured to accept dynamic BGP sessions, unconfigured-peer-graceful-restart statement should be configured to avoid traffic drop during graceful restart or graceful Routing Engine switchover.

For example:

content_copy zoom_out_map
protocols {
    bgp {
        group ext {
            graceful-restart {
                restart-time 400;
            }
        }
    }
}
routing-options {
    graceful-restart;
}

Figure 1 shows a standard MPLS VPN network. Routers CE1 and CE2 are customer edge routers, PE1 and PE2 are provider edge routers, and P0 is a provider core router. Several Layer 3 VPNs are configured across this network, as well as one Layer 2 VPN. Interfaces are shown in the diagram and are not included in the configuration example that follows.

Figure 1: Layer 3 VPN Graceful Restart TopologyLayer 3 VPN Graceful Restart Topology

Router CE1

On Router CE1, configure the following protocols on the logical interfaces of t3-3/1/0: OSPF on unit 101, RIP on unit 102, BGP on unit 103, and IS-IS on unit 512. Also configure graceful restart, BGP, IS-IS, OSPF, and RIP on the main instance to be able to connect to the routing instances on Router PE1.

content_copy zoom_out_map
[edit]
interfaces {
    t3-3/1/0 {
        encapsulation frame-relay;
        unit 100 {
            dlci 100;
            family inet {
                address 10.96.100.2/30;
            }
        }
        unit 101 {
            dlci 101;
            family inet {
                address 10.96.101.2/30;
            }
        }
        unit 102 {
            dlci 102;
            family inet {
                address 10.96.102.2/30;
            }
        }
        unit 103 {
            dlci 103;
            family inet {
                address 10.96.103.2/30;
            }
        }
        unit 512 {
            dlci 512;
            family inet {
                address 10.96.252.1/30;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.245.14.172/32;
                primary;
            }
            address 10.96.110.1/32;
            address 10.96.111.1/32;
            address 10.96.112.1/32;
            address 10.96.113.1/32;
            address 10.96.116.1/32;
        }
        family iso {
            address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4172.00;
        }
    }
}
routing-options {
    graceful-restart;
    autonomous-system 65100;
}
protocols {
    bgp {
        group CE-PE-INET {
            type external;
            export BGP_INET_LB_DIRECT;
            neighbor 10.96.103.1 {
                local-address 10.96.103.2;
                family inet {
                    unicast;
                }
                peer-as 65103;
            }
        }
    }
    isis {
        export ISIS_L2VPN_LB_DIRECT;
        interface t3-3/1/0.512;
    }
    ospf {
        export OSPF_LB_DIRECT;
        area 0.0.0.0 {
            interface t3-3/1/0.101;
        }
    }
    rip {
        group RIP {
            export RIP_LB_DIRECT;
            neighbor t3-3/1/0.102;
        }
    }
}
policy-options {
    policy-statement OSPF_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.101.0/30 exact;
                route-filter 10.96.111.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement RIP_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.102.0/30 exact;
                route-filter 10.96.112.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement BGP_INET_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.103.0/30 exact;
                route-filter 10.96.113.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement ISIS_L2VPN_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.116.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
}

Router PE1

On Router PE1, configure graceful restart in the master instance, along with BGP, OSPF, MPLS, and LDP. Next, configure several protocol-specific instances of graceful restart. By including instances for BGP, OSPF, Layer 2 VPNs, RIP, and static routes, you can observe the wide range of options available when you implement graceful restart. Configure the following protocols in individual instances on the logical interfaces of t3-0/0/0: a static route on unit 100, OSPF on unit 101, RIP on unit 102, BGP on unit 103, and Frame Relay on unit 512 for the Layer 2 VPN instance.

content_copy zoom_out_map
[edit]
interfaces {
    t3-0/0/0 {
        dce;
        encapsulation frame-relay-ccc;
        unit 100 {
            dlci 100;
            family inet {
                address 10.96.100.1/30;
            }
            family mpls;
        }
        unit 101 {
            dlci 101;
            family inet {
                address 10.96.101.1/30;
            }
            family mpls;
        }
        unit 102 {
            dlci 102;
            family inet {
                address 10.96.102.1/30;
            }
            family mpls;
        }
        unit 103 {
            dlci 103;
            family inet {
                address 10.96.103.1/30;
            }
            family mpls;
        }
        unit 512 {
            encapsulation frame-relay-ccc;
            dlci 512;
        }
    }
    t1-0/1/0 {
        unit 0 {
            family inet {
                address 10.96.0.2/30;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.245.14.176/32;
            }
            family iso {
                address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4176.00;
            }
        }
    }
}
routing-options {
    graceful-restart;
    router-id 10.245.14.176;
    autonomous-system 69;
}
protocols {
    mpls {
        interface all;
    }
    bgp {
        group PEPE {
            type internal;
            neighbor 10.245.14.182 {
                local-address 10.245.14.176;
                family inet-vpn {
                    unicast;
                }
                family l2vpn {
                    unicast;
                }
            }
        }
    }
    ospf {
        area 0.0.0.0 {
            interface t1-0/1/0.0;
            interface fxp0.0 {
                disable;
            }
            interface lo0.0 {
                passive;
            }
        }
    }
    ldp {
        interface all;
    }
}
policy-options {
    policy-statement STATIC-import {
        from community STATIC;
        then accept;
    }
    policy-statement STATIC-export {
        then {
            community add STATIC;
            accept;
        }
    }
    policy-statement OSPF-import {
        from community OSPF;
        then accept;
    }
    policy-statement OSPF-export {
        then {
            community add OSPF;
            accept;
        }
    }
    policy-statement RIP-import {
        from community RIP;
        then accept;
    }
    policy-statement RIP-export {
        then {
            community add RIP;
            accept;
        }
    }
    policy-statement BGP-INET-import {
        from community BGP-INET;
        then accept;
    }
    policy-statement BGP-INET-export {
        then {
            community add BGP-INET;
            accept;
        }
    }
    policy-statement L2VPN-import {
        from community L2VPN;
        then accept;
    }
    policy-statement L2VPN-export {
        then {
            community add L2VPN;
            accept;
        }
    }
    community BGP-INET members target:69:103;
    community L2VPN members target:69:512;
    community OSPF members target:69:101;
    community RIP members target:69:102;
    community STATIC members target:69:100;
}
routing-instances {
    BGP-INET {
        instance-type vrf;
        interface t3-0/0/0.103;
        route-distinguisher 10.245.14.176:103;
        vrf-import BGP-INET-import;
        vrf-export BGP-INET-export;
        routing-options {
            graceful-restart;
            autonomous-system 65103;
        }
        protocols {
            bgp {
                group BGP-INET {
                    type external;
                    export BGP-INET-import;
                    neighbor 10.96.103.2 {
                        local-address 10.96.103.1;
                        family inet {
                            unicast;
                        }
                        peer-as 65100;
                    }
                }
            }
        }
    }
    L2VPN {
        instance-type l2vpn;
        interface t3-0/0/0.512;
        route-distinguisher 10.245.14.176:512;
        vrf-import L2VPN-import;
        vrf-export L2VPN-export;
        protocols {# There is no graceful-restart statement for Layer 2 VPN instances.
            l2vpn {
                encapsulation-type frame-relay;
                site CE1-ISIS {
                    site-identifier 512;
                    interface t3-0/0/0.512 {
                        remote-site-id 612;
                    }
                }
            }
        }
    }
    OSPF {
        instance-type vrf;
        interface t3-0/0/0.101;
        route-distinguisher 10.245.14.176:101;
        vrf-import OSPF-import;
        vrf-export OSPF-export;
        routing-options {
            graceful-restart;
        }
        protocols {
            ospf {
                export OSPF-import;
                area 0.0.0.0 {
                    interface all;
                }
            }
        }
    }
    RIP {
        instance-type vrf;
        interface t3-0/0/0.102;
        route-distinguisher 10.245.14.176:102;
        vrf-import RIP-import;
        vrf-export RIP-export;
        routing-options {
            graceful-restart;
        }
        protocols {
            rip {
                group RIP {
                    export RIP-import;
                    neighbor t3-0/0/0.102;
                }
            }
        }
    }
    STATIC {
        instance-type vrf;
        interface t3-0/0/0.100;
        route-distinguisher 10.245.14.176:100;
        vrf-import STATIC-import;
        vrf-export STATIC-export;
        routing-options {
            graceful-restart;
            static {
                route 10.96.110.1/32 next-hop t3-0/0/0.100;
            }
        }
    }
}

Router P0

On Router P0, configure graceful restart in the main instance, along with OSPF, MPLS, and LDP. This allows the protocols on the PE routers to reach one another.

content_copy zoom_out_map
[edit]
interfaces {
    t3-0/1/3 {
        unit 0 {
            family inet {
                address 10.96.0.5/30;
            }
            family mpls;
        }
    }
    t1-0/2/0 {
        unit 0 {
            family inet {
                address 10.96.0.1/30;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.245.14.174/32;
            }
            family iso {
                address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4174.00;
            }
        }
    }
}
routing-options {
    graceful-restart;
    router-id 10.245.14.174;
    autonomous-system 69;
}
protocols {
    mpls {
        interface all;
    }
    ospf {
        area 0.0.0.0 {
            interface t1-0/2/0.0;
            interface t3-0/1/3.0;
            interface fxp0.0 {
                disable;
            }
            interface lo0.0 {
                passive;
            }
        }
    }
    ldp {
        interface all;
    }
}

Router PE2

On Router PE2, configure BGP, OSPF, MPLS, LDP, and graceful restart in the master instance. Configure the following protocols in individual instances on the logical interfaces of t1-0/1/3: a static route on unit 200, OSPF on unit 201, RIP on unit 202, BGP on unit 203, and Frame Relay on unit 612 for the Layer 2 VPN instance. Also configure protocol-specific graceful restart in all routing instances, except the Layer 2 VPN instance.

content_copy zoom_out_map
[edit]
interfaces {
    t3-0/0/0 {
        unit 0 {
            family inet {
                address 10.96.0.6/30;
            }
            family mpls;
        }
    }
    t1-0/1/3 {
        dce;
        encapsulation frame-relay-ccc;
        unit 200 {
            dlci 200;
            family inet {
                address 10.96.200.1/30;
            }
            family mpls;
        }
        unit 201 {
            dlci 201;
            family inet {
                address 10.96.201.1/30;
            }
            family mpls;
        }
        unit 202 {
            dlci 202;
            family inet {
                address 10.96.202.1/30;
            }
            family mpls;
        }
        unit 203 {
            dlci 203;
            family inet {
                address 10.96.203.1/30;
            }
            family mpls;
        }
        unit 612 {
            encapsulation frame-relay-ccc;
            dlci 612;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.245.14.182/32;
            }
            family iso {
                address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4182.00;
            }
        }
    }
}
routing-options {
    graceful-restart;
    router-id 10.245.14.182;
    autonomous-system 69;
}
protocols {
    mpls {
        interface all;
    }
    bgp {
        group PEPE {
            type internal;
            neighbor 10.245.14.176 {
                local-address 10.245.14.182;
                family inet-vpn {
                    unicast;
                }
                family l2vpn {
                    unicast;
                }
            }
        }
    }
    ospf {
        area 0.0.0.0 {
            interface t3-0/0/0.0;
            interface fxp0.0 {
                disable;
            }
            interface lo0.0 {
                passive;
            }
        }
    }
    ldp {
        interface all;
    }
    policy-options {
        policy-statement STATIC-import {
            from community STATIC;
            then accept;
        }
        policy-statement STATIC-export {
            then {
                community add STATIC;
                accept;
            }
        }
        policy-statement OSPF-import {
            from community OSPF;
            then accept;
        }
        policy-statement OSPF-export {
            then {
                community add OSPF;
                accept;
            }
        }
        policy-statement RIP-import {
            from community RIP;
            then accept;
        }
        policy-statement RIP-export {
            then {
                community add RIP;
                accept;
            }
        }
        policy-statement BGP-INET-import {
            from community BGP-INET;
            then accept;
        }
        policy-statement BGP-INET-export {
            then {
                community add BGP-INET;
                accept;
            }
        }
        policy-statement L2VPN-import {
            from community L2VPN;
            then accept;
        }
        policy-statement L2VPN-export {
            then {
                community add L2VPN;
                accept;
            }
        }
        community BGP-INET members target:69:103;
        community L2VPN members target:69:512;
        community OSPF members target:69:101;
        community RIP members target:69:102;
        community STATIC members target:69:100;
    }
    routing-instances {
        BGP-INET {
            instance-type vrf;
            interface t1-0/1/3.203;
            route-distinguisher 10.245.14.182:203;
            vrf-import BGP-INET-import;
            vrf-export BGP-INET-export;
            routing-options {
                graceful-restart;
                autonomous-system 65203;
            }
            protocols {
                bgp {
                    group BGP-INET {
                        type external;
                        export BGP-INET-import;
                        neighbor 10.96.203.2 {
                            local-address 10.96.203.1;
                            family inet {
                                unicast;
                            }
                            peer-as 65200;
                        }
                    }
                }
            }
        }
        L2VPN {
            instance-type l2vpn;
            interface t1-0/1/3.612;
            route-distinguisher 10.245.14.182:612;
            vrf-import L2VPN-import;
            vrf-export L2VPN-export;
            protocols {# There is no graceful-restart statement for Layer 2 VPN instances.
                l2vpn {
                    encapsulation-type frame-relay;
                    site CE2-ISIS {
                        site-identifier 612;
                        interface t1-0/1/3.612 {
                            remote-site-id 512;
                        }
                    }
                }
            }
        }
        OSPF {
            instance-type vrf;
            interface t1-0/1/3.201;
            route-distinguisher 10.245.14.182:201;
            vrf-import OSPF-import;
            vrf-export OSPF-export;
            routing-options {
                graceful-restart;
            }
            protocols {
                ospf {
                    export OSPF-import;
                    area 0.0.0.0 {
                        interface all;
                    }
                }
            }
        }
        RIP {
            instance-type vrf;
            interface t1-0/1/3.202;
            route-distinguisher 10.245.14.182:202;
            vrf-import RIP-import;
            vrf-export RIP-export;
            routing-options {
                graceful-restart;
            }
            protocols {
                rip {
                    group RIP {
                        export RIP-import;
                        neighbor t1-0/1/3.202;
                    }
                }
            }
        }
        STATIC {
            instance-type vrf;
            interface t1-0/1/3.200;
            route-distinguisher 10.245.14.182:200;
            vrf-import STATIC-import;
            vrf-export STATIC-export;
            routing-options {
                graceful-restart;
                static {
                    route 10.96.210.1/32 next-hop t1-0/1/3.200;
                }
            }
        }
    }
}

Router CE2

On Router CE2, complete the Layer 2 and Layer 3 VPN configuration by mirroring the protocols already set on Routers PE2 and CE1. Specifically, configure the following on the logical interfaces of t1-0/0/3: OSPF on unit 201, RIP on unit 202, BGP on unit 203, and IS-IS on unit 612. Finally, configure graceful restart, BGP, IS-IS, OSPF, and RIP on the main instance to be able to connect to the routing instances on Router PE2.

content_copy zoom_out_map
[edit]
interfaces {
    t1-0/0/3 {
        encapsulation frame-relay;
        unit 200 {
            dlci 200;
            family inet {
                address 10.96.200.2/30;
            }
        }
        unit 201 {
            dlci 201;
            family inet {
                address 10.96.201.2/30;
            }
        }
        unit 202 {
            dlci 202;
            family inet {
                address 10.96.202.2/30;
            }
        }
        unit 203 {
            dlci 203;
            family inet {
                address 10.96.203.2/30;
            }
        }
        unit 512 {
            dlci 512;
            family inet {
                address 10.96.252.2/30;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.245.14.180/32 {
                    primary;
                }
                address 10.96.210.1/32;
                address 10.96.111.1/32;
                address 10.96.212.1/32;
                address 10.96.213.1/32;
                address 10.96.216.1/32;
            }
            family iso {
                address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4180.00;
            }
        }
    }
}
routing-options {
    graceful-restart;
    autonomous-system 65200;
}
protocols {
    bgp {
        group CE-PE-INET {
            type external;
            export BGP_INET_LB_DIRECT;
            neighbor 10.96.203.1 {
                local-address 10.96.203.2;
                family inet {
                    unicast;
                }
                peer-as 65203;
            }
        }
    }
    isis {
        export ISIS_L2VPN_LB_DIRECT;
        interface t1-0/0/3.612;
    }
    ospf {
        export OSPF_LB_DIRECT;
        area 0.0.0.0 {
            interface t1-0/0/3.201;
        }
    }
    rip {
        group RIP {
            export RIP_LB_DIRECT;
            neighbor t1-0/0/3.202;
        }
    }
}
policy-options {
    policy-statement OSPF_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.201.0/30 exact;
                route-filter 10.96.211.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement RIP_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.202.0/30 exact;
                route-filter 10.96.212.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement BGP_INET_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.203.0/30 exact;
                route-filter 10.96.213.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
    policy-statement ISIS_L2VPN_LB_DIRECT {
        term direct {
            from {
                protocol direct;
                route-filter 10.96.216.1/32 exact;
            }
            then accept;
        }
        term final {
            then reject;
        }
    }
}

Router PE1 Status Before a Restart

The following example displays neighbor relationships on Router PE1 before a restart happens:

content_copy zoom_out_map
user@PE1> show bgp neighbor
Peer: 10.96.103.2+3785 AS 65100 Local: 10.96.103.1+179 AS 65103
  Type: External    State: Established    Flags: <>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ BGP-INET-import ] 
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily PeerAS Refresh>
  Address families configured: inet-unicast
  Local Address: 10.96.103.1 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 10.96.110.1      Local ID: 10.96.103.1      Active Holdtime: 90
  Keepalive Interval: 30
  Local Interface: t3-0/0/0.103
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-unicast
  NLRI peer can save forwarding state: inet-unicast
  NLRI that peer saved forwarding for: inet-unicast
  NLRI that restart is negotiated for: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Table BGP-INET.inet.0 Bit: 30001
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Last traffic (seconds): Received 8    Sent 3    Checked 3
  Input messages:  Total 15     Updates 0       Refreshes 0     Octets 321
  Output messages: Total 18     Updates 2       Refreshes 0     Octets 450
  Output Queue[2]: 0

Peer: 10.245.14.182+4701 AS 69    Local: 10.245.14.176+179 AS 69
  Type: Internal    State: Established    Flags: <>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily 
Rib-group Refresh>
  Address families configured: inet-vpn-unicast l2vpn
  Local Address: 10.245.14.176 Holdtime: 90 Preference: 170
  Number of flaps: 1
  Peer ID: 10.245.14.182    Local ID: 10.245.14.176    Active Holdtime: 90
  Keepalive Interval: 30
  NLRI for restart configured on peer: inet-vpn-unicast l2vpn
  NLRI advertised by peer: inet-vpn-unicast l2vpn
  NLRI for this session: inet-vpn-unicast l2vpn
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-vpn-unicast l2vpn
  NLRI peer can save forwarding state: inet-vpn-unicast l2vpn
  NLRI that peer saved forwarding for: inet-vpn-unicast l2vpn
  NLRI that restart is negotiated for: inet-vpn-unicast l2vpn
  NLRI of all end-of-rib markers sent: inet-vpn-unicast l2vpn
  Table bgp.l3vpn.0 Bit: 10000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Table bgp.l2vpn.0 Bit: 20000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table BGP-INET.inet.0 Bit: 30000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Table OSPF.inet.0 Bit: 60000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Table RIP.inet.0 Bit: 70000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Table STATIC.inet.0 Bit: 80000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            0
    Received prefixes:          0
    Suppressed due to damping:  0
  Table L2VPN.l2vpn.0 Bit: 90000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Last traffic (seconds): Received 28   Sent 28   Checked 28  
  Input messages:  Total 2      Updates 0       Refreshes 0     Octets 86
  Output messages: Total 13     Updates 10      Refreshes 0     Octets 1073
  Output Queue[0]: 0
  Output Queue[1]: 0
  Output Queue[2]: 0
  Output Queue[3]: 0
  Output Queue[4]: 0
  Output Queue[5]: 0
  Output Queue[6]: 0
  Output Queue[7]: 0
  Output Queue[8]: 0

user@PE1> show route instance detail
master:
  Router ID: 10.245.14.176
  Type: forwarding        State: Active
  Restart State: Complete Path selection timeout: 300
  Tables:
    inet.0                 : 17 routes (15 active, 0 holddown, 1 hidden)
    Restart Complete
    inet.3                 : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Complete
    iso.0                  : 1 routes (1 active, 0 holddown, 0 hidden)
    Restart Complete
    mpls.0                 : 19 routes (19 active, 0 holddown, 0 hidden)
    Restart Complete
    bgp.l3vpn.0            : 10 routes (10 active, 0 holddown, 0 hidden)
    Restart Complete
    inet6.0                : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Complete
    bgp.l2vpn.0            : 1 routes (1 active, 0 holddown, 0 hidden)
    Restart Complete
BGP-INET:
  Router ID: 10.96.103.1
  Type: vrf               State: Active
  Restart State: Complete Path selection timeout: 300
  Interfaces:
    t3-0/0/0.103
  Route-distinguisher: 10.245.14.176:103
  Vrf-import: [ BGP-INET-import ]
  Vrf-export: [ BGP-INET-export ]
  Tables:
    BGP-INET.inet.0        : 4 routes (4 active, 0 holddown, 0 hidden)
    Restart Complete
L2VPN:
  Router ID: 0.0.0.0
  Type: l2vpn             State: Active
  Restart State: Complete Path selection timeout: 300
  Interfaces:
    t3-0/0/0.512
  Route-distinguisher: 10.245.14.176:512
  Vrf-import: [ L2VPN-import ]
  Vrf-export: [ L2VPN-export ]
  Tables:
    L2VPN.l2vpn.0          : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Complete
OSPF:
  Router ID: 10.96.101.1
  Type: vrf               State: Active
  Restart State: Complete Path selection timeout: 300
  Interfaces:
    t3-0/0/0.101
  Route-distinguisher: 10.245.14.176:101
  Vrf-import: [ OSPF-import ]
  Vrf-export: [ OSPF-export ]
  Tables:
    OSPF.inet.0            : 8 routes (7 active, 0 holddown, 0 hidden)
    Restart Complete
RIP:
  Router ID: 10.96.102.1
  Type: vrf               State: Active
  Restart State: Complete Path selection timeout: 300
  Interfaces:
    t3-0/0/0.102
  Route-distinguisher: 10.245.14.176:102
  Vrf-import: [ RIP-import ]
  Vrf-export: [ RIP-export ]
  Tables:
    RIP.inet.0             : 6 routes (6 active, 0 holddown, 0 hidden)
    Restart Complete
STATIC:
  Router ID: 10.96.100.1
  Type: vrf               State: Active
  Restart State: Complete Path selection timeout: 300
  Interfaces:
    t3-0/0/0.100
  Route-distinguisher: 10.245.14.176:100
  Vrf-import: [ STATIC-import ]
  Vrf-export: [ STATIC-export ]
  Tables:
    STATIC.inet.0          : 4 routes (4 active, 0 holddown, 0 hidden)
    Restart Complete
__juniper_private1__:
  Router ID: 0.0.0.0
  Type: forwarding        State: Active

user@PE1> show route protocol l2vpn
inet.0: 16 destinations, 17 routes (15 active, 0 holddown, 1 hidden)
Restart Complete
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Complete
BGP-INET.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
Restart Complete
OSPF.inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
Restart Complete
RIP.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
Restart Complete
STATIC.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
Restart Complete
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Restart Complete
mpls.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
Restart Complete
+ = Active Route, - = Last Active, * = Both
800003             *[L2VPN/7] 00:06:00
                    > via t3-0/0/0.512, Pop       Offset: 4
t3-0/0/0.512       *[L2VPN/7] 00:06:00
                    > via t1-0/1/0.0, Push 800003, Push 100004(top) Offset: -4
bgp.l3vpn.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
Restart Complete
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Complete
L2VPN.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Complete
+ = Active Route, - = Last Active, * = Both
10.245.14.176:512:512:611/96                
                   *[L2VPN/7] 00:06:01
                      Discard
                    
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Restart Complete

Router PE1 Status During a Restart

Before you can verify that graceful restart is working, you must simulate a router restart. To cause the routing process to refresh and simulate a restart, use the restart routing operational mode command:

content_copy zoom_out_map
user@PE1> restart routing
Routing protocol daemon started, pid 3558

The following sample output is captured during the router restart:

content_copy zoom_out_map
user@PE1> show bgp neighbor
Peer: 10.96.103.2     AS 65100 Local: 10.96.103.1     AS 65103
  Type: External    State: Active         Flags: <ImportEval>
  Last State: Idle          Last Event: Start
  Last Error: None
  Export: [ BGP-INET-import ] 
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily PeerAS Refresh>
  Address families configured: inet-unicast
  Local Address: 10.96.103.1 Holdtime: 90 Preference: 170
  Number of flaps: 0
Peer: 10.245.14.182+179 AS 69    Local: 10.245.14.176+2131 AS 69
  Type: Internal    State: Established    Flags: <ImportEval>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily Rib-group Refresh>
  Address families configured: inet-vpn-unicast l2vpn
  Local Address: 10.245.14.176 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 10.245.14.182    Local ID: 10.245.14.176    Active Holdtime: 90
  Keepalive Interval: 30
  NLRI for restart configured on peer: inet-vpn-unicast l2vpn
  NLRI advertised by peer: inet-vpn-unicast l2vpn
  NLRI for this session: inet-vpn-unicast l2vpn
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-vpn-unicast l2vpn
  NLRI peer can save forwarding state: inet-vpn-unicast l2vpn
  NLRI that peer saved forwarding for: inet-vpn-unicast l2vpn
  NLRI that restart is negotiated for: inet-vpn-unicast l2vpn
  NLRI of received end-of-rib markers: inet-vpn-unicast l2vpn
  Table bgp.l3vpn.0 Bit: 10000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            10
    Received prefixes:          10
    Suppressed due to damping:  0
  Table bgp.l2vpn.0 Bit: 20000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table BGP-INET.inet.0 Bit: 30000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
Table OSPF.inet.0 Bit: 60000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table RIP.inet.0 Bit: 70000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table STATIC.inet.0 Bit: 80000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table L2VPN.l2vpn.0 Bit: 90000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Last traffic (seconds): Received 0    Sent 0    Checked 0
  Input messages:  Total 14     Updates 13      Refreshes 0     Octets 1053
  Output messages: Total 3      Updates 0       Refreshes 0     Octets 105
  Output Queue[0]: 0
  Output Queue[1]: 0
  Output Queue[2]: 0
  Output Queue[3]: 0
  Output Queue[4]: 0
  Output Queue[5]: 0
  Output Queue[6]: 0
  Output Queue[7]: 0
  Output Queue[8]: 0

user@PE1> show route instance detail
master:
  Router ID: 10.245.14.176
  Type: forwarding        State: Active
  Restart State: Pending  Path selection timeout: 300
  Tables:
    inet.0                 : 17 routes (15 active, 1 holddown, 1 hidden)
    Restart Pending: OSPF LDP
    inet.3                 : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Pending: OSPF LDP
    iso.0                  : 1 routes (1 active, 0 holddown, 0 hidden)
    Restart Complete
    mpls.0                 : 23 routes (23 active, 0 holddown, 0 hidden)
    Restart Pending: LDP VPN
    bgp.l3vpn.0            : 10 routes (10 active, 0 holddown, 0 hidden)
    Restart Pending: BGP VPN
    inet6.0                : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Complete
    bgp.l2vpn.0            : 1 routes (1 active, 0 holddown, 0 hidden)
    Restart Pending: BGP VPN
BGP-INET:
  Router ID: 10.96.103.1
  Type: vrf               State: Active
  Restart State: Pending  Path selection timeout: 300
  Interfaces:
    t3-0/0/0.103
  Route-distinguisher: 10.245.14.176:103
  Vrf-import: [ BGP-INET-import ]
  Vrf-export: [ BGP-INET-export ]
  Tables:
    BGP-INET.inet.0        : 6 routes (5 active, 0 holddown, 0 hidden)
    Restart Pending: VPN
L2VPN:
  Router ID: 0.0.0.0
  Type: l2vpn             State: Active
  Restart State: Pending  Path selection timeout: 300
  Interfaces:
    t3-0/0/0.512
  Route-distinguisher: 10.245.14.176:512
  Vrf-import: [ L2VPN-import ]
  Vrf-export: [ L2VPN-export ]
  Tables:
    L2VPN.l2vpn.0          : 2 routes (2 active, 0 holddown, 0 hidden)
    Restart Pending: VPN L2VPN
OSPF:
  Router ID: 10.96.101.1
  Type: vrf               State: Active
  Restart State: Pending  Path selection timeout: 300
  Interfaces:
    t3-0/0/0.101
  Route-distinguisher: 10.245.14.176:101
  Vrf-import: [ OSPF-import ]
  Vrf-export: [ OSPF-export ]
  Tables:           
    OSPF.inet.0            : 8 routes (7 active, 1 holddown, 0 hidden)
    Restart Pending: OSPF VPN
RIP:
  Router ID: 10.96.102.1
  Type: vrf               State: Active
  Restart State: Pending  Path selection timeout: 300
  Interfaces:
    t3-0/0/0.102
  Route-distinguisher: 10.245.14.176:102
  Vrf-import: [ RIP-import ]
  Vrf-export: [ RIP-export ]
  Tables:
    RIP.inet.0             : 8 routes (6 active, 2 holddown, 0 hidden)
    Restart Pending: RIP VPN
STATIC:
  Router ID: 10.96.100.1
  Type: vrf               State: Active
  Restart State: Pending  Path selection timeout: 300
  Interfaces:
    t3-0/0/0.100
  Route-distinguisher: 10.245.14.176:100
  Vrf-import: [ STATIC-import ]
  Vrf-export: [ STATIC-export ]
  Tables:
    STATIC.inet.0          : 4 routes (4 active, 0 holddown, 0 hidden)
    Restart Pending: VPN
__juniper_private1__:
  Router ID: 0.0.0.0
  Type: forwarding        State: Active 
content_copy zoom_out_map
user@PE1> show route instance summary
Instance           Type           Primary rib            Active/holddown/hidden
master             forwarding     
                                  inet.0                 15/0/1
                                  iso.0                  1/0/0
                                  mpls.0                 35/0/0
                                  l3vpn.0                0/0/0
                                  inet6.0                2/0/0
                                  l2vpn.0                0/0/0
                                  l2circuit.0            0/0/0
BGP-INET           vrf            
                                  BGP-INET.inet.0        5/0/0
                                  BGP-INET.iso.0         0/0/0
                                  BGP-INET.inet6.0       0/0/0
L2VPN              l2vpn          
                                  L2VPN.inet.0           0/0/0
                                  L2VPN.iso.0            0/0/0
                                  L2VPN.inet6.0          0/0/0
                                  L2VPN.l2vpn.0          2/0/0
OSPF               vrf            
                                  OSPF.inet.0            7/0/0
                                  OSPF.iso.0             0/0/0
                                  OSPF.inet6.0           0/0/0
RIP                vrf            
                                  RIP.inet.0             6/0/0
                                  RIP.iso.0              0/0/0
                                  RIP.inet6.0            0/0/0
STATIC             vrf            
                                  STATIC.inet.0          4/0/0
                                  STATIC.iso.0           0/0/0
                                  STATIC.inet6.0         0/0/0
__juniper_private1__ forwarding
                                  __juniper_priva.inet.0 0/0/0
                                  __juniper_privat.iso.0 0/0/0
                                  __juniper_priv.inet6.0 0/0/0

user@PE1> show route protocol l2vpn

inet.0: 16 destinations, 17 routes (15 active, 1 holddown, 1 hidden)
Restart Pending: OSPF LDP

inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Pending: OSPF LDP

BGP-INET.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
Restart Pending: VPN

OSPF.inet.0: 7 destinations, 8 routes (7 active, 1 holddown, 0 hidden)
Restart Pending: OSPF VPN

RIP.inet.0: 6 destinations, 8 routes (6 active, 2 holddown, 0 hidden)
Restart Pending: RIP VPN

STATIC.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
Restart Pending: VPN

iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Restart Complete

mpls.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden)
Restart Pending: LDP VPN
+ = Active Route, - = Last Active, * = Both

800001             *[L2VPN/7] 00:00:13
                    > via t3-0/0/0.512, Pop       Offset: 4
t3-0/0/0.512       *[L2VPN/7] 00:00:13
                    > via t1-0/1/0.0, Push 800003, Push 100004(top) Offset: -4

bgp.l3vpn.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
Restart Pending: BGP VPN

inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Complete

L2VPN.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Restart Pending: VPN L2VPN
+ = Active Route, - = Last Active, * = Both

10.245.14.176:512:512:611/96
                   *[L2VPN/7] 00:00:13
                      Discard
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Restart Pending: BGP VPN

Configuring VPN Graceful Restart

Graceful restart allows a router whose VPN control plane is undergoing a restart to continue to forward traffic while recovering its state from neighboring routers. Without graceful restart, a control plane restart disrupts any VPN services provided by the router. Graceful restart is supported on Layer 2 VPNs, Layer 3 VPNs, virtual-router routing instances, and VPLS.

To implement graceful restart for a Layer 2 VPN or Layer 3 VPN, perform the configuration tasks described in the following sections:

Configuring Graceful Restart Globally

To enable graceful restart, include the graceful-restart statement at the [edit routing-options] hierarchy level. To configure a global duration for the graceful restart period, include the restart-duration statement at the [edit routing-options graceful-restart] hierarchy level.

content_copy zoom_out_map
[edit]
routing-options {
    graceful-restart {
        disable;
        restart-duration seconds;
    }
}

To disable graceful restart globally, include the disable statement at the [edit routing-options graceful-restart] hierarchy level.

Configuring Graceful Restart for the Routing Instance

For Layer 3 VPNs only, you must also configure graceful restart for all routing and MPLS-related protocols within a routing instance by including the graceful-restart statement at the [edit routing-instances instance-name routing-options] hierarchy level. Because you can configure multi-instance BGP and multi-instance LDP, graceful restart for a carrier-of-carriers scenario is supported. To configure the duration of the graceful restart period for the routing instance, include the restart-duration statement at the [edit routing-instances instance-name routing-options].

content_copy zoom_out_map
[edit]
routing-instances {
    instance-name {
        routing-options {
            graceful-restart {
                disable;
                restart-duration seconds;
            }
        }
    }
}

You can disable graceful restart for individual protocols with the disable statement at the [edit routing-instances instance-name protocols protocol-name graceful-restart] hierarchy level.

Configuring Logical System Graceful Restart

Graceful restart for a logical system functions much as graceful restart does in the main router. The only difference is the location of the graceful-restart statement.

The following topics describe what to configure to implement graceful restart in a logical system:

Enabling Graceful Restart Globally

To enable graceful restart in a logical system, include the graceful-restart statement at the [edit logical-systems logical-system-name routing-options] hierarchy level. To configure a global duration of the graceful restart period, include the restart-duration statement at the [edit logical-systems logical-system-name routing-options graceful-restart] hierarchy level.

content_copy zoom_out_map
[edit]
logical-systems {
    logical-system-name {
        routing-options {
            graceful-restart {
                disable;
                restart-duration seconds;
            }
        }
    }
}

To disable graceful restart globally, include the disable statement at the [edit logical-systems logical-system-name routing-options graceful-restart] hierarchy level.

Configuring Graceful Restart for a Routing Instance

For Layer 3 VPNs only, you must also configure graceful restart globally for a routing instance inside a logical system. To configure, include the graceful-restart statement at the [edit logical-systems logical-system-name routing-instances instance-name routing-options] hierarchy level. Because you can configure multi-instance BGP and multi-instance LDP, graceful restart for a carrier-of-carriers scenario is supported. To configure the duration of the graceful restart period for the routing instance, include the restart-duration statement at the [edit logical-systems logical-system-name routing-instances instance-name routing-options].

content_copy zoom_out_map
[edit]
logical-systems {
    logical-system-name {
        routing-instances {
            instance-name {
                routing-options {
                    graceful-restart {
                        disable;
                        restart-duration seconds;
                    }
                }
            }
        }
    }
}

To disable graceful restart for individual protocols with the disable statement at the [edit logical-systems logical-system-name routing-instances instance-name protocols protocol-name graceful-restart] hierarchy level.

Configuring Graceful Restart for QFabric Systems

When you configure graceful restart in the QFabric CLI, the QFabric system applies the configuration to the network Node group to participate in graceful restart operations with devices external to the QFabric system. Such configuration preserves routing table state and helps neighboring routing devices to resume routing operations more quickly after a system restart. This also enables the network Node group to resume routing operations rapidly if there is a restart in the QFabric system (such as a software upgrade). As a result, we recommend enabling graceful restart for routing protocols in the QFabric CLI.

Note:

The QFabric system also uses graceful restart internally within the fabric to facilitate interfabric resiliency and recovery. This internal feature is enabled by default with no configuration required.

Enabling Graceful Restart

By default, graceful restart is disabled. To enable graceful restart, include the graceful-restart statement at the [edit routing-instance instance-name routing-options] or [edit routing-options] hierarchy level.

For example:

content_copy zoom_out_map
routing-options {
    graceful-restart;
}

To configure the duration of the graceful restart period, include the restart-duration at the [edit routing-options graceful-restart] hierarchy level.

Note:

Helper mode (the ability to assist a neighboring router attempting a graceful restart) is enabled by default when you start the routing platform, even if graceful restart is not enabled. You can disable helper mode on a per-protocol basis.

content_copy zoom_out_map
[edit]
routing-options {
    graceful-restart {
        disable;
        restart-duration seconds;
    }
}

To disable graceful restart globally, include the disable statement at the [edit routing-options graceful-restart] hierarchy level.

When graceful restart is enabled for all routing protocols at the [edit routing-options graceful-restart] hierarchy level, you can disable graceful restart on a per-protocol basis.

Note:

If you configure graceful restart after a BGP or LDP session has been established, the BGP or LDP session restarts and the peers negotiate graceful restart capabilities. Also, the BGP peer routing statistics are reset to zero.

Configuring Graceful Restart Options for BGP

To configure the duration of the BGP graceful restart period, include the restart-time statement at the [edit protocols bgp graceful-restart] hierarchy level. To set the length of time the router waits to receive messages from restarting neighbors before declaring them down, include the stale-routes-time statement at the [edit protocols bgp graceful-restart] hierarchy level.

content_copy zoom_out_map
[edit]
protocols {
    bgp {
        graceful-restart {
            disable;
            restart-time seconds;
            stale-routes-time seconds;
        }
    }
}
routing-options {
    graceful-restart;
}

To disable BGP graceful restart capability for all BGP sessions, include the disable statement at the [edit protocols bgp graceful-restart] hierarchy level.

Note:

To set BGP graceful restart properties or disable them for a group, include the desired statements at the [edit protocols bgp group group-name graceful-restart] hierarchy level.

To set BGP graceful restart properties or disable them for a specific neighbor in a group, include the desired statements at the [edit protocols bgp group group-name neighbor ip-address graceful-restart] hierarchy level.

Note:

Configuring graceful restart for BGP resets the BGP peer routing statistics to zero. Also, existing BGP sessions restart, and the peers negotiate graceful restart capabilities.

Configuring Graceful Restart Options for OSPF and OSPFv3

To configure the duration of the OSPF/OSPFv3 graceful restart period, include the restart-duration statement at the [edit protocols (ospf | ospf3) graceful-restart] hierarchy level. To specify the length of time for which the router notifies helper routers that it has completed graceful restart, include the notify-duration at the [edit protocols (ospf | ospf3) graceful-restart] hierarchy level. Strict OSPF link-state advertisement (LSA) checking results in the termination of graceful restart by a helping router. To disable strict LSA checking, include the no-strict-lsa-checking statement at the [edit protocols (ospf | ospf3) graceful-restart] hierarchy level.

content_copy zoom_out_map
[edit]
protocols {
    ospf | ospfv3{
        graceful-restart {
            disable;
            helper-disable
            no-strict-lsa-checking;
            notify-duration seconds;
            restart-duration seconds;
        }
    }
}
routing-options {
    graceful-restart;
}

To disable OSPF/OSPFv3 graceful restart, include the disable statement at the [edit protocols (ospf | ospf3) graceful-restart] hierarchy level.

Starting with Release 11.3, the Junos OS supports both the standard (based on RFC 3623, Graceful OSPF Restart) and the restart signaling-based (as specified in RFC 4811, RFC 4812, and RFC 4813) helper modes for OSPF version 2 graceful restart configurations. Both the standard and restart signaling-based helper modes are enabled by default. To disable the helper mode for OSPF version 2 graceful restart configurations, include the helper-disable <both | restart-signaling | standard> statement at the [edit protocols ospf graceful-restart] hierarchy level. Note that the last committed statement always takes precedence over the previous one.

content_copy zoom_out_map
[edit protocols ospf]
    graceful-restart {
        helper-disable <both | restart-signaling | standard>
    }

To reenable the helper mode, delete the helper-disable statement from the configuration by using the delete protocols ospf graceful-restarthelper-disable <restart-signaling | standard | both> command. In this case also, the last executed command takes precedence over the previous ones.

Note:

Restart signaling-based helper mode is not supported for OSPFv3 configurations. To disable helper mode for OSPFv3 configurations, include the helper-disable statement at the [edit protocols ospfv3 graceful-restart] hierarchy level.

Tip:

You can also track graceful restart events with the traceoptions statement at the [edit protocols (ospf | ospf3)] hierarchy level. For more information, see Tracking Graceful Restart Events.

Note:

If you configure BFD and graceful restart for OSPF, graceful restart might not work as expected.

Tracking Graceful Restart Events

To track the progress of a graceful restart event, you can configure graceful restart trace options flags for IS-IS and OSPF/OSPFv3. To configure graceful restart trace options, include the graceful-restart statement at the [edit protocols protocol traceoptions flag] hierarchy level:

content_copy zoom_out_map
[edit protocols]
isis {
    traceoptions {
        flag graceful-restart;
    }
}
(ospf | ospf3) {
    traceoptions {
        flag graceful-restart;
    }
}

Example: Managing Helper Modes for OSPF Graceful Restart

Configuration

Step-by-Step Procedure

Both standard and restart signaling-based helper modes are enabled by default, irrespective of the graceful-restart configuration status on the routing device. Junos OS allows you to disable or enable the helper modes based on your requirements.

To configure the helper mode options for graceful restart:

  1. To enable graceful restart, add the graceful-restart statement at the [edit routing-options] hierarchy level.

    content_copy zoom_out_map
    [edit routing-options]
    user@host# set graceful-restart
    

    The helper modes, both standard and restart signaling-based, are enabled by default.

  2. To disable one or both of the helper modes, add the helper-disable <both | restart-signaling | standard> statement at the [edit protocols ospf graceful-restart] hierarchy level.

    • To disable both standard and restart signaling-based helper modes:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# set helper-disable both
      
    • To disable only the restart signaling-based helper mode:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# set helper-disable restart-signaling
      
    • To disable only the standard helper mode:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# set helper-disable standard
      
    Note:

    You must commit the configuration before the change takes effect.

    The last committed statement always takes precedence over the previous one.

  3. To enable one or both of the helper modes when the helper modes are disabled, delete the helper-disable <both | restart-signaling | standard> statement from the [edit protocols ospf graceful-restart] hierarchy level.

    • To enable both standard and restart signaling-based helper modes:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# delete helper-disable
      
    • To enable the restart signaling-based helper mode:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# delete helper-disable restart-signaling
      
    • To enable the standard helper mode:

      content_copy zoom_out_map
      [edit protocols ospf graceful-restart]
      user@host# delete helper-disable standard
      
    Note:

    You must commit the configuration before the change takes effect.

    The last committed statement always takes precedence over the previous one.

Requirements

M Series or T Series routers running Junos OS Release 11.4 or later and EX Series switches.

Overview

Junos OS Release 11.4 extends OSPF graceful restart support to include restart signaling-based helper mode. Both standard (RFC 3623-based) and restart signaling-based helper modes are enabled by default, irrespective of the graceful-restart configuration status on the routing device.

Junos OS, however, enables you to choose between the helper modes with the helper-disable <standard | restart-signaling | both> statement.

Verification

Confirm that the configuration is working properly.

Verifying OSPF Graceful Restart and Helper Mode Configuration

Purpose

Verify the OSPF graceful restart and helper mode configuration on a router.

Action
  • Enter the run show ospf overview command from configuration mode.

    content_copy zoom_out_map
    user@host# run show ospf overview
    
      ~
      ~
      ~	
      Restart: Enabled
        Restart duration: 180 sec
        Restart grace period: 210 sec
        Graceful restart helper mode: Enabled
        Restart-signaling helper mode: Enabled
      ~
      ~
      ~
        
Meaning

The output shows that graceful restart and both of the helper modes are enabled.

Tracing Restart Signaling-Based Helper Mode Events for OSPF Graceful Restart

Junos OS provides a tracing option to log restart signaling-based helper mode events for OSPF graceful restart. To enable tracing for restart signaling-based helper mode events, include the traceoptions flag restart-signaling statement at the [edit protocols ospf] hierarchy level.

To enable tracing for restart signaling-based events:

  1. Create a log file for saving the log.
    content_copy zoom_out_map
    [edit protocols ospf]
    user@host# set traceoptions file ospf-log
    

    where ospf-log is the name of the log file.

  2. Enable tracing for restart signaling-based helper mode events.
    content_copy zoom_out_map
    [edit protocols ospf]
    user@host# set traceoptions flag restart-signaling
    
  3. Commit the configuration.
    content_copy zoom_out_map
    [edit protocols ospf]
    user@host# commit
    

The logs are saved to the ospf-log file in the /var/log folder.

Viewing the Log File

To view the restart signaling-based events from the log file, type:

content_copy zoom_out_map
user@host> file show /var/log/ospf-log | match “restart signaling”
Jun 25 14:44:08.890216 OSPF Restart Signaling: Start helper mode for nbr ip 14.19.3.2 id 10.10.10.1 
Jun 25 14:44:11.358636 OSPF restart signaling: Received DBD with R bit set from nbr ip=14.19.3.2 id=10.10.10.1. Start oob-resync.
Jun 25 14:44:11.380198 OSPF restart signaling: Received DBD with LR bit on from nbr ip=14.19.3.2 id=10.10.10.1. Save its oob-resync capability 1 
Jun 25 14:44:11.467200 OSPF restart signaling: nbr fsm for nbr ip=14.19.3.2 id=10.10.10.1 moving to state Full. Reset oob-resync parameters.

Verifying Graceful Restart Operation

This topic contains the following sections:

Graceful Restart Operational Mode Commands

To verify proper operation of graceful restart, use the following commands:

  • show bgp neighbor (for BGP graceful restart)

  • show log (for IS-IS and OSPF/OSPFv3 graceful restart)

  • show (ospf | ospfv3) overview (for OSPF/OSPFv3 graceful restart)

  • show rsvp neighbor detail (for RSVP graceful restart—helper router)

  • show rsvp version (for RSVP graceful restart—restarting router)

  • show ldp session detail (for LDP graceful restart)

  • show connections (for CCC and TCC graceful restart)

  • show route instance detail (for Layer 3 VPN graceful restart and for any protocols using graceful restart in a routing instance)

  • show route protocol l2vpn (for Layer 2 VPN graceful restart)

For more information about these commands and a description of their output fields, see the CLI Explorer.

Verifying BGP Graceful Restart

To view graceful restart information for BGP sessions, use the show bgp neighbor command:

content_copy zoom_out_map
user@PE1> show bgp neighbor 192.0.2.10
Peer: 192.0.2.10+179 AS 64496 Local: 192.0.2.5+1106 AS 64496
  Type: Internal    State: Established    Flags: <>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ static ] 
  Options:<Preference LocalAddress HoldTime GracefulRestart Damping PeerAS Refresh>
  Local Address: 192.0.2.5 Holdtime: 90 Preference: 170
  IPSec SA Name: hope
  Number of flaps: 0
  Peer ID: 192.0.2.10     Local ID: 192.0.2.5      Active Holdtime: 90
  Keepalive Interval: 30
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 180
  Stale routes from peer are kept for: 180
  Restart time requested by this peer: 300
  NLRI that peer supports restart for: inet-unicast
  NLRI that peer saved forwarding for: inet-unicast
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Table inet.0 Bit: 10000
    RIB State: restart is complete
    Send state: in sync
    Active prefixes: 0
    Received prefixes: 0
    Suppressed due to damping: 0
  Last traffic (seconds): Received 19   Sent 19   Checked 19
  Input messages:  Total 2      Updates 1       Refreshes 0     Octets 42
  Output messages: Total 3      Updates 0       Refreshes 0     Octets 116
  Output Queue[0]: 0

Verifying IS-IS and OSPF Graceful Restart

To view graceful restart information for IS-IS and OSPF, configure traceoptions (see Tracking Graceful Restart Events).

Here is the output of a traceoptions log from an OSPF restarting router:

content_copy zoom_out_map
Oct  8 05:20:12 Restart mode - sending grace lsas
Oct  8 05:20:12 Restart mode - estimated restart duration timer triggered
Oct  8 05:20:13 Restart mode - Sending more grace lsas

Here is the output of a traceoptions log from an OSPF helper router:

content_copy zoom_out_map
Oct  8 05:20:14 Helper mode for neighbor 192.0.2.5
Oct  8 05:20:14  Received multiple grace lsa from 192.0.2.5

Verifying CCC and TCC Graceful Restart

To view graceful restart information for CCC and TCC connections, use the show connections command. The following example assumes four remote interface CCC connections between CE1 and CE2:

content_copy zoom_out_map
user@PE1> show connections
CCC and TCC connections [Link Monitoring On]
  Legend for status (St)              Legend for connection types
  UN -- uninitialized                 if-sw:  interface switching
  NP -- not present                   rmt-if: remote interface switching
  WE -- wrong encapsulation           lsp-sw: LSP switching
  DS -- disabled
  Dn -- down                          Legend for circuit types
  -> -- only outbound conn is up      intf -- interface
  <- -- only inbound  conn is up      tlsp -- transmit LSP
  Up -- operational                   rlsp -- receive LSP
  RmtDn -- remote CCC down
  Restart -- restarting

CCC Graceful restart : Restarting

Connection/Circuit                Type    St      Time last up     # Up trans
CE1-CE2-0                         rmt-if  Restart -----                     0
  fe-1/1/0.0                        intf  Up
  PE1-PE2-0                         tlsp  Up
  PE2-PE1-0                         rlsp  Up
CE1-CE2-1                         rmt-if  Restart -----                     0
  fe-1/1/0.1                        intf  Up
  PE1-PE2-1                         tlsp  Up
  PE2-PE1-1                         rlsp  Up
CE1-CE2-2                         rmt-if  Restart -----                     0
  fe-1/1/0.2                        intf  Up
  PE1-PE2-2                         tlsp  Up
  PE2-PE1-2                         rlsp  Up
CE1-CE2-3                         rmt-if  Restart -----                     0
  fe-1/1/0.3                        intf  Up
  PE1-PE2-3                         tlsp  Up
  PE2-PE1-3                         rlsp  Up

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
15.1
You can, optionally, modify the global settings at the individual protocol level or, as of Junos OS 15.1, at the individual routing instance level.
external-footer-nav