目前很多交换机都暂不支持用MIB节点直接读取端口的IPv6流量,下面介绍使用MQC+MIB节点的方式读取端口的IPv6流量。
本文以S6800交换机为例进行说明,其他型号的交换机操作类似。
1)
acl ipv6 number 3500
rule 0 permit ipv6
#
traffic classifier ipv6 operator and
if-match acl ipv6 3500
#
traffic behavior ipv6
accounting packet
#
qos policy ipv6
classifier ipv6 behavior ipv6
#//创建统计ipv6流量的策略
interface Ten-GigabitEthernet2/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan all
qos apply policy ipv6 inbound
qos apply policy ipv6 outbound
#//将策略下发到要统计的端口上
2)
[S6800]display qos policy interface Ten-GigabitEthernet 2/0/1
Interface: Ten-GigabitEthernet2/0/1
Direction: Inbound
Policy: ipv6
Classifier: ipv6
Operator: AND
Rule(s) :
If-match acl ipv6 3500
Behavior: ipv6
Accounting enable:
2365 (Packets)
Interface: Ten-GigabitEthernet2/0/1
Direction: Outbound
Policy: ipv6
Classifier: ipv6
Operator: AND
Rule(s) :
If-match acl ipv6 3500
Behavior: ipv6
Accounting enable:
90 (Packets)
3)
[S6800-probe]display system internal ifmgr list
|
Ten-GigabitEthernet2/0/1(index:162)
4)
以下为读取节点hh3cCBQoSIntApplyObjectIndex(1.3.6.1.4.1.25506.2.65.2.1.5.5.2.1.2)的结果
***** SNMP QUERY STARTED *****
1: hh3cCBQoSIntApplyObjectIndex.162.1 (gauge) 1
2: hh3cCBQoSIntApplyObjectIndex.162.2 (gauge) 2//第一个数字代表端口索引,如果是0则代表全局;第二个数据1代表入方向;2代表出方向。所以入方向的index是1,出方向是2。
***** SNMP QUERY FINISHED *****
5)
[S6800]display qos policy user-defined ipv6
User-defined QoS policy information:
Policy: ipv6 (ID 106)
Classifier: ipv6 (ID 0) ---这个ID就是我们要找的hh3cCBQoSPolicyClassIndex
Behavior: ipv6
Accounting enable: Packet
6)
以下是读取节点hh3cCBQoSAccountingPackets(1.3.6.1.4.1.25506.2.65.2.1.5.6.8.1.1)的结果
***** SNMP QUERY STARTED *****
1: hh3cCBQoSAccountingPackets.1.0 (counter64) 2365
2: hh3cCBQoSAccountingPackets.2.0 (counter64) 90
小数点前的数字为hh3cCBQoSApplyObjectIndex,小数点后的数字为hh3cCBQoSPolicyClassIndex,后面代表报文数或者报文字节数(由accounting后跟的是packet还是byte决定)
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作