cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
279
Views
10
Helpful
5
Replies
Cisco Employee

difference between NSO config and nx device config even after device sync-from

Hello,

 

I have a real nx device, I am trying to sync it on NSO by using devices sync-from, I get result as "true". However, when I compare the configuration of any interface let's say Ethernet 1/39, I see many configs which are present on device but not appearing in NSO and vice-versa.

 

Some of the differences are:

 

only on DEVICE: 

  spanning-tree port-priority 128

  spanning-tree cost auto

  spanning-tree link-type auto

  spanning-tree port type normal

  buffer-boost

  no switchport monitor

  no switchport dot1q ethertype

  switchport access vlan 1

  switchport trunk native vlan 1

 

only in NSO:

   ip ospf authentication-key 0

   ip ospf dead-interval 40

   ip ospf hello-interval 10

   ip ospf priority    1

 

 

This is how I am checking the configs:

 

on the real device: using live status (verified by logging on to the device as well)

admin@ncs-rfs-1(config)# devices device US9314 live-status nx-stats:exec any "show running-config all"

 

devices device US9314

 config

   nx:interface Ethernet1/39

  no description

  priority-flow-control watch-dog-interval off

  cdp enable

  switchport

  switchport mode access

  no switchport monitor

  no switchport dot1q ethertype

  switchport access vlan 1

  switchport trunk native vlan 1

 

....

 

on NSO:

show full-configuration devices device US9314 config nx:interface Ethernet 1/39 | details

devices device US9314

 config

  nx:interface Ethernet1/39

   lacp rate normal

   no shutdown

   ip arp timeout 1500

   ip arp gratuitous hsrp duplicate

   ip arp gratuitous request

   ip arp gratuitous update

   ip ospf authentication-key 0

   ip ospf dead-interval 40

......

 

 

 

Any idea why this is not syncing properly? Also how can I sync them so that I see same config on NSO?

 

Any inputs appreciated. Thanks!!

 

 

 

5 REPLIES 5
Cisco Employee

Re: difference between NSO config and nx device config even after device sync-from

This is generally expected, the NED in NSO does not have a complete model of the device config, and does certain normalisations. (Such as making some implicit defaults explicit).

If you have a modern NSO try doing sync-from verbose to see what happens
Cisco Employee

Re: difference between NSO config and nx device config even after device sync-from

Hi Viktor, 

 

Thank you for the inputs, another question from this, I performed 2 test cases for ethernet interface on real NX device (NX C9372PX):

 

case 1:

1. I added few config lines of real device to NSO explicitly specifically: "flowcontrol send off" and "flowcontrol receive off", NSO started showing these lines after commit.

2. I checked device sync, it says it is in sync.

3. However, if I still do device sync-from, these lines again get removed from NSO full configuration. They remain as is in live-status of device. 

4. Now when I did "no flowcontrol" on NSO- obviously it shows no modifications to commit - if I check live config on device, flowcontrol remains send off and receive off.

 

case 2:

1. same as step 1 of case 1- added flowcontrol receive off and send off to NSO and commit. 

2. If I check device sync, it says it is in sync.

3. Now I did "no flowcontrol" on NSO, this removed flowcontrol configs from NSO and in the live status of device, it toggled flowcontrol to send ON and receive ON (which I understand the YANG has extension toggle-on-delete).

 

The question is what is the correct way of doing "no flowcontrol", why we get different behavior when I do "devices sync-from" before doing "no flowcontrol".

 

Appreciate your help.

 

Thank you.

 

Highlighted
Cisco Employee

Re: difference between NSO config and nx device config even after device sync-from

What version of the NX NED are you using? Most recent version is 5.10.4

Could it be that you are using an old version with low feature coverage?

Cisco Employee

Re: difference between NSO config and nx device config even after device sync-from

@KJ Rossavik  Thank you for the reply, I checked the NX NED, it supports all the features which are not getting copied. so don't think it is because of NED version.

Cisco Employee

Re: difference between NSO config and nx device config even after device sync-from

Hi,

 

First off, when comparing the config in NSO with the one on the device, it is best to use the "compare-config" in NSO (and check-sync), this will confirm that the view of the device NSO has is "correct", as previously noted, the model in NSO is not complete/perfect so in reality there might be differences. Actual differences are not relevant as long as the config in question is not something you need to use.

 

Another thing you encounter here is that when you run a "show running-config all" on the device, it will show ALL config (i.e. including "hidden" defaults), this will almost always show diffs compared to NSO's view of the config (both with respect to default values, and also of course due to missing config in model).

 

The reason for the "differences" you see can also be of a different nature. For example, concerning the "ospf ip ... " its because the model in NSO contains default values, hence these appear as set in NSO (i.e. unset means default). In device the semantics is a bit different, the model should probably contain a "when-statement" to "hide" these when ospf is not configured, however in practice it is not a concern.

 

Concerning the flow control behaviour you noticed, there is a complication here, since the defaults of these values vary "dynamically" depending on type of port, if one wants to use flow control config (when the defaults are varying), the NED in NSO handles this with the ned-setting "behaviours show-interface-all".

 

The README for the NED (found in top of package) contains some information about the various ned-settings which are specific to the NED. These are almost always introduced to handle specific use-cases where the config on the device is not easily mapped to yang, and the transactional nature of NSO.

 

Best way to inspect if the model can handle your use-case is to set what you need on device and do a sync-from and see how it appears in NSO, this will be what you need to set in NSO to apply this same config to device. Then try setting these values, for example from a service, commit to device and do a compare-config. As long as NSO is in sync (and there is no diff in "compare-config", you're fine). Missing/wrong config with respect to your use-case needs to be reported to TAC. However, missing/wrong config that you will not use is not of importance, again, as long as NSO's view of the device is "in sync", it will not touch the other config anyway.

 

Cheers,

 

/Mats