Referring to this web site: https://gist.github.com/bahootyper/575190
The following explanations are about snmpwalk & snmptranslate command options.
#Displayes every OID
$ snmptranslate -Tp
#Dispaly OID label(MIB name) from OID
$ snmptranslate .1.3.6.1.4.1.14823.2.2.1.1.2.1.1.2
WLSX-SWITCH-MIB::userPhyAddress
#Dispaly MIB tree name from OID label
#-IR: label, -Tp: tree option
$ snmptranslate -IR -Tp nUser6Name
+-- -R-- String nUser6Name(3)
Textual Convention: DisplayString
Size: 0..128
#Dispaly MIB tree name from OID label
#-IR: label, -Tp: tree option
$ snmptranslate -Tp .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3
+-- -R-- String nUser6Name(3)
Textual Convention: DisplayString
Size: 0..128
# OID's detailed option
$ snmptranslate -Td .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3
WLSX-USER6-MIB::nUser6Name
nUser6Name OBJECT-TYPE
-- FROM WLSX-USER6-MIB
-- TEXTUAL CONVENTION DisplayString
SYNTAX OCTET STRING (0..128)
DISPLAY-HINT "255a"
MAX-ACCESS read-only
STATUS current
DESCRIPTION "
Name of the User.
"
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) aruba(14823) arubaEnterpriseMibModules(2) switch(2) wlsxEnterpriseMibModules(1) wlsxUser6MIB(14) wlsxUser6AllInfoGroup(1) wlsxUser6Table(2) wlsxUser6Entry(1) 3 }
# OID's detailed optionSome OIDs are not supported when showing "not-accessible" in detailed option.
$ snmptranslate -Td .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.2
WLSX-USER6-MIB::nUser6IpAddress
nUser6IpAddress OBJECT-TYPE
-- FROM WLSX-USER6-MIB
-- TEXTUAL CONVENTION DisplayString
SYNTAX OCTET STRING (0..128)
DISPLAY-HINT "255a"
MAX-ACCESS not-accessible <<<< Be careful of not-implemented OID. not-accessible means it is not supported!
STATUS current
DESCRIPTION "
IPv6 Address of the user.
"
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) aruba(14823) arubaEnterpriseMibModules(2) switch(2) wlsxEnterpriseMibModules(1) wlsxUser6MIB(14) wlsxUser6AllInfoGroup(1) wlsxUser6Table(2) wlsxUser6Entry(1) 2 }
# MIB tree example
$ snmptranslate -Tp .1.3.6.1.4.1.14823.2.2.1.14.1.2.1
+--wlsxUser6Entry(1)
| Index: nUser6PhyAddress, nUser6IpAddress
|
+-- ---- String nUser6PhyAddress(1)
| Textual Convention: MacAddress
| Size: 6
+-- ---- String nUser6IpAddress(2)
| Textual Convention: DisplayString
| Size: 0..128
+-- -R-- String nUser6Name(3)
| Textual Convention: DisplayString
| Size: 0..128
+-- -R-- String nUser6Role(4)
| Textual Convention: DisplayString
| Size: 0..64
+-- -R-- TimeTicks nUser6UpTime(5)
+-- -R-- EnumVal nUser6AuthenticationMethod(6)
| Textual Convention: ArubaAuthenticationMethods
| Values: none(0), web(1), mac(2), vpn(3), dot1x(4), kerberos(5), secureId(7), pubcookie(15), xSec(16), xSecMachine(17), via-vpn(28), other(255)
+-- -R-- EnumVal nUser6SubAuthenticationMethod(7)
| Textual Convention: ArubaSubAuthenticationMethods
| Values: authPAP(1), authCHAP(2), authMSCHAP(3), authMSCHAPv2(4), eapTLS(5), eapTTLS(6), eapLEAP(7), eapMD5(8), eapPEAP(9)
+-- -R-- String nUser6AuthServerName(8)
| Textual Convention: DisplayString
| Size: 0..32
# snmptranslate options
USAGE: snmptranslate [OPTIONS] OID [OID]...
Version: 5.6
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h display this help message
-V display package version number
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
-D[TOKEN[,...]] turn on debugging output for the specified TOKENs
(ALL gives extremely verbose debugging output)
-w WIDTH set width of tree and detail output
-T TRANSOPTS Set various options controlling report produced:
B: print all matching objects for a regex search
d: print full details of the given OID
p: print tree format symbol table
a: print ASCII format symbol table
l: enable labeled OID report
o: enable OID report
s: enable dotted symbolic report
z: enable MIB child OID report
t: enable alternate format symbolic suffix report
-P MIBOPTS Toggle various defaults controlling mib parsing:
u: allow the use of underlines in MIB symbols
c: disallow the use of "--" to terminate comments
d: save the DESCRIPTIONs of the MIB objects
e: disable errors when MIB symbols conflict
w: enable warnings when MIB symbols conflict
W: enable detailed warnings when MIB symbols conflict
R: replace MIB symbols from latest module
-O OUTOPTS Toggle various defaults controlling output display:
0: print leading 0 for single-digit hex characters
a: print all strings in ascii format
b: do not break OID indexes down
e: print enums numerically
E: escape quotes in string indices
f: print full OIDs on output
n: print OIDs numerically
q: quick print for easier parsing
Q: quick print with equal-signs
s: print only last symbolic element of OID
S: print MIB module-id plus last element
t: print timeticks unparsed as numeric integers
T: print human-readable text along with hex strings
u: print OIDs using UCD-style prefix suppression
U: don't print units
v: print values only (not OID = value)
x: print all strings in hex format
X: extended index format
-I INOPTS Toggle various defaults controlling input parsing:
b: do best/regex matching to find a MIB node
h: don't apply DISPLAY-HINTs
r: do not check values for range/type legality
R: do random access to OID labels
u: top-level OIDs must have '.' prefix (UCD-style)
s SUFFIX: Append all textual OIDs with SUFFIX before parsing
S PREFIX: Prepend all textual OIDs with PREFIX before parsing
-L LOGOPTS Toggle various defaults controlling logging:
e: log to standard error
o: log to standard output
n: don't log at all
f file: log to the specified file
s facility: log to syslog (via the specified facility)
(variants)
[EON] pri: log to standard error, output or /dev/null for level 'pri' and above
[EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
[FS] pri token: log to file/syslog for level 'pri' and above
[FS] p1-p2 token: log to file/syslog for levels 'p1' to 'p2'
#Displaying OID numerically without translation.
$ snmpwalk -c public -v 2c -On 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.25.148.13.49.48.46.50.49.53.46.49.48.48.46.54.51 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.139.74.13.49.48.46.50.49.53.46.49.48.48.46.53.50 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.142.56.13.49.48.46.50.49.53.46.49.48.48.46.54.49 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.142.184.13.49.48.46.50.49.53.46.49.48.48.46.53.52 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.22.151.130.8.149.13.49.48.46.50.49.53.46.49.48.48.46.53.56 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.22.151.130.118.172.13.49.48.46.50.49.53.46.49.48.48.46.53.49 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.36.44.32.173.107.13.49.48.46.50.49.53.46.50.53.50.46.52.53 = STRING: aruba-demo
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.136.101.64.24.192.13.49.48.46.50.49.53.46.50.53.48.46.50.53 = STRING: authenticated
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.194.198.205.147.73.13.49.48.46.50.49.53.46.50.53.50.46.50.48 = STRING: employee
#Displaying OID with translation, however it fails to interprete hex numbers.
$ snmpwalk -c public -v 2c 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role.'..LZ..'."10.215.100.63" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.J'."10.215.100.52" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.8'."10.215.100.61" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.?'."10.215.100.54" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'......'."10.215.100.58" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'....v?'."10.215.100.51" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'.$, ?k'."10.215.252.45" = STRING: aruba-demo
WLSX-USER6-MIB::nUser6Role.'(77..L'."10.215.250.31" = STRING: authenticated
WLSX-USER6-MIB::nUser6Role.',??.?0'."10.215.250.17" = STRING: authenticated
#Displaying OID with translation, however it succeeds to interprete hex numbers with -OX option.
$ snmpwalk -c public -v 2c -OX 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:19:94][STRING: 10.215.100.63] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8b:4a][STRING: 10.215.100.52] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8e:38][STRING: 10.215.100.61] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8e:b8][STRING: 10.215.100.54] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:16:97:82:8:95][STRING: 10.215.100.58] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:16:97:82:76:ac][STRING: 10.215.100.51] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:24:2c:20:ad:6b][STRING: 10.215.252.45] = STRING: aruba-demo
WLSX-USER6-MIB::nUser6Role[STRING: 28:37:37:1d:a:4c][STRING: 10.215.250.31] = STRING: authenticated
WLSX-USER6-MIB::nUser6Role[STRING: 2c:f0:ee:17:b4:30][STRING: 10.215.250.17] = STRING: authenticated
The following explanations are about snmpwalk & snmptranslate command options.
#Displayes every OID
$ snmptranslate -Tp
#Dispaly OID label(MIB name) from OID
$ snmptranslate .1.3.6.1.4.1.14823.2.2.1.1.2.1.1.2
WLSX-SWITCH-MIB::userPhyAddress
#Dispaly MIB tree name from OID label
#-IR: label, -Tp: tree option
$ snmptranslate -IR -Tp nUser6Name
+-- -R-- String nUser6Name(3)
Textual Convention: DisplayString
Size: 0..128
#Dispaly MIB tree name from OID label
#-IR: label, -Tp: tree option
$ snmptranslate -Tp .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3
+-- -R-- String nUser6Name(3)
Textual Convention: DisplayString
Size: 0..128
# OID's detailed option
$ snmptranslate -Td .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3
WLSX-USER6-MIB::nUser6Name
nUser6Name OBJECT-TYPE
-- FROM WLSX-USER6-MIB
-- TEXTUAL CONVENTION DisplayString
SYNTAX OCTET STRING (0..128)
DISPLAY-HINT "255a"
MAX-ACCESS read-only
STATUS current
DESCRIPTION "
Name of the User.
"
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) aruba(14823) arubaEnterpriseMibModules(2) switch(2) wlsxEnterpriseMibModules(1) wlsxUser6MIB(14) wlsxUser6AllInfoGroup(1) wlsxUser6Table(2) wlsxUser6Entry(1) 3 }
# OID's detailed optionSome OIDs are not supported when showing "not-accessible" in detailed option.
$ snmptranslate -Td .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.2
WLSX-USER6-MIB::nUser6IpAddress
nUser6IpAddress OBJECT-TYPE
-- FROM WLSX-USER6-MIB
-- TEXTUAL CONVENTION DisplayString
SYNTAX OCTET STRING (0..128)
DISPLAY-HINT "255a"
MAX-ACCESS not-accessible <<<< Be careful of not-implemented OID. not-accessible means it is not supported!
STATUS current
DESCRIPTION "
IPv6 Address of the user.
"
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) aruba(14823) arubaEnterpriseMibModules(2) switch(2) wlsxEnterpriseMibModules(1) wlsxUser6MIB(14) wlsxUser6AllInfoGroup(1) wlsxUser6Table(2) wlsxUser6Entry(1) 2 }
# MIB tree example
$ snmptranslate -Tp .1.3.6.1.4.1.14823.2.2.1.14.1.2.1
+--wlsxUser6Entry(1)
| Index: nUser6PhyAddress, nUser6IpAddress
|
+-- ---- String nUser6PhyAddress(1)
| Textual Convention: MacAddress
| Size: 6
+-- ---- String nUser6IpAddress(2)
| Textual Convention: DisplayString
| Size: 0..128
+-- -R-- String nUser6Name(3)
| Textual Convention: DisplayString
| Size: 0..128
+-- -R-- String nUser6Role(4)
| Textual Convention: DisplayString
| Size: 0..64
+-- -R-- TimeTicks nUser6UpTime(5)
+-- -R-- EnumVal nUser6AuthenticationMethod(6)
| Textual Convention: ArubaAuthenticationMethods
| Values: none(0), web(1), mac(2), vpn(3), dot1x(4), kerberos(5), secureId(7), pubcookie(15), xSec(16), xSecMachine(17), via-vpn(28), other(255)
+-- -R-- EnumVal nUser6SubAuthenticationMethod(7)
| Textual Convention: ArubaSubAuthenticationMethods
| Values: authPAP(1), authCHAP(2), authMSCHAP(3), authMSCHAPv2(4), eapTLS(5), eapTTLS(6), eapLEAP(7), eapMD5(8), eapPEAP(9)
+-- -R-- String nUser6AuthServerName(8)
| Textual Convention: DisplayString
| Size: 0..32
# snmptranslate options
USAGE: snmptranslate [OPTIONS] OID [OID]...
Version: 5.6
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h display this help message
-V display package version number
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
-D[TOKEN[,...]] turn on debugging output for the specified TOKENs
(ALL gives extremely verbose debugging output)
-w WIDTH set width of tree and detail output
-T TRANSOPTS Set various options controlling report produced:
B: print all matching objects for a regex search
d: print full details of the given OID
p: print tree format symbol table
a: print ASCII format symbol table
l: enable labeled OID report
o: enable OID report
s: enable dotted symbolic report
z: enable MIB child OID report
t: enable alternate format symbolic suffix report
-P MIBOPTS Toggle various defaults controlling mib parsing:
u: allow the use of underlines in MIB symbols
c: disallow the use of "--" to terminate comments
d: save the DESCRIPTIONs of the MIB objects
e: disable errors when MIB symbols conflict
w: enable warnings when MIB symbols conflict
W: enable detailed warnings when MIB symbols conflict
R: replace MIB symbols from latest module
-O OUTOPTS Toggle various defaults controlling output display:
0: print leading 0 for single-digit hex characters
a: print all strings in ascii format
b: do not break OID indexes down
e: print enums numerically
E: escape quotes in string indices
f: print full OIDs on output
n: print OIDs numerically
q: quick print for easier parsing
Q: quick print with equal-signs
s: print only last symbolic element of OID
S: print MIB module-id plus last element
t: print timeticks unparsed as numeric integers
T: print human-readable text along with hex strings
u: print OIDs using UCD-style prefix suppression
U: don't print units
v: print values only (not OID = value)
x: print all strings in hex format
X: extended index format
-I INOPTS Toggle various defaults controlling input parsing:
b: do best/regex matching to find a MIB node
h: don't apply DISPLAY-HINTs
r: do not check values for range/type legality
R: do random access to OID labels
u: top-level OIDs must have '.' prefix (UCD-style)
s SUFFIX: Append all textual OIDs with SUFFIX before parsing
S PREFIX: Prepend all textual OIDs with PREFIX before parsing
-L LOGOPTS Toggle various defaults controlling logging:
e: log to standard error
o: log to standard output
n: don't log at all
f file: log to the specified file
s facility: log to syslog (via the specified facility)
(variants)
[EON] pri: log to standard error, output or /dev/null for level 'pri' and above
[EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
[FS] pri token: log to file/syslog for level 'pri' and above
[FS] p1-p2 token: log to file/syslog for levels 'p1' to 'p2'
#Displaying OID numerically without translation.
$ snmpwalk -c public -v 2c -On 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.25.148.13.49.48.46.50.49.53.46.49.48.48.46.54.51 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.139.74.13.49.48.46.50.49.53.46.49.48.48.46.53.50 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.142.56.13.49.48.46.50.49.53.46.49.48.48.46.54.49 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.0.76.90.142.184.13.49.48.46.50.49.53.46.49.48.48.46.53.52 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.22.151.130.8.149.13.49.48.46.50.49.53.46.49.48.48.46.53.56 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.22.151.130.118.172.13.49.48.46.50.49.53.46.49.48.48.46.53.49 = STRING: phone
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.36.44.32.173.107.13.49.48.46.50.49.53.46.50.53.50.46.52.53 = STRING: aruba-demo
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.136.101.64.24.192.13.49.48.46.50.49.53.46.50.53.48.46.50.53 = STRING: authenticated
.1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4.0.194.198.205.147.73.13.49.48.46.50.49.53.46.50.53.50.46.50.48 = STRING: employee
#Displaying OID with translation, however it fails to interprete hex numbers.
$ snmpwalk -c public -v 2c 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role.'..LZ..'."10.215.100.63" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.J'."10.215.100.52" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.8'."10.215.100.61" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.?'."10.215.100.54" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'......'."10.215.100.58" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'....v?'."10.215.100.51" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'.$, ?k'."10.215.252.45" = STRING: aruba-demo
WLSX-USER6-MIB::nUser6Role.'(77..L'."10.215.250.31" = STRING: authenticated
WLSX-USER6-MIB::nUser6Role.',??.?0'."10.215.250.17" = STRING: authenticated
#Displaying OID with translation, however it succeeds to interprete hex numbers with -OX option.
$ snmpwalk -c public -v 2c -OX 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:19:94][STRING: 10.215.100.63] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8b:4a][STRING: 10.215.100.52] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8e:38][STRING: 10.215.100.61] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8e:b8][STRING: 10.215.100.54] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:16:97:82:8:95][STRING: 10.215.100.58] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:16:97:82:76:ac][STRING: 10.215.100.51] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:24:2c:20:ad:6b][STRING: 10.215.252.45] = STRING: aruba-demo
WLSX-USER6-MIB::nUser6Role[STRING: 28:37:37:1d:a:4c][STRING: 10.215.250.31] = STRING: authenticated
WLSX-USER6-MIB::nUser6Role[STRING: 2c:f0:ee:17:b4:30][STRING: 10.215.250.17] = STRING: authenticated
Comments
Post a Comment