Cisco ASR 1000 Series Aggregation Services Routers Software Configuration Guide
Packet Trace
Downloads: This chapterpdf (PDF - 281.0KB) The complete bookPDF (PDF - 7.67MB) | Feedback

Table of Contents

Packet Trace

Finding Feature Information

Contents

Information About Packet Trace

Usage Guidelines for Configuring Packet Trace

Configuring Packet Trace

Displaying Packet-Trace Information

Removing Packet-Trace Data

Configuration Examples for Packet Trace

Example: Configuring Packet Trace

Example: Using Packet Trace

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Feature Information for Packet Trace

Packet Trace

First Published: November 21, 2013

The Packet-Trace feature provides a detailed understanding of how data packets are processed by the Cisco IOS XE platform, and thus helps customers to diagnose issues and troubleshoot them more efficiently. This module provides information about how to use the Packet-Trace feature.

Finding Feature Information

Your software release might not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the “Feature Information for Packet Trace” section.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn . An account on Cisco.com is not required.

Information About Packet Trace

The Packet-Trace feature provides three levels of inspection for packets: accounting, summary, and path data. Each level provides a detailed view of packet processing at the cost of some packet processing capability. However, Packet Trace limits inspection to packets that match the debug platform condition statements, and is a viable option even under heavy-traffic situations in customer environments.

Table 22-1 explains the three levels of inspection provided by packet trace.

Table 22-1 Packet-Trace Level

Packet-Trace Level
Description

Accounting

Packet-Trace accounting provides a count of packets that enter and leave the network processor. Packet-Trace accounting is a lightweight performance activity, and runs continuously until it is disabled.

Summary

At the summary level of packet trace, data is collected for a finite number of packets. Packet-Trace summary tracks the input and output interfaces, the final packet state, and punt, drop, or inject packets, if any. Collecting summary data adds to additional performance compared to normal packet processing, and can help to isolate a troublesome interface.

Path data

The packet-trace path data level provides the greatest level of detail in packet trace. Data is collected for a finite number of packets. Packet-Trace path data captures data, including a conditional debugging ID that is useful to correlate with feature debugs, a timestamp, and also feature-specific path-trace data.

Path data also has two optional capabilities: packet copy and Feature Invocation Array (FIA) trace. The packet-copy option enables you to copy input and output packets at various layers of the packet (layer 2, layer 3 or layer 4). The FIA- trace option tracks every feature entry invoked during packet processing and helps you to know what is happening during packet processing.

Note Collecting path data consumes more packet-processing resources, and the optional capabilities incrementally affect packet performance. Therefore, path-data level should be used in limited capacity or in situations where packet performance change is acceptable.

Usage Guidelines for Configuring Packet Trace

Consider the following best practices while configuring the Packet-Trace feature:

  • Use of ingress conditions when using the Packet-Trace feature is recommended for a more comprehensive view of packets.
  • Packet-trace configuration requires data-plane memory. On systems where data-plane memory is constrained, carefully consider how you will select the packet-trace values. A close approximation of the amount of memory consumed by packet trace is provided by the following equation:

memory required = (statistics overhead) + number of packets * (summary size + data size + packet copy size).

When the Packet-Trace feature is enabled, a small, fixed amount of memory is allocated for statistics. Similarly, when per-packet data is captured, a small, fixed amount of memory is required for each packet for summary data. However, as shown by the equation, you can significantly influence the amount of memory consumed by the number of packets you select to trace, and whether you collect path data and copies of packets.

Configuring Packet Trace

Perform the following steps to configure the Packet-Trace feature.


NoteThe amount of memory consumed by the Packet-Trace feature is affected by the packet-trace configuration. You should carefully select the size of per-packet path data and copy buffers and the number of packets to be traced in order to avoid interrupting normal services. You can check the current data-plane DRAM memory consumption by using the The amount of memory consumed by the Packet-Trace feature is affected by the packet-trace configuration. You should carefully select the size of per-packet path data and copy buffers and the number of packets to be traced in order to avoid interrupting normal services. You can check the current data-plane DRAM memory consumption by using the show platform hardware qfp active infrastructure exmem statistics command. See the “Configuration Examples for Packet Trace” section for more information about configuring packet trace.


