Welcome, Guest. Please login or register.

Author Topic: Config Backup - "show run" error on IOS-XR Devices?!  (Read 2572 times)

MPell

  • Newbie
  • *
  • Posts: 14
    • View Profile
Config Backup - "show run" error on IOS-XR Devices?!
« on: July 24, 2018, 01:04:45 pm »
Dear NeDi Community,

I've got a problem on backing the config of some devices (maybe IOS-XR devices only). SSH-Account is working correct. But one device throws an "EVNT:" and in the verbose output I can see, that the "show run" output stays in "WAIT:" Mode, while on the working device the output shows the prefix "CONF:" beginning with the line with "version xx.x" in it.

Both Backups were done over the WebGui and executed the following command:

Code: [Select]
/var/nedi/nedi.pl -v -B0 -SAFGgsjmvpadobewitu -a <Device-IP>
Here the excerpt of the "Not working IOS-XR device" output

Code: [Select]
Config (CLI)   ----------------------------------------------------------------
SSH :NeDi-System@<My-Device-IP-1>:22 Tout:2s OS:IOS-xr EN:[\w+().-]+#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l NeDi-System <My-Device-IP-1>
CLI2:Matched 'password: ' sending password
CLI3:Password sent
CLI8:Matched enable prompt, OK
CMDR:terminal length 0 result is OK
EVNT:MOD=C/1 L=150 CL=nede TGT=<My-Device-Name-1> MSG=Command "show run" returned snmp-server enable traps ethernet cfm crosscheck mep-missing mep-unknown service-up
WAIT:show run
WAIT:Building configuration...
WAIT:
WAIT:Current configuration : 11108 bytes
WAIT:!
WAIT:! Last configuration change at 09:55:39 CET Thu Nov 30 2017 by NetAdmin
WAIT:! NVRAM config last updated at 09:55:41 CET Thu Nov 30 2017 by NetAdmin
WAIT:!
WAIT:version 15.5
WAIT:service timestamps debug datetime msec localtime show-timezone
WAIT:service timestamps log datetime msec localtime show-timezone
WAIT:service password-encryption
[...]
WAIT:end
ERR :No config ()

And here the excerpt of the Output from the working IOS device:

Code: [Select]
Config (CLI)   ----------------------------------------------------------------
SSH :NeDi-System@<My-Device-IP-2>:22 Tout:2s OS:IOS EN:[\w+().-]+#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l NeDi-System <My-Device-IP-2>
CLI2:Matched 'password: ' sending password
CLI3:Password sent
CLI8:Matched enable prompt, OK
CMDR:terminal length 0 result is OK
CMDR:show run result is OK
WAIT:show run
WAIT:Building configuration...
WAIT:
WAIT:Current configuration : 14177 bytes
WAIT:!
WAIT:! Last configuration change at 17:00:38 CEST Tue Jul 17 2018 by NetAdmin
WAIT:! NVRAM config last updated at 17:41:17 CEST Tue Jul 17 2018 by NetAdmin
WAIT:!
CONF:version 12.2
CONF:no service pad
CONF:service timestamps debug datetime msec localtime show-timezone
CONF:service timestamps log datetime msec localtime show-timezone
CONF:service password-encryption
CONF:service sequence-numbers


Do you have some hints what to do or where to look to get it working?!

Thanks

M. Pell

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2903
    • View Profile
    • NeDi
Re: Config Backup - "show run" error on IOS-XR Devices?!
« Reply #1 on: July 27, 2018, 01:46:32 pm »
Search for IOS-xr in inc/libcli.pm

Replace the line:
$cmd{'IOS-xr'}{'cfst'} = '^!! IOS XR Configuration';

With this:
$cmd{'IOS-xr'}{'cfst'} = 'version';

Not sure if all IOS-xr use that format now, but if they do I can adjust it for the next release...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

MPell

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Config Backup - "show run" error on IOS-XR Devices?!
« Reply #2 on: July 30, 2018, 08:54:34 am »
It works! Thanks a lot!