Somewhat confusing explanation since you are comparing commands from inside and outside of config mode. "show | compare" or "show | compare rollback #" are used from config mode. "show configuration | compare rollback #" is used when not in config mode.
"show | compare" is the same thing as "show | compare rollback 0". 0 is the currently active configuration. 1 is the configuration that was active before 0, 2 is the one active before 1, and so on up to the commit history limit.
So, why would 0 and 1 show the same when comparing inside config mode? One simple reason is because the last commit was a confirmed commit.
set interfaces ge-0/0/0 description "test 0/0/0"
commit confirmed
commit
That makes rollback 0 and rollback 1 the exact same so any compare you do will be the same. If someone does a "commit full" without any changes in order to poke all the system daemons you'll see the same thing.
Another possible reason is because you are doing the show | compare from inside interfaces. The compare shows what is different from your current configuration level and below, not the entire configuration. If you want to compare against the entire configuration you need to be at the top level of the configuration.
For example, here are two updates to two different configuration areas.
[edit]
cmyers@lab-mx960-1.re0# set interfaces ge-0/0/0 description "test 0"
[edit]
cmyers@lab-mx960-1.re0# commit
commit complete
[edit]
cmyers@lab-mx960-1.re0# set routing-options options syslog upto debug
[edit]
cmyers@lab-mx960-1.re0# commit
commit complete
Now, I want to go in and change the description for ge-0/0/0.
[edit]
cmyers@lab-mx960-1.re0# edit interfaces
[edit interfaces]
cmyers@lab-mx960-1.re0# set ge-0/0/0 description "test 2"
[edit interfaces]
cmyers@lab-mx960-1.re0# show | compare
[edit interfaces ge-0/0/0]
- description "test 0";
+ description "test 2";
That's what you expect. But what about comparing against rollback 1?
[edit interfaces]
cmyers@lab-mx960-1.re0# show | compare rollback 1
[edit interfaces ge-0/0/0]
- description "test 0";
+ description "test 2";
Because we are in the interfaces stanza, compare will only show me the differences inside the interfaces stanza, nowhere else. To be safe and see all differences you need to be at the top of the configuration hierarchy.
[edit interfaces]
cmyers@lab-mx960-1.re0# top
[edit]
cmyers@lab-mx960-1.re0#
Now, let's do the show | compare again to see how it compares to the current active config.
[edit]
cmyers@lab-mx960-1.re0# show | compare
[edit interfaces ge-0/0/0]
- description "test 0";
+ description "test 2";
OK, that's what we expect. Now what about the config before that?
[edit]
cmyers@lab-mx960-1.re0# show | compare rollback 1
[edit interfaces ge-0/0/0]
- description "test 0";
+ description "test 2";
[edit routing-options options syslog]
- upto info;
+ upto debug;
Ah-ha! Now we can see the other change back in rollback 1.
-Chad