设备描述:
SNMPv2-MIB::sysDescr.0 = STRING: STAR-S6808 - Start Networks Technology Co. Ltd. Firmware Version: 9.3.0.3 PROM Version:
prom-2.0.1.3
设备名字:
SNMPv2-MIB::sysName.0 = STRING: dh-ag-s6808
设备运行时间:
SNMPv2-MIB::sysUpTime.0 = Timeticks: (688883500) 79 days, 17:33:55.00
INDEX对应的ID:
SNMPv2-SMI::mib-2.17.1.4.1.2.17 = INTEGER: 1
SNMPv2-SMI::mib-2.17.1.4.1.2.33 = INTEGER: 2
SNMPv2-SMI::mib-2.17.1.4.1.2.37 = INTEGER: 3
SNMPv2-SMI::mib-2.17.1.4.1.2.49 = INTEGER: 4
SNMPv2-SMI::mib-2.17.1.4.1.2.53 = INTEGER: 5
SNMPv2-SMI::mib-2.17.1.4.1.2.193 = INTEGER: 6
SNMPv2-SMI::mib-2.17.1.4.1.2.197 = INTEGER: 7
SNMPv2-SMI::mib-2.17.1.4.1.2.209 = INTEGER: 8
SNMPv2-SMI::mib-2.17.1.4.1.2.213 = INTEGER: 9
SNMPv2-SMI::mib-2.17.1.4.1.2.225 = INTEGER: 10
SNMPv2-SMI::mib-2.17.1.4.1.2.229 = INTEGER: 11
SNMPv2-SMI::mib-2.17.1.4.1.2.241 = INTEGER: 12
SNMPv2-SMI::mib-2.17.1.4.1.2.245 = INTEGER: 13
INTEGER 为index ID,对应端口描述
IF-MIB::ifDescr.1 = STRING: Physical port: et.1.1 D2-Dahuo_Internal
IF-MIB::ifDescr.2 = STRING: Physical port: gi.1.5 D2-DormA_new
IF-MIB::ifDescr.3 = STRING: Physical port: gi.1.4 Something_Error
IF-MIB::ifDescr.4 = STRING: Physical port: gi.1.3 U2-DH_C6509
IF-MIB::ifDescr.5 = STRING: Physical port: gi.1.2 U2-DH_C6509_1
IF-MIB::ifDescr.6 = STRING: Physical port: gi.4.1 D2-Dahuo_Internal
IF-MIB::ifDescr.7 = STRING: Physical port: gi.4.2 D2-Dorm1_South
IF-MIB::ifDescr.8 = STRING: Physical port: gi.4.3 D2-Dorm2_East
IF-MIB::ifDescr.9 = STRING: Physical port: gi.4.4 D2-Dorm2_West
IF-MIB::ifDescr.10 = STRING: Physical port: gi.4.8 D2-Dorm9
IF-MIB::ifDescr.11 = STRING: Physical port: gi.4.7 D2-Dorm7
IF-MIB::ifDescr.12 = STRING: Physical port: gi.4.6 D2-Dorm5
IF-MIB::ifDescr.13 = STRING: Physical port: gi.4.5 D2-Dorm4
MAC地址:
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.0.128.89.120 = Hex-STRING: 00 00 00 80 59 78
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.57.100.205.241 = Hex-STRING: 00 00 39 64 CD F1
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.134.70.113.186 = Hex-STRING: 00 00 86 46 71 BA
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.192.255.238.8 = Hex-STRING: 00 00 C0 FF EE 08
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.226.130.156.179 = Hex-STRING: 00 00 E2 82 9C B3
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.226.139.228.211 = Hex-STRING: 00 00 E2 8B E4 D3
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.232.17.20.108 = Hex-STRING: 00 00 E8 11 14 6C
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.232.17.65.68 = Hex-STRING: 00 00 E8 11 41 44
SNMPv2-SMI::mib-2.17.4.3.1.1.0.0.232.17.170.74 = Hex-STRING: 00 00 E8 11 AA 4A
MAC地址对应物理端口:
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.0.128.89.120 = INTEGER: 241
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.57.100.205.241 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.134.70.113.186 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.192.255.238.8 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.226.130.156.179 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.226.139.228.211 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.232.17.20.108 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.232.17.65.68 = INTEGER: 33
SNMPv2-SMI::mib-2.17.4.3.1.2.0.0.232.17.170.74 = INTEGER: 33
对于华为的设备,使用:
snmpwalk -v1 -Cc -c public SWITCH_IP OID
来列出所有的MIB库信息,因为华为的MIB自上往下不是递增的,大概输出2个MAC左右就退出了。
snmpget -v1 -Ovq -c public SWITCH_IP SNMPv2-MIB::sysDescr.0
snmpget -v1 -Otv -c public SWITCH_IP SNMPv2-MIB::sysUpTime.0
snmpget -v1 -Ovq -c public SWITCH_IP SNMPv2-MIB::sysName.0
以前这三个参数也用snmpwalk来获得,分析返回结果也花了一点点功夫(特别是不同版本的net-snmp返回的UpTime前缀还不一样),才想到可以这么来获得。以前老土了。
阅读(14616) | 评论(1) | 转发(0) |