一、ip accounting
1、配置方法
router(config)#int s 0/0
router(config-if)#ip accounting output-packets
router#sh ip accounting output-packets
Source Destination Packets Bytes
192.1.1.110 192.1.1.97 5 500
172.17.246. 128 192.1.1.110 8 704
Accounting data age is 2d23h
或者
router(config)#int s 0/0
router(config-if)#ip accounting access-violations
router#sh ip accounting [checkpoint] access-violations
Source Destination Packets Bytes ACL
192.1.1.110 224.0.0.5 46 3128 19
Accounting data age is 7
2、說明
● 基于地址對(duì)的字節(jié)數(shù)量及數(shù)據(jù)包數(shù)量統(tǒng)計(jì)
● 通常只支持outbound的數(shù)據(jù)包,及被ACL拒絕的數(shù)據(jù)包(支持IN 和 OUT方向的ACL)
● 只統(tǒng)計(jì)穿越路由器的流量,源或目的是該路由器的數(shù)據(jù)包不做統(tǒng)計(jì)
● 支持所有的switching path,除了Autonomous Switching
● 可以通過SNMP來訪問統(tǒng)計(jì)值,MIB是OLD-CISCO-IP-MIB, lipAccountingTable
● ip accounting還支持其他的監(jiān)測(cè)方式,如基于tos,mac-address等