Configuring Graceful Insertion and Removal

Graceful Insertion and Removal (GIR) provides an alternative method to minimize network service impact caused by device maintenance. GIR leverages redundant paths in the network to smoothly remove a device under maintenance, out of service, and insert it back to service when the maintenance is complete. This module describes the how to configure GIR.

Restrictions for Graceful Insertion and Removal

GIR is supported on the Cisco ASR 1000 series of routers only for BGP. GIR is configured either by creating customized templates or without a template.

Information About Graceful Insertion and Removal

Overview

Graceful Insertion and Removal (GIR) isolates a router from the network for debugging or an upgrade. The router can be put into maintenance mode using the start maintenance command. When router maintenance is complete, the router returns to normal mode on either reaching the configured maintenance timeout, or when the stop maintenance command is used.

Create a maintenance mode template before you put the router in maintenance mode. The objective of maintenance mode for a router is to minimize traffic disruption at the time of removal from the network, as well as during the time of insertion. There are mainly three stages:

  • Graceful removal of the node from network.

  • Performing maintenance on the device.

  • Graceful insertion into the network.

A router can be put into maintenance mode using default template or a custom template.

Snapshot Template

Snapshots are taken automatically while entering and exiting the maintenance mode. You can use the snapshot-template template-name command to capture and store snapshots for pre-selected features. Snapshots are useful to compare the state of a router before it went into maintenance mode and after it came back to normal mode. The snapshot process consists of three parts:

  • Creating a snapshot of the states of a few preselected features on the router and storing them on the persistent storage media.

  • Listing the snapshots taken at various time intervals and managing them.

  • Comparing snapshots and showing the summary and details of each feature.

You can create multiple snapshot templates. But you can apply only one snapshot template at a time. If you do not specify a custom snapshot template, a default snapshot template is applied.

Snapshot templates can be created to generate specific snapshots. A new snapshot template can be created using the snapshot-template template-name command. The command snapshot-template default-snapshot-template can be used to specify the default snapshot template in the maintenance mode.

The following example shows the creation of a snapshot template named gir_1:

snapshot-template gir_1
 router bgp
!

Maintenance Template

As a network administrator, you can create a maintenance template that is applied when the system goes into maintenance mode. This allows you to isolate specific protocol instances. All instances that need to be isolated must be explicitly specified.

You can create multiple templates with different configurations. However, only a single template is applied to the maintenance mode CLI. Once applied, the template cannot be updated. If the template has to be updated, then you must remove it, make the changes, and then re-apply.

maintenance-template t1
  router bgp 100

System Mode Maintenance Counters

GIR has counters to track the following events:

  • Number of times the router went into maintenance.

  • Ack statistics per client.

  • Nack statistics per client

  • Number of times a particular client did not acknowledge.

  • Number of times switchover happened during GIR. GIR infra will rsync this counter to track multiple switchovers.

  • Number of times the failsafe timer expired.

  • Number of times system got out of maintenance on a timeout expiry.

Enter the show system mode maintenance counters command in privileged EXEC mode, to display the counters that are being tracked by the feature.

Enter the clear system mode maintenance counters command in privileged EXEC mode, to clear the counters supported by the feature.

The client-ack timeout value can be configured using the failsafe failsafe-timeout-value command. Failsafe time is the time that the GIR engine allows a client to transition. Each client sends a notification to the GIR engine about its transition. If it takes more than the failsafe time to transition, it is assumed to have transitioned. The failsafe timer can be configured between 5 - 180 minutes, with a default of 30 minutes.

How to Configure Graceful Insertion and Removal

Creating a Maintenance Template

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. maintenance-template template_name
  4. router routing_protocol instance_id

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters the global configuration mode.

Step 3

maintenance-template template_name

Example:

Device(config)# maintenance-template gir1

Creates a template with the specified name. For example, see Examples: Creating customer profile.

Step 4

router routing_protocol instance_id

Example:

Device(config-maintenance-templ)# router bgp AS-number

Creates instances that should be isolated under this template.

  • router: Configures routing protocols and associated instance id.

Configuring System Mode Maintenance

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. system mode maintenance
  4. timeout timeout-value | template template-name | snapshot-template snapshot name | failsafe failsafe-timeout-value | on-reload reset-reason maintenance

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters the global configuration mode.

Step 3

system mode maintenance

Example:

Device(config)# system mode maintenance

Enters system mode maintenance configuration mode.

Different sub commands to create maintenance mode parameters are configured in this mode.

Step 4

timeout timeout-value | template template-name | snapshot-template snapshot name | failsafe failsafe-timeout-value | on-reload reset-reason maintenance

