An engineer needs to apply a configuration change to the device, but only if the configuration is syntactically correct. Which command should be used before committing?
Trap 1: commit
The 'commit' command immediately activates the candidate configuration and makes it the active configuration on the device. It does not perform any pre-validation; if there is a syntax or semantic error, the commit will fail and may leave the device in an uncertain state, requiring manual rollback. Because it applies changes rather than merely checking them, it is wrong for this scenario.
Trap 2: commit confirmed
The 'commit confirmed' command applies the candidate configuration immediately but starts a countdown timer, rolling back to the previous configuration if the operator does not issue 'commit confirm' within the default 10 minutes. While this offers a safety net, it does not provide a pre-validation step—the configuration is applied first and only later reverted if unconfirmed. Therefore, it is not a substitute for a syntax check.
Trap 3: show | compare
The 'show | compare' command displays the differences between the candidate configuration and the active configuration, but it performs no validation whatsoever. It only outputs a textual diff, so it cannot detect syntax errors, invalid statements, or missing mandatory configuration blocks. Thus, while useful for reviewing changes, it does not verify that the configuration is correct and is not a replacement for 'commit check'.
- A
commit
Why it fails: The 'commit' command immediately activates the candidate configuration and makes it the active configuration on the device. It does not perform any pre-validation; if there is a syntax or semantic error, the commit will fail and may leave the device in an uncertain state, requiring manual rollback. Because it applies changes rather than merely checking them, it is wrong for this scenario.
- B
commit check
The 'commit check' command validates the candidate configuration for syntax and semantic correctness exactly as a real commit would, but it discards the changes after validation, leaving the active configuration untouched. This makes it the ideal tool for the engineer to safely verify the configuration change before actually applying it. It provides a true pre-check without altering the running device.
- C
commit confirmed
Why it fails: The 'commit confirmed' command applies the candidate configuration immediately but starts a countdown timer, rolling back to the previous configuration if the operator does not issue 'commit confirm' within the default 10 minutes. While this offers a safety net, it does not provide a pre-validation step—the configuration is applied first and only later reverted if unconfirmed. Therefore, it is not a substitute for a syntax check.
- D
show | compare
Why it fails: The 'show | compare' command displays the differences between the candidate configuration and the active configuration, but it performs no validation whatsoever. It only outputs a textual diff, so it cannot detect syntax errors, invalid statements, or missing mandatory configuration blocks. Thus, while useful for reviewing changes, it does not verify that the configuration is correct and is not a replacement for 'commit check'.