
28-28
Catalyst 3550 Multilayer Switch Software Configuration Guide
78-11194-09
Chapter 28 Configuring Network Security with ACLs
Configuring Named MAC Extended ACLs
Applying a MAC ACL to a Layer 2 Interface
After you create a MAC ACL, you can apply it to a Layer 2 interface to filter non-IP traffic coming into
that interface. When you apply the MAC ACL, consider these guidelines:
•
You cannot apply an ACL to a Layer 2 interface on a switch if the switch has an input Layer 3 ACL
or a VLAN map applied to it. An error message is generated if you attempt to do so. You can apply
an ACL to a Layer 2 interface if the switch has output Layer 3 ACLs applied.
•
A Layer 2 interface can have only one MAC access list. If you apply a MAC access list to a Layer 2
interface that has a MAC ACL configured, the new ACL replaces the previously configured one.
Beginning in privileged EXEC mode, follow these steps to apply a MAC access list to control access to
a Layer 2 interface:
To remove the specified access group, use the no mac access-group {name} in interface configuration
command.
This example shows how to apply MAC access list mac1 on Gigabit Ethernet interface 0/3 to filter
packets entering the interface:
Switch(config)# interface gigabitethernet0/3
Router(config-if)# mac access-group mac1 in
Note
The mac access-group interface configuration command is only valid when applied to a physical Layer
2 interface.
For inbound ACLs, after receiving a packet, the switch checks it against the ACL. If the ACL permits
the packet, the switch continues to process the packet. If the ACL rejects the packet, the switch discards
it.
When you apply an undefined ACL to an interface, the switch acts as if the ACL has not been applied to
the interface and permits all packets. Remember this behavior if you use undefined ACLs for network
security.
Command
Purpose
Step 1
configure terminal
Enter global configuration mode.
Step 2
interface interface-id
Identify a specific interface for configuration, and enter interface
configuration mode.
The interface must be a physical Layer 2 interface (port ACL).
Step 3
mac access-group {name} {in}
Control access to the specified interface by using the MAC access list.
Note
Port ACLs are supported only in the inbound direction.
Step 4
end
Return to privileged EXEC mode.
Step 5
show mac access-group [interface
interface-id]
Display the MAC access list applied to the interface or all Layer 2
interfaces.
Step 6
copy running-config startup-config
(Optional) Save your entries in the configuration file.