Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Synchronizing Configurations Across Routing Engines

 

On devices with redundant Routing Engines, you can perform a commit synchronize, which activates and synchronizes the configuration on both Routing Engines. For more information, see the following topics:

Synchronizing Routing Engines

If your router has two Routing Engines, you can manually direct one Routing Engine to synchronize its configuration with the other by issuing the commit synchronize command. The Routing Engine on which you execute this command (requesting Routing Engine) copies and loads its candidate configuration to the other (responding Routing Engine). Both Routing Engines then perform a syntax check on the candidate configuration file being committed. If no errors are found, the configuration is activated and becomes the current operational configuration on both Routing Engines.

The commit synchronize command does not work if the responding Routing Engine has uncommitted configuration changes. However, you can enforce commit synchronization on the Routing Engines by using the force option. When you issue the commit synchronize command with the force option from one Routing Engine, the configuration sessions on the other Routing Engine will be terminated and its configuration synchronized with that on the Routing Engine from which you issued the command.

Note

We recommend that you use the force option only if you are unable to resolve the issues that caused the commit synchronize command to fail.

For example, if you are logged in to re1 (requesting Routing Engine) and you want re0 (responding Routing Engine) to have the same configuration as re1, issue the commit synchronize command on re1. re1 copies and loads its candidate configuration to re0. Both Routing Engines then perform a syntax check on the candidate configuration file being committed. If no errors are found, re1's candidate configuration is activated and becomes the current operational configuration on both Routing Engines.

Note

When you issue the commit synchronize command, you must use the groups re0 and re1. For information about how to use the apply-groups statement, see Applying a Junos OS Configuration Group.

The responding Routing Engine must be running Junos OS Release 5.0 or later.

For information about issuing the commit synchronize command on a routing matrix, see the Junos OS Administration Library.

To synchronize a Routing Engine's current operational configuration file with the other, log in to the Routing Engine from which you want to synchronize and issue the commit synchronize command:

Note

If the backup Routing Engine is partially committed due to invalid configuration during system reboot, the commit synchronize command with the force option from the master Routing Engine does not work.

Note

You can also add the commit synchronize statement at the [edit system] hierarchy level so that a commit command automatically invokes a commit synchronize command by default. For more information, see the Junos OS Administration Library.

To enforce a commit synchronize on the Routing Engines, log in to the Routing Engine from which you want to synchronize and issue the commit synchronize command with the force option:

Note
  • If you have nonstop routing enabled on your router, you must enter the commit synchronize command from the master Routing Engine after you make any changes to the configuration. If you enter this command on the backup Routing Engine, the Junos OS displays a warning and commits the configuration.

  • Starting with Junos OS Release 9.3, accounting of backup Routing Engine events or operations is not supported on accounting servers such as TACACS+ or RADIUS. Accounting is only supported for events or operations on a master Routing Engine.

For the commit synchronization process, the master Routing Engine commits the configuration and sends a copy of the configuration to the backup Routing Engine. Then the backup Routing Engine loads and commits the configuration. So, the commit synchronization between the master and backup Routing Engines takes place one Routing Engine at a time. If the configuration has a large text size or many apply-groups, commit times can be longer than desired.

You can use the commit fast-synchronize statement to have the synchronization between the master and backup Routing Engines occur simultaneously instead of sequentially. This can reduce the time needed for synchronization because the commits on the master and backup Routing Engines occur in parallel.

Include the fast-synchronize statement at the [edit system] hierarchy level to have the synchronization occur simultaneously between the master and the backup Routing Engines:

Note
  • When the fast-synchronize statement is configured, the commits on the master Routing Engine and the backup Routing Engine run in parallel. In this process, the configuration is validated only on the Routing Engine where you execute the commit command. Therefore, it is recommended not to include too many configuration details in groups like re0 and re1, because the configuration specified in group re0 is applied only if the current Routing Engine is in slot 0. Likewise, the configuration specified in group re1 is applied only if the current Routing Engine is in slot 1.

  • If fast-synchronize is enabled and if the master and backup Routing Engines run different software versions, even if the master validates the configuration, you cannot be sure if the configuration is valid for the backup Routing Engine. Therefore, ensure that the Junos OS software version running on both the Routing Engines is same.

