From lopaki at gmail.com Wed Jul 30 10:35:43 2008 From: lopaki at gmail.com (Scott Lambdin) Date: Wed, 30 Jul 2008 10:35:43 -0400 Subject: [Trilug-ontopic] CentOS/Fedora/RHEL? was: RHEL5 help.. In-Reply-To: References: <48456FE0.1030909@pobox.com> Message-ID: <529e76830807300735i7bb6398v6d00d75bc323e296@mail.gmail.com> Thorough spam testing on this email: Received: from pilot.trilug.org (localhost [127.0.0.1]) by pilot.trilug.org (Postfix) with ESMTP id 917D58421C; Tue, 29 Jul 2008 22:47:58 -0400 (EDT) X-Original-To: trilug-ontopic at trilug.org Delivered-To: trilug-ontopic at trilug.org Received: by pilot.trilug.org (Postfix, from userid 65534) id 2C4A7846FC; Tue, 3 Jun 2008 13:07:56 -0400 (EDT) Received: from an-out-0708.google.com (an-out-0708.google.com [ 209.85.132.250]) by pilot.trilug.org (Postfix) with ESMTP id AF9F0846DB for ; Tue, 3 Jun 2008 13:07:55 -0400 (EDT) On 6/3/08, Trevor Little wrote: > > CentOS is RHEL with all of the branding (logos, etc) removed. Other than > that, it's pretty much the same as RHEL. It's the way to go if you don't > want/have a liscence. Fedora is more of a beta as I understand it. Sort of > a test bed. I wouldn't recommend using it in a production environment. > > Trevor > > On Tue, 03 Jun 2008 12:59:07 -0400, Jason Watts > wrote: > > > my misguided knowledge says CentOS vs RHEL same thing... one is free the > > other isn't With redhat's you get the support and possibly some > > proprietary > > code that isn't quite available in CentOS. these two are meant to be > > stable > > and more sever oriented. RHEL vs Fedora... Fedora is less stable then > > RHEL. Fedora is meant to be the free version of their OS... more for > > desktop use. might be wrong here, but you tend to find code that hasn't > > been as tested as their RHEL edition. > > > > jsn > > > > On Tue, Jun 3, 2008 at 12:22 PM, Tom Roche wrote: > > > >> > >> Crist?bal Palmer Tue Jun 3 09:45:58 EDT 2008 > >> > If you don't want to pay for [an RHEL] license, then you should > >> > really be using CentOS. > >> > >> BTW: what's the difference between CentOS, Fedora, and RHEL? I don't > >> quite understand the partitioning, except that I understand (possibly > >> incorrectly) that the latter is licensed/supported and the former are > >> not. Also, why the coyness @ > >> > >> http://www.centos.org/ > >> > CentOS is an Enterprise-class Linux Distribution derived from > >> > sources freely provided to the public by a prominent North American > >> > Enterprise Linux vendor. > >> > >> ? It's Red Hat, right? > >> _______________________________________________ > >> Trilug-ontopic mailing list > >> Trilug-ontopic at trilug.org > >> http://www.trilug.org/mailman/listinfo/trilug-ontopic > >> > > > _______________________________________________ > Trilug-ontopic mailing list > Trilug-ontopic at trilug.org > http://www.trilug.org/mailman/listinfo/trilug-ontopic > -- CILCIL -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.trilug.org/pipermail/trilug-ontopic/attachments/20080730/493e43fb/attachment.htm From bogus@does.not.exist.com Tue Jul 29 11:09:28 2008 From: bogus@does.not.exist.com () Date: Tue, 29 Jul 2008 15:09:28 -0000 Subject: No subject Message-ID: have on the network, including perimeter devices (i.e. thorugh the firewall). I need to back up the running configurations and make regular little txt files out of them. All the devices I need to back up are Cisco devices running IOS. Easy enough. But the one thing I'm NOT able to do is issue a standard 'copy run scp/tftp/ftp' as the firewall will block any inbound new connections. Changing the firewalls rules to make this work is impossibe. So since I'm able to ssh to the devices I should, and am able, to use the 'spawn ssh' command in expect to reach all the devices. Now, the question is, how I do "read" the results of 'show run' back into the perl script that has already launched the expect script? I'm looking around for examples (as well as checking my book) and I haven't found anything just yet. I suppose it's more of an expect script. All my existing expect script just run commands based on values returned - and they all run totally in expect. How do I launch the perl script and then read back from the expect script ONLY the results of the 'show run' command? I'm sure someone has done this already. If you have or know easily how to make this work can you send me a code snippet? I'd be very grateful. Thx Greg ------=_Part_89566_14982968.1225307459701 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a linux box with a plain perl installation (expect is there too).  I am NOT able to make any changes to the software and am not able to add any modules.  It's just that way.  I can't change it and have to live with it.