SUMMARY STEPS

1. enable

2. debug platform packet-trace enable

3. debug platform packet-trace packet pkt-num [fia-trace | summary-only] [data-size data-size ] [circular]

4. debug platform packet-trace copy packet {input | output | both} [size num-bytes ] [ L2 | L3 | L4]

5. debug platform condition [ipv4 | ipv6] [interface interface ] [access-list access-list -name | ipv4-address / subnet-mask | ipv6-address / subnet-mask ] [ingress | egress]

6. debug platform packet-trace drop [code code-num ]

7. debug platform condition start

8. debug platform condition stop

9. show platform packet-trace {configuration | statistics | summary | packet {all | pkt-num }}

10. clear platform condition all

11. exit

DETAILED STEPS

Command
Purpose

Step 1

enable

 

Router> enable

Enables the privileged EXEC mode. Enter your password if prompted.

Step 2

debug platform packet-trace enable

 

Router# debug platform packet-trace enable

Enables packet-trace accounting.

Note This command is required for all levels of inspection.

Step 3

debug platform packet-trace packet pkt-num [fia-trace | summary-only] [circular] [data-size data-size ]

 

Router# debug platform packet-trace packets 2048 summary-only

 

Collects summary data for a specified number of packets. Captures feature path data by the default, and optionally performs FIA trace.

pkt-num —Specifies the maximum number of packets maintained at a given time.

fia-trace —Provides detailed level of data capture, including summary data, feature-specific data. Also displays each feature entry visited during packet processing.

summary-only —Enables the capture of summary data with minimal details.

circular —Saves the data of the most recently traced packets.

data-size —Specifies the size of data buffers for storing feature and FIA trace data for each packet in bytes. When very heavy packet processing is performed on packets, users can increase the size of the data buffers if necessary. The default value is 2048.

Step 4

debug platform packet-trace copy packet {in | out | both} [L2 | L3 | L4] [size num-bytes ]

 

 

Router# debug platform packet-trace copy packet input size 2048

 

Enables copying of ingress or egress packets or both. Also, optionally, allows specifying the layer of the packet in which the packet copy should start. If the specified layer does not exist for the packet, the default behavior is to copy the packet at layer 2.

num-bytes —Specifies the maximum number of octets to copy. Default value is 64.

Step 5

debug platform condition [ipv4 | ipv6] [interface interface ][access-list access-list -name | ipv4-address / subnet-mask | ipv6-address / subnet-mask ] [ingress| egress]

 

 

Router# debug platform condition interface g0/0/0 ingress

 

Specifies the matching criteria for tracing packets. Provides the ability to filter by protocol, IP address and subnet mask, access control list (ACL), interface, and direction.

Step 6

debug platform packet-trace drop [code code-num ]

 

Router# debug platform packet-trace drop

Captures only the data for dropped packets, and provides the option to capture data for a specific global drop code. This command can be used with or without platform conditions.

When this command is used without platform debug conditions, all the drop events in the system will be traced and packet trace will only capture the data available at the moment of the drop.

When this command is used with platform debug conditions, packet-trace data is collected for all the packets classified as a match, but the collected data is preserved only for packets that meet the drop criteria.

code-num —Specifies the drop code to trace.

Step 7

debug platform condition start

 

Router# debug platform condition start

 

Enables the specified matching criteria and starts packet tracing.

Step 8

debug platform condition stop

 

Router# debug platform condition start

Deactivates the condition and stops packet tracing.

Step 9

show platform packet-trace {configuration | statistics | summary | packet {all | pkt-num }}

 

Router# show platform packet-trace 14

Displays packet-trace data according to the specified option. See Table 22-1 for detailed information about the show command options.

Step 10

clear platform condition all

 

Router(config)# clear platform condition all

 

