Juniper Commit Confirmed and Rollback: A Practical Junos Guide
Understand commit check, commit confirmed and rollback in Junos, with a remote-change workflow that separates syntax validation from service testing.
Key Points
- Commit check validates the candidate configuration; it does not prove working traffic.
- Commit confirmed activates a change with a rollback timer unless it is confirmed.
- Rollback loads a saved configuration into the candidate; a commit applies it.
- Test a new management connection and the affected service before confirming.
Use commit confirmed when a Junos configuration change needs a timed return to the previous configuration if you cannot confirm success. It is particularly useful when editing a remote management path. It does not replace console access, a recovery plan or testing the actual service.
This guide explains the workflow for administrators working directly in the Junos CLI. Check your device, software release and automation ownership first. If a management platform controls the configuration, coordinate through that system rather than creating competing changes.
What do commit check, commit confirmed and rollback do?
| Command | Purpose | Important distinction |
|---|---|---|
show | compare | Review candidate changes in configuration mode | Review the full intended difference before activation |
commit check | Validate the candidate | Does not test reachability; can confirm a pending confirmed commit |
commit confirmed 10 | Activate with a ten-minute confirmation window | Unconfirmed changes are scheduled to roll back |
rollback 1 | Load the previous saved configuration | A subsequent commit is needed to activate it |
The Junos commit reference documents the confirmation behavior. A plain commit or commit check can confirm a pending confirmed commit. This is why the initial validation belongs before timed activation, not as a casual diagnostic step while you are relying on automatic recovery.
1. Prepare a small, testable change
Write down what should change and what should remain reachable. For a VLAN edit, identify a source client and its gateway. For an SRX policy change, identify one permitted flow and one flow that should remain blocked. For management changes, include a fresh login from the real administration network.
Coordinate with other operators and automation so another commit does not unexpectedly alter the candidate or confirm your change. Record the current software and configuration state, and choose a maintenance window appropriate to the affected service.
Enter configuration mode, make the intended edits, then review and validate them:
configure
show | compare
commit check
The commands above assume you have inserted your planned configuration edits before the comparison. There is no universal interface or policy change to paste here: the important input is the reviewed difference for your own device.
2. Activate with a timer, then test independently
commit confirmed 10 comment "Validate planned network change"
run show system commit
The example explicitly requests ten minutes and includes a change comment. Juniper documents comment requirements in newer Junos releases; keeping a meaningful comment also makes the history easier to interpret. Confirm the CLI reports success and inspect the pending rollback using show system commit. The run prefix invokes that operational command from configuration mode.
Keep the original session open while testing from a separate client. A pre-existing session can remain usable even when new connections fail. Test both the management path and the user traffic affected by the change, and leave enough time to interpret results before the deadline.
When the agreed checks pass, confirm deliberately:
commit comment "Validated management and service traffic"
run show system commit
If the change fails, do not issue a confirming commit merely to clear the timer. Use the agreed recovery path or allow the scheduled rollback, then verify that the previous service actually returns. A timed rollback is a recovery mechanism, not proof that every external dependency will recover with it.
3. Distinguish discarding edits from restoring an older configuration
In configuration mode, rollback 0 reloads the active configuration into the candidate, discarding pending edits. rollback 1 loads the preceding saved configuration. Neither should be used casually in a shared session: you can discard another operator's work or restore unrelated settings.
For a deliberate restoration, inspect the commit history first and select the appropriate saved version. A starting review sequence is:
run show system commit
rollback 1
show | compare
Review the difference before committing the restored candidate. Rollback numbers move as new commits occur, so “1” means a position in the current history, not a permanent label for your known-good baseline. Juniper's rollback reference describes the saved configurations and loading behavior.
Common mistakes to avoid
- Treating syntax validation as an application test: a valid configuration can still block the intended traffic.
- Checking only the existing SSH session: also test a new connection from the expected source.
- Running commit check during the timer: it can confirm the pending change before service testing is complete.
- Restoring an assumed rollback number: inspect history and the resulting difference first.
- Changing several unrelated features: keep the initial change small enough to explain and validate.
Connect the workflow to your Juniper deployment
For a firewall project, continue with our SRX zones, NAT and policy configuration guide. For campus switching, use the Juniper EX series guide to identify the relevant platform.
When hardware or support is part of the project, compare exact models in the Juniper price list. Include software entitlements, service terms and recovery access in the deployment plan. List prices help compare catalog entries; request a current supplier quote for the complete configuration.
Official documentation
- Juniper: commit command
- Juniper: committing configuration and release considerations
- Juniper: rollback command
- Juniper: inspect commit history
Examples were checked against documentation, not executed on physical devices. The cover is an illustrative networking image.
FAQ
What happens if I do not confirm a Junos commit confirmed?
Junos schedules a return to the precommit configuration when the confirmation period expires. Verify recovery afterward rather than assuming every service has recovered.
Does commit check confirm a pending commit confirmed?
Yes, the Junos command reference documents commit check as a confirmation method. Perform initial syntax validation before the timed commit and avoid confirming before service tests pass.
What is the difference between rollback 0 and rollback 1?
Rollback 0 reloads the active configuration into the candidate and discards pending edits. Rollback 1 loads the previous saved configuration; review and commit it to activate the restoration.
Does commit check prove that traffic will work?
No. It validates the candidate configuration. Independently test management access and the application traffic affected by the change.
Check Current Juniper Pricing
Browse the full, daily-updated Juniper GPL on GlobalPriceList.com.
View Juniper Price List See Juniper Price History