Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Request the Complete Configuration Using NETCONF

date_range 15-Jul-21

In a NETCONF session with a device running Junos OS, to request the entire candidate configuration or the complete configuration in the open configuration database, a client application encloses <get-config> and <source> tag elements and the <candidate/> tag in an <rpc> tag element:

content_copy zoom_out_map
<rpc>
    <get-config>
        <source>
            <candidate/>
        </source>
    </get-config>
</rpc>
]]>]]>
Note:

If a client application issues the Junos XML protocol <open-configuration> operation to open a specific configuration database before executing the <get-config> operation, setting the source to <candidate/> retrieves the configuration data from the open configuration database. Otherwise, the server returns the configuration data from the candidate configuration.

To request the entire active configuration, a client application encloses <get-config> and <source> tag elements and the <running/> tag in an <rpc> tag element:

content_copy zoom_out_map
<rpc>
    <get-config>
        <source>
            <running/>
        </source>
    </get-config>
</rpc>
]]>]]>

The NETCONF server encloses its reply in <rpc-reply>, <data>, and <configuration> tag elements. For information about the attributes in the opening <configuration> tag, see Specify the Source for Configuration Information Requests Using NETCONF.

content_copy zoom_out_map
<rpc-reply xmlns="URN" xmlns:junos="URL">
    <data>
         <configuration attributes>
             <!-- Junos XML tag elements representing the configuration -->
        </configuration>
    </data>
</rpc-reply>
]]>]]>
footer-navigation