Discussion:
[rancid] Dell Switch Errors
Willie Bollinger
2010-06-23 04:26:42 UTC
Permalink
I am running a couple of Dell 5448 Switches and am having issues with
the dell dell extensions. I know this isn't part of the standard install
but am hoping someone may have an idea as to what is going on.

This is what I am seeing in the logs when rancid runs

=====================================
Getting missed routers: round 1.
opened network stream from 10.10.111.2 if () at
/home2/rancid/bin/drancid line 2
72.
FOUND PROMPT: dsw1-cc#
found_end = 1, clean_run = 0
10.10.111.2: End of run not found
end
=====================================

The interesting thing is I can use dlogin manually and do a show run and
everything works so I assume my .cloginrc file is fine

***@staff$ ./dlogin -autoenable -c "show run" -f ../.cloginrc 10.10.111.2
10.10.111.2
spawn telnet 10.10.111.2
Trying 10.10.111.2...
Connected to 10.10.111.2.
Escape character is '^]'.


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

dsw1-cc#
dsw1-cc# show run
port jumbo-frame
interface ethernet g48
switchport mode trunk
exit
vlan database

<snip>


Any input would be appreciated
--
--------------------------------------------------------------------------
Willie Bollinger | Quantum Internet and Telecommunications
410-239-6920 | 2975B Manchester Rd., Manchester, MD 21102
--------------------------------------------------------------------------
Corey Chandler
2010-06-23 04:33:08 UTC
Permalink
Post by Willie Bollinger
10.10.111.2
spawn telnet 10.10.111.2
Trying 10.10.111.2...
Connected to 10.10.111.2.
Escape character is '^]'.
User Name:rancid
Password:*******
dsw1-cc#
dsw1-cc# show run
port jumbo-frame
interface ethernet g48
switchport mode trunk
exit
vlan database
<snip>
Any input would be appreciated
I assume this works when you telnet in and run these commands. What you might end up doing is running a packet capture via wireshark / tcpdump, and compare doing it by hand to your clogin command; it may be an improper newline or something simple like that.
--
Corey / KB1JWQ
http://serverwrangler.com
Willie Bollinger
2010-06-23 04:47:37 UTC
Permalink
john heasley
2010-06-23 04:52:00 UTC
Permalink
Wed, Jun 23, 2010 at 12:47:37AM -0400, Willie Bollinger:
Corey Chandler
2010-06-23 04:53:05 UTC
Permalink
Willie Bollinger
2010-06-23 15:05:45 UTC
Permalink
I am not sure if I am using the rancid command correctly but here is
what it outputs


$ ./rancid -d -f ../.cloginrc 10.10.111.2
opening file ../.cloginrc
../.cloginrc: missed cmd(s): dir /all slavedisk2:,show rsp
chassis-info,dir /all sec-slot2:,show diag,dir /all disk1:,show gsr
chassis,dir /all sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show
spe version,dir /all slaveslot2:,dir /all disk0:,show install
active,show bootvar,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
harddiska:,dir /all slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
running-config,show c7200,dir /all slot1:
../.cloginrc: missed cmd(s): dir /all slavedisk2:,show rsp
chassis-info,dir /all sec-slot2:,show diag,dir /all disk1:,show gsr
chassis,dir /all sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show
spe version,dir /all slaveslot2:,dir /all disk0:,show install
active,show bootvar,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
harddiska:,dir /all slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
running-config,show c7200,dir /all slot1:
../.cloginrc: End of run not found
../.cloginrc: End of run not found
!
$
Willie Bollinger
2010-06-23 04:55:04 UTC
Permalink
Where do I set NOPIPE=YES at?
Willie Bollinger
2010-06-23 16:29:01 UTC
Permalink
I added the path and it appears to be getting output now but I just got
an email that the switch cannot be successfully contacted