Removes the configurations provided by the debug platform condition and debug platform packet-trace commands.

Step 11

exit

 

Router# exit

 

Exits the privileged EXEC mode.

 

Displaying Packet-Trace Information

Use these show commands to display packet-trace information.

Table 22-2 show Commands

Command
Description

show platform packet-trace configuration

Displays packet trace configuration, including any defaults.

show platform packet-trace statistics

Displays accounting data for all the traced packets.

show platform packet-trace summary

Displays summary data for the number of packets specified.

show platform packet-trace {all | pkt-num } [decode]

Displays the path data for all the packets or the packet specified. The decode option attempts to decode the binary packet into a more human- readable form.

Removing Packet-Trace Data

Use these commands to clear packet-trace data.

Table 22-3 clear Commands

Command
Description

clear platform packet-trace statistics

Clears the collected packet-trace data and statistics.

clear platform packet-trace configuration

Clears the packet-trace configuration and the statistics.

Configuration Examples for Packet Trace

This section provides the following configuration examples:

Example: Configuring Packet Trace

This example describes how to configure packet trace and display the results. In this example, incoming packets to Gigabit Ethernet interface 0/0/2 are traced, and FIA-trace data is captured for the first 128 packets. Also, the input packets are copied. The show platform packet-trace packet 0 command displays the summary data and each feature entry visited during packet processing for packet 0.

Router> enable
Router# debug platform packet-trace enable
Router# debug platform packet-trace packet 128 fia-trace
Router# debug platform packet-trace copy packet input
Router# debug platform condition interface g0/0/2 ingress
Router# debug platform condition start
Router#! ping to UUT
Router# debug platform condition stop
Router# show platform packet-trace packet 0
Packet: 0 CBUG ID: 0
Summary
Input : GigabitEthernet0/0/0
Output : GigabitEthernet0/0/0
State : CONS Packet Consumed
Timestamp : 260253459452456
Path Trace
Feature: IPV4
Source : 1.1.1.2
Destination : 1.1.1.1
Protocol : 1 (ICMP)
Feature: FIA_TRACE
Entry : 0x8037eab4 - DEBUG_COND_INPUT_PKT
Timestamp : 260253459469426
Feature: FIA_TRACE
Entry : 0x82000d00 - IPV4_INPUT_DST_LOOKUP_CONSUME
Timestamp : 260253459481199
Feature: FIA_TRACE
Entry : 0x82000130 - IPV4_INPUT_FOR_US_MARTIAN
Timestamp : 260253459495863
Feature: FIA_TRACE
Entry : 0x80c782a4 - IPV4_INPUT_VFR
Timestamp : 260253459624349
Feature: FIA_TRACE
Entry : 0x82000e80 - IPV4_OUTPUT_LOOKUP_PROCESS
Timestamp : 260253459633503
Feature: ICMPV4
Type : 0 (Echo Reply)
Code : 0 (No Code)
Feature: FIA_TRACE
Entry : 0x811f5028 - STILE_LEGACY_DROP
Timestamp : 260253459841426
Feature: FIA_TRACE
Entry : 0x808cfa1c - INPUT_FNF_AOR_DROP
Timestamp : 260253459851553
Feature: FIA_TRACE
Entry : 0x80824410 - INPUT_FNF_DROP
Timestamp : 260253459859803
Feature: FIA_TRACE
Entry : 0x808ce2a0 - INPUT_FNF_AOR_RELEASE
Timestamp : 260253459872323
Feature: FIA_TRACE
Entry : 0x802428ec - INPUT_DROP
Timestamp : 260253459881419
Packet Copy In
00235e49 7c000021 1bd1dc1a 08004500 00640005 0000ff01 b78f0101 01020101
01010800 5faa0005 00000000 0000089f 15fcabcd abcdabcd abcdabcd abcdabcd
Router# clear platform condition all
Router# exit

Example: Using Packet Trace

