IP Accounting配置命令 (统计每个IP的流量)
配置mismatched表的门限值,缺省情况下,mismatched表的门限值为0,否则查看无结果
[Huawei]ip accounting mismatched-threshold 10
接口配置出入流量报文统计
[Huawei]interface Vlanif 1
ip accounting input-packets
ip accounting output-packets
ip accounting precedence input-packets
IP accounting precedence output-packets
查看IP出入流量报文统计
<Huawei>dis ip accounting output-packets mismatched top
<Huawei>dis ip accounting input-packets mismatched top
统计表的结果清零
<Huawei>reset ip accounting all
命令详情:
ip accounting mismatched-threshold命令功能ip accounting mismatched-threshold命令用来配置mismatched表的门限值。
undo ip accounting mismatched-threshold命令用来恢复mismatched表的门限值为缺省值。
缺省情况下,mismatched表的门限值为0。
命令格式ip accounting mismatched-threshold thresh-value
undo ip accounting mismatched-threshold
使用实例# 设置统计匹配IP Accounting规则报文的最大值为1000。
<Huawei> system-view
[Huawei] ip accounting matched-threshold 1000
mismatched-threshold表的门限值缺省为0,如果要统计mismatched表的结果,请在开始统计之前修改此值,否则执行该命令查看mismatched的信息,无任何结果。
ip accounting命令功能ip accounting命令用来使能接口入方向或出方向的IP报文统计功能。
undo ip accounting命令用来关闭接口的IP报文统计功能。
缺省情况下,没有使能接口的IP报文统计功能。
命令格式ip accounting { input-packets | output-packets }
undo ip accounting { input-packets | output-packets }
参数说明参数 | 参数说明 | 取值 |
input-packets | 使能接口入方向的IP报文统计功能。 | - |
output-packets | 使能接口出方向的IP报文统计功能。 | - |
# 使能接口GE1/0/0入方向的IP报文统计功能。
<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] ip accounting input-packets
display ip accounting input-packets
命令功能
display ip accounting input-packets命令用来查看入方向IP报文的统计结果。
命令格式
display ip accounting input-packets { matched | mismatched } [ top ]
参数:matched
参数说明:
查看matched表的入方向报文的统计结果。
说明:
matched表存储的是匹配IP Accounting统计规则的统计结果。
参数:mismatched
参数说明:
查看mismatched表的入方向报文的统计结果。
说明:
mismatched表存储的内容如下:
不匹配IP Accounting统计规则的统计结果。
没有配置IP Accounting统计规则的情况下,普通IP Accounting的统计结果。
参数:top
参数说明:
将统计表中的流记录按照报文个数从大到小排序,并显示最前面的32条,如果表中的流记录没有32条,则全部显示。
说明:
如果不指定top属性,则显示所有结果。
执行该命令可以查看入方向的IP报文统计结果,方便用户监管网络的流量。
注意事项
mismatched表的门限值缺省为0,如果要统计mismatched表的结果,请在开始统计之前修改此值,否则执行该命令查看mismatched的信息,无任何结果。
[Huawei]ip accounting mismatched-threshold 10
<Huawei>dis ip accounting output-packets mismatched top
<Huawei>dis ip accounting input-packets mismatched top
<Huawei>reset ip accounting all
将所有IP Accounting统计表的结果清零。
<Huawei> reset ip accounting all
华为官网命令详解:
详情链接:https://support.huawei.com/enterprise/zh/doc/EDOC1100203219/325543ab
,