< Home

Configuring ACL-based Traffic Statistics

Context

ACL-based traffic statistics allows the device to collect statistics on packets matching an ACL.

On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, if traffic policing and traffic statistics collection based on the same ACL are configured, only statistics on the number of packets matching an ACL, namely, value of matched in the display traffic-statistics command output, are correct.

Procedure

  • Configuring ACL-based traffic statistics globally or in a VLAN
    1. Run system-view

      The system view is displayed.

    2. Run the following commands as required.

      • Run traffic-statistic [ vlan vlan-id ] inbound acl { bas-acl | adv-acl | name acl-name | l2-acl } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching an ACL.

      • Run traffic-statistic [ vlan vlan-id ] inbound acl { ipv6 { bas-acl | adv-acl | name acl-name } | user-acl } [ rule rule-id ] [ by-bytes ]

        The device is configured to collect statistics on incoming packets matching an ACL.

      • Run traffic-statistic [ vlan vlan-id ] outbound acl { [ ipv6 ] { bas-acl | adv-acl | name acl-name } | l2-acl | user-acl } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching an ACL.

      • Run traffic-statistic [ vlan vlan-id ] inbound acl l2-acl [ rule rule-id ] acl { bas-acl | adv-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic [ vlan vlan-id ] inbound acl { bas-acl | adv-acl } [ rule rule-id ] acl { l2-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic [ vlan vlan-id ] inbound acl name acl-name [ rule rule-id ] acl { bas-acl | adv-acl | l2-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic [ vlan vlan-id ] outbound acl l2-acl [ rule rule-id ] acl { bas-acl | adv-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic [ vlan vlan-id ] outbound acl { bas-acl | adv-acl } [ rule rule-id ] acl { l2-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic [ vlan vlan-id ] outbound acl name acl-name [ rule rule-id ] acl { bas-acl | adv-acl | l2-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

  • Configuring ACL-based traffic statistics on an interface
    1. Run system-view

      The system view is displayed.

    2. Run interface interface-type interface-number

      The interface view is displayed.

    3. Run the following commands as required.

      • Run traffic-statistic inbound acl { bas-acl | adv-acl | name acl-name | l2-acl } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching an ACL.

      • Run traffic-statistic inbound acl { ipv6 { bas-acl | adv-acl | name acl-name } | user-acl } [ rule rule-id ] [ by-bytes ]

        The device is configured to collect statistics on incoming packets matching an ACL.

      • Run traffic-statistic outbound acl { [ ipv6 ] { bas-acl | adv-acl | name acl-name } | l2-acl } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching an ACL.

      • Run traffic-statistic inbound acl l2-acl [ rule rule-id ] acl { bas-acl | adv-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic inbound acl { bas-acl | adv-acl } [ rule rule-id ] acl { l2-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic inbound acl name acl-name [ rule rule-id ] acl { bas-acl | adv-acl | l2-acl | name acl-name } [ rule rule-id ] [ by-bytes ] [ secure ]

        The device is configured to collect statistics on incoming packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic outbound acl l2-acl [ rule rule-id ] acl { bas-acl | adv-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic outbound acl { bas-acl | adv-acl } [ rule rule-id ] acl { l2-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

      • Run traffic-statistic outbound acl name acl-name [ rule rule-id ] acl { bas-acl | adv-acl | l2-acl | name acl-name } [ rule rule-id ]

        The device is configured to collect statistics on outgoing packets matching Layer 2 and Layer 3 ACLs.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >