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.