Date created: 08/04/20 11:23:08. Last modified: 08/04/20 11:58:51

SNMP Examples

 

Interfaces:

IF-MIB:ifAlias

$snmpwalk -v2c -c 123456 -Os ar0.lab 1.3.6.1.2.1.31.1.1.1.18
ifAlias.76 = STRING: Customer 1
ifAlias.77 = STRING: Customer 2
ifAlias.78 = STRING: Customer 3
ifAlias.79 = STRING: Core 1
ifAlias.80 = STRING: Core 2
ifAlias.81 = STRING: Core 3
ifAlias.82 = STRING: Spare
ifAlias.83 = STRING: Customer 4
ifAlias.84 = STRING: Customer 5

IF-MIB:ifDescr

$snmpwalk -v2c -c 123456 -Os ar0.lab 1.3.6.1.2.1.2.2.1.2
ifDescr.76 = STRING: TenGigE0/1/0/2/0
ifDescr.77 = STRING: TenGigE0/1/0/2/1
ifDescr.78 = STRING: TenGigE0/1/0/2/2
ifDescr.79 = STRING: TenGigE0/1/0/2/3
ifDescr.80 = STRING: TenGigE0/1/0/2/4
ifDescr.81 = STRING: TenGigE0/1/0/2/5
ifDescr.82 = STRING: TenGigE0/1/0/2/6
ifDescr.83 = STRING: TenGigE0/1/0/2/7
ifDescr.84 = STRING: TenGigE0/1/0/2/8
ifDescr.85 = STRING: TenGigE0/1/0/2/9

 

Uptime

SNMPv2-MIB:sysUpTime

$snmpget -v2c -c 123456 -Os ar0.lab 1.3.6.1.2.1.1.3.0
sysUpTimeInstance = Timeticks: (432336302) 50 days, 0:56:03.02

 

snmpFrameworkMIB:snmpEngineTime

$snmpget -v2c -c 123456 -Os ar0.lab .1.3.6.1.6.3.10.2.1.3.0
snmpEngineTime.0 = INTEGER: 4323465 seconds

 

$for r in r2.s1 r2.s2 r2.s2 r2.s4; do echo -n "$r: " && snmpget -v2c -c 123456 -Os $r 1.3.6.1.2.1.1.3.0; done
r2.s1: sysUpTimeInstance = Timeticks: (2637521059) 305 days, 6:26:50.59
r2.s2: sysUpTimeInstance = Timeticks: (2057837576) 238 days, 4:12:55.76
r2.s3: sysUpTimeInstance = Timeticks: (3010570352) 348 days, 10:41:43.52
r2.s4: sysUpTimeInstance = Timeticks: (1997888111) 231 days, 5:41:21.11

Previous page: Capacity Planning
Next page: AS & IP Lookup