Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP "smiv2" yang extension doesn't work on augmented nodes #366

Closed
vvsosed opened this issue Sep 21, 2022 · 4 comments
Closed

SNMP "smiv2" yang extension doesn't work on augmented nodes #366

vvsosed opened this issue Sep 21, 2022 · 4 comments

Comments

@vvsosed
Copy link
Contributor

vvsosed commented Sep 21, 2022

I use IF-MIB.yang in order to add support for SNMP ifTable. All nodes inside IF-MIB.yang are already properly tagged with smiv2:oid, smiv2:max-access yang extension tags.
SNMP ifTable container (in IF-MIB.yang) contains ifSpeed leaf which holds current bandwidth in bits per second. Also, ifHighSpeed leaf is added as yang extension to hold bandwidth bigger than 4,294,967,295 bit/sec. So in my case, I filled both nodes as stated in the description and checked that they (base ifSpeed and augmented ifHighSpeed) held proper values through NETCONF. After, I tried to get the values with help of SNMP by using snmpwalk CLI tool. Unfortunately, snmpwalk's output consisted of values from the base ifTable container (i.e. ifSpeed) and none of the augmented nodes (i.e. mentioned earlier ifHighSpeed augmented node).

This issue was reproduced at latest clixon master revision 5f38b50.

@olofhagsand
Copy link
Member

Re-created.
But it is somewhat unclear what is expected behavior. From OID perspective, those fields are in table:

  smiv2:alias "ifXTable" {
    description
     "A list of interface entries.  The number of entries is
      given by the value of ifNumber.  This table contains
      additional objects for the interface table.";
    smiv2:oid "1.3.6.1.2.1.31.1.1";
  }

That is in the range 1.3.6.1.2.1.31.1.1.1.1 - 1.3.6.1.2.1.31.1.1.1.19
Which is different from ifTable being in the range: 1.3.6.1.2.1.2.2.1.1 - 1.3.6.1.2.1.2.2.1.22
This seems to be the only instance of MIBs of augmentation.
Do you have a reference on how the walk should behave in an augmented table?
In particular which OID the ifXTable entries have and how they behave in a walk/getnext?

@olofhagsand
Copy link
Member

Fixed snmp-get for augmented tables.
May remain work for getnext/walk

@olofhagsand
Copy link
Member

getnext + walk should also work, and regression tests added.
Please verify

@vvsosed
Copy link
Contributor Author

vvsosed commented Oct 1, 2022

Thanks a lot! We will check it soon.

@vvsosed vvsosed closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants