GithubHelp home page GithubHelp logo

rancid-cisco-sb's People

Contributors

chrpinedo avatar ganeshv avatar islander avatar pokui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rancid-cisco-sb's Issues

rancid backup updated every time because of uptime

@jbilder reported the next issue:

Thanks for creating this script. It's been extremely useful in environments where i support these devices. One issue I have seems to be with the Uptime changing on the device, so it causes rancid to send diffs every hour:

!Unit Up time
!---- ---------------

! 1 253,00:32:08
! 1 253,01:32:09

Please let me know how to go about excluding these changes from updates.

Thanks!

SG300 throws error on `show running-config brief`

Switch3#show version
SW version    1.1.2.0 ( date  12-Nov-2011 time  23:34:26 )
Boot version    1.0.0.4 ( date  08-Apr-2010 time  16:37:57 )
HW version    V01
Switch3#show running-config brief
% Wrong number of parameters or invalid range, size or characters entered

exec failed router manufacturer cisco-sb: Permission denied

It might seem like I typed something wrong, and I might still have, but no matter how I tweak it, I still get this error when running rancid-run

Trying to get all of the configs.
exec failed router manufacturer cisco-sb: Permission denied

When doing a manual connect using bin/clogin sg300 it connects just fine.

I am using a level 15 enabled user.

Any ideas?

csblogin doesn't work with config prompts

Using an SG300, normal commands like

 csblogin -c "show cpu utilization;show cpu utilization" switch2

work fine. However, commands like config which change the prompt run into trouble. e.g.

 csblogin -c "config;exit" switch2

logins run, runs the command config and then gets stuck. Output:

 User Name:cisco
 Password:********


 switch788b4a#terminal datadump
 switch788b4a#config
 switch788b4a(config)#

Add support for alternate SSH ports

Is it possible to add support for alternate SSH ports as defined in .cloginrc? It looks like this may be there for telnet, but I can't seem to modify it for SSH. For example...if:

add method sg300.foo.com {ssh:2222}

is in .cloginrc, csblogin should add -p 2222 to the ssh arguments.

Thanks!

Travis CI is falling for csblogin

There could be a problem with csblogin because it is failing in Travis CI https://travis-ci.org/chrpinedo/rancid-cisco-sb/jobs/80992695.

perl -c src/csblogin
Semicolon seems to be missing at src/csblogin line 60.
Number found where operator expected at src/csblogin line 63, near "do_command 0"
    (Do you need to predeclare do_command?)
Semicolon seems to be missing at src/csblogin line 63.
Semicolon seems to be missing at src/csblogin line 65.
Semicolon seems to be missing at src/csblogin line 68.
elseif should be elsif at src/csblogin line 74.
elseif should be elsif at src/csblogin line 76.
String found where operator expected at src/csblogin line 83, near "send_error "\nError: could not exec id: $reason\n""
    (Do you need to predeclare send_error?)
Bareword found where operator expected at src/csblogin line 99, near "switch"
    (Missing semicolon on previous line?)
Warning: Use of "-c" without parentheses is ambiguous at src/csblogin line 101.
syntax error at src/csblogin line 61, near "set password_file "
BEGIN not safe after errors--compilation aborted at src/csblogin line 101.
make: *** [test-csblogin] Error 255

The command "make -f .Makefile test" exited with 2.

Connectivity errors treated as part of configuration

If there is a connectivity problem with a switch, the config is replaced in source control with the error message:

> Index: configs/edge-cab6-a
> ===================================================================
> retrieving revision 1.8
> diff -u -4 -r1.8 edge-cab6-a
> @@ -190,121 +190,6 @@
>   !
>   interface gigabitethernet1/13
>    storm-control broadcast enable
>    storm-control include-multicast
> -  switchport mode access
> -  switchport access vlan 206
> -  lldp optional-tlv port-desc sys-name sys-desc sys-cap
> -  lldp management-address automatic
> <snip>
> - interface tengigabitethernet1/4
> -  storm-control broadcast enable
> -  lldp optional-tlv port-desc sys-name sys-desc sys-cap
> -  lldp management-address automatic
> - !
> - exit
> - ip default-gateway 172.22.190.1
> + 
> + Error: TIMEOUT reached

