Tip

This is the documentation for the 20.10 version. Looking for the documentation of the latest version? Have a look here.

Dataplane Packet Tracing

TNSR offers a means to trace packet actions through the dataplane. This is different from a packet capture in that a packet capture looks at the contents of a packet while a trace inspects how a packet flows through the dataplane. A trace shows basic information about a packet and the actions taken on the packet by the dataplane along the way.

Trace Capture

A trace capture records the actions taken by the dataplane on a given number of packets. The trace includes packet header data such as IP addresses, MAC addresses, and so on as well as which actions were taken by the dataplane (i.e. which dataplane nodes processed the packet). This gives a view of how a packet flowed through the dataplane, including whether or not the dataplane dropped a packet or allowed it to egress.

trace capture node <input-node> [maximum <max>] [verbose] [pre-clear]

node <input-node>:

The dataplane input node to capture on. For a list, enter trace capture node ?. The most common choice is dpdk-input.

maximum <max>:

The maximum number of packets to include in the trace.

Note

When using a Trace Filter, set the maximum value here larger than the maximum value on the filter. The filter will restrict matches within the total packets traced. If the trace capture maximum is too low, the filter can never reach its own maximum value unless every packet in the trace happens to match.

verbose:

Include additional data in the trace output.

pre-clear:

Clear the packet trace buffer before starting this trace.

To manually clear the packet trace buffer, use trace clear.

Trace Filter

Filtering restricts the trace output to match only packets which involve a specific dataplane graph node. There are numerous graph nodes for a variety of purposes.

trace filter (exclude|include) node <graph-node> [maximum <max>]

(exclude|include):

Action for this filter.

exclude:

Match packets which do not include a given node.

include:

Match packets which include the given node.

node <graph-node>:

A graph node name. Use trace filter <action> node ? for a list.

maximum <max>:

The maximum number of packets matching this filter to include in the output.

Note

Filters are also restricted by the total size of the trace capture. A trace capture can stop before it reaches the maximum value on the filter if it reaches its own maximum value first.

For example, an include filter may result in an empty trace if no packets in the trace capture match the filter before the capture reaches its maximum number of packets. Similarly, an exclude filter may result in an empty trace if the filter matches and excludes all packets in the trace capture.

trace filter none

Clear all trace filters.

View a Trace

Trace results are stored in a temporary buffer in memory. To view the trace, use:

show trace [maximum <max>]

maximum <max>:

The maximum number of packets to display from the trace

After viewing the results, the trace can be discarded by clearing the buffer with trace clear.