25-19
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 25 Configuring Network Securi t y w it h ACLs Configuring ACLs
This exam ple sh ows how to cr eate an d displ ay a n acc ess l ist name d mac1, denying o nl y E the rType
DECnet Phase IV traffic, but permitting all other types of traffic.
Switch(config)# mac access-list extended mac1
Switch(config-ext-macl)# deny any any decnet-iv
Switch(config-ext-macl)# permit any any
Switch(config-ext-macl)# end
Switch # show access-list
Extended MAC access list mac1
deny any any decnet-iv
permit any any

Creating MAC Access Groups

Beginning in privileged EXEC mo de, follow these steps t o create M AC ac cess group s and to apply a
MAC access list to an interface:
This e xampl e shows how to apply ACL 2 on Gigabit Etherne t inter f ac e 0/1 to filter packets enter ing the
interface:
Switch(config)# interface gigabitethernet0/1
Router(config-if)# mac access-group 2 in
Note Th e mac access-group interface configuration command is only valid when applied to a Layer 2
interface.
For inbound ACLs, after re ceiving a packet, th e switc h checks t he packet agains t the ACL. If the ACL
permits the packet, the switch continues to process the packet. If the ACL rejects the packet, the switch
discards th e packet. The MAC ACL appl ies to both IP an d non-IP packe ts.
When you apply an undefi ned ACL to an interface, the switch acts as if the A CL has not been applied to
the inter f a ce and pe rm its all p ackets. Remember t his b eh avior if you use undefined ACLs as a me an s of
network security.
Command Purpose
Step 1 configure terminal Enter globa l configurati on mode.
Step 2 interface interface-id Identify a specific interface for configuration, and enter interface
configurati on mode.
The interface must be a Layer 2 interface.
Step 3 mac access- group {name} {in} Control access to the specified interface by using the MAC access list name.
Step 4 end Return to privileged EXEC mode.
Step 5 show ma c-ac cess group Display the MAC ACLs applied on the switch.
Step 6 copy running-config startup-config (Optiona l) Save your entries in the co nfigurati on file.