无
通过如下两个节点读取接口in/out方向字节数时与设备上接口显示不一致,
1.3.6.1.2.1.2.2.1.10 ifInOctets 进
1.3.6.1.2.1.2.2.1.16 ifOutOctets 出
读取结果如下:
索引值:
IF-MIB::ifDescr.3043 = STRING: GigabitEthernet2/6/2
OUT方向:
IF-MIB::ifInOctets.3043 = Counter32: 3538585514
INT方向:
IF-MIB::ifInOctets.3043 = Counter32: 4288959393
而设备显示如下,可以看到接口计数未被清除过但是和MIB读取到的计数有很大差距:
[dianxin_ar]dis int G2/6/2
GigabitEthernet2/6/2
Current state: UP
Line protocol state: UP
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address:
Description:
Bandwidth: 1000000kbps
Loopback is not set
Media type is twisted pair, port hardware type is 1000_BASE_T
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 2048
Allow jumbo frame to pass
Broadcast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Unicast MAX-ratio: 100%
PVID: 601
Mdi type: automdix
Port link-type: access
Tagged Vlan: none
UnTagged Vlan: 601
Port priority: 0
Last clearing of counters: Never
Last 300 seconds input: 1400 packets/sec 168536 bytes/sec 0%
Last 300 seconds output: 2361 packets/sec 2434732 bytes/sec 1%
Input (total): 1288439330 packets, 7447324850900 bytes
- unicasts, - broadcasts, - multicasts, 89 pauses
Input (normal): 1288439330 packets, 7447324850900 bytes
1203666894 unicasts, 79116153 broadcasts, 5656194 multicasts, 89 pauses
Input: 0 input errors, 0 runts, 0 giants, - throttles
0 CRC, 0 frame, 0 overruns, 0 aborts
- ignored, - parity errors
Output (total): 1556372847 packets, 130790981112198 bytes
- unicasts, - broadcasts, - multicasts, - pauses
Output (normal): 1556372847 packets, 130790981112198 bytes
1556191499 unicasts, 131490 broadcasts, 49858 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
- lost carrier, - no carrier
通过查阅mib节点资料发现还有如下两个节点也是读取接口的字节数,那么这个和现场使用的有什么区别呢?
1.3.6.1.2.1.31.1.1.1.6 ifHCInOctets
1.3.6.1.2.1.31.1.1.1.10 ifHCOutOctets
通过使用MIB browser 上查看节点properties对比,可以看到:
通过对比发现,二者读取的节点差别在一个可以读出64bit,而另一个只能读到32bit,而现场的接口统计值超出了32bit读取的范围,
因此造成了读取结果不准确的问题。
使用合适的mib节点读取后解决。
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作