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.
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:
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.
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.