02-12-2019 04:36 AM
Hi,
I have a topology wherein my cisco ios router is configured with a terminal server. SSH is enabled on the terminal server. How to connect to the router through this terminal server added to NSO?
I have already referred the below post
But am facing the same issue that sujmurth has mentioned. I dont see cisco-ios-proxy-settings option listed for ned-settings command. Pls let me know the commands.
Solved! Go to Solution.
02-12-2019 04:39 AM
Make sure you use a production version of the NED and not the one that is distributed with NSO. Which NED version are you running?
02-12-2019 09:31 AM
02-12-2019 04:39 AM
Make sure you use a production version of the NED and not the one that is distributed with NSO. Which NED version are you running?
02-12-2019 09:23 AM
My NSO version is 4.7 and below is the Cisco IOS NED details. So why should we not use the NED that is distributed with NSO, if so what is purpose of packaging NEDs along with a NSO image?
packages package cisco-ios
package-version 3.0.0.3
description "NED package for Cisco IOS"
ncs-min-version [ 3.0.2 ]
directory ./state/packages-in-use/1/cisco-ios
component upgrade-ned-id
upgrade java-class-name com.tailf.packages.ned.ios.UpgradeNedId
component cisco-ios
ned cli ned-id cisco-ios
ned cli java-class-name com.tailf.packages.ned.ios.IOSNedCli
ned device vendor Cisco
02-12-2019 09:31 AM
02-13-2019 02:33 AM - edited 02-13-2019 02:57 AM
Alright, i have upgraded my NED. Now the proxy commands are enabled. As per the same i see the below ned-settings.
I am able to set the proxy prompt (before sending telnet) to # but am not able to set the proxy-prompt2(after sending telnet) to >.
proxy-prompt - Prompt pattern on the proxy before sending telnet/ssh command
proxy-prompt2 - Prompt pattern on the proxy after sending telnet/ssh command
remote-address - Address of host behind the proxy
remote-command - Connection command used to initiate proxy on device.
remote-connection - Connection type between proxy and device
remote-name - User name on the device behind the proxy
remote-password - Password on the device behind the proxy
remote-port - Port of host behind the proxy
admin@ncs% show devices device router-ios-1 ned-settings
cisco-ios {
connection {
number-of-retries 2;
time-between-retry 5;
prompt-timeout 15000;
send-login-newline true;
}
proxy {
remote-connection telnet;
remote-address 10.78.241.213;
remote-port 2066;
remote-command R1;
remote-name admin;
remote-password $8$LMvw1+gRkRyr3uNHFlMlCBkpvVBza5hpeXAbwR6+Gtw=;
proxy-prompt "#";
proxy-prompt2 >; (is this one not in double quote an issue?)
}
}
[ok][2019-02-12 16:26:52]
02-13-2019 03:00 AM
02-13-2019 09:20 AM
My connection to the router fails from NSO. Below is the message. I earlier got an error message which stated connection refused, no response from device in state proxyjump. After some changes i now see the message pointing to proxylogin. Any help or inputs here pls
admin@ncs% request devices device router-ios-1 connect
result false
info Failed to connect to device router-ios-1: connection refused: Timeout after 15s, no response from device in state proxylogin
[ok][2019-02-12 22:49:04]
Below is the ned-settings configuration done
admin@ncs% show devices device router-ios-1 ned-settings
cisco-ios {
connection {
number-of-retries 2;
time-between-retry 5;
prompt-timeout 15000;
send-login-newline true;
}
proxy {
remote-connection telnet;
remote-address 192.168.250.1;
remote-port 2066;
remote-command R1;
remote-name admin;
remote-password $8$LMvw1+gRkRyr3uNHFlMlCBkpvVBza5hpeXAbwR6+Gtw=;
remote-secondary-password $8$cMrB6I/W/RwucQVoYY5d5Sin8r3n/jSgzrK6onCDy9s=;
proxy-prompt "#";
proxy-prompt2 .*;
}
}
[ok][2019-02-12 22:49:27]
02-13-2019 09:06 PM - edited 02-13-2019 10:11 PM
device connect issue is resolved. the mistake i made was that i had set wrong protocol for the jump server as telnet which should have been ssh.
Thanks @vleijon @KJ Rossavik
02-13-2019 10:36 PM
One final question. I see that the device connection status keeps fluctuating. I mean it said connected. After some time I see it not getting connected. And again get connected when no config changes or n/w changes are made. Please see below. Any reason for this unstable behavior?
admin@ncs% request devices device router-ios-1 connect
result false
info Failed to connect to device router-ios-1: connection refused: Timeout after 30s, no response from device in state login
[ok][2019-02-13 12:04:37]
[edit]
admin@ncs% request devices device router-ios-1 connect
result false
info Failed to connect to device router-ios-1: connection refused: Timeout after 30s, no response from device in state login
[ok][2019-02-13 12:05:18]
[edit]
admin@ncs% request devices device router-ios-1 connect
result true
info (admin) Connected to router-ios-1 - 10.78.241.213:22
[ok][2019-02-13 12:05:54]
[edit]
admin@ncs%
02-14-2019 12:45 AM
No, there should be no nso-reason for that to fail intermittently. The SSH part is usually rock-solid.
I recommend turning on the device trace (set devices global-settings trace raw) and checking in the trace file what seems to happen.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: