2-136
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.4.0SG and IOS 15.1(2)SG)
OL-27596 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
counter
counter
To assign counters to a Layer 3 interface, use the counter interface command. To remove a counter
assignment, use the no form of this command.
counter {ipv4 | ipv6 | ipv4 ipv6 separate}
no counter
Note Supervisor Engine 6-E and Supervisor Engine 6L-E do not support Layer 2 interface counters.
Syntax Description
Defaults Not enabled
Command Modes Interface configuration
Command History
Usage Guidelines Entering the counter command without keywords displays the statistics as a sum.
The total number of switch ports that can possess transmit and receive counters is 4092.
When you change a Layer 3 port assigned with a counter to a Layer 2 port, the hardware counters are
cleared. This action is similar to entering the no counter command.
Examples The following example shows how to enable counters on interface VLAN 1:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface vlan 1
Switch(config-if)# counter ipv4
Switch(config-if)# end
Switch#
00:17:15: %SYS-5-CONFIG_I: Configured from console by console
Switch# show run interface vlan 1
Building configuration...
ipv4 Enables collection of IPv4 statistics only.
ipv6 Enables collection of IPv6 statistics only.
ipv4 ipv6 separate Enables collection of IPv4 and IPv6 statistics and displays them individually.
Release Modification
12.2(40)SG Support for this command was introduced on the Catalyst 4500 series switch.
12.2(54)SG Support added for IPv4 and IPv6 counters.