From the linux boxI am able to ssh, from the command line, to any device I have on the network, including perimeter devices (i.e. thorugh the firewall).  I need to back up the running configurations and make regular little txt files out of them.  All the devices I need to back up are Cisco devices running IOS.  Easy enough.  But the one thing I'm NOT able to do is issue a standard 'copy run scp/tftp/ftp' as the firewall will block any inbound new connections.

Changing the firewalls rules to make this work is impossibe. 

So since I'm able to ssh to the devices I should, and am able, to use the 'spawn ssh' command in expect to reach all the devices.  Now, the question is, how I do "read" the results of 'show run' back into the perl script that has already launched the expect script?  I'm looking around for examples (as well as checking my book) and I haven't found anything just yet. 

I suppose it's more of an expect script.  All my existing expect script just run commands based on values returned - and they all run totally in expect.  How do I launch the perl script and then read back from the expect script ONLY the results of the 'show run' command?

I'm sure someone has done this already.  If you have or know easily how to make this work can you send me a code snippet?  I'd be very grateful.

Thx

Greg
------=_Part_89566_14982968.1225307459701-- From bogus@does.not.exist.com Tue Jul 29 11:09:28 2008 From: bogus@does.not.exist.com () Date: Tue, 29 Jul 2008 15:09:28 -0000 Subject: No subject Message-ID: Retrieving IOS running-config via scp Posted by: daniel in Cisco Ok, now I've only tested this with routers running IOS - it may be a little different with Catalyst switches, since they store their config on flash, rather than nvram. On the other hand, it may be exactly the same, since we're retrieving running-config, not startup-config. First, you need to ensure that ssh and scp have been enabled. I strongly recommend that you run ssh version 2. ip ssh version 2 ip scp server enable Then, on your PC: scp user at router-hostname:system:running-config . You should then have a file called "running-config" in that directory. Pretty simple=85 If you want to grab the startup-config instead of the running-config, try: scp user at router-hostname:nvram:startup-config . By using RSA keys to eliminate the password prompt at login, this method could be expanded to form the basis of an automated config backup. I know that various apps already exist, but a lot of them retrieve the config via "expect" scripts, basically executing a "show run" and capturing the output= . Another method of retrieving the config is via SNMP, however unless you're using SNMP v3 with encryption, this method is potentially insecure. This entry was posted on Thursday, July 31st, 2008 at 3:03 am and is filed under Cisco .You can follow any responses to this entry through the RSS 2.0feed. You can skip to the end and leave a respon= se. Pinging is currently not allowed. --=20 There's a box? ------=_Part_122846_26742690.1225316061819 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I saw where someone else was having trouble with getting just the show= run output with expect.  Like this guy:  http://www.linuxforums.org/forum/linux-programming-scripti= ng/117521-expect-creating-variables-fly.html
 
I'm not getting where the "useless in= fo" is coming from.  Where = is my old Cisco Rooter-on-a-eisa-card thingy I bought for $300 in the '= 90's? 
 
 
From http://blog.pressure.net= .nz/ this looks interesting:
 

Retrieving IOS running-config via scp

Posted by: dan= iel in Cisco

Ok, now I've only tested this with routers running IOS - it may be a lit= tle different with Catalyst switches, since they store their config on flas= h, rather than nvram. On the other hand, it may be exactly the same, since = we're retrieving running-config, not startup-config.

First, you need to ensure that ssh and scp have been enabled. I strongly= recommend that you run ssh version 2.

ip ssh version 2
ip scp server enable

Then, on your PC:

scp user at router-hostname:system:running-config .

You should then have a file called "running-config" in that directory. P= retty simple=85

If you want to grab the startup-config instead of the running-config, tr= y:

scp user at router-hostname:nvram:startup-config .

By using RSA keys to eliminate the password prompt at login, this method= could be expanded to form the basis of an automated config backup. I know = that various apps already exist, but a lot of them retrieve the config via = "expect" scripts, basically executing a "show run" and capturing the output= .

Another method of retrieving the config is via SNMP, however unless you'= re using SNMP v3 with encryption, this method is potentially insecure.



--
There's a box?
------=_Part_122846_26742690.1225316061819--