zoukankan      html  css  js  c++  java
  • Cisco路由器配置学习-ip accounting

     

     

    Cisco 路由器有时需要定位到某个高流量的IP地址,但是交换机模块的端口是没办法查看。使用ip accounting可以实现此目的。

    【ip accounting使用说明】

    • 此方法如果在路由器负载特大的时候请谨慎使用,因其会使系统性能下降
    • 基于地址对的字节数量及数据包数量统计
    • 通常只支持outbound的数据包,及被ACL拒绝的数据包(支持IN 和 OUT方向的ACL)
    • 只统计穿越路由器的流量,源或目的是该路由器的数据包不做统计
    • 支持所有的switching path,除了Autonomous Switching
    • 可以通过SNMP来访问统计值,MIB是OLD-CISCO-IP-MIB, lipAccountingTable
    • ip accounting还支持其他的监测方式,如基于tos,mac-address等

    【ip accounting参数】

    A(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

     

    【例子】

    步骤1:将流量计数应用到路由出口

    A#conf t
    A(config)# 
    A(config)#interface s0/0/0 
    A(config-if)#ip accounting output-packets

    步骤2:查看端口流量计数

    A#sh ip accounting
     Source           Destination              Packets               Bytes
     192.25.1.186   192.25.1.130                  44                2640
     192.25.1.180   169.253.200.50                   4                 428
     192.25.1.135   10.22.61.62                     3                 120
    Accounting data age is 1
    A#

    以上结构可以查看对应的IP地址哪个流量高

    为了准确判断,在查看前最好能清除一下计数

    A#clear ip accounting

    发出 clear ip accounting 命令时即停止递增,清除统计信息。

  • 相关阅读:
    write to logfile
    open and read a file content to a variable
    strategy
    Android 开机启动程序
    消息队列
    卡机音乐功能实现
    Android 2.0 开机动画文件分析
    多线程实例
    消息队列
    多线程实例
  • 原文地址:https://www.cnblogs.com/qaszxc/p/14046517.html
Copyright © 2011-2022 走看看