
330
C
HAPTER
15: P
ACKET
F
ILTERING
Figure 26
Accept and Reject Instructions
The following example shows the use of both accept and reject in a
packet filter. This packet filter was created for a network that is running
both Phase I and Phase II AppleTalk software. The goal of the filter is to
eliminate the AppleTalk traffic.
Accept
(Use for OR-ing tests)
Reject
(Use for AND-ing tests)
First test
Nonzero
result?
Accept packet
and terminate
test sequence
Next test
Yes
No
Reject packet
and terminate
test sequence
First test
Nonzero
result?
Next test
Yes
No
Name
“Filter AppleTalk datagrams”
pushField.w
12
# Get the type field.
pushTop
# Make a copy.
pushLiteral
0x809b
# EtherTalk Phase I type.
eq
# Test if the packet type is
# equal to the AppleTalk type,
reject
# reject the packet and end.
# Otherwise,
pushLiteral.w
0x5dc
# Largest 802.3 packet size
lt
# If this value is less than the
# value in the packet’s
# type/length field, then this
# is an Ethernet frame, so
accept
# accept the packet if it is not
# 802.3, otherwise…
pushField.a
16
# get the SNAP OUI and Ethertype
pushLiteral.a
0x03080007809b
# value to compare.
ne
# If not equal, then forward the
# packet, otherwise drop it.
Summary of Contents for 4007
Page 36: ...36 ABOUT THIS GUIDE ...
Page 37: ...I UNDERSTANDING YOUR SWITCH 4007 SYSTEM Chapter 1 Configuration Overview ...
Page 38: ......
Page 50: ...50 CHAPTER 1 CONFIGURATION OVERVIEW ...
Page 52: ......
Page 70: ...70 CHAPTER 3 INSTALLING MANAGEMENT MODULES ...
Page 110: ...110 CHAPTER 4 CONFIGURING AND USING EME OPTIONS ...
Page 130: ...130 CHAPTER 5 MANAGING THE CHASSIS POWER AND TEMPERATURE ...
Page 222: ...222 CHAPTER 11 IP MULTICAST FILTERING WITH IGMP ...
Page 240: ...240 CHAPTER 13 RESILIENT LINKS ...
Page 304: ...304 CHAPTER 14 VIRTUAL LANS VLANS ...
Page 350: ...350 CHAPTER 15 PACKET FILTERING ...
Page 506: ...506 CHAPTER 19 OPEN SHORTEST PATH FIRST OSPF ROUTING ...
Page 534: ...534 CHAPTER 20 IPX ROUTING ...
Page 612: ...612 CHAPTER 22 QOS AND RSVP ...
Page 656: ...656 CHAPTER 23 DEVICE MONITORING ...
Page 657: ...IV REFERENCE Appendix A Technical Support Index ...
Page 658: ......
Page 664: ......