Wireshark’s most useful display filters

wireshark-logoNow and then, especially when you expect less, the network crashes or encounter an issue and then you had to troubleshoot. Sometime the problem is right there, you can see it and it’s easy to fix, but in other cases you’ll have to put an eye in the packets that are traveling through it and search deeper for the solution. When it comes to network sniffing or packet capturing or whatever you want to call it, I believe that the name Wireshark (formerly Ethereal) ring a bell in your head.


Wireshark is one of the world’s foremost network protocol analyzer, and is the de facto standard across many industries and educational institutions. Wireshark development thrives thanks to the contributions of networking experts across the globe. It is the continuation of a project that started in 1998. Some features of Wireshark:
- Deep inspection of hundreds of protocols, with more being added all the time
- Live capture and offline analysis
- Multi-platform: Runs on Windows, Linux, OS X, Solaris, FreeBSD, NetBSD, and many others
- Captured network data can be browsed via a GUI, or via the TTY-mode TShark utility
- Read/write many different capture file formats: tcpdump (libpcap), Pcap NG, Catapult DCT2000, Cisco Secure IDS iplog, Microsoft Network Monitor, Network General Sniffer® (compressed and   uncompressed), Sniffer® Pro, and NetXray®, Network Instruments Observer, NetScreen snoop, Novell LANalyzer, RADCOM WAN/LAN Analyzer, Shomiti/Finisar Surveyor, Tektronix K12xx, Visual Networks Visual UpTime, WildPackets EtherPeek/TokenPeek/AiroPeek, and many others
- Capture files compressed with gzip can be decompressed on the fly
- Live data can be read from Ethernet, IEEE 802.11, PPP/HDLC, ATM, Bluetooth, USB, Token Ring, Frame Relay, FDDI, and others (depending on your platfrom)
- Decryption support for many protocols, including IPsec, ISAKMP, Kerberos, SNMPv3, SSL/TLS, WEP, and WPA/WPA2

Wireshark is extremely useful when it comes to network troubleshooting as it capture the packets and you can have a detail look into them checking if everything is OK in parameters, message, format and so on. The problem is that if you capture the packets traveling through a backbone router you will end having  huge file ( yes, even up to 1G if you capture long enough) and a lot packets details in it. From this tons of information maybe you are interested in only a minor part like BGP traffic or a certain IP source and destination. Here is the part where Wireshark filters come into play.

There are 2 type of Wireshark filters:

- DISPLAY FILTERS – after you capture a lot of information, they help you to visualize only the packets that you are interested in
- CAPTURE FILTERS – from the beginning you know what is the interest for you and capture only those packets

I would recommed to use the Capture filters, when you know what are you looking for and you run the capture for more than couple of hours in a heavy traffic environment. This will help you stay in a reasonable amount on information being captured and file size.
If you run the packet capture for less time, like one or two hours, and you are not very sure what are you looking for, then I recommend to capture all the traffic and then use Display filters to visualize only the information that you are searching for.

For today I put together a list with the most useful Wireshark display filters. I compiled this list based on my personal experience and on my friends and colleagues advices. If you think that something is missing, or you are using a Display filter that might be useful for others please feel free to add it to a Comment to this topic and I will update the list. In one of the future posts I will show you how to capture the traffic and apply some of this filters.

