clear counters access-list

Clears all or specified counters for all configured MAC, IPv4, and IPv6 access lists.

Syntax

clear counters access-list all
clear counters ip access-list [ ACL_NAME | all ]
clear counters ipv6 access-list [ ACL_NAME | all ]
clear counters mac access-list [ ACL_NAME | all ]

Parameters

ACL_NAME
Specifies the name of the access-list.
all
Specifies all configured access-lists.
ip
Specifies the IPv4 access-list.
ipv6
Specifies the IPv6 access-list.
mac
Specifies the MAC access-list.

Modes

Exec mode

Examples

The following examples clear counters for access-lists.

device# clear counter ip access-list all 
device# clear counter ip access-list v4-acl 
device# clear counter ipv6 access-list v6-acl 
device# clear counter mac access-list l2-acl

The following example displays all MAC access-lists and their counters.

device# show mac access-list all 

mac access-list L2 
  seq 10 permit 02:02:02:02:02:02 02:02:02:02:02:02 02:02:02:02:02:03 02:02:02:02:02:03 ( 0 Packets, 0 Bytes, 0 Packets/sec, 0 Bits/sec ) 

The following example displays all IP access-lists and their counters.

device# show ip access-list all
ip access-list grp_a_deny_1
  seq 10 deny ip 2.2.4.0 255.255.255.0 1.1.1.3 255.255.255.255 ( 5000000 Packets, 1940000000 Bytes, 0 Packets/sec, 0 Bits/sec )
  seq 20 deny ip 2.2.5.0 255.255.255.0 1.1.1.4 255.255.255.255 ( 5000000 Packets, 1940000000 Bytes, 0 Packets/sec, 0 Bits/sec )
ip access-list grp_a_deny_2
  seq 10 deny ip 2.2.6.0 255.255.255.0 1.1.1.5 255.255.255.255 ( 5000000 Packets, 1940000000 Bytes, 0 Packets/sec, 0 Bits/sec )
  seq 20 deny ip 2.2.7.0 255.255.255.0 1.1.1.6 255.255.255.255 ( 5000000 Packets, 1940000000 Bytes, 0 Packets/sec, 0 Bits/sec )

The following example verifies that all access-list counters were cleared.

device# show ip access-list all
ip access-list grp_a_deny_0
  seq 10 deny ip 2.2.2.0 255.255.255.0 1.1.1.1 255.255.255.255 ( 0 Packets, 0 Bytes, 0 Packets/sec, 0 Bits/sec )
  seq 20 deny ip 2.2.3.0 255.255.255.0 1.1.1.2 255.255.255.255 ( 0 Packets, 0 Bytes, 0 Packets/sec, 0 Bits/sec )
ip access-list grp_a_deny_1
  seq 10 deny ip 2.2.4.0 255.255.255.0 1.1.1.3 255.255.255.255 ( 0 Packets, 0 Bytes, 0 Packets/sec, 0 Bits/sec )
  seq 20 deny ip 2.2.5.0 255.255.255.0 1.1.1.4 255.255.255.255 ( 0 Packets, 0 Bytes, 0 Packets/sec, 0 Bits/sec )