28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Solution<br />

Define the common information in a configuration group:<br />

[edit]<br />

aviva@router1# edit groups global<br />

[edit groups global]<br />

aviva@router1# set system domain-name mynetwork.com<br />

aviva@router1# set system backup-router 192.168.15.2<br />

aviva@router1# set system name-server 192.168.15.3<br />

aviva@router1# set system root-authentication encrypted-password $123poppI<br />

aviva@router1# set system ntp server 192.168.2.100<br />

aviva@router1# set system services ssh<br />

aviva@router1# set snmp location "JUNOS cookbook lab"<br />

aviva@router1# set snmp contact cookbook-lab-admin<br />

aviva@router1# set snmp interface fxp0.0<br />

aviva@router1# set snmp community public authorization read-only<br />

Then apply the group to the configuration:<br />

[edit]<br />

aviva@router1# set apply-groups global<br />

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

JUNOS configuration groups define common configuration snippets in one part of<br />

the router configuration, which you then import, or apply, in other parts of the configuration.<br />

This allows you to define common portions of the configuration once and<br />

have them apply in many places in the configuration, thus minimizing or eliminating<br />

the risk of configuration inconsistencies or errors. If you are a network designer who<br />

develops router configurations that are then distributed to a number of routers in a<br />

point of presence (POP) or NOC, configuration groups are a good tool for propagating<br />

common configuration snippets across a number of routers. Having this information<br />

in a separate part of the configuration also lessens the possibility that others<br />

might inadvertently modify it. Use configuration groups for network-wide information,<br />

such as the domain name, addresses of name and authentication servers, router<br />

login accounts, and static routes (as we have done in this recipe) and to make it easier<br />

to configure items that have multiple instances, such as all channels on channelized<br />

interfaces.<br />

Create the configuration groups under the [edit groups] hierarchy. The structure<br />

of the statements in the configuration group mirrors that of the complete JUNOS<br />

configuration.<br />

In this recipe, we create one configuration group named global that defines the basic<br />

router information discussed in Recipe 1.1, along with pointers to our SNMP NMS<br />

system. You can create any number of group configurations, each with a distinct<br />

name.<br />

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