[rancid] Re: Cisco IOS versus Cisco PIX and term width 80

Jason Ellison infotek at gmail.com
Sat Feb 7 22:45:52 UTC 2009


On Fri, Feb 6, 2009 at 5:27 PM, john heasley <heas at shrubbery.net> wrote:
> Fri, Feb 06, 2009 at 10:00:09AM +0000, Jethro R Binks:
>> On Fri, 6 Feb 2009, Jason Ellison wrote:
>>
>> > I have a problem with Cisco c1841 formating the screen differently.
>> >
>> > !VLAN: VLAN Name                             Status    Ports
>> > !VLAN: ---- -------------------------------- ---------
>> > -------------------------------
>> > !VLAN: 1    default                          active    Fa0/0/0, Fa0/0/1, Fa0/0/2
>> > !VLAN:                                                 Fa0/0/3
>> >
>> > versus
>> >
>> > !VLAN: VLAN Name                             Status    Ports
>> > !VLAN: ---- -------------------------------- ---------
>> > -------------------------------
>> > !VLAN: 1    default                          active    Fa0/0/0,
>> > Fa0/0/1, Fa0/0/2, Fa0/0/3
>> >
>> > adding "term width 80" after "term len 0" in clogin seems to fix this...
>> > but this seems to break the PIX.  Should I create a new class... for the
>> > PIX or maybe do some hostname matching.  Are others having this same
>> > issue?
>
> I presume that you added it incorrectly.
>
> But, this does bring us back to the question of whether this command,
> or term width 132 or term width 0, break any of the devices that clogin
> supports.
>
> Maybe PIX does not have this command, which is one case, but for the
> cases where the device does support the command, such as a catalyst,
> does it break or act erradically?  I do not have catalysts to test,
> nor PIX or ASA, etc.
>
> I've asked before, has anyone with catalysts or others tried this
> change to clogin?
>
>> "term width 80" certainly isn't a valid command for the PIX, however in
>> what way does it "break" it?  All I get if I add that is:
>>
>> asa1# term width 0
>>            ^
>> ERROR: % Invalid input detected at '^' marker.
>>
>> which is duly ignored.
>>
>> I think it would be useful if rancid had a clue earlier on what sort of
>> device it is going to be talking to, so it could modify its behaviour
>> (particularly in clogin) accordingly.  I have often pondered about
>> expanding the information per device in router.db.  A hint could be placed
>> in there (for example, to distinguish the common case of a traditional IOS
>> box vs. the PIX, which has become more similar over time but is still
>> somewhat different in some respects).
>>
>> It may be preferable to do this, rather than write a whole new
>> *rancid/*login for a device which is substantially very similar to an
>> existing one, which helps avoid duplication and divergence.
>>
>> Jethro.
>>
>> --
>> .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
>> Jethro R Binks
>> Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
>> _______________________________________________
>> Rancid-discuss mailing list
>> Rancid-discuss at shrubbery.net
>> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>


About the modification breaking my pix monitoring...


Here is my modification to clogin

root at monitor:/usr/local/rancid# diff -uN
/usr/local/src/rancid-2.3.2a9/bin/clogin bin/clogin
--- /usr/local/src/rancid-2.3.2a9/bin/clogin    2009-02-03
18:19:46.000000000 -0600
+++ bin/clogin  2009-02-07 15:24:16.000000000 -0600
@@ -610,6 +610,7 @@
            set command "set logging session disable;$command"
        } else {
            send "terminal length 0\r"
+           send "terminal width 80\r"
        }
        # escape any parens in the prompt, such as "(enable)"
        regsub -all {[)(]} $prompt {\\&} reprompt
@@ -875,6 +876,7 @@
            send "set logging session disable\r"
        } else {
            send "terminal length 0\r"
+           send "terminal width 80\r"
        }
        expect -re $prompt      {}
        source $sfile




TCP stream of rancid connecting to the pix (cleaned)...

<--CUT-->
Username: ..&..&........... ..!.."..'........&..&........... ..!.."..'......user
...
Password: ..$user
.********
Type help or '?' for a list of available commands.

.pix> enable
.enable
Password: password
.********

.pix#
.

.pix# terminal length 0
.terminal width 80
.terminal length 0
              ^
ERROR: % Invalid input detected at '^' marker.

.pix# terminal width 80
              ^
ERROR: % Invalid input detected at '^' marker.

.pix# admin show version
.ashow version
.dmin show version
      ^
ERROR: % Invalid input detected at '^' marker.

.pix# show redundancy secondary
.show version
<--CUT-->

<--CUT-->
.pix# more system:running-config
.show running-config
.more system:running-config
Cryptochecksum: bce13d29 c20a9f99 eaaddf54 9f6a8121
: Saved
: Written by enable_15 at 15:54:21.835 CST Sat Feb 7 2009
!
PIX Version 7.2(4)
!
hostname fw
domain-name example.org
enable password xxxxxxxx encrypted
passwd xxxxxxxxxxx encrypted
names

dns-guard
!
interface Ethernet0
 nameif outside
 security-level 0
 ip address 000.000.000.000 255.255.255.252
!
interface Ethernet1
 nameif inside
<--- More --->
.
.
. security-level 100
 ip address 192.168.1.1 255.255.255.0
!
interface Ethernet2
<--CUT-->

<--CUT-->
service-policy global_policy global
prompt hostname context
Cryptochecksum:bce13d29c20a9f99eaaddf549f6a8121
: end


.pix# write term
.write term
: Saved
:
PIX Version 7.2(4)
!
hostname fw01
<--CUT-->

<--CUT-->
Cryptochecksum:bce13d29c20a9f99eaaddf549f6a8121
: end
<--- More --->
.
.[OK]

.pix# eexxiitt
.

Logoff
<--CUT-->


The Log of the above run


root at monitor:/usr/local/rancid# cat var/logs/group.20090207.152420

starting: Sat Feb 7 15:24:20 CST 2009



Trying to get all of the configs.
fw01.example.org: missed cmd(s): show redundancy secondary,show running-config
=====================================
Getting missed routers: round 1.
fw01.example.org: missed cmd(s): show redundancy secondary,show running-config
=====================================
Getting missed routers: round 2.
fw01.example.org: missed cmd(s): show redundancy secondary,show running-config
=====================================
Getting missed routers: round 3.
fw01.example.org: missed cmd(s): show redundancy secondary,show running-config
=====================================
Getting missed routers: round 4.
fw01.example.org: missed cmd(s): show redundancy secondary,show running-config

cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs

ending: Sat Feb 7 15:25:35 CST 2009


More information about the Rancid-discuss mailing list