Networking/Computing Tips/Tricks

Rate this content:
5 of 5 - 1 votes
Thank you for rating this article.

Check out these great references as well: 

 Our custom profiles repository for Wireshark
 Our Udemy course on Wireshark 
 Our Udemy course on Wireless Packet capture


Of course you can edit these with appropriate addresses and numbers. The ones used are just examples.  Unlike Wireshark's Display Filter syntax, Capture filters use Berkley Packet Filter syntax.  Here are our favorites.

1. host #.#.#.#

Capture only traffic to or from a specific IP address.  Example: host

2. net #.#.#.#/24     or    net #.#.#.# mask

Capture traffic to or from (sources or destinations) a range of IP addresses.  Example: net The two commands are the same result.

  • src net
    Capture traffic with a source range of IP addresses.
  • dst net
    Capture traffic with a destination range of IP addresses.

3. ether host ##:##:##:##:##:##

Captures only traffic to or from the MAC address used.  Capitalizing hexadecimal letters does not matter. Example: ether host 01:0c:5e:00:53:00

4. vlan

Captures only VLAN traffic.

  • vlan and host #.#.#.#
    Captures VLAN traffic for a particular host.
  • vlan and (host #.#.#.# and port 80)
    Captures VLAN traffic for a paticular host and a particular port (HTTP in the example).

5. ip    or    ip6

Captures only IP  (ip is IPv4, ip6 is IPv6) traffic.

6. tcp

Captures only TCP traffic.

7. port xx

Capture single source or destination port traffic.  Example: port 80.  Another example: port 53 for DNS traffic.

8. host and not (port xx or port yy)     or and not port xx and not port yy

Capture all traffic, exclude specific packets.   The two commands above are the same result.

9.  tcp portrange 1800-1880

Capture traffic within a range of ports.  Example: tcp portrange 20-21 will capture all FTP traffic.

10.  not broadcast and not multicast

Capture only Unicast traffic.  

11. pppoes

Capture PPPOE traffic.

  • pppoes and host #.#.#.#
    Captures PPPOE traffic for a particular host.
  • pppoes and (host #.#.#.# and port 80)
    Captures PPPOE traffic for a paticular host and a particular port (HTTP in the example).

12.  port sip

Captures all SIP traffic (VoIP).

  • tcp port sip
    Captures VoIP SIP traffic using TCP.
  • udp port sip
    Captures VoIP SIP traffic using UDP.

13. dst host ff02::1 

Captures all IPv6 traffic within the local network that is multicast (such as Neighbor and Router advertisements).  It will include the multicast queries and listenners (MLD) traffic.

14. ip6 and not ip proto 41

Capture IPv6 Native Traffic Only.  This will exclude tunnelled IPv6.

15. ip proto 41

Capture only IPv6 over IPv4 Tunnelled Traffic.

Should we have done a top 20? What else would you add?

I hope you find this article and its content helpful.  Comments are welcomed below.  If you would like to see more articles like this, please support us by clicking the patron link where you will receive free bonus access to courses and more, or simply buying us a cup of coffee!, and all comments are welcome!

Did you learn something?
Did I save you time? 

Buy me a coffeeBuy me a coffee!

Find by Tag

5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az ACL Addressing Analysis Ansible Architecture ARP Assessment AToM Backup Bandwidth BGP Biography Bloom's Taxonomy Briefings CBRS CellStream Cellular Central Office Cheat Sheet Chrome Cisco Clock Cloud Computer Consulting CPI Data Center Data Networking Decryption DHCPv4 DHCPv6 Display Filter DNS Documentation ECMP EIGRP Ethernet Ethics Flipping the Certification Model Follow Me Fragmentation Git GNS3 Google GQUIC Hands-On History Home Network HTTPS ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 In A Day Internet IOS Classic IoT IPv4 IPv6 IS-IS L2 Switch L2VPN L3VPN LDP Learning Services Linux LLN Logging LoL M-BGP MAC MAC OSx Macro Microsoft mininet Monitoring Monitor Mode MPLS Multicast Name Resolution Netflow NetMon netsh Networking Network Science nmap Npcap nslookup Online Learning Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX Parrot PIM Ping Policy POTS POTS to Pipes PPP Profile Profiles Programming Project Management PW3E Python QoS QUIC Requirements RIP Routing RPL RSVP Rural SAS SDN Security Self Certification Service Provider Services Sharepoint Small Business Smartport SONET Speed SSH SSL Subnetting T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone Telnet Terminal TLS Tools Traceroute Traffic Analysis Traffic Engineering Training Travel Tunnel Utility Video Virtualbox Virtualization Voice VoIP VRF VXLAN Webex Wi-Fi Wi-Fi 6 Wi-Fi 6/6E Windows Wireless Wireless 5G Wireshark Wireshark Tip WLAN ZigBee Zoom

Twitter Feed