CPU Traffic Commands

Use these M4500 CLI commands to trace, filter, and display CPU-bound traffic by interface, IP address, protocol, or MAC address for troubleshooting.

show cpu-traffic

Use this command to display the current configuration parameters.

Format show cpu-traffic
Mode Privileged EXEC

show cpu-traffic interface

Use this command to display per-interface statistics for configured filters. The statistics can be displayed for a specific filter such as stp, udld, arp, and so on. If no filter is specified, statistics are displayed for all configured filters. Similarly, source IP, destination IP, TCP, UDP, or MAC, along with a custom filter can be used as a command option to get statistics.

Format show cpu-traffic interface {all | <intf-range> | cpu} [<filter>]
Mode Privileged EXEC

show cpu-traffic summary

Use this command to display summary statistics for the configured filters for all interfaces.

Format show cpu-traffic summary
Mode Privileged EXEC

show cpu-traffic trace

Use this command to display traffic trace information. The trace information can be displayed either for all available packets or for a specific filter such as stp, udld, arp, and so on. Similarly, source IP, destination IP, or MAC, along with a custom filter can be used as a command option to get specific traces from the history. If enabled, packet dump information is displayed along with packet trace statistics. By default, the packet dump buffer size is set to store the first 64 bytes of a packet.

Format show cpu-traffic trace [<filter>]
Mode Privileged EXEC

cpu-traffic direction interface

Use this command to associate CPU filters to an interface or list of interfaces. The interfaces can be a physical or logical LAG. The statistics counters are updated only for the configured interfaces. The traces can also be obtained for the configured interfaces.

NOTE: The offset must consider the VLAN tag headers becuase the packet to the CPU is always a tagged packet.

Format cpu-traffic direction {tx | rx | both} interface { < intf-range> [cpu] | cpu [<intf-range>]}

no cpu-traffic direction {tx|rx|bot} interface

Default None
Mode Global Config

cpu-traffic direction match cust-filter

Use this command to configure a custom filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured data at the specific offset. If the mask is not specified, the default mask is 0xFF. You can specify three different offsets as match conditions. Each time a custom filter is configured, the switch overrides the previous configuration.

NOTE: The offset must consider the VLAN tag headers becuase the packet to the CPU is always a tagged packet.

Format cpu-traffic direction {tx | rx | both} match cust-filter <offset1> <data1> [mask1 <mask1>] <offset2>

<data2> [mask2 <mask2>] <offset3> <data3> [mask3 <mask3>]

no cpu-traffic direction {tx|rx|both} match cust-filter

Default None
Mode Global Config

cpu-traffic direction match srcip

Use this command to configure the source IP address-specific filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured source IP/mask.

Format cpu-traffic direction {tx | rx | both} match srcip <ipaddress> [mask <mask>]

no cpu-traffic direction {tx | rx | both} match srcip

Default None
Mode Global Config

cpu-traffic direction match dstip

Use this command to configure the destination IP address-specific filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured destination IP/mask.

Format cpu-traffic direction {tx | rx | both} match dstip <ipaddress> [mask <mask>]

no cpu-traffic direction {tx | rx | both} match dstip

Default None
Mode Global Config

cpu-traffic direction match tcp

Use this command to configure the source or destination TCP port-specific filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured source or destination TCP port.

Format cpu-traffic direction {tx | rx | both} match {srctcp | dsttcp} <0-65535> [mask <0-65535>]

no cpu-traffic direction {tx | rx| both} match {srctcp | dsttcp}

Default None
Mode Global Config

cpu-traffic direction match udp

Use this command to configure the source or destination UDP port-specific filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured source or destination UDP port.

Format cpu-traffic direction {tx | rx | both} match {srcudp | dstudp} <0-65535> [mask <0-65535>]

no cpu-traffic direction {tx | rx | both} match {srcudp | dstudp}

Default None
Mode Global Config

cpu-traffic direction match mac

Use this command to configure the source or destination MAC filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured source or destination MAC address.

Format cpu-traffic direction {tx | rx | both} match {srcmac | dstmac} <0-65535> [mask <mask>]

no cpu-traffic direction {tx | rx | both} match {srcmac | dstmac}

Default None
Mode Global Config

cpu-traffic direction match filter

Use this command to configure the filter. The statistics, traces, or both for configured filters are obtained for the packet matching the configured filter item.

Format cpu-traffic direction {tx | rx | both} match filter {all | arp | bcast | bgp | custom | dhcp | dstip |

dstmac | dsttcp | dstudp | ip | lacpdu | lldp | mcast | ospf | srcip | srcmac | srctcp | srcudp | stp | ucast | udld} [arp | bcast | bgp | custom | dhcp | dstip | dstmac | dsttcp | dstudp | ip | lacpdu | lldp | mcast | ospf | srcip | srcmac | srctcp | srcudp | stp | ucast | udld]

no cpu-traffic direction {tx | rx | both} match filter {all | arp | bcast | bgp | custom | dhcp | dstip |

dstmac | dsttcp | dstudp | ip | lacpdu | lldp | mcast | ospf | srcip | srcmac | srctcp | srcudp | stp | ucast | udld} [arp | bcast | bgp | custom | dhcp | dstip | dstmac | dsttcp | dstudp | ip | lacpdu | lldp | mcast | ospf | srcip | srcmac | srctcp | srcudp | stp | ucast | udld]

Default None
Mode Global Config

cpu-traffic mode

Use this command to configure the CPU traffic mode. The packets in the RX/TX direction are matched when the mode is enabled.

Format cpu-traffic mode

no cpu-traffic mode

Default Disabled
Mode Global Config

cpu-traffic trace

Use this command to configure CPU packet tracing. The packet can be received by multiple components. If the feature is enabled and tracing configured, the packets are traced per the defined filter. If the dump-pkt keyword is enabled, the first 64 bytes of the packet are displayed along with the trace statistics.

Format cpu-traffic trace [dump-pkt]

no cpu-traffic trace

Default Disabled
Mode Global Config

clear cpu-traffic

Use this command to clear CPU traffic statistics or trace information on all interfaces.

Default None
Format clear cpu-traffic {counters | traces}
Mode Global Config