SNMP公共MIB和私有MIB

公共MIB库

公共MIB可以认为是大家共用使用的一些MIB查询节点,比如设备名称、设备运行时间、接口MAC、接口MTU、接口描述、接口收发报文数(接口流量)、路由表等等信息。

举例1:设备名称

Name:        sysName
Type:        OBJECT-TYPE
OID:         1.3.6.1.2.1.1.5

image-20220822165133029

举例2:设备启动时间

Name:        sysUpTime
Type:        OBJECT-TYPE
OID:         1.3.6.1.2.1.1.3

image-20220822165305394

举例3:设备接口名称、流量统计、接口描述、接口Alias、等OID

Name:        ifXTable
Type:        OBJECT-TYPE
OID:         1.3.6.1.2.1.31.1.1
Full path:        iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).ifMIB(31).ifMIBObjects(1).ifXTable(1)
Module:        IF-MIB

Parent:        ifMIBObjects
First child:        ifXEntry
Next sibling:        ifStackTable

Numerical syntax:        Sequence
Base syntax:        SEQUENCE OF IfXEntry
Composed syntax:        SEQUENCE OF IfXEntry
Status:        current
Max access:        not-accessible
Sequences:        
       1: ifName - DisplayString(4 - octets)
       2: ifInMulticastPkts - Counter32(65 - counter (32 bit))
       3: ifInBroadcastPkts - Counter32(65 - counter (32 bit))
       4: ifOutMulticastPkts - Counter32(65 - counter (32 bit))
       5: ifOutBroadcastPkts - Counter32(65 - counter (32 bit))
       6: ifHCInOctets - Counter64(70 - counter (64 bit))
       7: ifHCInUcastPkts - Counter64(70 - counter (64 bit))
       8: ifHCInMulticastPkts - Counter64(70 - counter (64 bit))
       9: ifHCInBroadcastPkts - Counter64(70 - counter (64 bit))
       10: ifHCOutOctets - Counter64(70 - counter (64 bit))
       11: ifHCOutUcastPkts - Counter64(70 - counter (64 bit))
       12: ifHCOutMulticastPkts - Counter64(70 - counter (64 bit))
       13: ifHCOutBroadcastPkts - Counter64(70 - counter (64 bit))
       14: ifLinkUpDownTrapEnable - INTEGER(2 - integer (32 bit))
       15: ifHighSpeed - Gauge32(66 - gauge (32 bit))
       16: ifPromiscuousMode - TruthValue(2 - integer (32 bit))
       17: ifConnectorPresent - TruthValue(2 - integer (32 bit))
       18: ifAlias - DisplayString(4 - octets)
       19: ifCounterDiscontinuityTime - TimeStamp(67 - timeticks)

image-20220822170233764

举例4:设备路由表信息

Name:        ipRouteNextHop
Type:        OBJECT-TYPE
OID:         1.3.6.1.2.1.4.21.1.7

image-20220822170744825

公共的mib 库非常之多,其中有很多有用的OID:

image-20220822170940168

具体可以通过以下链接查看到公共MIB:

Net-SNMP Distributed MIBs:http://net-snmp.sourceforge.net/docs/mibs/

UCD-SNMP-MIB:http://net-snmp.sourceforge.net/docs/mibs/ucdavis.html

HOST-RESOURCES-MIB:http://net-snmp.sourceforge.net/docs/mibs/host.html

IF-MIB:http://net-snmp.sourceforge.net/docs/mibs/ifMIBObjects.html

mibDepot:http://www.mibdepot.com/index.shtml

私有MIB库

FortiGate的私有mib文件在SNMP配置界面处直接可以下载到、或support网站下载、或互联网上获取。

FortiGate SNMP配置界面处直接下载

image-20220822175618629

FORTINET-CORE-MIB.mibFORTINET-CORE-MIB.mib(此处附件为基于FortiOS 7.2.6下载的私有MIB文件,可点击下载MIB文件)

SUPPORT网站下载

image-20220822181045517

注意事项

关于私有mib的oid,Fortinet的私有number是12356,可通过以下链接获取私有厂家的enterprise-numbers:https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers

image-20220822181305089

Copyright © 2024 Fortinet Inc. All rights reserved. Powered by Fortinet TAC Team.
📲扫描下方二维码分享此页面👇
该页面修订于: 2023-11-23 14:49:21

results matching ""

    No results matching ""