Hi,

I have a Cisco switch which SNMP agent returns up to 256 characters
long interface descriptions(ifAlias). For example here I receive an
100 characters long interface description:

$ snmpget -m ./IF-MIB_tmp -M /usr/share/snmp/mibs/ -M
/usr/local/share/snmp/mibs/ -Ov -v 2c -c public switch
IF-MIB::ifAlias.53
STRING: 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$


However, DisplayString SIZE in MIB files is 64 characters:

$ grep -A 5 -i "^ifalias" ./IF-MIB_tmp /usr/share/snmp/mibs/*
/usr/local/share/snmp/mibs/*
./IF-MIB_tmp:ifAlias   OBJECT-TYPE
./IF-MIB_tmp-    SYNTAX      DisplayString (SIZE(0..64))
./IF-MIB_tmp-    MAX-ACCESS  read-write
./IF-MIB_tmp-    STATUS      current
./IF-MIB_tmp-    DESCRIPTION
./IF-MIB_tmp-            "This object is an 'alias' name for the interface as
--
/usr/share/snmp/mibs/mib-rfc2863a.txt:ifAlias   OBJECT-TYPE
/usr/share/snmp/mibs/mib-rfc2863a.txt-    SYNTAX      DisplayString
(SIZE(0..64))
/usr/share/snmp/mibs/mib-rfc2863a.txt-    MAX-ACCESS  read-write
/usr/share/snmp/mibs/mib-rfc2863a.txt-    STATUS      current
/usr/share/snmp/mibs/mib-rfc2863a.txt-    DESCRIPTION
/usr/share/snmp/mibs/mib-rfc2863a.txt-            "This object is an
'alias' name for the interface as
$

I expected that snmpget displays the number of characters defined with
DisplayString SIZE parameter, e.g first 64 "x" characters. Does
DisplayString SIZE affect the output of snmpget? If it does, then how?
Or is the DISPLAY-HINT parameter the only one which actually changes
the output of SNMP GetResponse values?


thanks,
Martin

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to