Basic Packet Filtering: Address Filters
Basic Packet Filtering: Address Filters
Note: This is Part One of a two-part article focusing on protocol analysis filtering for network troubleshooting,
optimization and security.
Filtering reduces the amount of packets that are placed in the trace buffer or are displayed from
the trace buffer. The following list gives some examples of the types of filters that you may want
to apply on your network:
All TCP/IP traffic: You aren't interested in any other traffic because you're working on
some IP routing issues.
All ICMP traffic: You want to know what types of error messages and possible hack
probes are happening on your network.
All traffic to/from your server: You are interested in identifying who communicates most
often with your server.
All packets that contain the value NLST at packet offset 36: You want to know who is
listing files using the FTP list files (NLST) command regardless of the port number the
FTP process is using.
♦ Address filters
♦ Protocol filters
♦ Data set filters
Address Filters
Address filters are used to specify the desired traffic based on the source or
destination MAC (data link) address, IP address, or IPX address.
It seems pretty obvious which address type you would filter on, however I have
seen people select the wrong filter type at times. For example, which filter would
used to capture all traffic to and from a DHCP boot up device?
If you selected IP, you would've made in logical selection, but you would have
missed the initial boot up traffic. The DHCP client will initially communicate using
source IP address 0.0.0.0 -- thereby causing your filter to miss the traffic.
Because of this, if we are ever capturing traffic that involves the DHCP boot up
process, we must define a filter base of the MAC address of the device.
In Figure 1, we have set up in address filter to capture all traffic to and from the
device using IP address 10.2.0.2. We have selected "IP" as the address type,
and we have entered the address number in the table under the heading “Station
1”. Note that the arrow between the two machines (under the DIR heading) is
pointing both ways. This indicates that we are interested in bidirectional traffic--
traffic to and from device 10.2.0.2. Under the title “Station 2” we have entered
the word "any". This indicates that any destination address would be acceptable
to our filter.
Protocol Filters
Protocol filters help reduce the traffic based on functionality, or protocol. For
example you may want to capture all ICMP traffic, DNS traffic, OSPF traffic, and
so on. There are numerous protocols that are of interest on networks today. For
example if I were to come to your network can take a look at your traffic, I would
then begin applying filters looking for specific traffic such as all ICMP traffic. By
analyzing this traffic, I'd get an idea of the various errors and misconfigurations
that may exist on your network. Then, I may apply an OSPF filter to gather
information about your network routing.
Figure 2: Simply clicking on the ICMP checkbox creates a filter for the number
“01” in the IP header’s Protocol field.
I consider data set filters to be advanced filters. Too often overlooked, these
filters enable you to define interesting traffic based on a specific value at a
specific offset within a packet.
For example, in Figure 3, we have set up a data filter that will look all packets
that contain the value NLST at a specific offset. These packets are seen when
an FTP client executes a command to view the directory contents.
The following list is an example of some of the filters that you could build:
Note: For more information on data set filtering, refer to the article entitled
“Advanced Data Filtering” available online at www.packet-level.com.
True, analyzers have different capabilities in the area of filtering. Make a point of
checking out your analyzer’s ability to filter traffic.