浅塘在线--儿时的记忆,老家村门口一口浅塘,是儿童时光差不多全部美好时光的记忆,游泳嬉水、抓鱼钓鱼、捞螺丝、漂石仗、淘硬币、以及生活中各种洗洗涮涮~·

 找回密码
 立即注册

微信登录

微信扫一扫,快速登录

搜索
热搜: 活动 交友 discuz

社区广播台

查看: 49|回复: 0

使用路由器作流量检测的几个手段

[复制链接]

4万

主题

4万

帖子

13万

积分

版主

Rank: 7Rank: 7Rank: 7

积分
134973
发表于 2019-4-12 10:33:12 | 显示全部楼层 |阅读模式
一、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、说明

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

● 通常只支持outbound的数据包,及被ACL拒绝的数据包(支持IN 和 OUT方向的ACL)

● 只统计穿越路由器的流量,源或目的是该器的数据包不做统计

● 支持所有的switching path,除了Autonomous Switching

● 可以通过SNMP来访问统计值,MIB是OLD-CIO-IP-MIB, lipAccountingTable

● ip accounting还支持其他的监测方式,如基于tos,mac-address等

二、netflow
1、配置方法

router (config-if)#ip route-cache flow

router (config)#ip flow-export destination 172.17.246.225 9996

router (config)#ip flow-export version 5

Optional configuration

router (config)#ip flow-export source loopback 0

router (config)#ip flow-cache entrs

router (config)#ip flow-cache timeout

sh ip cache flow

IP packet size distribution (132429191 total packets):

1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480

.000 .191 .024 .009 .010 .006 .005 .008 .003 .005 .003 .003 .002 .001 .001


512 544 576 1024 1536 2048 2560 3072 3584 4096 4608

.001 .002 .107 .032 .578 .000 .000 .000 .000 .000 .000

IP Flow Switching Cache, 278544 bytes

33 active, 4063 inactive, 7975259 added

104834714 ager polls, 0 flow alloc failures

Active flows timeout in 30 minutes

Inactive flows timeout in 15 seconds

last clearing of statistics n
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 微信登录

本版积分规则

快速回复 返回顶部 返回列表