Wednesday, October 13, 2010

Exit Configuration Mode

To exit configuration mode, use the exit configuration-mode configuration mode command from any level, or use the exit command from the top level. For example:

[edit protocols ospf area 0.0.0.0 interface so-0/0/0]
user@host# exit configuration-mode 
exiting configuration mode
user@host> 

[edit]
user@host# exit 
exiting configuration mode
user@host> 

If you try to exit from configuration mode using the exit command and the configuration contains changes that have not been committed, you see a message and prompt:
[edit]
user@host# exit
The configuration has been changed but not committed
Exit with uncommitted changes? [yes,no] (yes) 
Exiting configuration mode
user@host> 

To exit with uncommitted changes without having to respond to a prompt, use the exit configuration-mode command. This command is useful when you are using scripts to perform remote configuration.
[edit]
user@host# exit configuration-mode
The configuration has been changed but not committed
Exiting configuration mode
user@host> 

No comments: