interface discovery with simulated device: We are using TSDN 4.0 packages with NSO 5.7.5.1For testing customer case scenario, we need to provision L2VPN devices with hundreds of end points. So, we are using simulated devices in addition to xrv9k devices. NSO has to discover the simulated device and its interfaces. Simulated devices support only SNMP and telnet. We added the simulated device IP to NSO, and connect is failing with timeout. We tried to enable trace by configuring (devices device Node_1_1 trace pretty), it created the file under /var/log/ncs/ned-cisco-iosxr-cli-7.39-Node_1_1.trace. 1. We need NSO to discover the device interfaces through telnet.So that we can provision L2VPN service with interfaces available in the device with no-networking option.NSO - 172.20.63.148 - root/Ovatest123@
if we are using SSH for device Node_1_2, we get this error message NEDCOM CONNECT: Unable to reach a settlement: and in new state. can we force NSO to use password for SSH as below.debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug3: send packet: type 50debug3: receive packet: type 51debug1: Authentications that can continue: passworddebug3: start over, passed a different list passworddebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,passworddebug3: authmethod_lookup passworddebug3: remaining preferred: ,gssapi-with-mic,publickey,keyboard-interactive,passworddebug3: authmethod_is_enabled passworddebug1: Next authentication method: passwordcisco@10.20.1.1's password:debug3: send packet: type 50debug2: we sent a password packet, wait for replydebug3: receive packet: type 52debug1: Authentication succeeded (password).Authenticated to 10.20.1.1 (:22).Hi Ramakrishnan,We are not able to connect to 172.20.63.148 with the provided credentials.Please suggest.Regards,Nishad Subair.Hi Nishad,It was a typo. Please try cnctest/Ovatest123@Thanks,Sreedhar.Hi Sreedhar, Ramakrishnan,We can help you to connect the simulated devices via ssh or telnet, please give us couple devices with credentials that can be reached from your NSO.Regards,Hi Nishad,I have added you in one of the mail thread where below details are provided. Also pasted below (incase if the table is not clear, please do look into that mail for info.) For trail Please find below 3 sheer devices, each belonging to each of RFSSheer Hostname Sheer IPConnectivity Type enabledSheer LoginsRFS node RFS node IPRFS LoginsCFS IPNode_1_110.20.1.1Telnetcisco/ciscoRFS1172.20.63.148cnctest/Ovatest123@172.20.63.132Node_1_510.20.1.5Telnetcisco/ciscoRFS2172.20.63.149cnctest/Ovatest123@Node_1_10010.20.1.100Telnetcisco/ciscoRFS3172.20.63.150cnctest/Ovatest123@Pasted snip of telnet of one of sheer from RFS1 $ telnet 10.20.1.1Trying 10.20.1.1...Connected to 10.20.1.1.Escape character is '^]'.Username: ciscociscoPassword: ciscoDevice_10_20_1_1#show running-configshow running-configThu Apr 7 21:00:07.958 PDTBuilding configuration...!! IOS XR Configuration 6.6.3!! Last configuration change at Thu Apr 7 20:23:30 2022 by cisco!hostname PE1-ASR9kclock timezone PST -8..!interface GigabitEthernet0/0/0/0description #Connected to Agilent 101/1 from PE1 this router"ipv4 address 16.1.1.1 255.255.255.0!interface GigabitEthernet0/0/0/1cdpipv4 address 16.1.1.5 255.255.255.252!We did mention this interface (GigabitEthernet0/0/0/1) in the payload of the script which is used to provision. Script copied to RFS1 for reference in below path - $ ls -l deploy_services_L2VPN_CNC4_Node_11-to-Node_15-rwxrwxr-x 1 cnctest cnctest 28342 Sep 28 10:45 deploy_services_L2VPN_CNC4_Node_11-to-Node_15Thanks,Sreedhar.I did verify onboarding a simulated device with telnet protocol in my setup and it works fine.admin@ncs% show devices device r1address  10.195.72.32;port   62083;authgroup iosxr_authgroup;device-type {  cli {    ned-id  cisco-iosxr-cli-7.42;    protocol telnet;  }}trace   pretty;state {  admin-state unlocked;}admin@ncs% request devices device r1 conPossible completions: config - NCS copy of the device configuration connect - Connect to the deviceadmin@ncs% request devices device r1 connectresult trueinfo (admin) Connected to r1 - 10.195.72.32:62083Thanks,LinhThere was connectivity issue from the simulated device, which is fixed now, admin@ncs# devices device Node_1_1 connectresult trueinfo (admin) Connected to Node_1_1 - 10.20.1.1:23admin@ncs# exitStill interfaces are not discovered. what command does NSO use to discover interfaces? We can accordingly check if that command is properly working in simulated device.What prompt does NSO expects in admin mode. Not clear why NSO times out, when there is # prompt being returned?Is it mandatory to get into admin mode for interface discovery.&#8211; Reading admin config&#8211; Entering admin modeadmininput 3-Oct-2022::04:14:03.974 user: cnctest/1011756 thandle 6203791 hostname scale-nso2-RFS1 device Node_1_1 ***adminSimulator(admin)#output 3-Oct-2022::04:19:04.049 user: cnctest/1011756 thandle 6203791 hostname scale-nso2-RFS1 device Node_1_1 ***<ul class="alternate" type="square"> progress: show: reading config error << 3-Oct-2022::04:19:04.051 user: cnctest/1011756 thandle 6203791 hostname scale-nso2-RFS1 device Node_1_1 ERROR: External error in the NED implementation for device Node_1_1: Read timeout after 300 seconds, blocked on "nSimulator(admin)#" when waiting for "Invalid input detected." | "This command is not authorized." | "Command authorization failed." | "Unable to login.dmin sername:" | "<br class="atl-forced-newline" />A." | "dmin mode has been deprecated" | "<br class="atl-forced-newline" />A.$">> 3-Oct-2022::04:19:04.053 user: cnctest/1011756 thandle 6203791 hostname scale-nso2-RFS1 device Node_1_1 CLOSE 0: (Pool: false)<< 3-Oct-2022::04:19:04.054 user: cnctest/1011756 thandle 6203791 hostname scale-nso2-RFS1 device Node_1_1 CLOSEDAfter adding 'connected ' string, now NSO proceeds, but it issues 'show running-config', and it waits for 5 mins to time out. Not sure why it is waiting for 5 minscisco connected from 192.168.71.148 using ssh on Device_10.20.1.1Device_10.20.1.1(admin)#output 3-Oct-2022::06:31:10.083 user: cnctest/1013271 thandle 6207591 hostname scale-nso2-RFS1 device Node_1_1 ***<ul class="alternate" type="square">Entered admin modeshow running-configinput 3-Oct-2022::06:31:10.084 user: cnctest/1013271 thandle 6207591 hostname scale-nso2-RFS1 device Node_1_1 ***show running-configDevice_10.20.1.1(admin)#output 3-Oct-2022::06:36:10.224 user: cnctest/1013271 thandle 6207591 hostname scale-nso2-RFS1 device Node_1_1 ***exitinput 3-Oct-2022::06:36:10.226 user: cnctest/1013271 thandle 6207591 hostname scale-nso2-RFS1 device Node_1_1 ***One more question, how does NSO discover the interfaces. I tried 'Sync from', but i dont see this information being queried. We also want to know the CLI commands used to discover the interfaces in this device.Hi Ramakrishnan,It looks like there is some issue with the simulated device you are using.We connected to the device and checked. There is no interfaces/config available in the device. that is the reason why you are not able to see the same in NSO.Regards,Nishad Subair.Surprising.... Which device have you connected ? In simulated devices only defined show commands like "show running-config" , "show interfaces" ... only will work and give o/p. If we try other show commands, there wont be any o/p. Most probably this could be the reason, the configs or interfaces are not noticed. If you don't see any o/p for these show commands then please ensure the ip address of node, which is been tried. We are more interested in below asks from Ramakrishnan Srinivasan :- "How does NSO discover the interfaces. Tried 'Sync from', but i dont see this information being queried. We also want to know the CLI commands used to discover the interfaces in this device"Hi Srinivasan ,I looked at your set up today ,as per my suggestion last time I suggested to use right port for connecting .Today I tried for one device :admin@ncs% show | compare   devices {   device Node_1_1 {<ul class="alternate" type="square">port 23;+    port 22;     device-type <div class="error"><span class="error">Unknown macro: {       cli {-        protocol telnet;+        protocol ssh;       }     }</span> </div>   }}admin@ncs% request devices device Node_1_1 sync-from result trueI can now see config for this device Node_1_1 for which I moved it to ssh from telnet and port 22.Please do same operation of rest of 8K+ devices on your NSO .Please close JSD if you are good .Please try creating services after fixing ports on rest of devices .ThanksPriyankaWe can now provision the service with interface discovered using SSH. We can deal with telnet issue later.