Re: MAC Address As Index

Krishna Chaitanya <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CABPxzYJkhfq+KbTr-qzm9mNNaE8qVm02i6NK26mW61pELaE0rA@mail.gmail.com>
On Wed, Sep 11, 2019 at 3:04 PM Niels Baggesen
<[email protected]> wrote:
>
> On Wed, Sep 11, 2019 at 12:40:38PM +0530, Krishna Chaitanya wrote:
> > > BTW, somehow the response from Neils is missed but found it in the archive.
> > >
> > > https://www.mail-archive.com/[email protected]/msg21705.html
> > >
> > > MacAddress TC from SNMPv2-TC is a fixed size string, so, the length
> > > should not be prefixed.
> > >
> >
> > Any ideas on how to get proper MAC address display without any side
> > effects? Any help is appreciated.
>
> The MacAddress TC mentioned above has a DISPLAY-HINT "1x:", does that
> not display the way you want? Otherwise show us what you see, and what
> is wrong with it.
>
Missed your reply again, now added filters and then found it.

Yes, the TC should work properly, but unfortunately, it doesn't, My
display is as below:
You can see that the "6" is prefixed and ".1/.2/.3" are part of MAC addresses.

This may not be a display only problem, currently, I am debugging a case where
deleting a single entry from the table makes it go haywire, it deletes
the wrong entry,
the same issue could probably be the reason (not sure though).

$ snmptable -v3 -a MD5 -l authNoPriv localhost -OX -Ci
                        index mpduTx
["wlp1s0"][6:52:54:0:c8:53].1    302
["wlp1s0"][6:52:54:0:c8:53].2    307
["wlp1s0"][6:52:54:0:c8:53].3    328


The MIB entry snippets are as below:

MacAddress, TEXTUAL-CONVENTION FROM SNMPv2-TC
...
bwtBh2GenStatsEntry OBJECT-TYPE
  SYNTAX BwtBh2GenStatsEntry
  MAX-ACCESS not-accessible
  STATUS current
  DESCRIPTION
    "A row in BH2 Gen stats table"
  INDEX { ifaceName, remoteMAC }
  ::= {bwtBh2GenStatsTable 1}
....
remoteMAC OBJECT-TYPE
       SYNTAX MacAddress
       MAX-ACCESS not-accessible
       STATUS current
       DESCRIPTION
           "Remote MAC address to which these statistics relate"
    ::= { bwtBh2GenStatsEntry 2 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.