Datapath Packet-Trace & FIA-Trace
The Packet-Trace feature provides insight into how packets are processed through the hardware and software data paths on Cisco platforms. It is a powerful diagnostic tool that can be used in production environments without severely impacting performance.
Packet Trace allows inspection of packet handling using three levels of granularity:
Packet-Trace Levels
Section titled “Packet-Trace Levels”| Level | Description |
|---|---|
| Accounting | Lightweight and runs continuously. Provides a count of packets entering and leaving the network processor. Minimal impact on performance. |
| Summary | Tracks input/output interfaces, packet state, and whether it was punted, dropped, or injected. Higher resource usage than accounting. Useful for identifying problem interfaces. |
| Path data | Provides the highest level of detail, including timestamps, debug IDs, and feature-specific processing data. Optional enhancements include packet-copy and Feature Invocation Array (FIA) tracing. Highest performance impact and should be used with care. |
Note: Path data collection is resource intensive. Use sparingly in live environments where performance is critical.
Guidelines and Memory Considerations
Section titled “Guidelines and Memory Considerations”- Use ingress condition filters to limit scope and avoid performance degradation.
- Packet trace consumes data-plane memory. The memory usage is estimated by:
memory required = statistics_overhead + number_of_packets * (summary_size + data_size + packet_copy_size)Configuration Steps
Section titled “Configuration Steps”Creating a Path Trace
Section titled “Creating a Path Trace”c8000v-0# debug platform packet-trace ? copy Copy packet data drop Trace drops only inject Trace injects only packet Packet count punt Trace punts only statistics enable packet trace statisticsdebug platform packet-trace packets 2048 fia-trace circularYou can enable multiple types of data being collected, as seen above.
Apply Match Conditions
Section titled “Apply Match Conditions”You can limit the packet trace to specific interfaces or traffic flows.
Example: Match on ingress interface
debug platform condition interface g0/0/0 ingressExample: Match on source IP
debug platform condition ipv4 192.168.1.1 ingressCombine multiple conditions to narrow down further.
Start and Stop Packet Trace
Section titled “Start and Stop Packet Trace”debug platform condition start...debug platform condition stopView Packet Trace Data
Section titled “View Packet Trace Data”show platform packet-trace configurationshow platform packet-trace statisticsshow platform packet-trace summaryshow platform packet-trace packet allClear All Conditions
Section titled “Clear All Conditions”clear platform condition allclear platform packet-trace configurationExample Workflow
Section titled “Example Workflow”debug platform packet-trace packets 100 fia-trace circulardebug platform packet-trace statisticsdebug platform condition interface GigabitEthernet0/0/0 egress
show platform packet-trace configurationshow platform condition
debug platform condition start
...generate test traffic...
debug platform condition stopshow platform packet-trace summaryshow platform packet-trace statisticsshow platform packet-trace packet #
...cleanup when done...
clear platform condition allclear platform packet-trace configuration