使用路由器作流量检测的几种方法

http://tech.ddvip.com   2006年08月31日    社区交流 收藏本文

本文详细介绍使用路由器作流量检测的几种方法

  一、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-CISCO-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 <peer-as | origin-as>

  Optional configuration

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

  router (config)#ip flow-cache entries <1024-524288>

  router (config)#ip flow-cache timeout

责编:豆豆技术应用

正在加载评论...