Configures maintenance mode parameters.

  • timeout: Configures maintenance mode timeout period in minutes, after which the system automatically returns to normal mode. The default timeout value is never.

  • template: Configures maintenance mode using the specified maintenance template.

  • snapshot-template: Configures maintenance mode using the specified snapshot template.

  • failsafe: Configures client-ack timeout value.

    If the system is going into maintenance mode, it will continue to reach maintenance.If the system is exiting from maintenance mode, then it will reach normal mode.

  • on-reload reset-reason maintenance: Configures the system such that when the system is reloaded it enters the maintenance mode. If it is not configured the system enters the normal mode when it is reloaded.

Starting and Stopping Maintenance Mode

SUMMARY STEPS

  1. enable
  2. start maintenance
  3. stop maintenance

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password if prompted.

Step 2

start maintenance

Example:

Device# start maintenance

Puts the system into maintenance mode.

Step 3

stop maintenance

Example:

Device# stop maintenance

Puts the system back into normal mode.

Monitoring Graceful Insertion and Removal

Use the following commands to check the status of or display statistics generated by the GIR feature:
Table 1. Privileged EXEC Commands

Command

Purpose

show system mode [maintenance [clients | template template-name]]

Displays information about system mode.

show system snapshots [dump <snapshot-file-name>]

Displays all the snapshots present on the device.

show system snapshots [dump <snapshot-file-name>]xml

Displays all the snapshots present on the device in XML format.

show system snapshots compare snapshot-name1 snapshot-name2

Displays differences between snapshots taken before entering maintenance mode and after exiting from the maintenance mode.

Table 2. Global Configuration Commands for Troubleshooting

Command

Purpose

debug system mode maintenance

Displays information to help troubleshoot the GIR feature.

Configuration Examples for Graceful Removal and Insertion

The following examples show the sequence followed to enable GIR during a maintanence window.

Example: Configuring Snapshot and Maintenance Templates

This example shows how to configure a snapshot template gir_1 with a BGP routing protocol instance.

Device#configure terminal
Device(config)#snapshot-template gir_1
Device(config-maintenance-templ)#router BGP 1

This example shows how to configure a maintenance template t1 with a BGP routing protocol instance.

Device#configure terminal
Device(config)#maintenance-template t1
Device(config-maintenance-templ)#router BGP 1

Example: Configuring System Mode Maintenance

This example shows how to create a maintenance template and configure the maintenance mode parameters.

Device# configure terminal
Device(config)# system mode maintenance
Device(config-maintenance)# timeout 20
Device(config-maintenance)# failsafe 30
Device(config-maintenance)# on-reload reset-reason maintenance
Device(config-maintenance)# template t1
Device(config-maintenance)# snapshot-template gir_1
Device(config-maintenance)# exit

Example: Starting and Stopping the Maintenance Mode

This example shows how to put the system into maintenance mode.

Device#start maintenance
Template t1 will be applied. Do you want to continue?[confirm]
Device#
Device(maint-mode)#

After the activity is completed, the system can be put out of maintenance mode.

This example shows how to put the system out of maintenance mode.

Device(maint-mode)#stop maintenance
Device(maint-mode)#
Device#

Example: Displaying System Mode Settings

This example shows how to display system mode settings using different options.

Device# show system mode
     System Mode: Normal

Device# show system mode maintenance
     System Mode: Normal
     Current Maintenance Parameters:
     Maintenance Duration: 20(mins)
     Failsafe Timeout: 30(mins)
     Maintenance Template: t1
     Snapshot Template: gir_1
     Reload in Maintenance: True

Device# show system mode maintenance clients
     System Mode: Normal
     Maintenance Clients:
     CLASS-EGP
     router bgp 1000: Transition None
      
     CLASS-IGP
      
     CLASS-MCAST
      
     CLASS-FHRP
      
     CLASS-L2

Device# show system mode maintenance template default
     System Mode: Normal
     default maintenance-template details:
     router bgp 1000

Device# show system mode maintenance template t1
     System Mode: Normal
     Maintenance Template t1 details:
     router bgp 1000

Example: Displaying System Differences Between Entering and Exiting Maintenance Mode

This example shows how to display differences between snapshots taken before entering maintenance mode and after exiting maintenance mode.

Device#show system snapshots compare before_maintenance after_maintenance     
================================================================================
Feature        Tag                           before_maintenance  after_maintenance   
================================================================================
[bgp_summary]
 
--------------------------------------------------------------------------------
      [Neighbor:192.168.10.2]
               MsgRcvd                       2                   **7**
               up                            00:07:30            **00:11:29**

Feature History and Information for Graceful Insertion and Removal

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Table 3. Feature History and Information for Graceful Insertion and Removal

Feature Name

Release

Feature Information

Graceful Insertion and Removal

Cisco IOS XE Gibraltar 16.12.1

This feature was introduced on the Cisco ASR 1000 series of routers with support for BGP.