
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.
Содержание 4007
Страница 1: ...http www 3com com Switch 4007 Implementation Guide Release 3 0 5 Part No 10013673 Published May 2000 ...
Страница 36: ...36 ABOUT THIS GUIDE ...
Страница 37: ...I UNDERSTANDING YOUR SWITCH 4007 SYSTEM Chapter 1 Configuration Overview ...
Страница 38: ......
Страница 50: ...50 CHAPTER 1 CONFIGURATION OVERVIEW ...
Страница 52: ......
Страница 70: ...70 CHAPTER 3 INSTALLING MANAGEMENT MODULES ...
Страница 110: ...110 CHAPTER 4 CONFIGURING AND USING EME OPTIONS ...
Страница 130: ...130 CHAPTER 5 MANAGING THE CHASSIS POWER AND TEMPERATURE ...
Страница 222: ...222 CHAPTER 11 IP MULTICAST FILTERING WITH IGMP ...
Страница 240: ...240 CHAPTER 13 RESILIENT LINKS ...
Страница 304: ...304 CHAPTER 14 VIRTUAL LANS VLANS ...
Страница 350: ...350 CHAPTER 15 PACKET FILTERING ...
Страница 506: ...506 CHAPTER 19 OPEN SHORTEST PATH FIRST OSPF ROUTING ...
Страница 534: ...534 CHAPTER 20 IPX ROUTING ...
Страница 612: ...612 CHAPTER 22 QOS AND RSVP ...
Страница 656: ...656 CHAPTER 23 DEVICE MONITORING ...
Страница 657: ...IV REFERENCE Appendix A Technical Support Index ...
Страница 658: ......
Страница 664: ......