DISPLAY FILTEREXPLANATIONEXAMPLE
eth.addrsource or destination mac-addresseth.addr == 00:1a:6b:ce:fc:bb
eth.srcsource mac-addresseth.src == 00:1a:6b:ce:fc:bb
eth.dstdestination mac-addresseth.dst == 00:1a:6b:ce:fc:bb
arp.dst.hw_mactarget mac-addressarp.dst.hw_mac == 00:1a:6b:ce:fc:bb
arp.dst.proto_ipv4target IPv4 addressarp.dst.proto_ipv4 == 10.10.10.10
arp.src.hw_macsender mac-addressarp.src.hw_mac == 00:1a:6b:ce:fc:bb
arp.src.proto_ipv4sender IPv4 addressarp.src.proto_ipv4 == 10.10.10.10
vlan.idvlan IDvlan.id == 16
ip.addrsource or destination IPv4 addressip.addr == 10.10.10.10
ip.dstdestination IPv4 addressip.addr == 10.10.10.10
ip.srcsource IPv4 addressip.src == 10.10.10.10
ip.protoIP protocol (decimal)ip.proto == 1
ipv6.addrsource or destination IPv6 addressipv6.addr == 2001::5
ipv6.srcsource IPv6 addressipv6.addr == 2001::5
ipv6.dstdestination IPv6 addressipv6.dst == 2001::5
tcp.portsource or destination TCP porttcp.port == 20
tcp.dstportdestination TCP porttcp.dstport == 80
tcp.srcportsource TCP porttcp.srcport == 60234
udp.portsource or destination UDP portudp.port == 513
udp.dstportdestination UDP portudp.dstport == 513
udp.srcportsource UDP portudp.srcport == 40000
fr.dlciFrame-Relay DLCI numberfr.dlci == 112
icmp.typeICMP type code (decimal)icmp.type == 8
vtp.vlan_info.vlan_nameVLAN namevtp.vlan_info.vlan_name == TEST
bgp.originator_idBGP id (IPv4 address)bgp.originator_id == 192.168.10.15
bgp.next_hopBGP Next Hop (IPv4 address)bgp.next_hop == 192.168.10.15
rip.ipRIP IPv4 addressrip.ip == 200.0.2.0
ospf.advrouterOSPF advertising router IDospf.advrouter == 192.168.170.8
eigrp.asEIGRP autonomous system numbereigrp.as == 100
hsrp.virt_ipHSRP virtual IP addresshsrp.virt_ip == 192.168.23.250
vrrp.ip_addrVRRP virtual IP addressvrrp.ip_addr == 192.168.23.250
zebra.dest4ZEBRA destination IPv4 addresszebra.dest4 == 10.10.10.10
wlan.addrsource or destination MAC addresswlan.addr == 00:1a:6b:ce:fc:bb
wlan.sasource MAC addresswlan.sa == 00:1a:6b:ce:fc:bb
wlan.dadestination MAC addresswlan.da == 00:1a:6b:ce:fc:bb

Materials that helped me for this post:
http://packetlife.net/static/cheatsheets/wireshark-display-filters.pdf – thanks Jeremy Stretch
http://www.wireshark.org/docs/dfref/ – here you can find the full list of filters – thanks developers of Wireshark

Popularity: 31% [?]

Interesting for you :

7 Responses

  1. Joe says:

    Do you have an example of a filter that shows only DNS server addresses being used by clients on the LAN?
     
    Thank you!

  2. Calin says:

    If you type “dns” (without quotes)  in the Filter field of Wireshark, do you obtain what you want? In this way you can see only the DNS traffic that it’s flowing from the LAN interface.

    If this isn’t what you intended, please add some more details to your request.

    Good luck!

  3. Tom says:

    Very useful, thanks!

  4. Bes says:

    I need to filter and analyze IP packets on port 110.  I used the filter commend tcp.port == 110 but I got nothing.
    Port 110 is used for POP3, but I don’t know how to get the “POP3 traffic” flowing.

    Thank you!
     

  5. gezim says:

    for pop3 u can use outlook express but it's only for SMTP if I have right I don't know if I have help something but try

  6. Adrian says:

    I need to filter and analyze IP packets on port 110. I used the filter commend tcp.port == 110 but I got nothing.
    Port 110 is used for POP3, but I don’t know how to get the “POP3 traffic” flowing.

    Thank you!

  7. Netcowboy says:

    Hi Adrian
    Just use capture filer -> port 110

    That’s it

Leave a Reply

© 2010 FirstDigest. All rights reserved.

Switch to our mobile site