This example provides a scenario in which packet trace is used to troubleshoot packet drops for a NAT configuration on a Cisco ASR 1006 Router. This example shows how you can effectively utilize the level of detail provided by the Packet-Trace feature to gather information about an issue, isolate the issue, and then find a solution.

In this scenario, you can detect that there are issues, but are not sure where to start troubleshooting. You should, therefore, consider accessing the Packet-Trace summary for a number of incoming packets.

Router# debug platform condition ingress
Router# debug platform packet-trace enable
Router# debug platform packet-trace packet 2048 summary-only
Router# debug platform condition start
Router# debug platform condition stop
Router# show platform packet-trace summary | include DROP
403 Gi0/0/0 --- DROP 064.NatIn2Out
781 Gi0/0/0 --- DROP 064.NatIn2Out
1708 Gi0/0/0 --- DROP 064.NatIn2Out

 

The output shows that packets are dropped due to NAT configuration on Gigabit Ethernet interface 0/0/0, which enables you to understand that an issue is occurring on a specific interface. Using this information, you can limit which packets to trace, reduce the number of packets for data capture, and increase the level of inspection.

Router# debug platform packet-trace enable
Router# debug platform packet-trace packet 256
Router# debug platform packet-trace copy packet input size 32 L3
Router# debug platform condition interface Gi0/0/0
Router# debug platform condition start
Router# debug platform condition stop
Router# show platform packet-trace summary | include DROP
14 Gi0/0/0 --- DROP 064.NatIn2Out
Router# show platform packet-trace 14
Packet: 14 CBUG ID: 17
Summary
Input : GigabitEthernet0/0/0
Output : ---
State : DROP 064.NatIn2Out
Timestamp: 1123438869354000
Path Trace
Feature: IPv4
Source : 10.1.1.1
Destination : 64.102.6.247
Protocol : 17 (UDP)
Feature: NAT
Direction : IN to OUT
Action : Drop
Sub-code : 027 - NON_PATTABLE
Feature: DROP
Code: 064.NatIn2Out
Packet Copy In
45000040 00020000 3C11E030 0A010101 406606F7 046D0035
 

From the show command output, you can see that there is some traffic that cannot be configured for Port Address Translation (PAT). Hence, you should modify the ACL to spare this traffic from NAT configuration, or disable the service for that kind of traffic. From the copy of the incoming packet, you can see that the protocol is UDP, and the destination port is DNS, and that you should turn off the DNS Application Layer Gateway (ALG).

Additional References

Related Documents

Related Topic
Document Title

Cisco IOS commands

Cisco IOS Master Commands List, All Releases

Standards

Standard
Title

None

MIBs

MIB
MIBs Link

None

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at this URL:

http://www.cisco.com/go/mibs

RFCs

RFC
Title

None

Technical Assistance

Description
Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for Packet Trace

Table 22-4 lists the features in this module and provides links to specific configuration information.

Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn . An account on Cisco.com is not required.


Note Table 22-4 lists only the software releases that support a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.


Table 22-4 Feature Information for Packet Trace

Feature Name
Releases
Feature Information

Packet Trace

Cisco IOS XE 3.10

In Cisco IOS XE Release 3.10, the Packet-Trace feature was introduced on the Cisco ASR 1000 Series Router. The Packet-Trace feature provides information about how data packets are processed by the Cisco IOS XE platform.

The following commands were introduced or modified:

  • debug platform packet-trace enable
  • debug platform packet-trace packet pkt-num [fia-trace | summary-only] [data-size data-size ] [circular]
  • debug platform packet-trace copy packet {input | output | both} [size num-bytes ] [L2 | L3 | L4]
  • show platform packet-trace {configuration | statistics | summary | packet {all | pkt-num }}

Cisco IOS XE 3.11

In Cisco IOS XE Release 3.11, the Packet-Trace feature was enhanced to include the following features:

  • Matched versus traced statistics.
  • Trace stop timestamp in addition to trace start timestamp.

The following commands were introduced or modified:

  • debug platform packet-trace drop [code drop-num ]
  • show platform packet-trace packet {all | pkt-num} [decode]