欢迎你客人 ( 登录 | 注册 )

  评价 XXXX

 | 分类: Network
entry 2007-12-9, 00:00 AM
CISCO最新出品,专门为640-802考试制作(可查看流量,可用Debug)
http://59099.blog.51cto.com/49099/39000

below is from: http://www.openlab.cn/cgi-bin/topic.cgi?fo...=971&show=0
以前论坛有些人在讨论怎么检测router的流量,下面就介绍使用ip accounting命令检查router的流量.(这中方法只适合小型网络)
r1 e0/0 ------ e0/0 r2 e0/1 ------ e0/1 r3
现在在r2上面做流量检控
在r2的e0/1端口打入"ip accounting output-packets"命令.然后
r2#show ip accounting
Source Destination Packets Bytes

Accounting data age is 1
r2#
因为现在没有流量通过.所以是空的
然后我在r1上面ping r3的ip地址.然后在
r2#show ip accounting
Source Destination Packets Bytes
1.1.14.1 1.1.46.6 5 500

Accounting data age is 3.
r2#
ip地址1.1.14.1是r1的.1.1.46.6是r3的,因为默认ping 的时候是5个数据报,每个数据报是100Bytes.

2、ip accounting使用说明

● 基于地址对的字节数量及数据包数量统计

● 通常只支持outbound的数据包,及被ACL拒绝的数据包(支持IN 和 OUT方向的ACL)
  
● 只统计穿越路由器的流量,源或目的是该路由器的数据包不做统计
  
● 支持所有的switching path,除了Autonomous Switching
  
● 可以通过SNMP来访问统计值,MIB是OLD-CISCO-IP-MIB, lipAccountingTable
  
● ip accounting还支持其他的监测方式,如基于tos,mac-address等

下面这个是accounting的参数
r4(config-if)#ip accounting ?
access-violations Account for IP packets violating access lists on this interface
mac-address Account for MAC addresses seen on this interface
output-packets Account for IP packets output on this interface
precedence Count packets by IP precedence on this interface

  
r4(config-if)#ip accounting
大家有兴趣自己也可以做做这个小实验.这样就可以检查内部每台pc机对外发出数据的流量.

路由器流量检测还有其它的命令,上面这条命令很大的缺点就是不能检查流量是哪些协议的流量,它只能统计所有的流量.

  Fast Reply Reply to this topic

« 前一篇文章 · 潜水的猫 捕捞 · 后一篇文章 »
 
1
2
3
4
5
6
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31



我的 Blog 链接

我的相册


我的相片
User Photo