Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Verifying Configuration Syntax Using the Junos XML Protocol

In a Junos XML protocol session with a device running Junos OS, during the process of committing the candidate configuration or a private copy, the Junos XML protocol server first confirms that the candidate configuration is syntactically correct. If the syntax check fails, the server does not commit the configuration. To avoid the potential complications of such a failure, it often makes sense to confirm the correctness of the candidate configuration before actually committing it.

To verify the syntax of the candidate configuration prior to committing it, a client application encloses an empty <check/> tag in the <commit-configuration> and <rpc> tag elements.

The Junos XML protocol server encloses its response in <rpc-reply>, <commit-results>, and <routing-engine> tag elements. If the candidate configuration syntax is valid, the <routing-engine> tag element encloses the <commit-check-success/> tag and the <name> tag element, which reports the name of the Routing Engine on which the check succeeded (re0 on routing platforms that use a single Routing Engine, and either re0 or re1 on routing platforms that can have two Routing Engines).

If the candidate configuration syntax is not valid, the server returns an <xnm:error> element, which encloses child tag elements that describe the error.

The <check/> tag can be combined with the <synchronize/> tag to verify the check the syntactic correctness of a local configuration on both Routing Engines.