The following sections describe how to configure Routing Engine redundancy:
![]() |
Note: To complete the tasks in the following sections, re0 and re1 configuration groups must be defined. For more information about configuration groups, see the JUNOS CLI User Guide. |
For routers with two Routing Engines, you can configure which Routing Engine is the master and which is the backup. By default, the Routing Engine in slot 0 is the master (re0) and the one in slot 1 is the backup (re1).
![]() |
Note: In systems with two Routing Engines, both Routing Engines cannot be configured to be master at the same time. This configuration causes the commit check to fail. |
To modify the default configuration, include the routing-engine statement at the [edit chassis redundancy] hierarchy level:
- [edit chassis redundancy]
- routing-engine slot-number (master | backup | disabled);
slot-number can be 0 or 1. To configure the Routing Engine to be the master, specify the master option. To configure it to be the backup, specify the backup option. To disable a Routing Engine, specify the disabled option.
![]() |
Note: To switch between the master and the backup Routing Engines, you must modify the configuration and then activate it by issuing the commit synchronize command. |
The following sections describe how to configure automatic failover to the backup Routing Engine when certain failures occur on the master Routing Engine.
For routers with two Routing Engines, you can configure graceful Routing Engine switchover (GRES). When graceful switchover is configured, socket reconnection occurs seamlessly without interruption to packet forwarding. For information about how to configure graceful Routing Engine switchover, see Graceful Routing Engine Switchover Configuration Guidelines.
After you configure a backup Routing Engine, you can direct it to take mastership automatically if it detects a hard disk error from the master Routing Engine. To enable this feature, include the failover on-disk-failure statement at the [edit chassis redundancy] hierarchy level.
- [edit chassis redundancy]
- failover on-disk-failure;
After you configure a backup Routing Engine, you can direct it to take mastership automatically if it detects a loss of keepalive signal from the master Routing Engine.
To enable failover on receiving a loss of keepalive signal, include the failover on-loss-of-keepalives statement at the [edit chassis redundancy] hierarchy level:
- [edit chassis redundancy]
- failover on-loss-of-keepalives;
When graceful Routing Engine switchover is not configured, by default, failover occurs after 300 seconds (5 minutes). You can configure a shorter or longer time interval. To change the keepalive time period, include the keepalive-time statement at the [edit chassis redundancy] hierarchy level:
- [edit chassis redundancy]
- keepalive-time seconds;
The range for keepalive-time is 2 through 10,000 seconds.
The following example describes the sequence of events if you configure the backup Routing Engine to detect a loss of keepalive signal in the master Routing Engine:
![]() |
Note: When graceful Routing Engine switchover is configured, the keepalive signal is automatically enabled and the failover time is set to 2 seconds. You cannot manually reset the keepalive time. |
A former master Routing Engine becomes a backup Routing Engine if it returns to service after a failover to the backup Routing Engine. To restore master status to the former master Routing Engine, you can use the request chassis routing-engine master switch operational mode command.
If at any time one of the Routing Engines is not present, the remaining Routing Engine becomes master automatically, regardless of how redundancy is configured.
To configure automatic switchover to the backup Routing Engine if a software process fails, include the failover other-routing-engine statement at the [edit system processes process-name] hierarchy level:
- [edit system processes] process-name
- failover other-routing-engine;
process-name is one of the valid process names. If this statement is configured for a process, and that process fails four times within 30 seconds, the router reboots from the other Routing Engine. Another statement available at the [edit system processes] hierarchy level is failover alternate-media. For information about the alternate media option, see the JUNOS System Basics Configuration Guide.
To manually switch the Routing Engine mastership, use one of the following commands:
A separate log file is provided for redundancy logging at /var/log/mastership. To view the log, use the file show /var/log/mastership command. Table 5 lists the mastership log event codes and descriptions.
Table 5: Routing Engine Mastership Log