28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Here’s an example sequence of edit and exit commands to illustrate this:<br />

[edit]<br />

aviva@router1# edit protocols<br />

[edit protocols]<br />

aviva@router1# edit ospf<br />

[edit protocols ospf]<br />

aviva@router1# edit area 0.0.0.1<br />

[edit protocols ospf area 0.0.0.1]<br />

aviva@router1# exit<br />

[edit protocols ospf]<br />

aviva@router1# exit<br />

[edit protocols]<br />

aviva@router1# exit<br />

[edit]<br />

aviva@router1# exit<br />

Exiting configuration mode<br />

aviva@router1><br />

A quicker way to commit and then exit configuration mode from a lower level in the<br />

hierarchy is to use the commit command followed by the exit configuration-mode<br />

command.<br />

Perhaps the quickest way to commit and get back to operational mode is to use the<br />

commit and-quit command. You can use this command at any hierarchy level. One<br />

caveat is that this command succeeds only if there are no mistakes or syntax errors in<br />

the configuration. If the commit fails, the CLI shows an error message, and you<br />

remain in configuration mode.<br />

See Also<br />

Recipe 1.7<br />

1.10 Keeping a Record of Configuration Changes<br />

Problem<br />

When you activate a configuration, you want to include a short message that<br />

describes the changes you made.<br />

Solution<br />

Include a comment when you activate the configuration:<br />

aviva@router1# commit comment "turned on telnet"<br />

<strong>Discussion</strong><br />

It’s good practice to include a short description of the changes you made to each version<br />

of a configuration file so you can keep a history of configuration changes. You<br />

do this by using the comment option with the commit command.<br />

26 | Chapter 1: Router Configuration and File Management<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!