Ingress and Egress Per-Port for ipv4 and IPv6 Counters
This feature supports per-interface ingress and egress packet and byte counters for 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 and L3 subinterfaces only), use the following commands:
[no] hardware counter feature ip in layer3
[no] hardware counter feature ip out layer3
hardware counter feature ip
Use the hardware counter feature ip command to enable ingress and egress counters at Layer 3. The no and default forms of the command disables the feature. The feature is enabled by default.
Command Mode
Configuration mode
Command Syntax
hardware counter feature ip in|out layer3
no hardware counter feature ip in|out layer3
default hardware counter feature in|out layer3
Example
switch(config)# hardware counter feature in layer3
switch(config)# hardware counter feature 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
...
You can also query the output from the show interfaces counters ip command through SNMP via the ARISTA-IP-MIB.
To clear 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 next hop. By default, ipv4's next-hop and IPv6's next-hop resolve to the same MAC address and interface that shared the ARP entry.
To differentiate the counters between ipv4 and IPv6, disable arp entry sharing with the following command:
ip hardware fib next-hop arp dedicated
Considerations
- Packet sizes greater than 9236 bytes are not counted by per-port ipv4 and IPv6 counters.
- The following platforms support the hardware counter feature ip in command:
- DCS-7260X3
- DCS-7368
- DCS-7300
- DCS-7050SX3
- DCS-7050CX3
- DCS-7280SR
- DCS-7280CR
- DCS-7500-R
- The following platforms support the hardware counter feature ip [in|out] layer3 command:
- DCS-7280SR
- DCS-7280CR
- DCS-7500-R