Mailing List Archive

Ignoring IP-Host DIFF in Cisco configs
Hello all- new to the group and rancid, like what I see so far.

It seems like a new "feature" (or maybe it's been there forever and I
haven't noticed it) of IOS is that it puts the most-recently used IP host
entry at the top of the host list. This of course causes the DIFF to be
triggered, and with rancid, for the version number to increment.

Is there anyway to filter this out of rancid's diff? (understanding that it
can be filtered from the mail update, but I'd like to not see the version
number increment every time someone uses a host name). Is there a way to
turn this off in IOS?

I searched the mail archive for an answer, to no avail. Any insight is
greatly appreciated.

Brian Apley
CCIE #7599
Ignoring IP-Host DIFF in Cisco configs [ In reply to ]
On Wed, Apr 30, 2003 at 01:32:42PM -0400, Brian Apley wrote:
> It seems like a new "feature" (or maybe it's been there forever and I
> haven't noticed it) of IOS is that it puts the most-recently used IP host
> entry at the top of the host list. This of course causes the DIFF to be
> triggered, and with rancid, for the version number to increment.

Example of what you are talking about?
Its easy to sort stuff but you kinda have to know the sytax of the
statement first.
--asp
Ignoring IP-Host DIFF in Cisco configs [ In reply to ]
Sure- example-

within the cisco config, we have a series of ip host commands, i.e.-

ip host a2e 10.5.1.17
ip host a1e 10.5.1.18
ip host nsp 10.6.1.15

Believe it or not (and I wasn't aware IOS did this), but the order that
these commands appear in the config changes based on what host was used
last.

So, if I used the nsp hostname from the CLI (by typing "nsp" or "telnet
nsp"), the config would then look like-

ip host nsp 10.6.1.15
ip host a2e 10.5.1.17
ip host a1e 10.5.1.18

This of course represents a DIFF.

What I'm looking for is a way to ignore these types of DIFFs- not only for
the mailer broadcast, but ignore them completely, so that the version number
doesn't get incremented.

Thanks again.
Ignoring IP-Host DIFF in Cisco configs [ In reply to ]
On Wed, Apr 30, 2003 at 01:46:54PM -0400, Brian Apley wrote:
> ip host a2e 10.5.1.17
> ip host a1e 10.5.1.18
> ip host nsp 10.6.1.15

There is some stuff in rancid to order "ip host line\d+" commands,
but it looks like this ip host stuff is more than just the line\d+
stuff, so try this patch & let me know if it works.
--asp

Index: rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v
retrieving revision 1.136
diff -u -r1.136 rancid.in
--- rancid.in 28 Apr 2003 06:09:12 -0000 1.136
+++ rancid.in 30 Apr 2003 17:53:19 -0000
@@ -1239,9 +1239,9 @@
ProcessHistory("NTP","keysort",$sortkey,"$_");
next;
}
- # order ip host line statements
- /^ip host line(\d+)/ &&
- ProcessHistory("IPHOST","numsort","$1","$_") && next;
+ # order ip host statements
+ /^ip host (\S+) / &&
+ ProcessHistory("IPHOST","keysort","$1","$_") && next;
# order ip nat source static statements
/^ip nat (\S+) source static (\S+)/ &&
ProcessHistory("IP NAT $1","ipsort","$2","$_") && next;
Ignoring IP-Host DIFF in Cisco configs [ In reply to ]
That did the trick- thanks much, appreciate the quick response!