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?

Comments powered by CComment

Find by Tag

4G Networks 5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az Addressing Analysis Ansible Architecture ARP AToM Baseline BGP Bloom's Taxonomy Broadband Cable cat CellStream Cellular Central Office Cheat Sheet Chrome Cisco Cloud CMD Coloring Rules Computer Consulting Customer Support Data Center Data Networking DHCPv6 DNS Docker Documentation Dublin-Traceroute dumpcap ECMP Ethernet Ethics Evaluation Field Operations Fragmentation G-MPLS GeoIP Git GNS3 Google GQUIC Hands-On History Home Network ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 India Interface Control Internet IoT IPsec IPv4 IPv6 IRINN IS-IS L2VPN L3VPN LDP Linux LLN LoL M-BGP MAC Macro Microsoft mininet Monitoring MPLS mtr MTU Multicast Name Resolution Netcat Netmiko NetMon netsh Networking Network Science nmap Npcap NSE Observations Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX OTT Paris-Traceroute Parrot PIM PMTU Policy POTS POTS to Pipes PPP Profile Programming Project Management PW3E Python QoS QUIC Remote Desktop Requirements Resume RIP Routing RPL RSVP Rural SDN Security Service Provider Small Business SONET Speed SS7 SSH SSL Subnetting SYSCTL T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone termshark Testing TLS Tools Traceroute Traffic Engineering Training Travel Tunnel Ubuntu Utility Video Virtualbox Virtualization VoIP VRF VXLAN Wi-Fi Wi-Fi 4 Wi-Fi 5 Wi-Fi 6 Windows Winpcap Wireless Wireless 5G Wireshark Wireshark Tip WLAN Writing Zenmap ZigBee

Twitter Feed