Juniper Junos OS User manual

Category
Software
Type
User manual
JUNOS
®
OS
Junos XML Management Protocol Guide
Release
10.3
Published: 2010-06-30
Copyright © 2010, Juniper Networks, Inc.
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, California 94089
USA
408-745-2000
www.juniper.net
This product includes the Envoy SNMP Engine, developed by Epilogue Technology, an Integrated Systems Company. Copyright © 1986-1997,
Epilogue Technology Corporation. All rights reserved. This program and its documentation were developed at private expense, and no part
of them is in the public domain.
This product includes memory allocation software developed by Mark Moraes, copyright © 1988, 1989, 1993, University of Toronto.
This product includes FreeBSD software developed by the University of California, Berkeley, and its contributors. All of the documentation
and software included in the 4.4BSD and 4.4BSD-Lite Releases is copyrighted by the Regents of the University of California. Copyright ©
1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994. The Regents of the University of California. All rights reserved.
GateD software copyright © 1995, the Regents of the University. All rights reserved. Gate Daemon was originated and developed through
release 3.0 by Cornell University and its collaborators. Gated is based on Kirton’s EGP, UC Berkeley’s routing daemon (routed), and DCN’s
HELLO routing protocol. Development of Gated has been supported in part by the National Science Foundation. Portions of the GateD
software copyright © 1988, Regents of the University of California. All rights reserved. Portions of the GateD software copyright © 1991, D.
L. S. Associates.
This product includes software developed by Maker Communications, Inc., copyright © 1996, 1997, Maker Communications, Inc.
Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United
States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other
trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are
owned by or licensed to Juniper Networks: U.S. Patent Nos. 5,473,599, 5,905,725, 5,909,440, 6,192,051, 6,333,650, 6,359,479, 6,406,312,
6,429,706, 6,459,579, 6,493,347, 6,538,518, 6,538,899, 6,552,918, 6,567,902, 6,578,186, and 6,590,785.
JUNOS
®
OS Junos XML Management Protocol Guide
Release 10.3
Copyright © 2010, Juniper Networks, Inc.
All rights reserved. Printed in USA.
Writing: Tony Mauro, Michael Scruggs, Brenda Wilden
Editing: Stella Hackell, Nancy Kurahashi, Sonia Saruba, Laura Singer
Illustration: Faith Bradford
Cover Design: Edmonds Design
Revision History
July 2010—R1 Junos 10.3
The information in this document is current as of the date listed in the revision history.
YEAR 2000 NOTICE
Juniper Networks hardware and software products are Year 2000 compliant. The Junos OS has no known time-related limitations through
the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
Copyright © 2010, Juniper Networks, Inc.ii
END USER LICENSE AGREEMENT
READ THIS END USER LICENSE AGREEMENT (“AGREEMENT”) BEFORE DOWNLOADING, INSTALLING, OR USING THE SOFTWARE.
BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE OR OTHERWISE EXPRESSING YOUR AGREEMENT TO THE TERMS
CONTAINED HEREIN, YOU (AS CUSTOMER OR IF YOU ARE NOT THE CUSTOMER, AS A REPRESENTATIVE/AGENT AUTHORIZED TO
BIND THE CUSTOMER) CONSENT TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS CONTAINED
HEREIN, THEN (A) DO NOT DOWNLOAD, INSTALL, OR USE THE SOFTWARE, AND (B) YOU MAY CONTACT JUNIPER NETWORKS
REGARDING LICENSE TERMS.
1. The Parties. The parties to this Agreement are (i) Juniper Networks, Inc. (if the Customer’s principal office is located in the Americas) or
Juniper Networks (Cayman) Limited (if the Customer’s principal office is located outside the Americas) (such applicable entity being referred
to herein as Juniper”), and (ii) the person or organization that originally purchased from Juniper or an authorized Juniper reseller the applicable
license(s) for use of the Software (“Customer”) (collectively, the “Parties”).
2. The Software. In this Agreement, “Software” means the program modules and features of the Juniper or Juniper-supplied software, for
which Customer has paid the applicable license or support fees to Juniper or an authorized Juniper reseller, or which was embedded by
Juniper in equipment which Customer purchased from Juniper or an authorized Juniper reseller. “Software” also includes updates, upgrades
and new releases of such software. “Embedded Software” means Software which Juniper has embedded in or loaded onto the Juniper
equipment and any updates, upgrades, additions or replacements which are subsequently embedded in or loaded onto the equipment.
3. License Grant. Subject to payment of the applicable fees and the limitations and restrictions set forth herein, Juniper grants to Customer
a non-exclusive and non-transferable license, without right to sublicense, to use the Software, in executable form only, subject to the
following use restrictions:
a. Customer shall use Embedded Software solely as embedded in, and for execution on, Juniper equipment originally purchased by
Customer from Juniper or an authorized Juniper reseller.
b. Customer shall use the Software on a single hardware chassis having a single processing unit, or as many chassis or processing units
for which Customer has paid the applicable license fees; provided, however, with respect to the Steel-Belted Radius or Odyssey Access
Client software only, Customer shall use such Software on a single computer containing a single physical random access memory space
and containing any number of processors. Use of the Steel-Belted Radius or IMS AAA software on multiple computers or virtual machines
(e.g., Solaris zones) requires multiple licenses, regardless of whether such computers or virtualizations are physically contained on a single
chassis.
c. Product purchase documents, paper or electronic user documentation, and/or the particular licenses purchased by Customer may
specify limits to Customer’s use of the Software. Such limits may restrict use to a maximum number of seats, registered endpoints, concurrent
users, sessions, calls, connections, subscribers, clusters, nodes, realms, devices, links, ports or transactions, or require the purchase of
separate licenses to use particular features, functionalities, services, applications, operations, or capabilities, or provide throughput,
performance, configuration, bandwidth, interface, processing, temporal, or geographical limits. In addition, such limits may restrict the use
of the Software to managing certain kinds of networks or require the Software to be used only in conjunction with other specific Software.
Customer’s use of the Software shall be subject to all such limitations and purchase of all applicable licenses.
d. For any trial copy of the Software, Customer’s right to use the Software expires 30 days after download, installation or use of the
Software. Customer may operate the Software after the 30-day trial period only if Customer pays for a license to do so. Customer may not
extend or create an additional trial period by re-installing the Software after the 30-day trial period.
e. The Global Enterprise Edition of the Steel-Belted Radius software may be used by Customer only to manage access to Customer’s
enterprise network. Specifically, service provider customers are expressly prohibited from using the Global Enterprise Edition of the
Steel-Belted Radius software to support any commercial network access services.
The foregoing license is not transferable or assignable by Customer. No license is granted herein to any user who did not originally purchase
the applicable license(s) for the Software from Juniper or an authorized Juniper reseller.
4. Use Prohibitions. Notwithstanding the foregoing, the license provided herein does not permit the Customer to, and Customer agrees
not to and shall not: (a) modify, unbundle, reverse engineer, or create derivative works based on the Software; (b) make unauthorized
copies of the Software (except as necessary for backup purposes); (c) rent, sell, transfer, or grant any rights in and to any copy of the
Software, in any form, to any third party; (d) remove any proprietary notices, labels, or marks on or in any copy of the Software or any product
in which the Software is embedded; (e) distribute any copy of the Software to any third party, including as may be embedded in Juniper
equipment sold in the secondhand market; (f) use any ‘locked or key-restricted feature, function, service, application, operation, or capability
without first purchasing the applicable license(s) and obtaining a valid key from Juniper, even if such feature, function, service, application,
operation, or capability is enabled without a key; (g) distribute any key for the Software provided by Juniper to any third party; (h) use the
iiiCopyright © 2010, Juniper Networks, Inc.
Software in any manner that extends or is broader than the uses purchased by Customer from Juniper or an authorized Juniper reseller; (i)
use Embedded Software on non-Juniper equipment; (j) use Embedded Software (or make it available for use) on Juniper equipment that
the Customer did not originally purchase from Juniper or an authorized Juniper reseller; (k) disclose the results of testing or benchmarking
of the Software to any third party without the prior written consent of Juniper; or (l) use the Software in any manner other than as expressly
provided herein.
5. Audit. Customer shall maintain accurate records as necessary to verify compliance with this Agreement. Upon request by Juniper,
Customer shall furnish such records to Juniper and certify its compliance with this Agreement.
6. Confidentiality. The Parties agree that aspects of the Software and associated documentation are the confidential property of Juniper.
As such, Customer shall exercise all reasonable commercial efforts to maintain the Software and associated documentation in confidence,
which at a minimum includes restricting access to the Software to Customer employees and contractors having a need to use the Software
for Customer’s internal business purposes.
7. Ownership. Juniper and Juniper’s licensors, respectively, retain ownership of all right, title, and interest (including copyright) in and to
the Software, associated documentation, and all copies of the Software. Nothing in this Agreement constitutes a transfer or conveyance
of any right, title, or interest in the Software or associated documentation, or a sale of the Software, associated documentation, or copies
of the Software.
8. Warranty, Limitation of Liability, Disclaimer of Warranty. The warranty applicable to the Software shall be as set forth in the warranty
statement that accompanies the Software (the “Warranty Statement”). Nothing in this Agreement shall give rise to any obligation to support
the Software. Support services may be purchased separately. Any such support shall be governed by a separate, written support services
agreement. TO THE MAXIMUM EXTENT PERMITTED BY LAW, JUNIPER SHALL NOT BE LIABLE FOR ANY LOST PROFITS, LOSS OF DATA,
OR COSTS OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,ORFORANY SPECIAL, INDIRECT,OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THIS AGREEMENT, THE SOFTWARE, OR ANY JUNIPER OR JUNIPER-SUPPLIED SOFTWARE. IN NO EVENT SHALL JUNIPER
BE LIABLE FOR DAMAGES ARISING FROM UNAUTHORIZED OR IMPROPER USE OF ANY JUNIPER OR JUNIPER-SUPPLIED SOFTWARE.
EXCEPT AS EXPRESSLY PROVIDED IN THE WARRANTY STATEMENT TO THE EXTENT PERMITTED BY LAW, JUNIPER DISCLAIMS ANY
AND ALL WARRANTIES IN AND TO THE SOFTWARE (WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE), INCLUDING ANY
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT DOES
JUNIPER WARRANT THAT THE SOFTWARE, OR ANY EQUIPMENT OR NETWORK RUNNING THE SOFTWARE, WILL OPERATE WITHOUT
ERROR OR INTERRUPTION, OR WILL BE FREE OF VULNERABILITY TO INTRUSION OR ATTACK. In no event shall Juniper’s or its suppliers’
or licensors’ liability to Customer, whether in contract, tort (including negligence), breach of warranty, or otherwise, exceed the price paid
by Customer for the Software that gave rise to the claim, or if the Software is embedded in another Juniper product, the price paid by
Customer for such other product. Customer acknowledges and agrees that Juniper has set its prices and entered into this Agreement in
reliance upon the disclaimers of warranty and the limitations of liability set forth herein, that the same reflect an allocation of risk between
the Parties (including the risk that a contract remedy may fail of its essential purpose and cause consequential loss), and that the same
form an essential basis of the bargain between the Parties.
9. Termination. Any breach of this Agreement or failure by Customer to pay any applicable fees due shall result in automatic termination
of the license granted herein. Upon such termination, Customer shall destroy or return to Juniper all copies of the Software and related
documentation in Customer’s possession or control.
10. Taxes. All license fees payable under this agreement are exclusive of tax. Customer shall be responsible for paying Taxes arising from
the purchase of the license, or importation or use of the Software. If applicable, valid exemption documentation for each taxing jurisdiction
shall be provided to Juniper prior to invoicing, and Customer shall promptly notify Juniper if their exemption is revoked or modified. All
payments made by Customer shall be net of any applicable withholding tax. Customer will provide reasonable assistance to Juniper in
connection with such withholding taxes by promptly: providing Juniper with valid tax receipts and other required documentation showing
Customer’s payment of any withholding taxes; completing appropriate applications that would reduce the amount of withholding tax to
be paid; and notifying and assisting Juniper in any audit or tax proceeding related to transactions hereunder. Customer shall comply with
all applicable tax laws and regulations, and Customer will promptly pay or reimburse Juniper for all costs and damages related to any
liability incurred by Juniper as a result of Customer’s non-compliance or delay with its responsibilities herein. Customer’s obligations under
this Section shall survive termination or expiration of this Agreement.
11. Export. Customer agrees to comply with all applicable export laws and restrictions and regulations of any United States and any
applicable foreign agency or authority, and not to export or re-export the Software or any direct product thereof in violation of any such
restrictions, laws or regulations, or without all necessary approvals. Customer shall be liable for any such violations. The version of the
Software supplied to Customer may contain encryption or other capabilities restricting Customer’s ability to export the Software without
an export license.
Copyright © 2010, Juniper Networks, Inc.iv
12. Commercial Computer Software. The Software is “commercial computer software” and is provided with restricted rights. Use,
duplication, or disclosure by the United States government is subject to restrictions set forth in this Agreement and as provided in DFARS
227.7201 through 227.7202-4, FAR 12.212, FAR 27.405(b)(2), FAR 52.227-19, or FAR 52.227-14(ALT III) as applicable.
13. Interface Information. To the extent required by applicable law, and at Customer's written request, Juniper shall provide Customer
with the interface information needed to achieve interoperability between the Software and another independently created program, on
payment of applicable fee, if any. Customer shall observe strict obligations of confidentiality with respect to such information and shall use
such information in compliance with any applicable terms and conditions upon which Juniper makes such information available.
14. Third Party Software. Any licensor of Juniper whose software is embedded in the Software and any supplier of Juniper whose products
or technology are embedded in (or services are accessed by) the Software shall be a third party beneficiary with respect to this Agreement,
and such licensor or vendor shall have the right to enforce this Agreement in its own name as if it were Juniper. In addition, certain third party
software may be provided with the Software and is subject to the accompanying license(s), if any, of its respective owner(s). To the extent
portions of the Software are distributed under and subject to open source licenses obligating Juniper to make the source code for such
portions publicly available (such as the GNU General Public License (“GPL”) or the GNU Library General Public License (“LGPL”)), Juniper
will make such source code portions (including Juniper modifications, as appropriate) available upon request for a period of up to three
years from the date of distribution. Such request can be made in writing to Juniper Networks, Inc., 1194 N. Mathilda Ave., Sunnyvale, CA
94089, ATTN: General Counsel. You may obtain a copy of the GPL at http://www.gnu.org/licenses/gpl.html, and a copy of the LGPL
at http://www.gnu.org/licenses/lgpl.html .
15. Miscellaneous. This Agreement shall be governed by the laws of the State of California without reference to its conflicts of laws
principles. The provisions of the U.N. Convention for the International Sale of Goods shall not apply to this Agreement. For any disputes
arising under this Agreement, the Parties hereby consent to the personal and exclusive jurisdiction of, and venue in, the state and federal
courts within Santa Clara County, California. This Agreement constitutes the entire and sole agreement between Juniper and the Customer
with respect to the Software, and supersedes all prior and contemporaneous agreements relating to the Software, whether oral or written
(including any inconsistent terms contained in a purchase order), except that the terms of a separate written agreement executed by an
authorized Juniper representative and Customer shall govern to the extent such terms are inconsistent or conflict with terms contained
herein. No modification to this Agreement nor any waiver of any rights hereunder shall be effective unless expressly assented to in writing
by the party to be charged. If any portion of this Agreement is held invalid, the Parties agree that such invalidity shall not affect the validity
of the remainder of this Agreement. This Agreement and associated documentation has been written in the English language, and the
Parties agree that the English version will govern. (For Canada: Les parties aux présentés confirment leur volonté que cette convention de
même que tous les documents y compris tout avis qui s'y rattaché, soient redigés en langue anglaise. (Translation: The parties confirm that
this Agreement and all related documentation is and will be in the English language)).
vCopyright © 2010, Juniper Networks, Inc.
Copyright © 2010, Juniper Networks, Inc.vi
Abbreviated Table of Contents
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Part 1 Overview
Chapter 1 Introduction to the Junos XML Management Protocol and Junos XML
API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2 Using Junos XML Management Protocol and Junos XML Tag Elements . . . 9
Part 2 Using the Junos XML Management Protocol
Chapter 3 Controlling the Junos XML Management Protocol Session . . . . . . . . . . . . . 25
Chapter 4 Requesting Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter 5 Changing Configuration Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Chapter 6 Committing a Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Chapter 7 Summary of Junos XML Protocol Tag Elements . . . . . . . . . . . . . . . . . . . . . . 149
Chapter 8 Summary of Attributes in Junos XML Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Part 3 Writing Junos XML Protocol Client Applications
Chapter 9 Writing Junos XML Protocol Perl Client Applications . . . . . . . . . . . . . . . . . 205
Chapter 10 Writing Junos XML Protocol C Client Applications . . . . . . . . . . . . . . . . . . . . 233
Part 4 Index
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Index of Statements and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
viiCopyright © 2010, Juniper Networks, Inc.
Copyright © 2010, Juniper Networks, Inc.viii
Junos 10.3 Junos XML Management Protocol Guide
Table of Contents
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Junos Documentation and Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Supported Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Using the Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Documentation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Requesting Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Self-Help Online Tools and Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Opening a Case with JTAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Part 1 Overview
Chapter 1 Introduction to the Junos XML Management Protocol and Junos XML
API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Junos XML Management Protocol and Junos XML API Overview . . . . . . . . . . . . . . 3
XML Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Junos XML and Junos XML Management Protocol Tag Elements . . . . . . . . . . 4
Document Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Advantages of Using the Junos XML Management Protocol and Junos XML
API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Overview of a Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Chapter 2 Using Junos XML Management Protocol and Junos XML Tag Elements . . . 9
XML and Junos XML Management Protocol Conventions Overview . . . . . . . . . . . . 9
Request and Response Tag Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Child Tag Elements of a Request Tag Element . . . . . . . . . . . . . . . . . . . . . . . . 10
Child Tag Elements of a Response Tag Element . . . . . . . . . . . . . . . . . . . . . . . . 11
Spaces, Newline Characters, and Other White Space . . . . . . . . . . . . . . . . . . . 11
XML Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
XML Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Predefined Entity References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Mapping Commands to Junos XML Tag Elements . . . . . . . . . . . . . . . . . . . . . . . . . 14
Mapping for Command Options with Variable Values . . . . . . . . . . . . . . . . . . . 14
Mapping for Fixed-Form Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Mapping Configuration Statements to Junos XML Tag Elements . . . . . . . . . . . . . . 15
Mapping for Hierarchy Levels and Container Statements . . . . . . . . . . . . . . . . 15
Mapping for Objects That Have an Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Mapping for Single-Value and Fixed-Form Leaf Statements . . . . . . . . . . . . . . 17
Mapping for Leaf Statements with Multiple Values . . . . . . . . . . . . . . . . . . . . . 18
ixCopyright © 2010, Juniper Networks, Inc.
Mapping for Multiple Options on One or More Lines . . . . . . . . . . . . . . . . . . . . 19
Mapping for Comments About Configuration Statements . . . . . . . . . . . . . . . 20
Using the Same Configuration Tag Elements in Requests and Responses . . . . . . 21
Part 2 Using the Junos XML Management Protocol
Chapter 3 Controlling the Junos XML Management Protocol Session . . . . . . . . . . . . . 25
Client Application’s Role in a Junos XML Protocol Session . . . . . . . . . . . . . . . . . . 25
Establishing a Junos XML Management Protocol Session . . . . . . . . . . . . . . . . . . . 26
Supported Access Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Prerequisites for Establishing a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Prerequisites for All Access Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Prerequisites for Clear-Text Connections . . . . . . . . . . . . . . . . . . . . . . . . . 29
Prerequisites for SSH Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Prerequisites for Outbound SSH Connections . . . . . . . . . . . . . . . . . . . . . 31
Prerequisites for SSL Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Prerequisites for Telnet Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Connecting to the Junos XML Protocol Server . . . . . . . . . . . . . . . . . . . . . . . . . 37
Connecting to the Junos XML Protocol Server from the Client
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Connecting to the Junos XML Protocol Server from the CLI . . . . . . . . . . 38
Starting the Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Emitting the Initialization PI and Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Parsing the Initialization PI and Tag from the Junos XML Protocol
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Verifying Software Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Supported Software Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Authenticating with the Junos XML Protocol Server . . . . . . . . . . . . . . . . . . . . 43
Submitting an Authentication Request . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Interpreting the Authentication Response . . . . . . . . . . . . . . . . . . . . . . . . 45
Exchanging Information with the Junos XML Protocol Server . . . . . . . . . . . . . . . . 45
Sending a Request to the Junos XML Protocol Server . . . . . . . . . . . . . . . . . . 46
Request Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Including Attributes in the Opening <rpc> Tag . . . . . . . . . . . . . . . . . . . . 48
Parsing the Junos XML Protocol Server Response . . . . . . . . . . . . . . . . . . . . . 48
xmlns:junos Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Junos XML Protocol Server Response Classes . . . . . . . . . . . . . . . . . . . . . 49
Using a Standard API to Parse Response Tag Elements . . . . . . . . . . . . . 50
Handling an Error or Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Halting a Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Locking and Unlocking the Candidate Configuration or Creating a Private
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Locking the Candidate Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Unlocking the Candidate Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Creating a Private Copy of the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Ending a Junos XML Protocol Session and Closing the Connection . . . . . . . . . . . 55
Displaying CLI Output as XML Tag Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Copyright © 2010, Juniper Networks, Inc.x
Junos 10.3 Junos XML Management Protocol Guide
Example of a Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Exchanging Initialization PIs and Tag Elements . . . . . . . . . . . . . . . . . . . . . . . . 57
Sending an Operational Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Locking the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Changing the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Committing the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Unlocking the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Closing the Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 4 Requesting Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Overview of the Request Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Requesting Operational Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Parsing the <output> Tag Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Requesting Configuration Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Specifying the Source and Output Format of Configuration Information . . . . . . . 65
Requesting Information from the Committed or Candidate
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Requesting Output as Formatted ASCII Text or Junos XML Tag
Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Requesting a Change Indicator for Configuration Elements . . . . . . . . . . . . . . 70
Requesting an Indicator for Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Specifying the Output Format for Configuration Groups . . . . . . . . . . . . . . . . 74
Specifying Whether Configuration Groups Are Displayed Separately . . . 75
Displaying the Source Group for Inherited Configuration Elements . . . . . 76
Examples: Specifying Output Format for Configuration Groups . . . . . . . 78
Specifying the Scope of Configuration Information to Return . . . . . . . . . . . . . . . . 81
Requesting the Complete Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Requesting a Hierarchy Level or Container Object Without an Identifier . . . . 82
Requesting All Configuration Objects of a Specified Type . . . . . . . . . . . . . . . 83
Requesting a Specified Number of Configuration Objects . . . . . . . . . . . . . . . 84
Requesting Identifiers Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Requesting One Configuration Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Requesting a Subset of Objects by Using Regular Expressions . . . . . . . . . . . 90
Requesting Multiple Configuration Elements Simultaneously . . . . . . . . . . . . 93
Requesting an XML Schema for the Configuration Hierarchy . . . . . . . . . . . . . . . . 94
Creating the junos.xsd File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Example: Requesting an XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Requesting a Previous (Rollback) Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Comparing Two Previous (Rollback) Configurations . . . . . . . . . . . . . . . . . . . . . . . 99
Requesting the Rescue Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Chapter 5 Changing Configuration Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Overview of Configuration Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Specifying the Source and Format of New Configuration Data . . . . . . . . . . . . . . 105
Providing Configuration Data in a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Providing Configuration Data as a Data Stream . . . . . . . . . . . . . . . . . . . . . . 106
Defining Configuration Data as Formatted ASCII Text or Junos XML Tag
Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
xiCopyright © 2010, Juniper Networks, Inc.
Table of Contents
Replacing the Entire Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Replacing the Configuration with New Data . . . . . . . . . . . . . . . . . . . . . . . . . 108
Rolling Back to a Previous or Rescue Configuration . . . . . . . . . . . . . . . . . . . 109
Creating, Modifying, or Deleting Configuration Elements . . . . . . . . . . . . . . . . . . . 109
Merging Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Replacing Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Creating New Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Replacing Configuration Elements Only If They Have Changed . . . . . . . . . . . 115
Deleting Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Deleting a Hierarchy Level or Container Object . . . . . . . . . . . . . . . . . . . . 117
Deleting a Configuration Object That Has an Identifier . . . . . . . . . . . . . . 117
Deleting a Single-Value or Fixed-Form Option from a Configuration
Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Deleting Values from a Multivalue Option of a Configuration Object . . 120
Reordering Elements in Configuration Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Renaming a Configuration Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Changing a Configuration Element’s Activation State . . . . . . . . . . . . . . . . . . . . . . 125
Deactivating a Newly Created Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Deactivating or Reactivating an Existing Element . . . . . . . . . . . . . . . . . . . . . 126
Changing a Configuration Element’s Activation State Simultaneously with Other
Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Replacing an Element and Setting Its Activation State . . . . . . . . . . . . . . . . . 128
Using Junos XML Tag Elements for the Replacement Element . . . . . . . 128
Using Formatted ASCII Text for the Replacement Element . . . . . . . . . . 128
Reordering an Element and Setting Its Activation State . . . . . . . . . . . . . . . . 129
Renaming an Object and Setting Its Activation State . . . . . . . . . . . . . . . . . . 129
Example: Replacing an Object and Deactivating It . . . . . . . . . . . . . . . . . . . . 130
Chapter 6 Committing a Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Verifying a Configuration Before Committing It . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Committing the Candidate Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Committing a Private Copy of the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Committing a Configuration at a Specified Time . . . . . . . . . . . . . . . . . . . . . . . . . 136
Committing the Candidate Configuration Only After Confirmation . . . . . . . . . . . 137
Committing and Synchronizing a Configuration on Redundant Control
Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Synchronizing the Configuration on Both Routing Engines . . . . . . . . . . . . . . . 141
Example: Synchronizing the Configuration on Both Routing Engines . . 142
Forcing a Synchronized Commit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Example: Forcing a Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Synchronizing Configurations Simultaneously with Other Operations . . . . . 143
Verifying the Configuration on Both Routing Engines . . . . . . . . . . . . . . . 143
Scheduling Synchronization for a Specified Time . . . . . . . . . . . . . . . . . 144
Synchronizing Configurations but Requiring Confirmation . . . . . . . . . . . 144
Logging a Message About Synchronized Configurations . . . . . . . . . . . . 145
Logging a Message About a Commit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Chapter 7 Summary of Junos XML Protocol Tag Elements . . . . . . . . . . . . . . . . . . . . . . 149
<abort/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
<abort-acknowledgement/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Copyright © 2010, Juniper Networks, Inc.xii
Junos 10.3 Junos XML Management Protocol Guide
<authentication-response> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
<challenge> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
<checksum-information> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
<close-configuration/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
<commit-configuration> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
<commit-results> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
<database-status> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
<database-status-information> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
<end-session/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
<get-checksum-information> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
<get-configuration> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
<junoscript> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
<load-configuration> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
<load-configuration-results> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
<lock-configuration/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
<open-configuration> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
<reason> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
<request-end-session/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
<request-login> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
<routing-engine> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
<rpc> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
<rpc-reply> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
<unlock-configuration/> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
<?xml?> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
<xnm:error> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
<xnm:warning> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Chapter 8 Summary of Attributes in Junos XML Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
inactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
junos:changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
junos:changed-localtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
junos:changed-seconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
junos:commit-localtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
junos:commit-seconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
junos:commit-user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
junos:group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
junos:key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
junos:position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
junos:total . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
recurse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
xmlns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
xiiiCopyright © 2010, Juniper Networks, Inc.
Table of Contents
Part 3 Writing Junos XML Protocol Client Applications
Chapter 9 Writing Junos XML Protocol Perl Client Applications . . . . . . . . . . . . . . . . . 205
Overview of the Junos::Device Perl Module and Sample Scripts . . . . . . . . . . . . . 205
Downloading the Junos XML Protocol Perl Client and Prerequisites Package . . 206
Unpacking the Junos XML Protocol Perl Client and Sample Scripts . . . . . . . . . . 207
Installing the Prerequisites Package and the Junos XML Protocol Perl Client . . . 207
Unpacking and Installing the Junos XML Protocol Perl Client Prerequisites
Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Installing the Junos XML Protocol Perl Client . . . . . . . . . . . . . . . . . . . . . . . . 209
Tutorial: Writing Perl Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Import Perl Modules and Declare Constants . . . . . . . . . . . . . . . . . . . . . . . . . 210
Connect to the Junos XML Protocol Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Satisfying Protocol Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Group Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Obtain and Record Parameters Required by the JUNOS::Device
Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Obtaining Application-Specific Parameters . . . . . . . . . . . . . . . . . . . . . . 215
Converting Disallowed Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Establishing the Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Submitting a Request to the Junos XML Protocol Server . . . . . . . . . . . . . . . . 217
Providing Method Options or Attributes . . . . . . . . . . . . . . . . . . . . . . . . . 218
Submitting a Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Example: Getting an Inventory of Hardware Components . . . . . . . . . . . 221
Example: Loading Configuration Statements . . . . . . . . . . . . . . . . . . . . . 222
Parsing and Formatting the Response from the Junos XML Protocol
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Parsing and Formatting an Operational Response . . . . . . . . . . . . . . . . 226
Parsing and Outputting Configuration Data . . . . . . . . . . . . . . . . . . . . . . 228
Closing the Connection to the Junos XML Protocol Server . . . . . . . . . . . . . . 232
Mapping CLI Commands to Perl Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Chapter 10 Writing Junos XML Protocol C Client Applications . . . . . . . . . . . . . . . . . . . . 233
Establishing a Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Accessing and Editing Device Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Part 4 Index
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Index of Statements and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Copyright © 2010, Juniper Networks, Inc.xiv
Junos 10.3 Junos XML Management Protocol Guide
List of Tables
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Table 1: Notice Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Table 2: Text and Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Part 1 Overview
Chapter 2 Using Junos XML Management Protocol and Junos XML Tag Elements . . . 9
Table 3: Predefined Entity Reference Substitutions for Tag Content Values . . . . . 13
Table 4: Predefined Entity Reference Substitutions for Attribute Values . . . . . . . . 13
Part 2 Using the Junos XML Management Protocol
Chapter 3 Controlling the Junos XML Management Protocol Session . . . . . . . . . . . . . 25
Table 5: Supported Access Protocols and Authentication Mechanisms . . . . . . . . 27
Table 6: Junos XML Protocol version 1.0 PI and Opening Tag . . . . . . . . . . . . . . . . . 43
Chapter 4 Requesting Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Table 7: Regular Expression Operators for the matching Attribute . . . . . . . . . . . . . 91
xvCopyright © 2010, Juniper Networks, Inc.
Copyright © 2010, Juniper Networks, Inc.xvi
Junos 10.3 Junos XML Management Protocol Guide
About This Guide
This preface provides the following guidelines for using the JUNOS
®
OS Junos XML
Management Protocol Guide:
Junos Documentation and Release Notes on page xvii
Objectives on page xvii
Audience on page xviii
Supported Platforms on page xix
Using the Indexes on page xix
Documentation Conventions on page xix
Documentation Feedback on page xxi
Requesting Technical Support on page xxi
Junos Documentation and Release Notes
For a list of related Junos documentation, see
http://www.juniper.net/techpubs/software/junos/ .
If the information in the latest release notes differs from the information in the
documentation, follow the Junos Release Notes.
To obtain the most current version of all Juniper Networks
®
technical documentation,
see the product documentation page on the Juniper Networks website at
http://www.juniper.net/techpubs/.
Juniper Networks supports a technical book program to publish books by Juniper Networks
engineers and subject matter experts with book publishers around the world. These
books go beyond the technical documentation to explore the nuances of network
architecture, deployment, and administration using the Junos operating system (Junos
OS) and Juniper Networks devices. In addition, the Juniper Networks Technical Library,
published in conjunction with O'Reilly Media, explores improving network security,
reliability, and availability using Junos OS configuration techniques. All the books are for
sale at technical bookstores and book outlets around the world. The current list can be
viewed at http://www.juniper.net/books .
Objectives
This guide describes how to use the Junos Extensible Markup Language (XML)
management protocol and the Junos XML application programming interface (API) to
xviiCopyright © 2010, Juniper Networks, Inc.
configure or request information from the Junos XML protocol server on a device running
Junos OS.
NOTE: For additional information about Junos OS—either corrections to or information
that might have been omitted from this guide—see the software release notes at
http://www.juniper.net/.
Audience
This guide is designed for network administrators who are configuring and monitoring a
Juniper Networks M Series, MX Series, T Series, EX Series, or J Series router or switch.
This guide is designed for Juniper Networks customers who want to write custom
applications for configuring or monitoring a Juniper Networks device that runs the Junos
OS. It assumes that you are familiar with basic terminology and concepts of XML, with
XML-parsing utilities such as the Document Object Model (DOM) or Simple API for XML
(SAX), and with the Junos OS command-line interface (CLI).
To use this guide, you need a broad understanding of networks in general, the Internet
in particular, networking principles, and network configuration. You must also be familiar
with one or more of the following Internet routing protocols:
Border Gateway Protocol (BGP)
Distance Vector Multicast Routing Protocol (DVMRP)
Intermediate System-to-Intermediate System (IS-IS)
Internet Control Message Protocol (ICMP) device discovery
Internet Group Management Protocol (IGMP)
Multiprotocol Label Switching (MPLS)
Open Shortest Path First (OSPF)
Protocol-Independent Multicast (PIM)
Resource Reservation Protocol (RSVP)
Routing Information Protocol (RIP)
Simple Network Management Protocol (SNMP)
Personnel operating the equipment must be trained and competent; must not conduct
themselves in a careless, willfully negligent, or hostile manner; and must abide by the
instructions provided by the documentation.
Copyright © 2010, Juniper Networks, Inc.xviii
Junos 10.3 Junos XML Management Protocol Guide
Supported Platforms
For the features described in this manual, Junos OS currently supports the following
platforms:
EX Series
J Series
M Series
MX Series
SRX Series
T Series
Using the Indexes
This reference contains two indexes: a standard index with topic entries, and an index of
tags and attributes.
Documentation Conventions
Table 1 on page xix defines notice icons used in this guide.
Table 1: Notice Icons
DescriptionMeaningIcon
Indicates important features or instructions.Informational note
Indicates a situation that might result in loss of data or hardware damage.Caution
Alerts you to the risk of personal injury or death.Warning
Alerts you to the risk of personal injury from a laser.Laser warning
Table 2 on page xx defines the text and syntax conventions used in this guide.
xixCopyright © 2010, Juniper Networks, Inc.
About This Guide
Table 2: Text and Syntax Conventions
ExamplesDescriptionConvention
To enter configuration mode, type the
configure command:
user@host> configure
Represents text that you type.Bold text like this
user@host> show chassis alarms
No alarms currently active
Represents output that appears on the
terminal screen.
Fixed-width text like this
A policy term is a named structure
that defines match conditions and
actions.
Junos System Basics Configuration
Guide
RFC 1997, BGP Communities Attribute
Introduces important new terms.
Identifies book names.
Identifies RFC and Internet draft titles.
Italic text like this
Configure the machine’s domain name:
[edit]
root@# set system domain-name
domain-name
Represents variables (options for which
you substitute a value) in commands or
configuration statements.
Italic text like this
To configure a stub area, include the
stub statement at the [edit protocols
ospf area area-id] hierarchy level.
The console port is labeled CONSOLE.
Represents names of configuration
statements, commands, files, and
directories; IP addresses; configuration
hierarchy levels; or labels on routing
platform components.
Plain text like this
stub <default-metric metric>;Enclose optional keywords or variables.< > (angle brackets)
broadcast | multicast
(string1 | string2 | string3)
Indicates a choice between the mutually
exclusive keywords or variables on either
side of the symbol. The set of choices is
often enclosed in parentheses for clarity.
| (pipe symbol)
rsvp { # Required for dynamic MPLS onlyIndicates a comment specified on the
same line as the configuration statement
to which it applies.
# (pound sign)
community name members [
community-ids ]
Enclose a variable for which you can
substitute one or more values.
[ ] (square brackets)
[edit]
routing-options {
static {
route default {
nexthop address;
retain;
}
}
}
Identify a level in the configuration
hierarchy.
Indention and braces ( { } )
Identifies a leaf statement at a
configuration hierarchy level.
; (semicolon)
J-Web GUI Conventions
Copyright © 2010, Juniper Networks, Inc.xx
Junos 10.3 Junos XML Management Protocol Guide
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282

Juniper Junos OS User manual

Category
Software
Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI