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.
Routing Engine Synchronization Overview
If your device 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
(the requesting Routing Engine) first commits the configuration. The requesting Routing
Engine then copies and loads its candidate configuration to the responding Routing
Engine. Each Routing Engine performs a syntax check on the candidate configuration file
before committing it. The commit synchronization process takes place one Routing Engine
at a time.
If no errors are found, the configuration is activated and becomes the current operational configuration on both Routing Engines.
If the commit fails on either Routing Engine, the commit process is rolled back on the other Routing Engine as well. This safeguard ensures that both Routing Engines have the same configuration.
If your configuration includes a large amount of text or many apply-groups, commit times can be longer than desired.
For example, you may want both Routing Engines to have the same configuration. In this
scenario, if you are logged in to re1 (
requesting Routing
Engine)
, you issue the commit synchronize
command
on re1
. Routing Engine re1
copies and loads its
candidate configuration to re0
(responding Routing Engine). Both
Routing Engines then perform a syntax check on the candidate configuration file being
committed. If no errors are found, the re1
candidate configuration is
activated and becomes the current operational configuration on both Routing Engines.
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 Configuration Group.
You can synchronize a Routing Engine's current operational configuration file with the
other Routing Engine's configuration file. To do this, you log in to the Routing Engine
from which you want to synchronize and issue the commit synchronize
command.
Example:
[edit]
user@host# commit synchronize
re0:
configuration check succeeds
re1:
commit complete
re0:
commit complete
The backup Routing Engine may be only partially committed due to invalid
configuration during system reboot. In this case, the commit
synchronize
command with the force
option from the
primary Routing Engine does not work.
The commit synchronize
command does not work if the responding Routing
Engine has uncommitted configuration changes. However, you can force 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 are terminated. When those sessions are terminated on the other
Routing Engine, its configuration is synchronized with the configuration on the Routing
Engine from which you issued the command.
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.
To force a commit synchronize
on the Routing Engines, you log in to the
Routing Engine from which you want to synchronize. Then, you issue the command with the
force
option.
Example:
[edit]
user@host# commit synchronize force
re0:
re1:
commit complete
re0:
commit complete
[edit]
user@host#
If you have nonstop routing enabled on your device, you enter the commit
synchronize
command from the primary Routing Engine after you make any
changes to the configuration. If you enter this command on the backup Routing
Engine, the software displays a warning and commits the configuration.
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 you configure the load-scripts-from-flash
statement for the requesting Routing Engine, the device synchronizes the scripts. 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.
Example:
[edit]
user@host# commit synchronize scripts
re0:
configuration check succeeds
re1:
commit complete
re0:
commit complete
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. The scripts are still synchronized because the synchronization occurs before 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.
[edit system scripts] synchronize;
Configure Multiple Routing Engines to Synchronize Committed Configurations Automatically
If your device 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:
[edit system] commit synchronize;
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 primary 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 primary 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.