Packet Filter Examples; Destination Address Filter; Source Address Filter; Length Filter - 3Com SUPERSTACK 2200 User Manual

Switch administration console
Table of Contents

Advertisement

Packet Filter
Examples
Destination
Address Filter
Source Address
Filter

Length Filter

The following examples of using the packet filter language start with basic
packet filter concepts.
This filter operates on the destination address field of a frame. It
allows packets to be forwarded that are destined for stations with an
Organizationally Unique Identifier (OUI) of 08-00-02. To customize this filter
to another OUI value, change the literal value loaded in the last
instruction. Note that the OUI must be padded with an additional 00 to fill
out the literal to 4 bytes.
name
"Forward to 08-00-02"
pushField.l
0
pushLiteral.l
0xffffff00
and
pushLiteral.l
0x08000200
eq
This filter operates on the source address field of a frame. It allows packets
to be forwarded that are from stations with an OUI of 08-00-02. To
customize this filter to another OUI value, change the literal value loaded in
the last
instruction. Note that the OUI must be padded with an
pushLiteral.l
additional 00 to fill out the literal to 4 bytes.
name
"Forward from 08-00-02"
pushField.l
6
pushLiteral.l
0xffffff00
and
pushLiteral.l
0x08000200
eq
This filter operates on the length field of a frame. It allows packets to be
forwarded that are less than 400 bytes in length. To customize this filter to
another length value, change the literal value loaded in the
instruction.
name
"Forward < 400"
pushField.w
12
pushLiteral.w
400
lt

Packet Filter Examples

# Get first 4 bytes of
# destination address
# Set up mask to isolate first
# 3 bytes
# Top of stack now has OUI
# Load OUI value
# Check for match
# Get first 4 bytes of source
# address
# Set up mask to isolate first
# 3 bytes
# Top of stack now has OUI
# Load OUI value
# Check for match
# Get length field
# Load length limit
# Check for frame length < limit
A-9
pushLiteral.l
pushLiteral.w

Advertisement

Table of Contents
loading

This manual is also suitable for:

Superstack ii 2200

Table of Contents