Deep Magic for Advanced Techs

For those of you who are intrepid enough to travel beyond the confines of the CLI and GUI, JUNOS software offers a powerful onboard scripting processor that includes application programming interfaces (APIs) for creating scripts and clients capable of providing better coverage and high availability. Using the JUNOScript API and Extensible Markup Language (XML), you can automate monitoring, troubleshooting, and configuration of network equipment, thus possibly preventing human error from leading to network downtime. Full coverage of how to implement JUNOS scripting in your network would require a book of its own. This section provides a good start, explaining how scripting works. The JUNOS documentation itself provides additional explanation, and you can also find example scripts on the Internet that are easy to understand and to modify, especially if you have a basic understanding of Perl scripting.


The key to using the extended JUNOS API capabilities is to understand XML and how it interacts with JUNOS in your network equipment. Network devices natively running the JUNOS software support XML. You can use XML to parse input and output from the device and its software modules. To communicate with the processes on the network device, you use either the JUNOS XML API or the JUNOScript API. Both APIs enable the Juniper networking equipment to accept and respond to request and configuration changes encoded in XML. The APIs take the XML input and ...

Get JUNOS High Availability now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.