cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
607
Views
5
Helpful
3
Replies

NSO 5.7 synchronization issue with Ocnos

arno0912
Level 1
Level 1

Hello, I am having an issue, about I can't see the running-config of my device in NSO. Actually, seems that it does not syncronize, despiste it shows it as synchronized.

1- I create the device:

admin@ncs(config)# devices device ocnos_oc_R8_7027 device-type netconf ned-id netconf
admin@ncs(config-device-ocnos_oc_R8_7027)# address 10.14.111.101 port 830 authgroup ocnos
admin@ncs(config-device-ocnos_oc_R8_7027)# state admin-state unlocked
admin@ncs(config-device-ocnos_oc_R8_7027)# commit
Commit complete.
admin@ncs(config-device-ocnos_oc_R8_7027)# ssh fetch-host-keys
result updated
fingerprint {
algorithm ssh-ed25519
value e6:55:ad:00:4e:cc:1c:37:03:4b:45:a8:48:5d:a2:61
}
fingerprint {
algorithm ecdsa-256
value 2d:29:10:6d:c6:83:77:66:59:73:b0:e9:3a:78:97:12
}
fingerprint {
algorithm ssh-rsa
value 61:bb:20:8b:37:5a:d0:10:fa:69:6a:3c:af:58:c0:af

2 - Import the yang modules:

admin@ncs(config)# netconf-ned-builder project ocnos_oc 1.0
admin@ncs(config-project-ocnos_oc/1.0)# module iana-crypt-hash 2014-04-04 select
[EDITED]
admin@ncs(config-project-ocnos_oc/1.0)# module feature-list 2022-07-25 select
admin@ncs(config-project-ocnos_oc/1.0)# exit
admin@ncs(config)# exit
admin@ncs# show netconf-ned-builder project ocnos_oc module status
FAMILY MAJOR
NAME VERSION NAME REVISION STATUS
---------------------------------------------------------------------------------------
ocnos_oc 1.0 cml-data-types 2022-04-04 selected,downloaded
[EDITED]
yuma-netconf 2012-10-05 selected,downloaded

3 - Create the ned, export it and reload the packages:

admin@ncs(config)# netconf-ned-builder project ocnos_oc 1.0 build-ned

admin@ncs(config)# netconf-ned-builder project ocnos_oc 1.0 export-ned to-directory /home/arnofernando/venko/ncs-run/packages
Error: Error creating resulting tar archive: error changing file owner: not owner

admin@ncs# packages reload

>>> System upgrade is starting.
>>> Sessions in configure mode must exit to operational mode.
>>> No configuration changes can be performed until upgrade has completed.
>>> System upgrade has completed successfully.
reload-result {
package ocnos_oc-nc-1.0
result true
}

4 - When I sinchronize it, seems everithing is OK:

admin@ncs# config
Entering configuration mode terminal
admin@ncs(config)# devices sync-from
sync-result {
device ocnos_oc_R8_7027
result true
}

5 - But I can not see any configuration of my switch (like interfaces or routes configuration), and can't see the interfaces, only manager data:

admin@ncs# show running-config devices device ocnos_oc_R8_7027 config
% No entries found.

admin@ncs# show running-config devices device ocnos_oc_R8_7027
devices device ocnos_oc_R8_7027
address 10.14.111.101
port 830
ssh host-key ssh-rsa
key-data "AAAAB3NzaC1yc2EAAAADAQABAAABAQC706mz0GQvdEaqK/2zUUtCOh/kEUkZpQ7d8gie4jf1\nyV4nV2g1u7oIbdnoBBI0a5bIwbUGDHPUvfTpoJntpryY7G/QIWuBJVDiu6QteoB4u5byNVbS\nqA3fljbFMISYfLxK3i3S07htadDfUIpYTyx/D5PCf8DDxmdf7UkhOM4Quj8GgGW3PacE2YyJ\nASBq5x7MaWEUiStuNgtemWqR/DTw+OO8l3gZzHhWBcmHLzo3jdkH/8ffLGEWqEb78wR4lxck\nVlja4suFB0GEa7vFLucYO3TpGzZARf7iY5A0bB0fi7Zi1yQ3RN7+di28lSNWsFCzZm8vWS7G\nyLUFn1xttlqJ"
!
ssh host-key ssh-ed25519
key-data AAAAC3NzaC1lZDI1NTE5AAAAII/jNFIYKbUk/ePbp4wu/AjhP5gERqn6F+4tH39idbh7
!
ssh host-key ecdsa-256
key-data "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBCN/XoGuZGwNfKCE+cu\nQOULrSHomRSmkDp0u6MsoNIVLhtRe9+r8Ak7G8taE55D7NgugnEDzdLKBmeCZWcww64="
!
authgroup ocnos
device-type netconf ned-id netconf
state admin-state unlocked
!
admin@ncs#

And even I did some change directly in the switch and ask to verify, there NSO does not tell me that there is a configuration mismatch:
admin@ncs# devices device ocnos_oc_R8_7027 compare-config
admin@ncs#

I am using Openconfig protocol and I am pretty sure that all yangs needed were imported. So, how can I see the running config of my switch in NSO? Did I do something wrong?

2 Accepted Solutions

Accepted Solutions

Hi @snovello
Your solution works, thanks! However, I understood that I need a NED for
each device model.
When I try to create a second ned, this does not appear as option to set
this NED to new device. When I try to change the ned to the one created
(ocnos), it does not appear as option, just the ned created previously
(ocnos-oc) appear :




































*admin@ncs(config)# devices device ocnos device-type netconf ned-id
netconfadmin@ncs(config-device-ocnos)# addPossible completions:
add-capability This action adds a capability to the list of
capabilities. address IP address or host name for the management
interfaceadmin@ncs(config-device-ocnos)# address 10.12.44.118 port 830
authgroup ocnosadmin@ncs(config-device-ocnos)# state admin-state unlocked
admin@ncs(config-device-ocnos)# commitCommit
complete.admin@ncs(config-device-ocnos)# ssh fetch-host-keys result
updatedfingerprint { algorithm ssh-ed25519 value
e6:55:ad:00:4e:cc:1c:37:03:4b:45:a8:48:5d:a2:61}fingerprint { algorithm
ecdsa-256 value
2d:29:10:6d:c6:83:77:66:59:73:b0:e9:3a:78:97:12}fingerprint { algorithm
ssh-rsa value
61:bb:20:8b:37:5a:d0:10:fa:69:6a:3c:af:58:c0:af}admin@ncs(config)#
netconf-ned-builder project ocnos 1.0 device ocnos local-user admin vendor
ipiadmin@ncs(config-project-ocnos/1.0)# commitadmin@ncs(config)#
netconf-ned-builder project ocnos 1.0 build-ned When I try to change the
ned to created, it does not appear as option, just the ned created
previously admin@ncs(config)# devices device ocnos device-type netconf
ned-id Possible completions: lsa-netconf netconf ocnos_oc-nc-1.0 snmp*
Is there any restriction to create NED?

View solution in original post

You can use the NED for multiple devices. You do not need an individual NED per device. NSO is just enforcing that you can use the NEDs that it is aware of because they have been loaded with package reload.

What you may have is that different ocnos devices are running different software releases. If the yang modules exposed by the devices change in incompatible ways, (they might be the same module names but with different versions) you will need 2 NEDs for the different software releases. At this point you would create a new NED e.g. ocnos-oc version 1.1

Of course if you want to manage a completely different device that exposes other yang models you would create a different NED for that.

View solution in original post

3 Replies 3

snovello
Cisco Employee
Cisco Employee
Hello,
you also need to modify the device record so the NED is not the generic Netconf NED, but is the NED you created.

admin@ncs(config)# devices device ocnos_oc_R8_7027 device-type netconf ned-id ocnos_oc-nc-1.0
admin@ncs(config)# commit

So that service code can reliably configure a device, NSO uses the yang modules that are included in the Netconf NED that is assigned to the device. Other modules are ignored. The generic Netconf NED does not support any modules.

Hi @snovello
Your solution works, thanks! However, I understood that I need a NED for
each device model.
When I try to create a second ned, this does not appear as option to set
this NED to new device. When I try to change the ned to the one created
(ocnos), it does not appear as option, just the ned created previously
(ocnos-oc) appear :




































*admin@ncs(config)# devices device ocnos device-type netconf ned-id
netconfadmin@ncs(config-device-ocnos)# addPossible completions:
add-capability This action adds a capability to the list of
capabilities. address IP address or host name for the management
interfaceadmin@ncs(config-device-ocnos)# address 10.12.44.118 port 830
authgroup ocnosadmin@ncs(config-device-ocnos)# state admin-state unlocked
admin@ncs(config-device-ocnos)# commitCommit
complete.admin@ncs(config-device-ocnos)# ssh fetch-host-keys result
updatedfingerprint { algorithm ssh-ed25519 value
e6:55:ad:00:4e:cc:1c:37:03:4b:45:a8:48:5d:a2:61}fingerprint { algorithm
ecdsa-256 value
2d:29:10:6d:c6:83:77:66:59:73:b0:e9:3a:78:97:12}fingerprint { algorithm
ssh-rsa value
61:bb:20:8b:37:5a:d0:10:fa:69:6a:3c:af:58:c0:af}admin@ncs(config)#
netconf-ned-builder project ocnos 1.0 device ocnos local-user admin vendor
ipiadmin@ncs(config-project-ocnos/1.0)# commitadmin@ncs(config)#
netconf-ned-builder project ocnos 1.0 build-ned When I try to change the
ned to created, it does not appear as option, just the ned created
previously admin@ncs(config)# devices device ocnos device-type netconf
ned-id Possible completions: lsa-netconf netconf ocnos_oc-nc-1.0 snmp*
Is there any restriction to create NED?

You can use the NED for multiple devices. You do not need an individual NED per device. NSO is just enforcing that you can use the NEDs that it is aware of because they have been loaded with package reload.

What you may have is that different ocnos devices are running different software releases. If the yang modules exposed by the devices change in incompatible ways, (they might be the same module names but with different versions) you will need 2 NEDs for the different software releases. At this point you would create a new NED e.g. ocnos-oc version 1.1

Of course if you want to manage a completely different device that exposes other yang models you would create a different NED for that.