When connectivity returns later on, the "change" is reverted. Other RANCID device types do not exhibit this behaviour when there is a connectivity problem.

SG200 support

Just a heads up to prevent others from wasting time, not all SG series switches are support, as implied here. Only the 300 and above are support. 200 series does not have SSH.

SG500 - Error Login

Hi,

I've a problem in login with Cisco SG500 series, I test csblogin but I cann't login to the switch in ssh, do you have a solution?

Thanks a lot

support for RANCID version 3.x

Hi,

I successfully configured the rancid 3.1 with centos 7 i want to add vendortable dictionary to file rancid-fe but do not know where to exactly add line. i insert line end of file but not working. Please check the rancid-fe file for reference.

! /usr/bin/perl

require 5;

my($script);
my($router, $devtype) = split(';', $ARGV[0]);
$devtype =~ tr/[A-Z]/[a-z]/;
if (! length($devtype)) {
printf(STDERR "unknown router manufacturer for $router: $devtype\n");
exit(-1);
}

foreach $file ("/usr/local/rancid/etc/rancid.types.base",
"/usr/local/rancid/etc/rancid.types.conf") {
open(INPUT, "< $file") || die "Could not open $file: $!";
while () {
chomp;
my($type, $directive, $value) = split(';');
$type =~ tr/[A-Z]/[a-z]/;
$directive =~ tr/[A-Z]/[a-z]/;
if ($type eq $devtype && $directive eq "script") {
$script = $value;
close(INPUT);
goto FOUND;
}
}
close(INPUT);
}

FOUND:
if (! defined($script)) {
printf(STDERR "unknown router manufacturer for $router: $devtype\n");
exit(-1);
} else {
exec($script . " $router");
}

printf(STDERR "exec($script) failed router manufacturer $devtype: $!\n");
exit(-1);
'cisco-sb' => 'csbrancid',

Problem to login on SG300

May be the bug is between the chair and the keyboard, But I don't know what's going wrong.

I install Rancid 2.3.6 on an Ubuntu 14.04, I had your 2 files csblogin and csbrancid in /var/lib/rancid/bin/

make them runnable

when I launch this command:

/var/lib/rancid/bin/csblogin 10.50.127.253

I have this output:

Trying 10.50.127.253...
Connected to 10.50.127.253.
Escape character is '^]'.

User Name:rancid
Password:**********

User Name:rancid
Password:**********

User Name:rancid
Password:**********
authentication failed

Connection closed by foreign host.
spawn ssh -c 3des -x -l rancid 10.50.127.253
[email protected]'s password:
Permission denied, please try again.
Error: Check your password for 10.50.127.253

I don't know why the app try authenticate with username rancid whereas in my config I configured the app to use : globality

This is my .cloginrc config:

blablabla...
add password 10.33.125.253 Security92 F-Fsecure_S
add password 10.33.126.253 Security92 F-Fsecure_S
add user 10.50.127.253 {globality}
add password 10.50.127.253 {Security EnSecure}
add method 10.50.127.253 telnet
add autoenable 10.50.127.253 1
add userprompt 10.50.127.253 {"User Name:"}

But I also tried with :

add user 10.50.127.253 globality
add password 10.50.127.253 Security EnSecure
add method 10.50.127.253 telnet
add autoenable 10.50.127.253 1
add userprompt 10.50.127.253 "User Name:"

this is my router.db:

**blablabla...
10.50.125.253:cisco:up
10.50.126.253:cisco:up
10.50.127.253:cisco-sb:up

This is my rancid-fe:

%vendortable = (
'cisco-sb' => 'csbrancid',
'agm' => 'agmrancid',
'alteon' => 'arancid',
etc.

Thanks by advance for your help.

Proc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.