Alan McKinnon | 25 Apr 09:00 2014
Picon

[rancid] [PATCH]: Improved IOS XE detection in rancid

Cisco appear to have changed the IOS-XE stamp in "show version" for some
images. This causes the XE detection in ShowVersion() to fail, causing
the filtering for tracelog in DirSlotN() to not be applied.

One-line patch below. The strings are subtlety different, it seemed
easier to add a new regex rather than adapt the existing one.

Sample version output:

#show ver
Cisco IOS XE Software, Version 03.10.02.S - Extended Support Release
Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M),
Version 15.3(3)S2, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.

Diff:

--- rancid.old  2014-04-25 08:51:36.000000000 +0200
+++ rancid      2014-04-25 08:53:34.000000000 +0200
 <at>  <at>  -196,6 +196,7  <at>  <at> 
            next;
        }
        if (/cisco ios .* IOS-XE/i) { $ios = "XE"; }
+       if (/cisco IOS XE software/i) { $ios = "XE"; }
        if (/^Application and Content Networking .*Software/) { $type =
"CE"; }
        # treat the ACE like the Content Engines for matching endofconfig
        if (/^Cisco Application Control Software/) { $type = "CE"; }

(Continue reading)

Gerhard Mourani | 24 Apr 21:37 2014
Picon

[rancid] Rancid 3.0 and Dell Switches

Hello,

I've upgraded to Rancid 3.0 and would like to know which name to use for Dell PowerConnect 34xx and 64xx series inside router.db?

Presently I'm using this in router.db:
192.168.x.1xx;dell;up
192.168.x.2xx;dell;up

and can see these errors in the log files:

Trying to get all of the configs.
loadtype: loading dell failed: Global symbol "$proc" requires explicit package name at /usr/lib64/rancid/dell.pm line 82.
Global symbol "$found_version" requires explicit package name at /usr/lib64/rancid/dell.pm line 83.
Compilation failed in require at /usr/lib64/rancid/rancid.pm line 222.

Thanks,
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Vincent Aniello | 23 Apr 16:49 2014

[rancid] Excluding config lines in Rancid

Rancid is detecting configuration changes on a few configuration items in Cisco switch configurations that are automatically updated and Rancid should exclude from it's comparisons.

On a Cisco Catalyst 3560 switch running software version 12.2(25)SEE4 Rancid is reporting changes to the "ntp clock-period" command:

- ntp clock-period 36029104
+ ntp clock-period 3602910

On a Cisco Nexus 3548 switch running software version 6.0(2)A1(1e) Rancid is reporting changes to the following configuration items:

  !Env:  INTAKE     45            29
+ !Env:  INTAKE     45            28

- !Flash: bootflash:     5356844    Apr 22 17:42:48 2014  BufferMonitor-1HourData
+ !Flash: bootflash:     5356844    Apr 22 20:42:48 2014  BufferMonitor-1HourData

Can Rancid be configured to ignore changes in these lines?

I am currently running Rancid 3.0, but had the same issue in 2.3.6 and 2.3.8.

Thanks.

--Vincent
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Andrei Sabau | 17 Apr 13:47 2014
Picon

[rancid] Login to Juniper J-series work, commands do not.

I have an issue where jlogin works when connecting to a juniper device, but if i run rancid-run or jrancid -c 'command' it gets stuck after the prompt.

The last lines are :

expect: does "rancid <at> BGP-CORE-0> " (spawn_id exp4) match regular expression "(\r\n|\n)"? (No Gate, RE only) gate=yes re=no
"^[^ ]+>"? Gate "*>"? gate=yes re=yes
expect: set expect_out(0,string) "rancid <at> BGP-CORE-0>"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "rancid <at> BGP-CORE-0>"
Gate keeper glob pattern for 'rancid <at> BGP-CORE-0[#>]' is 'rancid <at> BGP-CORE-0?'. Activating booster.

expect: does " " (spawn_id exp4) match regular expression "rancid <at> BGP-CORE-0[#>]"? Gate "rancid <at> BGP-CORE-0?"? gate=no
expect: timed out

Error: TIMEOUT reached

I set the timeout to 20 seconds so it'll die. The command was 'show version'. But if i run jlogin without command i can do anything on the device.

Any ideas?


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Tore Anderson | 16 Apr 10:52 2014
Picon

[rancid] '>' in default prompt causes problems for zrancid

After an upgrade from RANCID 2.3.2, zrancid is creating bogus diffs.
They always involve the character «e» appearing/disappearing at the
beginning of lines, like so:

-log file /var/log/quagga/zebra.log
+elog file /var/log/quagga/zebra.log

Or at the end of lines, like so:

- ipv6 nd suppress-ra
+ ipv6 nd suppress-rae

I've traced this to a change in the default prompt in clogin.in that
happened in RANCID 2.3.6. Fast forwarding to RANCID 3.0, the relevant
code is as follows (lines 766-770 of clogin.in):

    # Default prompt.
    set prompt [join [find prompt $router] ""]
    if { [llength $prompt] == 0 } {
	set prompt "(>|#| \\(enable\\))"
    }

In RANCID 2.3.5 and earlier, $prompt was set to "(#| \\(enable\\))" by
default, and that worked perfectly for me.

I haven't yet been able to fully understand why the ">" match is causing
problems, but I did notice that it causes $prompt_match to always be set
to ">" at lines 576-579 of clogin.in:

        -re "$prompt"           {
                                  set prompt_match $expect_out(0,string);
                                  break;
                                }

