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.

configuration hierarchy with the top command and then use the show | compare command,<br />

which is equivalent to the show | compare rollback 0 command. This is actually<br />

two commands: the show command displays the entire configuration, and the<br />

output is piped to the compare command, which lists only the differences between the<br />

two commands (just like the Unix diff command).<br />

The output shown in the “Solution” indicates that you have deleted the fe-1/0/1<br />

interface from the [edit interfaces] configuration hierarchy. The first line of the<br />

output shows the hierarchy level, and the minus signs indicate the deletions. Plus<br />

signs are used when you have added statements, as in this example:<br />

[edit]<br />

aviva@RouterG# show | compare<br />

[edit interfaces lo0 unit 0 family inet]<br />

address 192.168.19.1/32 { ... }<br />

+ address 127.0.0.1/32;<br />

You can also compare the current configuration with a previously committed one.<br />

The second command shows how to do this. rollback 1 is the version of the configuration<br />

you committed immediately before committing the current one. The output<br />

shown above indicates that the export send-direct statement was present at the<br />

[edit protocols ospf] hierarchy in the previous configuration but has been removed.<br />

You can also use a filename with the compare command to compare the candidate<br />

configuration to a saved file. This supports URLs and scp-style filenames, so you can<br />

use commands such as the following:<br />

[edit]<br />

aviva@RouterG# show | compare aviva@archives:nightly/my-rtr/2005-12-01.conf<br />

[edit system login user testuser]<br />

- class operator;<br />

+ class read-only;<br />

See Also<br />

Recipe 1.17<br />

1.12 Configuring the Router by Copying a File<br />

from a Server<br />

Problem<br />

You have a router configuration file on a server and you want to copy it to the router<br />

and activate it.<br />

28 | 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!