9
Applying an ACL to an interface for packet filtering
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Apply an ACL to the interface
to filter packets.
packet-filter
[
ipv6
] { acl-number
|
name
acl-name } {
inbound
|
outbound
} [
hardware-count
]
By default, an interface does not
filter packets.
You can apply only one ACL to the
same direction of an interface.
Configuring the applicable scope of packet filtering on a
VLAN interface
You can configure the packet filtering on a VLAN interface to filter the following packets:
• Packets forwarded at Layer 3 by the VLAN interface.
• All packets, including packets forwarded at Layer 3 by the VLAN interface and packets
forwarded at Layer 2 by the physical ports associated with the VLAN interface.
To configure the applicable scope of packet filtering on a VLAN interface:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Create a VLAN interface
and enter its view.
interface vlan-interface
vlan-interface-id
If the VLAN interface already exists,
you directly enter its view.
By default, no VLAN interface exists.
3. Specify the applicable
scope of packet filtering on
the VLAN interface.
packet-filter filter
[
route
|
all
]
By default, the packet filtering filters
packets forwarded at Layer 3.
Setting the interval for generating and outputting packet
filtering logs
After you set the interval, the device periodically generates and outputs the packet filtering logs to the
information center, including the number of matching packets and the matched ACL rules. For more
information about information center, see Network Management and Monitoring Configuration
Guide.
To set the interval for generating and outputting packet filtering logs:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Set the interval for
generating and outputting
packet filtering logs.
acl
[
ipv6
]
logging
interval
interval
The default setting is 0 minutes,
which mean that no packet
filtering logs are generated.