Troubleshooting: Packet Tracing

In this article, we will look at how to make use of the inbuilt feature of Versa VOS to debug the life of a packet or a session. This will help engineers and Enterprise troubleshoot and identify issues much faster.

Traditional debug-level logs put a lot of load on the production system and is generally not recommended. However, by using the Packet tracing feature and the logs generated by it, we can identify the root cause of an issue.

The packet tracking logs are stored in /var/log/versa/versa-pkttrace.log

The packet trace option, comes with a host of option as listed below

descriptionDescription of the Session Filter
destination-portDestination port or port range (eg. 5000-6000, 5000)
destination-prefixDestination IP prefix
filter-nameSession filter name
ip-versionIP version/family (default is IPv4)
modulesModule-specific logging
OrgOrganization Name
protocolProtocol value (e.g., ICMP = 8)
routing-instanceRouting instance name
source-portSource port or port range (eg. 5000-6000, 5000)
source-prefixSource IP prefix


In this section we will see how to create a Packet Trace filter to trace DNS packets originating from the subnet

Step 1: Create a packet trace filter using the command
request debug session filter-create
- this has to be followed by configurign all or required packet trace option. 

In this case, we will create a packet filter with the name DNS with Protocol 17 (UDP) for DNS packets going from the LAN subnet toward the DNS Server

root@gotham-cli> request debug session filter-create filter-name DNS org Customer1 source-prefix destination-prefix protocol 17 routing-instance riCustomer1

Packet trace filters are per tenant; so in case of a multi-tenant CPE, other tenants are not penalized because of extra lookup and logging done for a specific tenant.

Step 2: To view the packet trace filter, execute teh command
request debug session filter-display <<filter_name>> 
root@gotham-cli> request debug session filter-display DNS
result Success 
org Customer1 
routing-instance DNS 
ip-version ipv4 

The command shows that the packet trace filter has been successfully created and all the other options associated with it.

Step 3: To view the packet trace table (Datapath), use the command 
show debug filter trace table
root@gotham-cli> show debug filter trace table 
  C/Catg - Category
  L/Prio - Level/priority
  P/Prot - Protocol

 |   Rule Hdl | C |  L  |  P  |    VRF    |     SOURCE-IP      |       DEST-IP      |    SPORT    |    DPORT    |
 | 0x00010000 | A |  22 |  17 |    8-8    | | |     0-65535 |     0-65535 |
 | Total IPv4 Filters: 1                                                                                        |

root@gotham-cli> show debug filter trace stats 

 Rule Handle 0x00010000 :     1

It is a good practice to stop and delete the packet trace filter once the logs are captured. A packet trace filter can be deleted using the command request debug session filter-delete <filter_name>


In this article, we saw how to create packet trace filters which can be used for debugging or troubleshooting data path issues. By using the filtering options available, enterprise and users can configure more granular packet captures that will help identify issues faster.