debug ip packet detail
debug ip icmp
思科设备抓包的方法时间:2010-12-23 10:45来源:未知 作者:admin 点击:133次
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 i
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 Bytese
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
<cr>
r4(config-if)#ip accounting
使用路由器作流量检测的几个手段
一、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