Ingress and Egress Per-Port for IPv4 and IPv6 Counters

This feature provides support for per-interface ingress and egress packet and byte counters for both IPv4 and IPv6.

This section describes Ingress and Egress per-port for IPv4 and IPv6 counters, including configuration instructions and command descriptions. Topics covered by this chapter include:

Configuration

IPv4 and IPv6 ingress counters (count bridged and routed traffic, supported only on front-panel ports) can be enabled and disabled using the hardware counter feature ip in command:

[no] hardware counter feature ip in

For IPv4 and IPv6 ingress and egress counters that include only routed traffic (supported on Layer3 interfaces such as routed ports, L3 subinterfaces only):

On the DCS-7300X, DCS-7250X, DCS-7050X, and DCS-7060X platforms, IPv4 and IPv6 packet counters for only routed traffic do not require any configuration. They are collected by default. Other platforms (DCS-7280SR, DCS-7280CR and DCS-7500-R) need the feature enabled.

[no]hardware counter feature ip in layer3
[no]hardware counter feature ip out layer3

Show Commands

Use the show interfaces counters ip command to display IPv4, IPv6 packets, and octets.

switch# show interfaces counters ip
Interface   IPv4InOctets    IPv4InPkts     IPv6InOctets    IPv6InPkts
Et1/1            0               0               0               0
Et1/2            0               0               0               0
Et1/3            0               0               0               0
Et1/4            0               0               0               0
...
Interface  IPv4OutOctets  IPv4OutPkts    IPv6OutOctets   IPv6OutPkts    
Et1/1            0               0               0               0
Et1/2            0               0               0               0
Et1/3            0               0               0               0
Et1/4            0               0               0               0
...

The output from the show interfaces counters ip can also be queried through SNMP via the ARISTA-IP-MIB.

To clear the the IPv4 or IPv6 counters, use the clear counters command

switch# clear counters

Dedicated ARP Entry for TX IPv4 and IPv6 Counters

IPv4/IPv6 egress Layer 3 (hardware counter feature ip out layer3) counting on DCS-7280SR, DCS-7280CR and DCS-7500-R platforms work, based on ARP entry of the nexthop. By default, IPv4 next hop and IPv6 next hop both resolve to the same MAC address and interface that have shared ARP entry. To differentiate the counters between IPv4 and IPv6, disable arp entry sharing with following command:

ip hardware fib next-hop arp dedicated

On the DCS-7280SR, DCS-7280CR and DCS-7500-R platforms, this command is required for IPv4 and IPv6 egress counters to operate.

Limitations

  • Packet sizes greater than 9236 bytes are not counted by per-port IPv4 and IPv6 counters.
  • Only the DCS-7260X3, DCS-7368, DCS-7300, DCS-7050SX3, DCS-7050CX3, DCS-7280SR, DCS-7280CR and DCS-7500-R platforms support the hardware counter feature ip in command.
  • Only the DCS-7280SR, DCS-7280CR and DCS-7500-R platforms support the hardware counter feature ip [in|out] layer3 command.