cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

427
Views
2
Helpful
7
Replies
Highlighted
Cisco Employee

create NSO Netsim devices with configuration from a real device

 

Hi, all

 

 

We are having an issue that nso not building device model correctly. It is missing 90% of configuration for one ask 9k device, in customer’s production environment. I am trying to see if we can re-porduce this in cisco lab, using nso Netsim. Can we use the config in the production device and put it onto Nso Netsim device? If we can, how?

 

 

Thanks.

 

  

 

Regards,

 

  Weigang Huang

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Hi!

 

 

I have a script that batch loads device configurations and it has been used for cisco-iso (I created 1500 devices on my laptop).

 

 

You point the script to a directory of device configurations, then it creates a device for each file. The script contains some doc on how to use it.

 

 

Br,

 

Fredrik

 

View solution in original post

7 REPLIES 7
Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Hi,

 

 

Is it that 90% of the device’s config is not modelled in the IOS-XR NED? Which flavour of the NED is it (CLI or NETCONF)?

 

 

It could be that some CLIs are not modelled and those CLIs keeps repeating multiple times in the configuration.

 

 

Hiro (copied) wrote some script that can paste a given config into a netsim and assess what all CLI commands are missing. Please see the existing community thread.

 

 

Thanks,

 

Bilal.

 

Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Bilal,

 

 

Thanks for the info. What happened was, the device has been synced up and 90+% of the config was modeled successfully. Customer has been using it to deploy about 60 nso services after that. Only about a month ago, we noticed the device model becomes only about 10 lines, instead of severable hundred lines. All the service related cli’s are no longer modeled. Customer has informed that there was no version/image changes to the device. Checking the device directly, we can see all the configurations, including those deployed by nso. Unfortunately, nso does not model any of them. Sync state shows synced. But show full config from nso shows only:

 

 

admin@ncs(config)# show full-configuration devices device mr6.snjsca config

 

devices device mr6.snjsca

 

config

 

  cisco-ios-xr:hostname mr6.snjsca

 

  cisco-ios-xr:group IPSLA-TPAC

 

   end-group

 

  !

 

  cisco-ios-xr:vrf Ioc

 

  exit

 

  cisco-ios-xr:cached-show version version 5.3.3

 

  cisco-ios-xr:cached-show version model ASR9K

 

!

 

!

 

 

 

Which is totally wrong. We have seen a much bigger device model before. A TAC case has opened more than a month ago, till today, we don’t see any progress. :-(.

 

 

I will check the attached emails. Thanks!

 

 

 

  

 

Regards,

Weigang Huang

Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Strange. Is this just for one device or for all devices under /devices/device? Please follow up with the TAC team.

 

 

BTW, what NSO version is this?

 

 

I’m assuming the service CRUD operations are still going through ok? Also if you do a REST call and retrieve the device’s config, is it still trimmed down?

 

 

Thanks,

 

Bilal.

 

Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Bilal,

 

 

It is just this one ask9k device, the rest 20+ 9k are all functioning well. The customer is able to deploy services to all other devices. We have been following up with the TAC team. The last recommendation from TAC is to delete and re-add the device. We can’t just do it since there are about 60 services associated to the problem device, and other working devices. The customer has put real traffic on those  services already.

 

 

NSO version: 4.1.1.1

 

 

I have not tried to do a rest call and retrieve the device config. You mean through nso? We can try that.

 

  

Thanks.

 

 

Regards,

Weigang Huang

Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

 

Hi!

 

 

I have a script that batch loads device configurations and it has been used for cisco-iso (I created 1500 devices on my laptop).

 

 

You point the script to a directory of device configurations, then it creates a device for each file. The script contains some doc on how to use it.

 

 

Br,

 

Fredrik

 

View solution in original post

Beginner

Re: create NSO Netsim devices with configuration from a real device

Hi Khara,

We are trying to use your create_devices.py script, but netsim does not seem to be using show_fixedconfig.sh to return the running configuration.  As a result, all the devices are created, but with the same default configuration.  Is there something you need to do to configure the netsim in order to use the external show_fixedconfig.sh script over its internally modeled configuration?

Thanks,

-Allen

Cisco Employee

Re: create NSO Netsim devices with configuration from a real device

Hi!

This script no longer works with newer IOS NEDs. The new way of loading from a file is:

devices device ios0 live-status ios-stats:exec any "sync-from-file test.txt"

devices device ios0 sync-from

Content for Community-Ad
FusionCharts will render here