From andre at is.co.za Fri Feb 11 14:51:55 2005 From: andre at is.co.za (Andre van der Merwe) Date: Fri, 11 Feb 2005 16:51:55 +0200 Subject: Cisco 1900s, fru, AS5300s and AS5400s... Message-ID: <20050211165155.D12895@is.co.za> Hi NOTE: This is for -test- purpose only please don't patch your live systems... We have added the following to the version RANCID (2.3.1) we run. - fru / product code support - 1900 improved support, (I hope :) ) - Cisco AS5300, AS5400 basic "Slot" support FRU/product code. The additional field within the "Slot" field has been added and called "fru" for now, this is the product "fru" code. The ability for RANCID to pick this up is based on the IOS you run and the age of the PA/NM cards. As usual Cisco does not have a standard way of doing this, so there a bit of kludging to make it work. Here is the "fru" field as shown in the sample below. !RANCID-CONTENT-TYPE: Cisco ! !Chassis type: 7206VXR - a 7200 router !CPU: NPE-G1, SB-1 CPU at 700Mhz, impl 1025, Rev 0.2, 512KB L2 Cache ! ! !Slot 1: fru PA-A3-OC3SMI= !Slot 1: type ATM WAN OC3 SMI, 1 ports !Slot 1: hvers 2.0 rev A0 !Slot 1: part 73-2427-04, serial xxxxxxx ! !Slot 2: fru PA-2E3= !Slot 2: type E3 PA, 2 ports !Slot 2: hvers 1.1 rev C0 !Slot 2: part 73-2324-03, serial xxxxxxxx ! !Slot 3: fru PA-8T-X21= !Slot 3: type Mx serial X.21, 8 ports !Slot 3: hvers 1.13 rev A0 !Slot 3: part 73-1582-05, serial xxxxxx ! !Slot 4: fru PA-MC-8TE1+ !Slot 4: type PA-MC-8TE1 Plus, 8 ports !Slot 4: hvers 2.0 rev A0 !Slot 4: part 800-19387-02, serial xxxxxxx ! !Slot 6: fru PA-MC-8TE1+ !Slot 6: type PA-MC-8TE1 Plus, 8 ports !Slot 6: hvers 2.0 rev A0 !Slot 4: part 800-19387-02, serial xxxxxxx ! !Slot 6: fru PA-MC-8TE1+ !Slot 6: type PA-MC-8TE1 Plus, 8 ports !Slot 6: hvers 2.0 rev A0 !Slot 6: part 800-19387-02, serial xxxxxxx ! !Slot Midplane: hvers 2.8 rev B0 !Slot Midplane: part 73-3223-11, serial xxxxxxx ! !Slot CPU: hvers 2.0 rev A0 !Slot CPU: part 28-5082-09, serial xxxxxxx ! Here is the basic mod to "rancid" to get it all in. ------- > } elsif ( $proc =~ /^AS5300/) { > $type = "AS5300"; > } elsif ( $proc =~ /^AS5350/) { > $type = "AS5350"; > } elsif ( $proc =~ /^AS5400/) { > $type = "AS5400"; 843a850,857 > # > # For getting FRU part numbers from 7200's, not yet tested much. > # > if (/FRU\s+Part\s+Number:\s+(.*)/) { > ProcessHistory("SLOT","keysort","AF","!Slot $slot$WIC: fru $1\n"); > next; > } > # 918a933,939 > # > # AS5300/5400 handling > /^Hardware is\s+(.*)$/i && > ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n") && next; > /^DFC type is\s+(.*)$/i && > ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n") && next; > # 960a982,986 > # fru bits > if (/product \(fru\) number\s+:\s+(\S+)/i) { $fn = $1; } > if (/product number\s+:\s+(\S+)/i) { $fn = $1; } > # > 962a989,991 > # fru bits > ProcessHistory("SLOT","keysort","AF","!Slot $slot$WIC: fru $fn\n"); > # 971a1001,1010 > # AS5x00 bits > /^\ Board Revision\s+(\S+),\s+Serial Number\s+(\S+),/ && > ProcessHistory("SLOT","keysort","D","!Slot $slot$WIC: rev $1, serial $2\n") && > next; > /^\ Board Hardware Version\s+(\S+),\s+Item Number\s+(\S+),/ && > ProcessHistory("SLOT","keysort","D","!Slot $slot$WIC: hvers $1, part $2\n") && > next; > /^Motherboard Info:/ && > ProcessHistory("SLOT","keysort","D","!Slot $slot$WIC: Motherboard\n") && > next; 1157a1197,1203 > > # 1900's have spaces in the config which move around when > # changes are made, this get rid of them... > if ($type =~ /^1900$/ && /^$/) { > next; > } -------- The other thing we have done is hopefully improve the Cat 1900 support by adding some pager handling stuff to clogin, we are now able to use RANCID collect configs from our group of 1900's they don't support "term length 0" as far as I can see. Here is the basic mod to "clogin". -------- 531a532,535 > # 1900 pager sucks > -re "^\[\n\r]*^--More--\[\n\r\]*" { send " " > exp_continue} > # 561a566,569 > # 1900 Pager sucks > -re "^\[\n\r]*^--More--\[\n\r]*" { send " " > exp_continue} > # -------- Hope this helps. Andr? van der Merwe From heas at shrubbery.net Sat Feb 12 00:32:16 2005 From: heas at shrubbery.net (john heasley) Date: Fri, 11 Feb 2005 16:32:16 -0800 Subject: Cisco 1900s, fru, AS5300s and AS5400s... In-Reply-To: <20050211165155.D12895@is.co.za> References: <20050211165155.D12895@is.co.za> Message-ID: <20050212003216.GC13167@shrubbery.net> Fri, Feb 11, 2005 at 04:51:55PM +0200, Andre van der Merwe: > - 1900 improved support, (I hope :) ) > > The other thing we have done is hopefully improve the Cat 1900 support by adding > some pager handling stuff to clogin, we are now able to use RANCID collect > configs from our group of 1900's they don't support "term length 0" as far as I can > see. > > Here is the basic mod to "clogin". > > -------- > 531a532,535 > > # 1900 pager sucks > > -re "^\[\n\r]*^--More--\[\n\r\]*" { send " " > > exp_continue} > > # > 561a566,569 > > # 1900 Pager sucks > > -re "^\[\n\r]*^--More--\[\n\r]*" { send " " > > exp_continue} > > # > -------- could you try ftp://ftp.shrubbery.net/pub/rancid/clogin.in I think all the 1900 issues were worked-out. From heas at shrubbery.net Wed Feb 16 17:59:58 2005 From: heas at shrubbery.net (john heasley) Date: Wed, 16 Feb 2005 09:59:58 -0800 Subject: Duplicate config when polling Foundry ServerIrons In-Reply-To: <20050216171850.B767D11142@guelah.shrubbery.net> References: <20050216171850.B767D11142@guelah.shrubbery.net> Message-ID: <20050216175958.GD13470@shrubbery.net> > We have problems with rancid when polling ServerIron Chassis devices. > It logs on and collects the data okay but it seems to duplicate lines of > config randomly. See an example below. > > @@ -410,8 +410,10 @@ > interface ethernet 4/10 > disable > ! > interface ethernet 4/11 > + interface ethernet 4/11 > + interface ethernet 4/11 > disable > ! > interface ethernet 4/12 > disable > > I'm assuming it's something with the cli, any idea how I can fix this or > prove that it is the cli causing it? could you try collecting it manually like $ export NOPIPE=YES $ francid -d host that will leave a host and host.raw file behind. do it a few times and see if you can get a pair of files where this duplication has happened. with those, we can narrow down the cause. From mloveley at plus.net Thu Feb 17 17:13:05 2005 From: mloveley at plus.net (Mark Loveley) Date: Thu, 17 Feb 2005 17:13:05 +0000 Subject: Duplicate config when polling Foundry ServerIrons In-Reply-To: <20050216175958.GD13470@shrubbery.net> References: <20050216171850.B767D11142@guelah.shrubbery.net> <20050216175958.GD13470@shrubbery.net> Message-ID: <1108660385.3867.119.camel@localhost.localdomain> On Wed, 2005-02-16 at 09:59 -0800, john heasley wrote: > could you try collecting it manually like > $ export NOPIPE=YES > $ francid -d host > > that will leave a host and host.raw file behind. do it a few times and see > if you can get a pair of files where this duplication has happened. with > those, we can narrow down the cause. I did this and on the first attempt I can see a few lines that have been duplicated in both files. ie host.new:snmp-server community ..... rw 5 host.new:snmp-server community ..... rw 5 host.new:snmp-server community ..... rw 5 host.raw:snmp-server community ..... rw 5 host.raw:snmp-server community ..... rw 5 host.raw:snmp-server community ..... rw 5 The config only has one rw community:- tacacs-server key 1 snmp-server community ..... ro 5 snmp-server community ..... rw 5 snmp-server contact I can also replicate the problem with a straight telnet session (as in no expect) ie telnet host en term len 0 write term Sure enough I get some duplicated lines, time to raise a bug with foundry methinks, the cli on the SI GTE series just isn't as good as on the Bigirons, copying and pasting config also has problems.... If you can think of anything else that we can try let me know. Thanks -- | Mark Loveley Broadband Solutions for | Network Engineer Home & Business @ | PlusNet plc. www.plus.net + ----- PlusNet - The smarter way to broadband ------ From heas at shrubbery.net Thu Feb 17 17:23:59 2005 From: heas at shrubbery.net (john heasley) Date: Thu, 17 Feb 2005 09:23:59 -0800 Subject: Duplicate config when polling Foundry ServerIrons In-Reply-To: <1108660385.3867.119.camel@localhost.localdomain> References: <20050216171850.B767D11142@guelah.shrubbery.net> <20050216175958.GD13470@shrubbery.net> <1108660385.3867.119.camel@localhost.localdomain> Message-ID: <20050217172359.GH10279@shrubbery.net> Thu, Feb 17, 2005 at 05:13:05PM +0000, Mark Loveley: > Sure enough I get some duplicated lines, time to raise a bug with > foundry methinks, the cli on the SI GTE series just isn't as good as on > the Bigirons, copying and pasting config also has problems.... good luck. i tried for over 3 years to get them to fix bigiron cli bugs. their response was that "customers had become accustomed to the behavior."