***@staff$ ./drancid -dl 10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
opened 10.10.111.2.raw
PROMPT MATCH: dsw1-cc#
HIT COMMAND:dsw1-cc# show version
In ShowVersion: dsw1-cc# show version
SW version 2.0.0.35 ( date 27-Jan-2009 time 18:13:34 )
ShowVersion: Boot version 2.0.0.0 ( date 12-Nov-2008 time 12:56:52 )
ShowVersion: HW version 00.00.02
ShowVersion: dsw1-cc# show vlan
FOUND PROMPT: dsw1-cc#
HIT COMMAND:dsw1-cc# show vlan
In ShowVLAN: dsw1-cc# show vlan
ShowVLAN:
ShowVLAN: Vlan Name Ports Type
Authorization
ShowVLAN: ---- ----------------- ---------------------------
------------ -------------
ShowVLAN: 1 1 g(1-12,14-47),ch(1-8) other
Required
ShowVLAN: 200 management g(13,48) permanent
Required
ShowVLAN:
ShowVLAN: dsw1-cc# show running-config
HIT COMMAND:dsw1-cc# show running-config
In WriteTerm: dsw1-cc# show running-config
interface ethernet g13
WriteTerm: description "MANAGEMENT INTERFACE TO DIAMOND4"
WriteTerm: exit
WriteTerm: interface ethernet g47
WriteTerm: description "INTERCONNECT TO DSW2-CC"
WriteTerm: exit
WriteTerm: interface ethernet g48
WriteTerm: description "INTERCONNECT TO CSW1-CC"
WriteTerm: exit
WriteTerm: port jumbo-frame
WriteTerm: interface range ethernet g(47-48)
WriteTerm: switchport mode trunk
WriteTerm: exit
WriteTerm: vlan database
WriteTerm: vlan 200
WriteTerm: exit
WriteTerm: interface ethernet g13
WriteTerm: switchport access vlan 200
WriteTerm: exit
WriteTerm: interface ethernet g48
WriteTerm: switchport trunk native vlan 200
WriteTerm: exit
interface vlan 200 : <return>
WriteTerm: name management
WriteTerm: exit
WriteTerm: voice vlan oui-table add 0001e3 Siemens_AG_phone________
WriteTerm: voice vlan oui-table add 00036b Cisco_phone_____________
WriteTerm: voice vlan oui-table add 00096e Avaya___________________
WriteTerm: voice vlan oui-table add 000fe2 H3C_Aolynk______________
WriteTerm: voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
WriteTerm: voice vlan oui-table add 00d01e Pingtel_phone___________
WriteTerm: voice vlan oui-table add 00e075 Polycom/Veritel_phone___
WriteTerm: voice vlan oui-table add 00e0bb 3Com_phone______________
WriteTerm: iscsi target port 860 address 0.0.0.0
WriteTerm: iscsi target port 3260 address 0.0.0.0
WriteTerm: interface vlan 200
WriteTerm: ip address 10.10.111.2 255.255.255.0
WriteTerm: exit
WriteTerm: ip default-gateway 10.10.111.1
WriteTerm: hostname dsw1-cc
ip ssh server : <return>
WriteTerm: snmp-server community Dell_Network_Manager rw view DefaultSuper
WriteTerm: clock timezone -4
WriteTerm: clock summer-time recurring usa
WriteTerm: sntp client enable vlan 200
WriteTerm: clock source sntp
WriteTerm: sntp server 209.150.96.19 poll
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm: Default settings:
WriteTerm: Service tag: 9QJQFH1
WriteTerm:
WriteTerm: SW version 2.0.0.35 (date 27-Jan-2009 time 18:13:34)
WriteTerm:
WriteTerm: Gigabit Ethernet Ports
WriteTerm: =============================
WriteTerm: no shutdown
WriteTerm: speed 1000
duplex full : <return>
WriteTerm: negotiation
WriteTerm: flow-control off
WriteTerm: mdix auto
WriteTerm: no back-pressure
WriteTerm:
WriteTerm: interface vlan 1
WriteTerm: interface port-channel 1 - 8
WriteTerm:
WriteTerm: spanning-tree
WriteTerm: spanning-tree mode STP
WriteTerm:
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
Done :
found_end = 1, clean_run = 0
10.10.111.2: End of run not found
end
***@staff$

The following routers have not been successfully contacted for
more than 4 hours.
-rw-r----- 1 rancid netadm 0 Jun 22 23:54 10.10.111.2
This is what it outputs
$ ./drancid -dl 10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
opened network stream from 10.10.111.2 if (1) at ./drancid line 272.
sh: dlogin: not found
you need to fix that; fix your path so that it includes the directory
where dlogin is.
10.10.111.2: missed cmd(s): show version,show running-config,show vlan
found_end = 0, clean_run = 0
10.10.111.2: End of run not found
!
$ > >
I exported it and then sent another email with the output but im not
sure of the exact syntax of the rancid command
I didnt receive/see the mail.
i think the dell script is called drancid. if so, drancid -dl 10.10.111.2
Post by Willie Bollinger
Where do I set NOPIPE=YES at?
in your shell environment; you also need to export it, in case you
didnt know that.
Jeremy Singletary
2010-06-30 20:08:16 UTC
Permalink
Post by Willie Bollinger
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
The line above leads me to believe that the regex is failing because the
regex expects the last character on the line to be the t in exit.

