How to Check Junos Configuration before Commit

The Junos candidate configuration file is only the "proposed" configuration; your device does not use any of this configuration until you activate this candidate configuration using the commit command, but first you’ll want to check your work.

While editing your candidate configuration you can make as many changes as you want, in any order that you want. You can be interrupted numerous times, and when you are done, check your work to make sure you didn’t miss anything.

For example, in configuration mode, Junos OS checks for omitted statements required at a particular hierarchy level whenever you attempt to move from that hierarchy level or when you issue the show command:

[edit protocols]
wiley@netnik# show
pim {
 interface so-0/0/0 {
   priority 4;
   version 2;
   # Warning: missing mandatory statement(s): 'mode'
 }
}
<snip>

You can use the show command at the top of configuration mode to view the entire candidate configuration or within any sub-hierarchy to see the configuration from that hierarchical level and below.

The show command displays all the statements in a configuration, one screen at a time. To see the next screen, press Enter or the spacebar.

The commit check command validates the logic and completeness of the candidate without activating any changes. These are the same validations that run when you commit the candidate configuration. If the Junos operating system finds a problem in the candidate, Junos lets you know:

[edit]
wiley@netnik# commit check
[edit interfaces lo0 unit 0 family inet]
  'address 192.168.69.1/24'
    Loopback addresses' prefix must be 32 bits
error: configuration check-out failed
blog comments powered by Disqus
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.