Configuring ACL
ACL Configurations
Configuration Guide
523
The following example shows how to create MAC ACL 50 and configure Rule 1 to permit
packets with source MAC address 00:34:a2:d4:34:b5:
Switch#configure
Switch(config)#mac access-list
50
Switch(config-mac-acl)#rule
1 permit
smac
00:34:a2:d4:34:b5
smask
ff:ff:ff:ff:ff:ff
Switch(config-mac-acl)#show access-list
50
mac access list 50
Rule 1 permit smac 00:34:a2:d4:34:b5 smask ff:ff:ff:ff:ff:ff
Switch(config-mac-acl)#end
Switch#copy running-config startup-config
Configuring the Standard-IP ACL
Step 1
configure
Enter global configuration mode.
Step 2
access-list create
access-list-num
Create a Standard-IP ACL.
access-list-num:
Enter an ACL ID. The ID ranges from 500 to 1499.
Step 3
access-list standard
acl-id
rule
rule-id
{
deny
|
permit
} [[ sip
source-ip
] smask
source-ip-mask
]
[[ dip
destination-ip
] dmask
destination-ip-mask
]
Add a rule to the ACL.
acl-id:
The ID number of the ACL you have created.
rule-id:
Specify the rule ID, which ranges from 0 to 1999. It should not be the same as any
existing Standard-IP rule IDs
deny | permit:
Specify the operation to be performed with the packets that match the rule.
Deny means to discard; permit means to forward. By default, it is set to permit.
source-ip:
Enter the source IP address.
source-ip-mask:
Enter the mask of the source IP address. This is required if a source IP address
is entered.
destination-ip:
Enter the destination IP address.
destination-ip-mask:
Enter the mask of the destination IP address. This is required if a
destination IP address is entered.
Step 4
show access-list
[
access-list-num
]
(Optional) View the current ACL configuration.
access-list-num
: The ID number of the ACL.