cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
875
Views
0
Helpful
3
Replies

IOSXR interface become preconfigure mode cause service out of sync

lpiao
Cisco Employee
Cisco Employee

Hello

 if anyone experience the following issue , and how to resolve it ?

service config the device with interface where there is no sfp plugged in ,

the service is provisioned with interface config but in the IOSXR device it go to preconfgure mode

 device sync-from

interface move to preconfigured mode in the cbd

service check-sync false

3 Replies 3

Alex Stevenson
Cisco Employee
Cisco Employee

 

Hello @lpiao,

 

I would check out the Cisco Bug Search Tool

https://bst.cloudapps.cisco.com/bugsearch/

 

tsiemers1
Spotlight
Spotlight

This is normal behavior for IOS-XR. Example

 

You have the following interface

 

GigabitEthernet 0/0/0/1 -- no SFP in this slot

 

You push the following config 

 

TenGig 0/0/0/1

description "preconfigure example"

 

Until you put in a TenGig SFP into slot 0/0/0/1 it will be translated to a preconfigure interface. Once you slot a tenGig SFP the interface will move from preconfigure to configured and you will see The TenGig 0/0/0/1 on the router and GigabitEthernet 0/0/0/1 will disappear.

 

https://www.cisco.com/c/en/us/td/docs/iosxr/ncs5500/interfaces/70x/configuration/guide/b-interfaces-hardware-component-cg-ncs5500-70x/preconfiguring-physical-interfaces.html

 

The NED is handling this in my opinion correctly and sending the interface to the XR router, the Router then sees no SFP for that type and moves the config to 'preconfigure' when you do a sync-from it updates the CDB with the correct path. 

 

I guess in the future the NED could be updated to check for this first but I don't see the use case. You could use java/python to check for this in the service code as well. 

snovello
Cisco Employee
Cisco Employee

IOS-XR has a feature that lets you preconfigure interfaces. It comes in handy when you have an interface whose speed can be changed by plugging different optics. For example, currenty I have 'interface GigabitEthernet 1/2/3/4', and I configure 'interface TenGigE 1/2/3/4'. When I look at the configuration, I will see 'interface preconfigure TenGigE 1/2/3/4'. So the real interface appears differently to configuration that is not applied. When you plugin the new optics, the configuration changes and we will see 'interface preconfigure GigabitEthernet 1/2/3/4' and 'interface TenGigE 1/2/3/4'.

This causes problems for NSO because the config changes lead to devices being becoming out of sync, i.e. there will be discrepancies betweens NSO view of the device configuration and the device state.

One solution to dealing with 'interface preconfigure' in IOS-XR CLI is to use a ned-setting to hide the 'preconfigure' keyword completely. In this case NSO has no visibility of whether an interface is in preconfigure mode. The way to do this is:

devices global-settings ned-settings cisco-iosxr read replace-config preconfigure regexp "interface preconfigure" replacement "interface"

The above applies the ned-setting globally. NED settings can be also applied to individual devices or a devices can be given a 'profile' and then the setting configured on the profile.

What this does is that when the config is read from the device, a simple regular expression replacement is made on every line. So  if interfaces configurations are in the 'preconfigure' state, NSO sees all the configurations but does not see the preconfigure state.

When using this NED option you should not attempt to configure an interface as 'interface preconfigure GigabitEthernet 1/2/3/4' even if you know that the interface is preconfigured, because it will again cause you to run into issues with devices out of sync.

If you preconfigure an interface,  with this ned-setting, you will be in a state where you have two interfaces of different types with the same id, and may need to know which is real an which is preconfigured. You will not be able to do so just by looking at the configuration, and will have to instead use a command like 'show interfaces' which will only show the real interfaces.

Getting Started

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: