Discussion:
[rancid] VRF table-id 0 not active on Cisco IOS XE Switches
Peter Conrad
2014-02-03 16:44:13 UTC
Permalink
Hi, I have quite a few Cisco 4500-E switches running IOS XE. Every time a
switch is logged into, this line is in the next RANCID diff:

!

config-register 0x2101

% VRF table-id 0 not active

+ % VRF table-id 0 not active

!



The next run, the line is removed:

!

config-register 0x2101

% VRF table-id 0 not active

- % VRF table-id 0 not active

!



This is rather annoying because I have other systems that login to the
switches on a regular basis, so my RANCID diffs are full of this spam now.



Is there any way to filter out the line "% VRF table-id 0 not active" so
this doesn't happen again?



Thanks
Alan McKinnon
2014-02-03 16:59:26 UTC
Permalink
That's very easy to do, rancid itself is full of such rules.

For an example, look in sub ShowFlash for the script "rancid", you will
see this near line 716:

# Filter dhcp database
next if (/dhcp_[^. ]*\.txt/);

if the regular expression matches, the code branches to the next line in
the input, effectively skipping over the unwanted input.

Which IOS command returns your unwanted line? Find the command in
@commandtable near the end of the script, it points to the sub that
parses that command. Edit the sub by putting your custom code in it
somewhere reasonable:

next if (/VRF table-id 0 not active/);

Almost all reasonable rancid installations acquire a collection of
customizations like this, it's how we users make rancid do what we need
it to do :-)

You might want to tweak that regex a bit more, eg the 0 so probably use
a /d+, I will leave that up to you.




On 03/02/2014 18:44, Peter Conrad wrote:
> Hi, I have quite a few Cisco 4500-E switches running IOS XE. Every time
> a switch is logged into, this line is in the next RANCID diff:
>
> !
>
> config-register 0x2101
>
> % VRF table-id 0 not active
>
> + % VRF table-id 0 not active
>
> !
>
>
>
> The next run, the line is removed:
>
> !
>
> config-register 0x2101
>
> % VRF table-id 0 not active
>
> - % VRF table-id 0 not active
>
> !
>
>
>
> This is rather annoying because I have other systems that login to the
> switches on a regular basis, so my RANCID diffs are full of this spam now.
>
>
>
> Is there any way to filter out the line “% VRF table-id 0 not active” so
> this doesn’t happen again?
>
>
>
> Thanks
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-***@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>


--
Alan McKinnon
***@gmail.com
heasley
2014-02-03 17:51:49 UTC
Permalink
Mon, Feb 03, 2014 at 06:59:26PM +0200, Alan McKinnon:
> That's very easy to do, rancid itself is full of such rules.
>
> For an example, look in sub ShowFlash for the script "rancid", you will
> see this near line 716:
>
> # Filter dhcp database
> next if (/dhcp_[^. ]*\.txt/);
>
> if the regular expression matches, the code branches to the next line in
> the input, effectively skipping over the unwanted input.
>
> Which IOS command returns your unwanted line? Find the command in
> @commandtable near the end of the script, it points to the sub that
> parses that command. Edit the sub by putting your custom code in it
> somewhere reasonable:
>
> next if (/VRF table-id 0 not active/);
>
> Almost all reasonable rancid installations acquire a collection of
> customizations like this, it's how we users make rancid do what we need
> it to do :-)
>
> You might want to tweak that regex a bit more, eg the 0 so probably use
> a /d+, I will leave that up to you.

it could be from logging too; if logging is enabled on your vtys.
>
>
>
> On 03/02/2014 18:44, Peter Conrad wrote:
> > Hi, I have quite a few Cisco 4500-E switches running IOS XE. Every time
> > a switch is logged into, this line is in the next RANCID diff:
> >
> > !
> >
> > config-register 0x2101
> >
> > % VRF table-id 0 not active
> >
> > + % VRF table-id 0 not active
> >
> > !
> >
> >
> >
> > The next run, the line is removed:
> >
> > !
> >
> > config-register 0x2101
> >
> > % VRF table-id 0 not active
> >
> > - % VRF table-id 0 not active
> >
> > !
> >
> >
> >
> > This is rather annoying because I have other systems that login to the
> > switches on a regular basis, so my RANCID diffs are full of this spam now.
> >
> >
> >
> > Is there any way to filter out the line ?% VRF table-id 0 not active? so
> > this doesn?t happen again?
> >
> >
> >
> > Thanks
> >
> >
> >
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-***@shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> >
>
>
> --
> Alan McKinnon
> ***@gmail.com
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-***@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Peter Conrad
2014-02-04 12:50:44 UTC
Permalink
Thanks for the help. At line 1622 I added:

# Filter IOS XE Bug next if (/VRF table-id 0 not active/);
and it worked perfectly, no more annoying spam after logins to the switches.
By the way, the command shows up in a sh run, so it went in the "WriteTerm" command subsection
> Date: Mon, 3 Feb 2014 18:59:26 +0200
> From: ***@gmail.com
> To: rancid-***@shrubbery.net
> Subject: Re: [rancid] VRF table-id 0 not active on Cisco IOS XE Switches
>
> That's very easy to do, rancid itself is full of such rules.
>
> For an example, look in sub ShowFlash for the script "rancid", you will
> see this near line 716:
>
> # Filter dhcp database
> next if (/dhcp_[^. ]*\.txt/);
>
> if the regular expression matches, the code branches to the next line in
> the input, effectively skipping over the unwanted input.
>
> Which IOS command returns your unwanted line? Find the command in
> @commandtable near the end of the script, it points to the sub that
> parses that command. Edit the sub by putting your custom code in it
> somewhere reasonable:
>
> next if (/VRF table-id 0 not active/);
>
> Almost all reasonable rancid installations acquire a collection of
> customizations like this, it's how we users make rancid do what we need
> it to do :-)
>
> You might want to tweak that regex a bit more, eg the 0 so probably use
> a /d+, I will leave that up to you.
>
>
>
>
> On 03/02/2014 18:44, Peter Conrad wrote:
> > Hi, I have quite a few Cisco 4500-E switches running IOS XE. Every time
> > a switch is logged into, this line is in the next RANCID diff:
> >
> > !
> >
> > config-register 0x2101
> >
> > % VRF table-id 0 not active
> >
> > + % VRF table-id 0 not active
> >
> > !
> >
> >
> >
> > The next run, the line is removed:
> >
> > !
> >
> > config-register 0x2101
> >
> > % VRF table-id 0 not active
> >
> > - % VRF table-id 0 not active
> >
> > !
> >
> >
> >
> > This is rather annoying because I have other systems that login to the
> > switches on a regular basis, so my RANCID diffs are full of this spam now.
> >
> >
> >
> > Is there any way to filter out the line “% VRF table-id 0 not active” so
> > this doesn’t happen again?
> >
> >
> >
> > Thanks
> >
> >
> >
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-***@shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> >
>
>
> --
> Alan McKinnon
> ***@gmail.com
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-***@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...