25-21
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 25 Configuring Network Securi t y w it h ACLs Displaying ACL Information

Applying ACLs to a Physical Interface

Beginning in privileged EXEC mode, follow these steps to control access to a Layer 2 interface:
This example shows how to apply access list 2 on Gigabit Ethernet interface 0/2 to filter packets entering
the interface:
Switch(config)# interface gigabitethernet0/2
Router(config-if)# ip access-group 2 in
Note Th e ip access-group interface configuration command is only valid when applied to a management
interface or a Layer 2 physical interface. ACLs cannot be applied to interface port-channels.
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
discar ds the packet.
When you apply an undefi ned ACL to an interface, the switch acts as if the A CL has not been applied to
the interfac e and perm its all packet s. Remem ber this behavior if y ou use undefined ACLs for network
security.

Displaying ACL Information

You can displ ay t h e ACLs th at ar e co nfigured on the s wit ch, a nd you c an disp lay th e ACLs tha t have
been a ppli ed to phy si cal and mana ge ment i nter faces. T his sec ti on consi sts of t h ese t opi cs:
Displaying ACLs, page 25-22
Displayin g Access Groups, page 25-23
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 or management interface or a management
inte rfa ce VL AN ID .
Step 3 ip access-group {access-list-number |
name} {in} Control access to the specified interface.
Step 4 end Return to privileged EXEC mode.
Step 5 show running-config Display the access list configuration.
Step 6 copy running-config startup-config (Optiona l) Save your entries in the co nfigurati on file.