- play_arrow Overview
- play_arrow NETCONF XML Management Protocol Overview
- play_arrow NETCONF and Junos XML Tags Overview
- XML and Junos OS Overview
- XML Overview
- XML and NETCONF XML Management Protocol Conventions Overview
- Map Junos OS Commands and Command Output to Junos XML Tag Elements
- Map Configuration Statements to Junos XML Tag Elements
- Using NETCONF Configuration Response Tag Elements in NETCONF Requests and Configuration Changes
-
- play_arrow Manage NETCONF Sessions
- play_arrow NETCONF Session Overview
- play_arrow Manage NETCONF Sessions
- Establish an SSH Connection for a NETCONF Session
- NETCONF Sessions over Transport Layer Security (TLS)
- NETCONF and Shell Sessions over Enhanced Outbound HTTPS
- NETCONF Sessions over Outbound HTTPS
- NETCONF Call Home Sessions
- NETCONF Sessions
- Sample NETCONF Session
- How Character Encoding Works on Juniper Networks Devices
- Configure RFC-Compliant NETCONF Sessions
- NETCONF Monitoring
- NETCONF Event Notifications
- play_arrow NETCONF Tracing Operations
- play_arrow NETCONF Protocol Operations and Attributes
- play_arrow NETCONF Request and Response Tags
- play_arrow Junos XML Protocol Elements Supported in NETCONF Sessions
- <abort/>
- <abort-acknowledgement/>
- <checksum-information>
- <close-configuration/>
- <commit-configuration>
- <commit-results>
- <commit-revision-information>
- <database-status>
- <database-status-information>
- <end-session/>
- <get-checksum-information>
- <get-configuration>
- <load-configuration>
- <load-configuration-results>
- <lock-configuration/>
- <open-configuration>
- <reason>
- <request-end-session/>
- <routing-engine>
- <unlock-configuration/>
- <xnm:error>
- <xnm:warning>
- play_arrow Junos XML Protocol Element Attributes Supported in NETCONF Sessions
-
- play_arrow Manage Configurations Using NETCONF
- play_arrow Change the Configuration Using NETCONF
- Edit the Configuration Using NETCONF
- Upload and Format Configuration Data in a NETCONF Session
- Set the Edit Configuration Mode in a NETCONF Session
- Handle Errors While Editing the Candidate Configuration in a NETCONF Session
- Replace the Candidate Configuration Using NETCONF
- Roll Back Uncommitted Changes in the Candidate Configuration Using NETCONF
- Delete the Configuration Using NETCONF
- Change Individual Configuration Elements Using NETCONF
- Merge Configuration Elements Using NETCONF
- Create Configuration Elements Using NETCONF
- Delete Configuration Elements Using NETCONF
- Replace Configuration Elements Using NETCONF
- Replace Patterns in Configuration Data Using the NETCONF or Junos XML Protocol
- play_arrow Commit the Configuration Using NETCONF
- play_arrow Ephemeral Configuration Database
- Understanding the Ephemeral Configuration Database
- Unsupported Configuration Statements in the Ephemeral Configuration Database
- Enable and Configure Instances of the Ephemeral Configuration Database
- Commit and Synchronize Ephemeral Configuration Data Using the NETCONF or Junos XML Protocol
- Managing Ephemeral Configuration Database Space
- Example: Configure the Ephemeral Configuration Database Using NETCONF
-
- play_arrow Request Operational and Configuration Information Using NETCONF
- play_arrow Request Operational Information Using NETCONF
- play_arrow Request Configuration Information Using NETCONF
- Request the Committed Configuration and Device State Using NETCONF
- Request Configuration Data Using NETCONF
- Specify the Source for Configuration Information Requests Using NETCONF
- Specify the Scope of Configuration Information to Return in a NETCONF Response
- Request the Complete Configuration Using NETCONF
- Request a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF
- Request All Configuration Objects of a Specified Type Using NETCONF
- Request Identifiers for Configuration Objects of a Specified Type Using NETCONF
- Request A Specific Configuration Object Using NETCONF
- Request Specific Child Tags for a Configuration Object Using NETCONF
- Request Multiple Configuration Elements Simultaneously Using NETCONF
- Retrieve a Previous (Rollback) Configuration Using NETCONF
- Compare Two Previous (Rollback) Configurations Using NETCONF
- Retrieve the Rescue Configuration Using NETCONF
- Request an XML Schema for the Configuration Hierarchy Using NETCONF
-
- play_arrow YANG
- play_arrow YANG Overview
- Understanding YANG on Devices Running Junos OS
- Understanding Junos YANG Modules
- YANG Modules Overview
- Understanding the YANG Modules That Define the Junos OS Configuration
- Understanding the YANG Modules for Junos Operational Commands
- Junos Genstate YANG Data Models
- Understanding the Junos DDL Extensions YANG Module
- YANG Metadata Annotations for Junos Devices
- Use Juniper Networks YANG Modules
- play_arrow Create and Use Non-Native YANG Modules
- Understanding the Management of Nonnative YANG Modules on Devices Running Junos OS
- Manage YANG Packages, Modules, and Scripts on Junos Devices
- Managing YANG Packages and Configurations During a Software Upgrade or Downgrade
- Create Translation Scripts for YANG Configuration Models
- Disable and Enable YANG Translation Scripts on Devices Running Junos OS
- Commit and Display Configuration Data for Nonnative YANG Modules
- Create Custom RPCs in YANG for Devices Running Junos OS
- Create Action Scripts for YANG RPCs on Junos Devices
- Use Custom YANG RPCs on Devices Running Junos OS
- Example: Use a Custom YANG RPC to Retrieve Operational Information on Junos Devices
- Understanding Junos OS YANG Extensions for Formatting RPC Output
- Customize YANG RPC Output on Devices Running Junos OS
- Define Different Levels of Output in Custom YANG RPCs for Junos Devices
- Display Valid Command Option and Configuration Statement Values in the CLI for Custom YANG Modules
- Configure a NETCONF Proxy Telemetry Sensor in Junos
-
- play_arrow OpenDaylight Integration
- play_arrow Configure OpenDaylight Integration
-
- play_arrow Configuration Statements and Operational Commands
Understanding the NETCONF Perl Client and Sample Scripts
Devices running Junos OS support the NETCONF XML management protocol, which enables client applications to request and change configuration information on the devices. The NETCONF protocol uses an Extensible Markup Language (XML)-based data encoding for the configuration data and remote procedure calls. The Juniper Networks NETCONF Perl API enables programmers familiar with the Perl programming language to create their own Perl applications to manage devices running Junos OS over NETCONF.
Prior to Junos OS Release 16.1, every Junos OS release included a new, release-dependent version of the NETCONF Perl client. Beginning in Junos OS Release 16.1, the NETCONF Perl client is release-independent, is hosted on GitHub and CPAN, and can manage devices running any version of the Junos OS release. The modules and sample scripts in the release-dependent versions of the NETCONF Perl distribution differ from those in the release-independent version hosted on GitHub and CPAN.
This section includes the following topics:
NETCONF Perl Client Modules
Table 1 summarizes
the modules in the release-independent version of the NETCONF Perl
library. The Net::Netconf::Manager
module
provides an object-oriented interface for communicating with the NETCONF
server on devices running Junos OS, and enables you to easily connect
to the device, establish a NETCONF session, and execute operational
and configuration requests. Client applications only directly invoke
the Net::Netconf::Manager
object. When
the client application creates a Manager
object, it supplies the device name and the login name to use when
accessing the device. The login name determines the client application's
access level on the device.
Module | Description |
---|---|
| Creates an |
| Declares all NETCONF constants. |
| Implements an object-oriented interface to the NETCONF API supported by devices running Junos OS. Objects of this class represent the local side of the connection to the device, which communicates to the client using the NETCONF protocol. |
| Facilitates the development of XML documents for both operational and configuration requests. The module uses |
| Instantiates and returns a NETCONF or Junos XML |
| SAX-based parser that parses responses from the NETCONF server. |
| Provides SSH access to a |
| Provides tracing levels and enables tracing based on the requested debug level. |
The following module is new in the release-independent version
of the NETCONF Perl client: EzEditXML
.
The following modules were removed in the release-independent
version of the NETCONF Perl client: Transform
, Plugins
, and Version
.
Client applications can also leverage Perl modules in the public domain to ease the development of NETCONF Perl client applications. Because NETCONF uses XML-based data encoding, client applications can make use of the many Perl modules that manipulate XML data.
You can use the NETCONF Perl client to create Perl applications that connect to a device, establish a NETCONF session, and execute operations. The communication between the client and the NETCONF server on the device through the NETCONF Perl API involves the following steps:
Establishing a NETCONF session over SSHv2 between the client application and the NETCONF server on the device running Junos OS.
Creating RPCs corresponding to requests and sending these requests to the NETCONF server.
Receiving and processing the RPC replies from the NETCONF server.
Sample Scripts
The NETCONF Perl distribution includes an examples directory with the following sample scripts that illustrate how to use the modules to perform various functions. For instructions on running the scripts, see the README file in the NETCONF Perl GitHub repository at https://github.com/Juniper/netconf-perl.
diagnose_bgp/diagnose_bgp.pl—Illustrates how to monitor the status of the device and diagnose problems. The script extracts and displays information about a device's unestablished Border Gateway Protocol (BGP) peers from the full set of BGP configuration data.
get_chassis_inventory/get_chassis_inventory.pl—Illustrates how to use a predefined query to request information from a device. The sample script invokes the
get_chassis_inventory
query with thedetail
option to request the same information as returned by the Junos XML<get-chassis-inventory><detail/></get-chassis-inventory>
request and the CLI operational mode commandshow chassis hardware detail
.edit_configuration/edit_configuration.pl—Illustrates how to configure the device by loading a file that contains configuration data formatted with Junos XML tag elements. The distribution includes a sample configuration file, config.xml; however, you can specify a different configuration file on the command line when you invoke the script.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.