ios xe – Restconf not getting switchport vlan info

I’ve a few catalyst switches which I am experiencing an attention-grabbing situation utilizing APIs not pulling all the knowledge I want.

The switches are operating IOS-XE 17.6.3, however I’ve additionally seen the identical situation on v16.6 code and 17.6.4

In case you have a trunk interface with sufficient VLAN allowed entries that the cli shows the checklist as a number of traces with the “add” possibility e.g.:

interface TenGigabitEthernet1/0/1

switchport trunk native vlan 99

switchport trunk allowed vlan 1-4,8,10,30,40,50,51,53,61,65,72,85

switchport trunk allowed vlan add 202,241,342,400,1101

switchport mode trunk

switchport nonegotiate


Once I use RESTCONF to interrogate the config with a URL like:https://IPADDR/restconf/knowledge/Cisco-IOS-XE-native:native/interface/TenGigabitEthernet

The outcomes solely checklist the ultimate ‘add’ line – and lose the ‘switchport trunk allowed vlan’ line:


"switchport": {

  "Cisco-IOS-XE-switch:mode": {

    "trunk": {}


  "Cisco-IOS-XE-switch:nonegotiate": [null],

  "Cisco-IOS-XE-switch:trunk": {

    "allowed": {

      "vlan": {

        "add": "202,241,342,400,1101"



    "native": {

      "vlan": {

        "vlan-id": 99





It seems it does not see the knowledge relating to the config line:

switchport trunk allowed vlan 1-4,8,10,30,40,50,51,53,61,65,72,85

Am I doing one thing incorrect? Is there one other strategy to get this info or is that this a bug?


Leave a Reply

Your email address will not be published.