Juniper J-Series Administration Manual page 112

Juniper networks router administration guide
Hide thumbs Also See for J-Series:
Table of Contents

Advertisement

J-series
Services Router Administration Guide
Consider the following examples of actions you can perform with commit scripts:
The scripting language you use for writing commit scripts is Extensible Stylesheet
Language Transformations (XSLT). XSLT commit scripts are based on JUNOScript
Extensible Markup Language (XML).
Enabling Commit Scripts
To enable commit scripts:
1.
2.
3.
4.
5.
90
Defining and Enforcing Configuration Rules with Commit Scripts
Generate custom warning messages, system log messages, or error messages.
If error messages are generated, the commit operation fails and the candidate
configuration remains unchanged.
Change the configuration in accordance with your rules and then proceed with
the commit operation.
Run a basic sanity test. Ensure that the
hierarchies have not been accidentally deleted.
Check configuration consistency. Ensure that every T1 interface configured at
the
[edit interfaces]
hierarchy level is also configured at the
hierarchy level.
Enforce network design rules. For example, suppose your network design requires
every interface on which the International Organization for Standardization (ISO)
family of protocols is enabled to also have Multiprotocol Label Switching (MPLS)
enabled. At commit time, a commit script inspects the configuration and issues
an error if this requirement is not met. This error causes the commit operation
to fail and forces the user to update the configuration to comply.
Instead of an error, the commit script can issue a warning about the configuration
problem and then automatically correct it, by changing the configuration to
enable MPLS on all interfaces. A system log message can also be generated
indicating that corrective action was taken.
Write a commit script.
For information about writing commit scripts, see the JUNOS Configuration and
Diagnostic Automation Guide.
Copy the script to the
/var/db/scripts/commit
Only users with superuser privileges can access and edit files in the
/var/db/scripts/commit
directory.
Navigate to the top of the configuration hierarchy in either the J-Web or CLI
configuration editor.
Perform the configuration tasks described in Table 43 on page 91.
If you are finished configuring the network, commit the configuration.
and
[edit interfaces]
[edit protocols]
[edit protocols rip]
directory.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents