ip access-list

Creates an IP access control list (ACL). ACLs contain rules that permit or deny traffic based on packet fields belonging to the IPv4 family of protocols.

Syntax

ip access-list name
no ip access-list name

Parameters

name
Specifies the name of the IP access list.

Modes

Config mode

Usage Guidelines

Command-line mode changes from (config) to (config-ip-acl) after new IP ACL is created.

Names cannot exceed 64 characters and must start with an alphabetic character or an underscore, followed by alphabetic or numeric characters or dots.

The following reserved keywords cannot be used as name identifiers: all, ingress-group, egress, egress-group, match, list, access-list, route-map, and listener-policy.

Examples

The following example creates an ACL named P4. On successful creation the mode changes to config-ip-acl.

device# configure terminal
device(config)# ip access-list P4
device(config-ip-acl)#

device# show running-config ip access-list P4 
ip access-list P4 

device# show running-config ip access-list all 
ip access-list P4 

The following example deletes the ACL named P4.

device# configure terminal
device(config)# no ip access-list P4