Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-users: Re: [Wireshark-users] Capture Filter Help

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Sake Blok <sake@xxxxxxxxxx>
Date: Wed, 6 Feb 2008 20:02:55 +0100

On Wed, Feb 06, 2008 at 01:51:43PM -0500, James Pifer wrote:
> Hi. I've been googling and using the wiki but I can't figure out if this
> is possible. 
> 
> I'm trying setup a capture filter to capture only data where the ip
> address contains a certain part of an ip address. We have a lot of
> servers on a distributed network that have standard addresses. 
> 
> For example, I'd like to capture data on port 137 if the ip address is
> like 192.xxx.xxx.11 where xxx can be anything. 
> 
> Can this be done in a capture filter? Looks like it can be done in a
> display filter, but I really don't want that. 

How'bout looking at the specific locations within the ip-packet for
src address or destination address:

ip[0xc]==192 and ip[0xf]==11

Would match any packet from 192.x.x.11 and 

ip[0x10]=192 and ip[0x13]==11

would match and packet to 192.x.x.11.

So the full filter would be:

"((ip[0xc]==84 and ip[0xf]==11) or (ip[0x10]=84 and ip[0x13]==11)) and port 137"

Hope this helps,
Cheers,
    Sake

  • Follow-Ups:
    • Re: [Wireshark-users] Capture Filter Help
      • From: James Pifer
  • References:
    • [Wireshark-users] Capture Filter Help
      • From: James Pifer
  • Prev by Date: [Wireshark-users] Capture Filter Help
  • Next by Date: Re: [Wireshark-users] Capture Filter Help
  • Previous by thread: [Wireshark-users] Capture Filter Help
  • Next by thread: Re: [Wireshark-users] Capture Filter Help
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation