A network engineer needs to commit a configuration change but wants to ensure the change can be easily reverted if it causes issues. Which approach should the engineer take?
Trap 1: Use the 'commit and-quit' command to apply changes.
The 'commit and-quit' command commits the candidate configuration and immediately exits configuration mode, but it does not schedule any rollback. If the change disrupts access, the device will retain the new config until a human manually intervenes. Unlike 'commit confirmed', it offers no safety net for remote administrators who might get locked out.
Trap 2: Use the 'commit check' command before committing.
'commit check' validates the syntax and logical semantics of the candidate configuration without activating it. Passing the check does not guarantee the change is safe, and after a normal subsequent commit there is no automatic rollback available. It is a pre-flight validation tool, not a safeguard against unsuccessful remote changes.
Trap 3: Use the 'rollback 0' command after committing.
'rollback 0' in configuration mode loads the currently committed configuration as the candidate, effectively discarding uncommitted changes. After a commit, using 'rollback 0' then committing would manually revert to the previous config, but this requires outside access and does not happen automatically on a timeout. It is a manual recovery tool, not an automatic confirm mechanism.
- A
Use the 'commit and-quit' command to apply changes.
Why wrong: The 'commit and-quit' command commits the candidate configuration and immediately exits configuration mode, but it does not schedule any rollback. If the change disrupts access, the device will retain the new config until a human manually intervenes. Unlike 'commit confirmed', it offers no safety net for remote administrators who might get locked out.
- B
Use the 'commit confirmed' command with a timeout.
The 'commit confirmed' command with a timeout (e.g., 'commit confirmed 5') activates the configuration for a temporary interval, defaulting to 10 minutes. If the administrator does not issue a confirming 'commit' before the timer expires, Junos automatically rolls back to the previous configuration. This self-reverting behavior prevents permanent lockouts caused by misconfigured access settings.
- C
Use the 'commit check' command before committing.
Why wrong: 'commit check' validates the syntax and logical semantics of the candidate configuration without activating it. Passing the check does not guarantee the change is safe, and after a normal subsequent commit there is no automatic rollback available. It is a pre-flight validation tool, not a safeguard against unsuccessful remote changes.
- D
Use the 'rollback 0' command after committing.
Why wrong: 'rollback 0' in configuration mode loads the currently committed configuration as the candidate, effectively discarding uncommitted changes. After a commit, using 'rollback 0' then committing would manually revert to the previous config, but this requires outside access and does not happen automatically on a timeout. It is a manual recovery tool, not an automatic confirm mechanism.