Creating Packet Filters

12-17

Combining All the Filters. Together, the four packet filters work to perform the solution to the problem: filtering the broadcast packets from the market data servers. These steps show how to create this filter:

1Name the filter:

“Discard XNS & IP pkts w/in socket range”

2Perform steps 2 through 4 as described in “Packet Filter One” on page 12-14.

3Perform steps 2 through 8 as described in “Packet Filter Two” on page 12-15.

4Add an and statement to compare the results of step 2 and the results of step 3:

and # compare if XNS & in range

5Perform steps 2 through 4 as described in “Combining a Subset of the Filters” on page 12-16.

6Add an or statement:

or # determine if the type field is either XNS or IP

7Add a not statement to discard any matching packets:

not # discard if (IP & in range) & (XNS & in range)

The complete packet filter that discards IP and XNS packets that are within the specified range is shown on page 12-13.

Tools for Writing You can create a new packet filter using either an ASCII-based text editor a Filter (such as EMACS or vi ) or the line editor built into the Administration

Console. Using an ASCII-based text editor allows you to create multiple copies of the packet filter definition, which you can then copy onto one or more Switch 2200 systems from a networked workstation. This method also allows you to archive copies of filter definitions.

Using the Built-in Line Editor

The built-in text editor provides a minimal set of editing functions that you can use to edit a packet filter definition one line at a time. A single line is limited to no more than 79 characters. The number of lines is limited only by available memory.

Page 154
Image 154
3Com 2200 manual Add a not statement to discard any matching packets