[j-nsp] JUNOS syntax checker

Phil Shafer phil at juniper.net
Tue Aug 10 16:41:02 EDT 2004


Jeff Wheeler writes:
>Is there any sort of JUNOS configuration syntax checker available? 

There's the "test configuration <url>" command in junos, which
might be sufficient for you.  The configuration is loaded and
checked, but doesn't affect the candidate or committed configs.

root at mybox> test configuration phil at myserver:juniper.conf 
juniper.conf                                            100%   15KB  14.5KB/s   00:00    
configuration check succeeds

root at mybox> test configuration phil at myserver:/etc/motd
motd                                                    100%   79     0.1KB/s   00:00    
phil at 152.14.12.27:/etc/motd:1:(7) syntax error: FreeBSD
  [edit]
    'FreeBSD 4.9-STABLE (ZAP) #0: Mon Nov 17 16:11:24 EST 2003'
      syntax error
error: configuration syntax failed

root at mybox> 

Thanks,
 Phil


More information about the juniper-nsp mailing list