Print

监控某个接口特定vlan流量

3天前 发表

问题描述

监控某个接口特定vlan流量

解决方法

目前设备限制通过display等命令无法直接查看或者统计到某个接口特定vlan的流量,如果有相关需求,可以通过qos方式实现:

[S6520XS-26XC]dis qos policy interface Ten-GigabitEthernet 2/0/11 outbound                                                         

Interface: Ten-GigabitEthernet2/0/11                                                                                                

  Direction: Outbound                                                                                                              

  Policy: 1                                                                                                                         

   Classifier: 1                                                                                                                   

     Operator: AND                                                                                                                  

     Rule(s) :                                                                                                                     

      If-match service-vlan-id 20    (流策略里面直接匹配vlan id)                                                                                               

      If-match destination-mac 0000-0001-0001    (也可以增加其他匹配条件)                                                                                   

     Behavior: 1                                                                                                                    

      Accounting enable:       (流行为中使用accounting,统计流量)                                                                                                     

        493696 (Bytes)                                                                                                              

   Classifier: 2               (可以设置多个cb对来实现不同vlan的统计)                                                                                                     

     Operator: AND                                                                                                                  

     Rule(s) :                                                                                                                     

      If-match service-vlan-id 30                                                                                                   

      If-match destination-mac 0000-0000-0002 ffff-ffff-0fff                                                                       

     Behavior: 2                                                                                                                    

      Accounting enable:                                                                                                           

        493440 (Bytes)   


注意此方式要占用acl资源,建议在少量端口对少量vlan使用,不建议大量配置