RE: Method to find any changes in configuration

From: Mike Baker (mb@juniper.net)
Date: Fri Dec 21 2001 - 04:47:14 EST


Nicolas, et al

If you just want to the delta between two configurations in the
CLI, try
        show | compare rollback # | match "^[+-]"

This will compare your current configuration (the show command)
with a previous configuration (rollback #) and then match only
the modifications (grep "^[+-]").

That way you don't have to scroll through the whole config just
to get the deltas.

mb

-----Original Message-----
From: Nicolas FEVRIER [mailto:nicolas.fevrier@free.fr]
Sent: Thursday, December 20, 2001 10:20 PM
To: juniper-nsp@puck.nether.net
Subject: Re: Method to find any changes in configuration

First, when you enter into a configuration that have been modified
but not commited, the CLI warns you :

root@M5-1> edit
Entering configuration mode
The configuration has been changed but not committed
[edit]
root@M5-1#

So if you type "commit", you also will commit the changes made earlier.
An easy way to know which part of the config as been changed is to
compare it with the rollback version

> There's a "compare" command built in to the CLI. The general syntax is
> show configuration | compare

[edit]
root@M5-1# show | compare rollback 1
 version 5.1R1.4;
[...]
 chassis {
     aggregated-devices {
         ethernet {
             device-count 2;
         }
     }
 }
 interfaces {
     so-0/1/0 {
+ disable;
+ sonet-options {
+ loopback local;
+ }
         unit 0 {
             family inet {
                 address 10.50.1.2/30;
[...]

The "+" point to the added lines, "-" to the removed ones.

Any way, it's highly recommanded to define a log file for the cli
commands
and to use a syslog server to be informed as soon as a command is
typed on the router :

[edit system syslog]
root@M5-1# show
user * {
    any emergency;
}
host 10.1.1.1 {
    interactive-commands notice;
}
file messages {
    any notice;
    authorization info;
}
file cli-commands {
    interactive-commands notice;
    archive size 100000 files 10;
}

HTH,
Nicolas.



This archive was generated by hypermail 2b29 : Mon Aug 05 2002 - 10:42:38 EDT