Applying A Mac Acl To A Layer 2 Interface - Cisco Catalyst 3750-X Software Configuration Manual

Hide thumbs Also See for Catalyst 3750-X:
Table of Contents

Advertisement

Creating 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 in
that interface. When you apply the MAC ACL, consider these guidelines:
Beginning in privileged EXEC mode, follow these steps to apply a MAC access list to control access to
a Layer 2 interface:
Command
Step 1
configure terminal
Step 2
interface interface-id
mac access-group {name} {in}
Step 3
Step 4
end
show mac access-group [interface interface-id]
Step 5
Step 6
copy running-config startup-config
To remove the specified access group, use the no mac access-group {name} interface configuration
command.
This example shows how to apply MAC access list mac1 to a port to filter packets entering the port:
Switch(config)# interface gigabitethernet1/0/2
Router(config-if)# mac access-group mac1 in
The mac access-group interface configuration command is only valid when applied to a physical
Note
Layer 2 interface.You cannot use the command on EtherChannel port channels.
After receiving a packet, the switch checks it against the inbound ACL. If the ACL permits it, 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 ifthe ACL has not been applied and permits all packets.
Remember this behavior if you use undefined ACLs for network security.
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
37-30
If you apply an ACL to a Layer 2 interface that is a member of a VLAN, the Layer 2 (port) ACL
takes precedence over an input Layer 3 ACL applied to the VLAN interface or a VLAN map applied
to the VLAN. Incoming packets received on the Layer 2 port are always filtered by the port ACL.
You can apply no more thanone IP access list and one MAC access list to the same Layer 2 in terface.
The IP access list filters only IP packets, and the MAC access list filters non-IP packets.
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.
Chapter 37
Purpose
Enter global configuration mode.
Identify a specific interface, and enter interface configuration
mode. The interface must be a physical Layer 2 interface (port
ACL).
Control access to the specified interface by using the MAC access
list.
Port ACLs are supported only in the inbound direction.
Return to privileged EXEC mode.
Display the MAC access list applied to the interface or all Layer 2
interfaces.
(Optional) Save your entries in the configuration file.
Configuring Network Security with ACLs
OL-21521-01

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 3560-x

Table of Contents