However, the routers in question don't use ">" in their prompt (they use
"#"), so I don't think this can be right.

Attempting to escape the ">" (using "\>" or "\\>") makes no difference.
Removing it or replacing it with any other character (including "<")
does help, though, and in this case $prompt_match gets set to "#" as
expected, and the spurious «e» characters stop appearing.

The platform is Ubuntu 12.04.4 with expect 5.45.

Tore

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Howard Jones | 15 Apr 20:38 2014

[rancid] Mutating prompts

My previously working multi-context ASA/FWSM script appears to have been 
more by luck than judgement, and fails if the hostname has a '-' in it, 
I guess because there is somewhere it is being interpreted as a regexp 
character.

I've just been taking a look at it again, and making a fwsmlogin from 
clogin, which understands that the prompt changes when there's a 
'changeto' command to move between firewall contexts. Am I right in 
thinking I need to redo this stuff in BOTH '*login' and '*rancid' in two 
different languages?

Thanks,

Howie
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Vyankat Gaddamwar | 15 Apr 11:50 2014
Picon

[rancid] Rancid 3.0 config problem

Hi,

 

I installed rancid 3.0 and configured properly as per documentation but when I run bin/rancid-run no output and logs are empty.

Any good way to troubleshoot this?

 

 

/venky

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Charles Gagnon | 11 Apr 22:01 2014

[rancid] So close yet....

So I just tried deploying rancid on a RHEL 6.2 box. I have:

rancid 3.0
perl v5.10.1
expect version 5.44.1.15

It seems close to working but whenever I run 'rancid-run', routers end-up in the routers.down file. I am testing right now with a single entry in my router.db.

I tested w/ clogin myrouter (which works)
I can also do rancid -t cisco myroute (and it also saves a file)

If I run "rancid myrouter" it failed with:
$ rancid myrouter
loadtype(): device_type is empty
Couldn't load device type spec for 

But this may be normal. 

rancid-run returns no errors. Returns in a few seconds with no output. What is the best way to troubleshoot this?

I check my .db file and it is NOT DOS format. How can I tell if I have a problem with my file.

Any good way to troubleshoot this?

--
Charles Gagnon
charlesg at unixrealm.com
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Fabio Santos | 10 Apr 17:12 2014
Picon

[rancid] Erro with Rancid on solaris 10.

Hi all,

I'm trying to compile rancid 3.0 on solaris 10, the ./configure command works fine. but when i try make i received the erro above,

Making all in bin
gmake[1]: Entering directory `/tmp/rancid-3.0/bin'
gcc -DHAVE_CONFIG_H -I. -I../include     -g -O0 -MT hpuifilter.o -MD -MP -MF .deps/hpuifilter.Tpo -c -o hpuifilter.o hpuifilter.c
mv -f .deps/hpuifilter.Tpo .deps/hpuifilter.Po
gcc  -g -O0   -o hpuifilter hpuifilter.o
gcc -DHAVE_CONFIG_H -I. -I../include     -g -O0 -MT par.o -MD -MP -MF .deps/par.Tpo -c -o par.o par.c
mv -f .deps/par.Tpo .deps/par.Po
gcc  -g -O0   -o par par.o
Undefined                       first referenced
 symbol                             in file
asprintf                            par.o
ld: fatal: Symbol referencing errors. No output written to par
gmake[1]: *** [par] Error 1
gmake[1]: Leaving directory `/tmp/rancid-3.0/bin'
make: *** [all-recursive] Error 1
bash-3.00#

Someone know how can i fix this problem?

Att,
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Andrei Sabau | 7 Apr 18:09 2014
Picon

[rancid] rancid -t cisco host works but rancid host does not.

Hello. I've recently installed Rancid on a Centos 6. I have worked with it before a bit but never encountered this issue.

I have hosts assigned in the hosts file. I have the host added in <group>/router.db
The clogin command works. The clogin -c command works.

The log from run-rancid shows almost empty. I tried running the comands separately but 'rancid host' gives me a:

loadtype(): device_type is empty
Couldn't load device type spec for

but 'rancid -t cisco host' works. I'm thinking this has to do with rancid and the group's router.db.

my group is in rancid.conf (LIST_OF_GROUPS="networking") but is the networking/router.db even read?


Any ideas are helpful, thanks.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Picon

[rancid] fortigate paging suppression

Hi All,

 

I have some new fortigates that I need to backup with RANCID. They are running config-version FW60C-5.00. When I back them up the paging lines show up in the config on the same line as some part of the config eg. “--More--                          next”. I have tried patching the original fnlogin with the following.

 

-                  -gl "--More--"                                                { send " "

+                 -gl "--More--\[^\n\r]*"                             { send " "

                                                                                                 exp_continue

-                  -re "\[\n\r]+"                                 { exp_continue }

                                                                                               }

+                 -re "\[^\r\n]*\[\n\r]+"             { send_user -- "$expect_out(buffer)"

+                                                                                               exp_continue }

+                                                                                             }

 

I still get the pages in the config. I tried a newer version of fnlogin from https://github.com/renard/rancid/blob/master/bin/fnlogin.in but have the same result. I am currently running RANCID 2.3.6-1.el5 and will not be upgrading to a newer version for at least another month or two. Is there a way to make this work with my current fnlogin and RANCID version?

 

Regards,

Scotty

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Gmane