First time here? Check out the FAQ!

Ask Your Question
0

Filters and ICMP

asked May 26 '3

Max Helbig gravatar image

Hello,

let's say i captured two packets

  • From 192.168.1.50 to 192.168.1.1 (empty udp from nmap)
  • From 192.168.1.1 to 192.168.1.50 (ICMP - Port unreachable)

I use the filter: ip.src == 192.168.1.50

Both packets are still visible

I know that my first IP-Packet is send back inside the ICMP Reply, and it looks like wireshark also reads the header from the packet inside the ICMP.

can i somehow define a filter or set an option anyware so that the filter only reads the address from the not nested ip Packet?

Using the Filter ip.scr == 192.168.1.50 && !icmp works in this case but is not a nice solution

Thanks in advance

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered May 26 '3

cmaynard gravatar image

If your version of Wireshark is version 4.0.0 or newer, then you can use the layer operator to restrict filtering to match only the first layer, like so:

ip.src#1 eq 192.168.1.50

The layer operator is described in the wireshark-filter man page.

Preview: (hide)
link

Comments

works perfectly

Max Helbig gravatar imageMax Helbig ( May 30 '3 )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: May 26 '3

Seen: 4,327 times

Last updated: May 26 '23