tcpdump filter out arp and all stp packets

Viewed 9153

I need to capture on an interface with tcpdump and filter out all arp and stp/rstp packets. I tried this command, which does filter out arp, but I still see rstp packets:

tcpdump -n -i ens224 not arp and not stp

Also tried this, still see rstp packets

tcpdump -n -i ens224 not stp

What am I doing wrong?

I read this post already but its not helpful in the context of tcpdump, looking for specific syntax: how to filter rtsp packets from a pcap file

2 Answers

You are not doing wrong. It's about how libpcap and vendors are reading/writing headers. To remove STP 802.1d lines I use this command:

tcpdump -i eth0 not arp and not llc

Best regards

Related