3com 2200 用户手册

下载
页码 200
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:
Name the filter:
“Discard XNS & IP pkts w/in socket range”
Add an and statement to compare the results of step 2 and the results of 
step 3:
and # compare if XNS & in range
Add an or statement:
or # determine if the type field is either XNS or IP 
Add 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
a Filter
You can create a new packet filter using either an ASCII-based text editor 
(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.