Chinaunix首页 | 论坛 | 博客
  • 博客访问: 728699
  • 博文数量: 256
  • 博客积分: 3502
  • 博客等级: 中校
  • 技术积分: 3988
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(256)

文章存档

2014年(11)

2013年(134)

2012年(111)

我的朋友

分类: 系统运维

2013-07-22 12:38:13

以前论坛有些人在讨论怎么检测router的,下面就介绍使用ip accounting命令检查router的.(这中方法只适合小型网络)$
r1 e0/0 ------ e0/0 r2 e0/1 ------ e0/1 r3&fX
现在在r2上面做流量检控.$qhL
在r2的e0/1端口打入"ip accounting output-packets"命令.然后P+r
r2#show ip accounting-z
   Source            Destination               Packets                Bytes=*v8>
©open-lab技术交流中心 -- open-lab技术交流中心  uU
Accounting data age is 1=:z
r2#/v$kd'
因为现在没有流量通过.所以是空的.;
然后我在r1上面ping r3的ip地址.然后在kBz
r2#show ip accountingQ^T'tb
   Source            Destination               Packets                BytesYJ{?o
1.1.14.1          1.1.46.6                          5                  500..{H!
©open-lab技术交流中心 -- open-lab技术交流中心  ;Zld)
Accounting data age is 3Kz@
r2#p
ip地址1.1.14.1是r1的.1.1.46.6是r3的,因为默认ping 的时候是5个数据报,每个数据报是100Bytes._^o
2、ip accounting使用说明5]x<
©open-lab技术交流中心 -- open-lab技术交流中心  :{no
● 基于地址对的字节数量及数据包数量统计XXW
©open-lab技术交流中心 -- open-lab技术交流中心  C
● 通常只支持outbound的数据包,及被ACL拒绝的数据包(支持IN 和 OUT方向的ACL)"Q
©open-lab技术交流中心 -- open-lab技术交流中心  \h~~~
● 只统计穿越的流量,源或目的是该的数据包不做统计
©open-lab技术交流中心 -- open-lab技术交流中心  )nqU
● 支持所有的switching path,除了Autonomous Switchingu
©open-lab技术交流中心 -- open-lab技术交流中心  tuYz
● 可以通过SNMP来访问统计值,MIB是OLD-CISCO-IP-MIB, lipAccountingTable.bws-T
©open-lab技术交流中心 -- open-lab技术交流中心  
● ip accounting还支持其他的监测方式,如基于tos,mac-address等'7ri
_______________________________________________f?6cd
下面这个是accounting的参数.JaV!!
r4(config-if)#ip accounting ?)#g13
access-violations   Account for IP packets violating access lists on thisp5~
                     interfaceD@cka~
mac-address         Account for MAC addresses seen on this interfaceq
output-packets      Account for IP packets output on this interface(zV#
precedence          Count packets by IP precedence on this interfaceJ_
p
©open-lab技术交流中心 -- open-lab技术交流中心  "~w
r4(config-if)#ip accountingP5HW
大家有兴趣自己也可以做做这个小实验.这样就可以检查内部每台pc机对外发出数据的流量.
阅读(1323) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~