ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

用NBAR和ip accounting做路由器流量监测的配置和说明

2014-7-16 04:04| 发布者: admin| 查看: 615| 评论: 0

摘要: NBAR和ip accounting是平常工作中利用路由器配置以作为流量监测的两个方法,下面给大家详细的介绍这两种常用方法,并附带上配置命令行和说明。 名词解析:NBAR是英文Network Based Application Recognition的缩写 ...

NBAR和ip accounting是平常工作中利用路由器配置以作为流量监测的两个方法,下面给大家详细的介绍这两种常用方法,并附带上配置命令行和说明。

名词解析:NBAR是英文Network Based Application Recognition的缩写,中文意为“基于网络的应用程序识别”。

一、首先说说NBAR的配置方法和说明:

1、配置方法

router(config)# interface FastEthernet 0/1
router(config-if)# ip nbar protocol discovery
router# show ip nbar protocol -discovery interface FastEthernet 6/0
FastEthernet6/0
Input Output
Protocol Packet Count Packet Count
Byte Count Byte Count
5 minute bit rate (bps) 5 minute bit rate (bps)
------------------------ ------------------------ ------------------------
http 316773 0
26340105 0
3000 0
pop3 4437 7367
2301891 339213
3000 0
snmp 279538 14644
319106191 673624
0 0

Total 17203819 151684936
19161397327 50967034611
4179000 6620000

2、配置说明

NBAR识别从4层到7层的协议信息;以基于端口统计input 和output 的bit rate (bps), packet counts, byte counts;只能在cef或dcef的基础上运行;不象netflow,没有流的概念。主要是统计目前网络中有那一些应用。

二、用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
http://www.luyouqiwang.com/13425/
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等。

总结,NBAR和ip accounting的配置命令行比较复杂,多使用之后就能熟练掌握。

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2025-7-1 14:36 , Processed in 0.490525 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部