TCPDUMP: How do I filter an arp message by checking for equality with arp's hexadecimal value of 0806?

I've spent the last hour trying to figure this challenge out.  I know I can filter out by name but would like to also know how to by hexadecimal value.

I have a capture file and would like to filter arp by its hexadecimal value 0806?  Any additional explanation will be appreciated.  Thanks.
Who is Participating?
ranit8Connect With a Mentor Commented:
The pattern to capture specific bytes from a protocol header in tcpdump is
proto [ offset : length ]

You know that the ethernet header has the 2-byte protocol field after the first 12 bytes (destination and source). So match them with

Then apply the bitwise or comparison operations you need; in your case the whole field must have a specific value.

But watch out the presence of LLC when filtering some protocols, in those cases better using the protocol name.
jeffw22Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.