
Very helpful when searching on a specific string or user ID, for example. This filter will find and display all TCP packets that contain the word ‘test’. This creates a filter for any TCP packet with 5000 as a source or destination port. This filter will find and display all TCP resets. This creates a conversation filter between the two defined IP addresses. You'll get list, in ascending order of frequency, of each unique src, dst and proto combination present within your sample file.This filters for any packet with 172.16.1.1, as either the source or destination. For example, if you append this to that command line: |sort -n |uniq -c |sort -n Under Linux (which is what I use), you can easily pipe the output of that into various other utility programs. If you'd prefer to eliminate the non-IPv4 packets, just add a filter: tshark -r -2 -Tfields -R ip -eip.src -eip.dst -eframe.protocols With that command line, you'll get exactly those fields, but be aware that some lines, such as those with ARP packets, won't have IP addresses (because they're not IP packets), and that IPv6 packets won't show IP addresses because those field names ( ip.src and ip.dst) are only for IPv4.

So with that approach in mind, you could use this: tshark -r -2 -Tfields -eip.src -eip.dst -eframe.protocols When I've done that sort of thing before, I typically use tshark to extract the data and then other tools (Python, Perl, awk, etc.) to further refine the resulting data.
