First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

How to find out total number of ip4 packets (that are not TCP,UDP or ICMP)

The header basically says it all. I want to find out the total number of ipv4 packets in a pcap file, that are not TCP,UDP or ICMP. What is the best way to do so?

gamma's avatar
1
gamma
asked 2020-04-25 14:45:47 +0000, updated 2020-04-25 14:46:30 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

3 Answers

1

Enter this display filter:

ip && !(tcp || udp || icmp)

and then read the number of displayed packets in the status bar.

Jim Aragon's avatar
7.5k
Jim Aragon
answered 2020-04-25 15:01:01 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

In the Wireshark Gui?
Display filter: ip.version==4 and !tcp and !udp and !icmp
Then check Displayed: in the status bar lower right.

Chuckc's avatar
3k
Chuckc
answered 2020-04-25 15:02:40 +0000
edit flag offensive 0 remove flag delete link

Comments

Thanks for the help! It worked fine.

gamma's avatar gamma (2020-04-25 15:08:57 +0000) edit
add a comment see more comments
0

An often overlooked aspect of filtering is IP fragments. While filters such as those provided by @bubbasnmp and @jim-aragon (e.g., ip && !(tcp || udp || icmp) will exclude IPv4 packets carrying either TCP, UDP or ICMP payloads, it will only do so in cases where the IP packets are not fragmented or for the 1st fragment when Reassemble fragmented IPv4 datagrams is disabled or for the last (reassembled) packet when is Reassemble fragmented IPv4 datagrams enabled.

If you want to filter out the IP fragments associated with the TCP, UDP or ICMP packets as well, then a better filter is: ip and !(ip.proto == 1 or ip.proto == 6 or ip.proto == 17).

cmaynard's avatar
11.1k
cmaynard
answered 2020-04-27 15:58:38 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer