High Availability · Topic 2 of 5

GRES, NSR and NSB

Learn Junos Routing Engine redundancy for the JN0-364: GRES, nonstop active routing, nonstop bridging, commit synchronize and switchover checks.

  • 5 min
In a nutshell
  • GRES: set chassis redundancy graceful-switchover; keeps the PFEs forwarding through a switchover.
  • GRES alone resets routing sessions; add NSR or rely on GR helpers.
  • NSR: set routing-options nonstop-routing; needs GRES and commit synchronize.

What it is

An MX router with two Routing Engines (REs) has a primary (master) RE and a backup. If the primary fails, the backup takes over. Three features decide how much survives that switchover.

Graceful Routing Engine switchover (GRES) keeps the forwarding plane running, so packets keep flowing. Nonstop active routing (NSR) adds the routing protocols, so neighbors never notice the switchover. Nonstop bridging (NSB) does the same for Layer 2 control protocols such as spanning tree.

No GRESswitchoverPacket Forwarding Engines restarttraffic lostGRES onlyswitchoverForwarding continuesrouting protocols restartGRES plus NSRswitchoverForwarding continuesrouting sessions stay up

How it works

Without GRES

When the primary RE fails and GRES is off, the new primary RE restarts the Packet Forwarding Engines (PFEs) and relearns all state. Interfaces flap, forwarding stops and every neighbor sees the router go away and come back.

GRES

With GRES, the primary RE continuously copies interface and kernel state, including the forwarding table, to the backup RE. At switchover the PFEs are not restarted, so traffic keeps flowing on the existing forwarding entries.

GRES alone does not keep routing protocols running. The routing process starts fresh on the new primary RE, so OSPF, IS-IS, BGP and other sessions reset unless something else covers them: either graceful restart helpers on the neighbors, or NSR on this router.

user@R1# set chassis redundancy graceful-switchover
user@R1# set system commit synchronize

commit synchronize makes every commit apply to both REs, so the backup always has the same configuration. GRES needs it.

NSR

NSR runs the routing protocol process on the backup RE as well and keeps it in sync: routes, adjacencies and session state are copied from the primary. At switchover the backup is already up to date, so neighbors see no change and no help is needed from them.

user@R1# set chassis redundancy graceful-switchover
user@R1# set system commit synchronize
user@R1# set routing-options nonstop-routing
RequirementWhy
GRESNSR depends on the forwarding plane surviving the switchover
commit synchronizeBoth REs must have the same configuration
No graceful restartGR and NSR cannot be enabled together; the commit fails

NSB

NSB keeps the Layer 2 control protocol process synchronized between the REs, so spanning tree state survives a switchover and ports do not reconverge.

user@R1# set chassis redundancy graceful-switchover
user@R1# set system commit synchronize
user@R1# set protocols layer2-control nonstop-bridging

NSB has the same requirements as NSR: GRES and commit synchronize.

Comparing the features

FeatureWhat survives a switchoverNeedsNeighbors involved?
GRESForwarding plane and interface stateTwo REs, commit synchronizeNo, but their routing sessions reset without GR or NSR
GRES plus GRForwarding plus routes, with neighbor helpNeighbors as GR helpersYes, they must support GR
NSRForwarding plus routing protocol sessionsGRES, commit synchronize, no GRNo
NSBForwarding plus Layer 2 control protocol stateGRES, commit synchronizeNo
GRESforwardingplusNSRrouting protocolsGRESforwardingplusNSBLayer 2 controlGRESforwardingor plusGraceful restartneeds helpers

Monitoring

CommandRun onShows
show system switchoverBackup REWhether GRES is on and the backup is ready
show task replicationPrimary REWhether NSR replication is enabled and which protocols are synchronized
show chassis routing-engineEitherEach RE's role (master or backup) and health
request chassis routing-engine master switchPrimary REStarts a manual switchover

On the backup RE, a ready GRES shows lines such as:

{backup}
user@R1> show system switchover
Graceful switchover: On
Configuration database: Ready
Kernel database: Ready
Peer state: Steady State

show task replication on the primary lists each protocol with its synchronization status. Only switch over when the status is complete for the protocols you care about.

{master}
user@R1> show task replication
        Stateful Replication: Enabled
        RE mode: Master

Troubleshooting checklist

SymptomLikely cause
Commit of NSR or NSB failsGRES or commit synchronize missing, or graceful restart configured with NSR
show system switchover not ReadyThe backup RE is still synchronizing, or GRES was just enabled
Traffic lost at switchoverGRES not enabled, so the PFEs restarted
Routing sessions reset at switchover with GRES onNeither NSR on this router nor GR helpers on the neighbors
Exam tip

Run show system switchover on the backup RE. On the primary it does not report the readiness you need.

Common mistakes

Thinking GRES keeps routing protocols up. GRES protects forwarding only. Routing sessions need NSR, or GR with helper neighbors.

Configuring NSR without GRES. NSR and NSB both require GRES and commit synchronize.

Enabling GR and NSR together. They cannot be enabled together. Choose NSR when you do not want to depend on neighbors.

Switching over before the backup is ready. Check show system switchover and show task replication first.

Watch out

NSB protects Layer 2 control protocol state such as spanning tree. It does not protect routing protocols, and NSR does not protect spanning tree.

What to remember for the exam

  • GRES: set chassis redundancy graceful-switchover; keeps the PFEs forwarding through a switchover.
  • GRES alone resets routing sessions; add NSR or rely on GR helpers.
  • NSR: set routing-options nonstop-routing; needs GRES and commit synchronize.
  • NSB: set protocols layer2-control nonstop-bridging; needs GRES and commit synchronize.
  • GR and NSR cannot be enabled together.
  • Verify GRES with show system switchover on the backup RE, NSR with show task replication on the primary.
  • Manual switchover: request chassis routing-engine master switch.

Check yourself

  • GRES is enabled, but OSPF and BGP neighbors drop at every switchover. Which feature keeps them up without help from the neighbors?

    NSR, enabled with set routing-options nonstop-routing.

  • What two things must be configured before NSR will commit?

    GRES (chassis redundancy graceful-switchover) and system commit synchronize.

  • On which Routing Engine do you run show system switchover to check GRES readiness?

    On the backup Routing Engine.

Topic 2 of 5 in High Availability

Test yourself on High Availability

The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.