You can use the commit synchronize scripts command to synchronize a Routing Engine's configuration and all commit, event, lib, op, and SNMP scripts with the other Routing Engine. If the load-scripts-from-flash statement is configured for the requesting Routing Engine, the device synchronizes the scripts from flash memory on the requesting Routing Engine to flash memory on the responding Routing Engine. Otherwise, the device synchronizes the scripts from the hard disk on the requesting Routing Engine to the hard disk on the responding Routing Engine. The device synchronizes all scripts regardless of whether they are enabled in the configuration or have been updated since the last synchronization.

To synchronize a Routing Engine's configuration file and all scripts with the other Routing Engine, log in to the Routing Engine from which you want to synchronize, and issue the commit synchronize scripts command:

If the commit check operation fails for the requesting Routing Engine, the process stops, and the scripts are not copied to the responding Routing Engine. If the commit check or commit operation fails for the responding Routing Engine, the scripts are still synchronized, since the synchronization occurs prior to the commit check operation on the responding Routing Engine.

Include the synchronize statement at the [edit system scripts] hierarchy level to synchronize scripts every time you issue a commit synchronize command.

Note
  • If commit fails on either Routing Engine, the commit process is rolled back on the other Routing Engine as well. This ensures that both Routing Engines have the same configuration.

  • When the fast-synchronize statement is configured, the commits on the master Routing Engine and the backup Routing Engine run in parallel. In this process, the configuration is validated only on the Routing Engine where you execute the commit command. Therefore, it is recommended not to include too many configuration details in groups like re0 and re1, because the configuration specified in group re0 is applied only if the current Routing Engine is in slot 0. Likewise, the configuration specified in group re1 is applied only if the current Routing Engine is in slot 1.

  • If fast-synchronize is enabled and if the master and backup Routing Engines run different software versions, even if the master validates the configuration, you cannot be sure if the configuration is valid for the backup Routing Engine. Therefore, ensure that the Junos OS software version running on both the Routing Engines is same.

Configuring Multiple Routing Engines to Synchronize Committed Configurations Automatically

If your router or switch has multiple Routing Engines, you can manually direct one Routing Engine to synchronize its configuration with the others by issuing the commit synchronize command.

To make the Routing Engines synchronize automatically whenever a configuration is committed, include the commit synchronize statement at the [edit system] hierarchy level:

The Routing Engine on which you execute the commit command (requesting Routing Engine) copies and loads its candidate configuration to the other (responding) Routing Engines. All Routing Engines then perform a syntax check on the candidate configuration file being committed. If no errors are found, the configuration is activated and becomes the current operational configuration on all Routing Engines.

For the commit synchronization process, the master Routing Engine commits the configuration and sends a copy of the configuration to the backup Routing Engine. Then the backup Routing Engine loads and commits the configuration. So, the commit synchronization between the master and backup Routing Engines takes place one Routing Engine at a time. If the configuration has a large text size or many apply-groups, commit times can be longer than desired.

You can use the commit fast-synchronize statement to have the synchronization between the master and backup Routing Engines occur simultaneously instead of sequentially. This can reduce the time needed for synchronization because the commits on the master and backup Routing Engines occur in parallel.

Include the fast-synchronize statement at the [edit system] hierarchy level to have synchronize occur simultaneously between the master and the backup Routing Engines:

Note
  • If commit fails on either Routing Engine, the commit process is rolled back on the other Routing Engine as well. This ensures that both Routing Engines have the same configuration.

  • When the fast-synchronize statement is configured, the commits on the master Routing Engine and the backup Routing Engine run in parallel. In this process, the configuration is validated only on the Routing Engine where you execute the commit command. Therefore, it is recommended not to include too many configuration details in groups like re0 and re1, because the configuration specified in group re0 is applied only if the current Routing Engine is in slot 0. Likewise, the configuration specified in group re1 is applied only if the current Routing Engine is in slot 1.

  • If fast-synchronize is enabled and if the master and backup Routing Engines run different software versions, even if the master validates the configuration, you cannot be sure if the configuration is valid for the backup Routing Engine. Therefore, ensure that the Junos OS software version running on both the Routing Engines is same.