cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
613
Views
0
Helpful
1
Replies

IOS NED different for different IOS versions?

ian.scheidler1
Level 4
Level 4

Hi,

for an upcoming PoC I have been sent a sample configuration and tried to test whether the IOS NED supports all the configurations required by the customer.

I am using NSO 4.7 and IOS NED version 6.1.2.

 

Here is the config which causes me concern:

 

 

int ${Int}
 switchport trunk allowed vlan add ${KNVLANID}

Note: ${Int} will be some actual Interface Name (e.g. Ethernet0/0/0) and ${KNVLANID} will be a valid Vlan ID.

 

The problem I discovered is:

 

When I spin up a netsim device using the above mentioned NED and type in the config I only get so far...up to 

switchport trunk allowed vlan

Then the NED says the device would expect the following:

 

ios0(config-if)# switchport trunk allowed vlan ?
  WORD   VLAN IDs of the allowed VLANs when this port is in trunking mode
  none   no VLANs

So my question is:

 

Is it a mistake in the NED that it doesnt expect "add" followed by the VLAN ID? Or is this something that maybe behaves differently depending on which IOS/IOS-XE version is used on the actual device?

The used versions at the customer site are:

 

- Cisco IOS Software, c6880x Software (c6880x-IPSERVICESK9-M), Version 15.1(2)SY7

- Cisco IOS Software, C800 Software (C800-UNIVERSALK9-M), Version 15.3(3)M5

- Cisco IOS XE Software, Version 16.03.02 Cisco IOS Software [Denali], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.3.2

 

If it is a mistake/error/bug in the NED I would like to contact the NED team for a fix/enhancement as soon as possible but I do not want to contact them before I know for sure that there isn't some other fix already available (e.g. a different NED version?).

 

I also noticed that when I do

 

interface vlan

a real device doesn't seem to be bothered about whether it is a capital V (in Vlan) or a lower case v (vlan).

 

The NED does seem to mind whether upper or lower case is used:

 

ios0(config)# interface V? 
  Video              video service interface
  Virtual-Template   Virtual Template interface
  VirtualPortGroup   Virtual Port Group
  Vlan               Vlan interface
ios0(config)# interface v?
  vasileft    VasiLeft interface
  vasiright   VasiRight interface

Is that something I have to worry about (as the sample config the customer provided always uses lower case)?

 

1 Reply 1

Jan Lindblad
Cisco Employee
Cisco Employee

 


 

switchport trunk allowed vlan

Then the NED says the device would expect the following:

 

ios0(config-if)# switchport trunk allowed vlan ?
  WORD   VLAN IDs of the allowed VLANs when this port is in trunking mode
  none   no VLANs

So my question is:

 

Is it a mistake in the NED that it doesnt expect "add" followed by the VLAN ID? Or is this something that maybe behaves differently depending on which IOS/IOS-XE version is used on the actual device?

 

No, this is as it should be. The YANG model of the device does not include action verbs like "add". This only makes sense in a CLI world, and not in clean interfaces like e.g. NETCONF, so the YANG models do not have this. The VLAN you mention will be added if it is new, updated otherwise.

 


interface vlan

a real device doesn't seem to be bothered about whether it is a capital V (in Vlan) or a lower case v (vlan).

 

The NED does seem to mind whether upper or lower case is used:

 

Yes, the NED follows the YANG module exactly, and there it was modeled as lowercase. Allowing multiple spellings only really makes sense in a CLI, and not in e.g. NETCONF. IIRC it is possible to configure NSO to ignore upper/lowercase in the CLI (and internally pick the spelling used in the YANG), if you really want that.

 


 Is that something I have to worry about (as the sample config the customer provided always

uses lower case)?

Well, your CLI commands and your code needs to use the right spelling (case), as defined in the YANG. If the customer's config always matches the YANG, no problem. NSO will yell out if you load a file that contains unknown words/symbols.