Networking/Computing Tips/Tricks


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?

Subscribe to our Newsletter!

Our Tag Cloud

4G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az Addressing Airlines Analysis Ansible Apple Architecture ARP Articles Associations ATM AToM Authoring Bandwidth BGP Billing Bloom's Taxonomy Bluehost BPF Briefings Cable Capture Filter CellStream Cellular Central Office Cheat Sheet Chrome Cisco Click Model Cloud Computer Consulting Crowd Funding Data Center Data Networking Decryption Design DHCPv6 dig Display Filter DNS Documentation Early Adopter Ethernet Ethics Filter Fragmentation G-MPLS GNS3 Google Graphics Hands-On Hiring History Home Network HTTPS ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 Illustration Image Size Internet IoT IPv4 IPv6 IS-IS L2VPN L3VPN LDP Linux LLN M-BGP MAC Macro Management mergecap Microsoft mininet Monitoring MPLS Multicast Netcat NetMon netsh Networking News nmap NMS nslookup Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX OTT PDF Personnel Planning Policy POTS POTS to Pipes PPP Preview Privacy Profile Project Management PW3E QoS QUIC Remote Desktop Requirements RFI RFP RFQ RIP Routig Routing RPL RSVP Rural Scanning SDN Security Sensor Service Provider Small Business Solutions Brainstorming SONET Spam Speed SS7 SSL Subnetting Support SWOT T-Shark TCP TCP/IP Teamwork Technology Telco Telecom 101 Telecommunications Terminal TLS Tools TR-069 Traffic Engineering Training TRANSUM Travel Tunnel Ubuntu Utility Video Virtualization VoIP VRF WAVE Wi-Fi Windows Wireless Wireless 5G Wireshark WLAN ZigBee

Our Twitter Feed