Networking/Computing Tips/Tricks

Perhaps....

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 192.168.1.1

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

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

  • src net 192.168.1.0/24
    Capture traffic with a source range of IP addresses.
  • dst net 192.168.1.0/24
    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 www.myhostname.com and not (port xx or port yy)     or    www.myhostname.com 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 Ad-Hoc Addressing Analysis Ansible Apple Architecture ARP Assessment AToM Automation Baseline BGP Bloom's Taxonomy Bluehost BPF Briefings Cable Capture Filter CellStream Cellular Central Office Cheat Sheet Chrome Cisco Cloud CMD Company Policy Computer Consulting Data Center Data Networking Dependencies DHCPv6 Display Filter DNS Documentation dumpcap Earth Earthquakes ECMP Ethernet Ethics Etiquette Evaluation Field Operations Five Monkey Rule G-MPLS Gauge GeoIP GNS3 Google GQUIC Hands-On History Home Network ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 India Internet IoT IPv4 IPv6 IRINN IS-IS L2VPN L3VPN LDP LifeNet Linux LLN LoL M-BGP MAC Macro Management Microsoft Milky Way mininet Monitoring MPLS mtr Multicast Murphy Name Resolution Netcat NetMon netsh Networking nmap NSE Observations OLPC Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX OTT Parrot PIM Policy POTS POTS to Pipes PPP Profile Project Management PW3E QoS QUIC Railroad Remote Desktop Requirements Resume Review RIP Routig Routing RPL RSVP Rural Scanning SDN Security Service Provider Small Business SONET Speed SSL Status Storms Subnetting Support T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone Testing Tools Traceroute Traffic Engineering Training Travel Tunnel Ubuntu Utility Video Virtualbox Virtualization VoIP VRF VXLAN Wi-Fi Windows Wireless Wireless 5G Wireshark WLAN Writing Zenmap ZigBee

Twitter Feed