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.

For the initial router configuration to take effect—and in fact for any router configuration<br />

or configuration changes to take effect—you use the commit command. This command<br />

verifies that there are no syntax errors in the configuration and then activates it.<br />

root@# commit<br />

root@router1#<br />

It’s worthwhile to take a moment to comment on the style you use to type configuration<br />

statements on JUNOS routers. In this recipe, you are at the [edit] configuration<br />

hierarchy level, which is the very top level of the hierarchy, so you have to type<br />

the full hierarchy to the statement as well as the statement itself. This hierarchy is<br />

fairly shallow, so there is not too much extra typing. When you are working in<br />

deeper hierarchies, you may find it easier to move to that hierarchy level, both so you<br />

have less typing to do and have a better sense of where you are in the configuration.<br />

For this recipe, you could type most of the configuration commands from the [edit<br />

system] hierarchy level:<br />

root# cli<br />

root@><br />

cli> configure<br />

[edit]<br />

root@# edit system<br />

[edit system]<br />

root@# set host-name router1<br />

root@# set domain-name mynetwork.com<br />

root@# set backup-router 192.168.15.2<br />

root@# set name-server 192.168.15.3<br />

root@# set root-authentication plain-text-password<br />

New password: $123poppI<br />

Retype password: $123poppI<br />

Then when you use the show command, you see only the statements at the [edit<br />

system] level:<br />

[edit system]<br />

root@#show<br />

host-name router1;<br />

domain-name mynetwork.com;<br />

backup-router 192.168.15.2;<br />

root-authentication {<br />

encrypted-password "$1$ZUlES4dp$OUwWo1g7cLoV/aMWpHUnC/"; ## SECRET-DATA;<br />

}<br />

name-server {<br />

192.168.15.3;<br />

}<br />

In portions of the configuration where you are using the same configuration command<br />

repeatedly with only minor variations, it is handy to use the keystroke<br />

sequences listed in Table 1-1.<br />

Configuring the Router for the First Time | 15<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!