Welcome, Guest. Please login or register.

Author Topic: backup configs  (Read 6903 times)

hcorbett23

  • Guest
backup configs
« on: March 10, 2009, 07:14:26 PM »
Hi,

I'm having trouble backing up the configs on some of my Cisco switches. I'm able to backup most of the switches with no problem, but I have some WS-C3560-48PS switches, among a couple of other types, that i am unable to backup. All of the devices that i cannot backup are on the same subnet, but I am not sure that it is a network problem because when i run tcpdump on the NeDi server I can see the sh run command being ran and the configuration from the WS-C3560-48PS switches. But I cannot see the configuration for these switches in the NeDi web interface. I have a green lightbulb by both SNMP and CLI

Im not sure how to troubleshoot any further. Any help would be greatly appreciated.

thanks!
Heath

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: backup configs
« Reply #1 on: March 10, 2009, 07:59:45 PM »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

hcorbett23

  • Guest
Re: backup configs
« Reply #2 on: March 11, 2009, 06:56:00 PM »
Thanks for the information. Maybe i misunderstood something on that page because i still cannot backup the configurations for my Cisco 3750's and 3560's. I have attached output from running nedi.pl -bd as well as tail -f on input.log and output.log. It looks like authentication is working correctly, and I have a green lightbulb. I started from a clean database (nedi.pl -i).

It looks like it gets to the part where it is going to run the show run command, but then I see nothing happen for about 1.5 - 2 minutes and then the discovery finishes and the config is not backed up. However, if i run a tcpdump sniffer i can actually see (telnet) that NeDi does in fact run the show run command on the switch and the configuration is built and sent across the network to the NeDi server. After the configuration is sent across the network I see the 1.5 -2 minute delay where nothing happens and then the discovery finishes and the config is not in the database.

I am able to backup several other models of cisco switches so i think (hope!) that I have everything configured correctly...any guidance would be greatly appreciated!

Thanks
Heath

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: backup configs
« Reply #3 on: March 12, 2009, 06:56:58 PM »
Good troubleshooting so far, but it would help even more, when you disabled in/outputlogging of BridgeFwd() and turn it on in Config() instead  ;)

I wasn't sarcastic, with the troubleshooting quote, though. Because you confirmed that the config is being sent and it seems nedi doesn't recognize it's end, hence just sits there and times out. This results in a error and the config is discarded. You can use -v instead of -d to actually see the config (use -vt <ip> for verbose testing). It matches this regexp /^(: )?end$|<\/config>/ to determine the configs end...
« Last Edit: March 12, 2009, 06:58:57 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

hcorbett23

  • Guest
Re: backup configs
« Reply #4 on: March 13, 2009, 02:59:23 PM »
Thanks, i enabled in/output logging in Config as you suggested... ;) and i was able to see that the configuration for the device did indeed show up in the output.log. However, in the nedi.pl -vbt <ip> I did not see the config (no lines beginning with CFG) like i do when a config is successfully backed up. The config for these devices end with the 'end' statement like all of my other switches. I have attached the last few lines of the configuration of a device that is not being backed up, as well as the last few lines of two devices that are being successfully backed up. I'm not sure that this information will be helpful...is there anything else i can provide?

Thanks!
Heath

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: backup configs
« Reply #5 on: March 15, 2009, 06:47:14 PM »
Ah, ok if you don't see the CFG: lines, it's most likely the beginning! Can you provide the first lines of the configs not being backed up?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

hcorbett23

  • Guest
Re: backup configs
« Reply #6 on: March 16, 2009, 03:20:00 PM »
Sure, here are the first few lines... if you need more, please let me know

Building configuration...

Current configuration : 4722 bytes
!
! Last configuration change at 10:31:19 CST Fri Mar 13 2009
! NVRAM config last updated at 10:31:33 CST Fri Mar 13 2009
!
version 12.2
no service pad
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
!
hostname Mcin_Cat3560G_24_Shipping(1)
!
enable secret 5 <...>
!
username <...> password 7 <...>
no aaa new-model
clock timezone CST -6
clock summer-time CDT recurring
switch 1 provision ws-c3750g-24ts
ip subnet-zero
!
no ip domain-lookup
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
vlan internal allocation policy ascending
!
interface Port-channel11
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet1/0/1

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: backup configs
« Reply #7 on: March 16, 2009, 05:54:14 PM »
Hmm, this is odd  ??? As you can see here this should match the beginning:

if ($line =~ /^(Running|Current|PIX|FWSM|ASA)\s|^begin$|\*\*\* CORE|<config>/){$go = 1}

Add this line after for further debugging:print "CFG:$go $line\n"

Then just do a nedi.pl -t <IP>
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

hcorbett23

  • Guest
Re: backup configs
« Reply #8 on: March 17, 2009, 02:56:19 PM »
When i add that line I don't get any output from it...I mean NeDi runs fine and I see other output, but no CFG: lines

I added some other "print" lines to libcli-netssh and I captured the output from the nedi.pl command.

I've attached the relevant section of libcli-netssh showing the print statements I added, as well as the output of nedi.pl -bvd and the input.log and output.log

Hopefully this will help..

thanks

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: backup configs
« Reply #9 on: March 20, 2009, 06:17:14 PM »
Thanks for the great feedback. Verify whether all problematic devices have () in the name? If so, you'll need to either adjust the prompt regexp in the beginning of the lib or get rid of the parentheses. I can see it took 239s until nedi timed-out as the prompt is never matched...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

hcorbett23

  • Guest
Re: backup configs
« Reply #10 on: March 23, 2009, 06:25:08 PM »
You were correct!  ;D

All problematic devices had (). I changed the hostnames and all is well..thanks for your help!!