drancid:
if (/$prompt\s?exit$/) { warn "left WriteTerm on: $_"; $clean_run=1;last; }

also in drancid:
if (/[>#]\s?exit$/) {
$clean_run=1;
last;
}

Try removing the $ after the word exit in one or both of those regex conditions.

-jeremy
john heasley
2010-06-30 20:17:51 UTC
Permalink
Post by Jeremy Singletary
Post by Willie Bollinger
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
The line above leads me to believe that the regex is failing because the
regex expects the last character on the line to be the t in exit.
if (/$prompt\s?exit$/) { warn "left WriteTerm on: $_"; $clean_run=1;last; }
if (/[>#]\s?exit$/) {
$clean_run=1;
last;
}
Try removing the $ after the word exit in one or both of those regex conditions.
you should try it like the extreme script (xrancid) to be safer.
Jeremy Singletary
2010-06-30 20:35:58 UTC
Permalink
Post by john heasley
Post by Jeremy Singletary
Post by Willie Bollinger
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
The line above leads me to believe that the regex is failing because the
regex expects the last character on the line to be the t in exit.
if (/$prompt\s?exit$/) { warn "left WriteTerm on: $_"; $clean_run=1;last; }
if (/[>#]\s?exit$/) {
$clean_run=1;
last;
}
Try removing the $ after the word exit in one or both of those regex conditions.
you should try it like the extreme script (xrancid) to be safer.
Thanks, I'll copy that regex from xrancid.
Willie Bollinger
2010-07-05 15:31:14 UTC
Permalink
I removed the $ from the below regex and this is what I am getting now.
Its still not writing out the config



***@staff$ drancid -dl 10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
executing dlogin -t 90 -c"show version;show vlan;show running-config"
10.10.111.2
opened network stream from 10.10.111.2 if (1) at
/home2/rancid/bin/drancid line 272.
PROMPT MATCH: dsw1-cc#
HIT COMMAND:dsw1-cc# show version
In ShowVersion: dsw1-cc# show version
SW version 2.0.0.35 ( date 27-Jan-2009 time 18:13:34 )
ShowVersion: Boot version 2.0.0.0 ( date 12-Nov-2008 time 12:56:52 )
ShowVersion: HW version 00.00.02
ShowVersion: dsw1-cc# show vlan
FOUND PROMPT: dsw1-cc#
HIT COMMAND:dsw1-cc# show vlan
In ShowVLAN: dsw1-cc# show vlan
ShowVLAN:
ShowVLAN: Vlan Name Ports Type
Authorization
ShowVLAN: ---- ----------------- ---------------------------
------------ -------------
ShowVLAN: 1 1 g(1-12,14-47),ch(1-8) other
Required
ShowVLAN: 200 management g(13,48) permanent
Required
ShowVLAN:
ShowVLAN: dsw1-cc# show running-config
HIT COMMAND:dsw1-cc# show running-config
In WriteTerm: dsw1-cc# show running-config
interface ethernet g1
WriteTerm: description "CIRRUS PORT 3-A"
WriteTerm: exit
WriteTerm: interface ethernet g2
WriteTerm: description "CIRRUS PORT 4-A"
WriteTerm: exit
WriteTerm: interface ethernet g5
WriteTerm: description "DIAMOND4 PORT 8-A"
WriteTerm: exit
WriteTerm: interface ethernet g6
WriteTerm: description "DIAMOND4 PORT 9-A"
WriteTerm: exit
WriteTerm: interface ethernet g7
WriteTerm: description "DIAMOND5 PORT 8-A"
WriteTerm: exit
WriteTerm: interface ethernet g8
WriteTerm: description "DIAMOND5 PORT 9-A"
WriteTerm: exit
WriteTerm: interface ethernet g13
WriteTerm: description "MANAGEMENT INTERFACE TO DIAMOND4"
WriteTerm: exit
WriteTerm: interface ethernet g47
description "INTERCONNECT TO DSW2-CC" : <return>
WriteTerm: exit
WriteTerm: interface ethernet g48
WriteTerm: description "INTERCONNECT TO CSW1-CC"
WriteTerm: exit
WriteTerm: port jumbo-frame
WriteTerm: interface range ethernet g(47-48)
WriteTerm: switchport mode trunk
WriteTerm: exit
WriteTerm: vlan database
WriteTerm: vlan 200
WriteTerm: exit
WriteTerm: interface ethernet g13
WriteTerm: switchport access vlan 200
WriteTerm: exit
WriteTerm: interface ethernet g48
WriteTerm: switchport trunk native vlan 200
WriteTerm: exit
WriteTerm: interface vlan 200
WriteTerm: name management
WriteTerm: exit
WriteTerm: voice vlan oui-table add 0001e3 Siemens_AG_phone________
voice vlan oui-table add 00036b Cisco_phone_____________
WriteTerm: voice vlan oui-table add 00096e Avaya___________________
WriteTerm: voice vlan oui-table add 000fe2 H3C_Aolynk______________
WriteTerm: voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
WriteTerm: voice vlan oui-table add 00d01e Pingtel_phone___________
WriteTerm: voice vlan oui-table add 00e075 Polycom/Veritel_phone___
WriteTerm: voice vlan oui-table add 00e0bb 3Com_phone______________
WriteTerm: iscsi target port 860 address 0.0.0.0
WriteTerm: iscsi target port 3260 address 0.0.0.0
WriteTerm: interface vlan 200
WriteTerm: ip address 10.10.111.2 255.255.255.0
WriteTerm: exit
WriteTerm: ip default-gateway 10.10.111.1
WriteTerm: hostname dsw1-cc
<user and passes snipped>
WriteTerm: ip ssh server
WriteTerm: snmp-server community Dell_Network_Manager rw view DefaultSuper
WriteTerm: clock timezone -4
WriteTerm: clock summer-time recurring usa
sntp client enable vlan 200 : <return>
WriteTerm: clock source sntp
WriteTerm: sntp server 209.150.96.19 poll
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm:
WriteTerm: Default settings:
WriteTerm: Service tag: 9QJQFH1
WriteTerm:
WriteTerm: SW version 2.0.0.35 (date 27-Jan-2009 time 18:13:34)
WriteTerm:
WriteTerm: Gigabit Ethernet Ports
WriteTerm: =============================
WriteTerm: no shutdown
WriteTerm: speed 1000
WriteTerm: duplex full
WriteTerm: negotiation
WriteTerm: flow-control off
WriteTerm: mdix auto
no back-pressure : <return>
WriteTerm:
WriteTerm: interface vlan 1
WriteTerm: interface port-channel 1 - 8
WriteTerm:
WriteTerm: spanning-tree
WriteTerm: spanning-tree mode STP
WriteTerm:
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
left WriteTerm on: dsw1-cc#exitConnection to 10.10.111.2 closed by
foreign host.
Post by Jeremy Singletary
Post by john heasley
Post by Jeremy Singletary
Post by Willie Bollinger
WriteTerm: qos basic
WriteTerm: qos trust cos
WriteTerm: dsw1-cc#exitConnection to 10.10.111.2 closed by foreign host.
The line above leads me to believe that the regex is failing because the
regex expects the last character on the line to be the t in exit.
if (/$prompt\s?exit$/) { warn "left WriteTerm on: $_"; $clean_run=1;last; }
if (/[>#]\s?exit$/) {
$clean_run=1;
last;
}
Try removing the $ after the word exit in one or both of those regex conditions.
you should try it like the extreme script (xrancid) to be safer.
Thanks, I'll copy that regex from xrancid.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
--------------------------------------------------------------------------
Willie Bollinger | Quantum Internet and Telecommunications
410-239-6920 | 2975B Manchester Rd., Manchester, MD 21102
--------------------------------------------------------------------------
Corey Chandler
2010-06-23 04:52:34 UTC
Permalink
From what I can see the script does a show version, show vlan, and show running-config and all of these work properly when I telnet into the switch and run them manually.
Right, which is why you need to take a look at a packet capture to see if it's a broken newline or similar. Compare and contrast what the script is sending with what you're sending when you do it by hand. That'll be the easiest way to diagnose things.
--
Corey / KB1JWQ
http://serverwrangler.com
Continue reading on narkive:
Loading...