IPv4 ACLs

Network security with ACLs

This chapter describes how to configure network security on the switch by using access control lists (ACLs), which in commands and tables are also referred to as access lists.

ACL overview

An access control list (ACL) is a network security mechanism that

  • defines permit and deny conditions for network packets

  • filters inbound and outbound traffic as it traverses network devices, and

  • enforces access and segmentation policies by controlling which packets are forwarded or dropped.

When a packet is received on an interface, the switch compares the fields in the packet against any applied ACLs to verify that the packet has the required permissions to be forwarded, based on the criteria specified in the access lists. The controller checks each packet against the conditions you set in the access list, one at a time. The controller accepts or rejects the packets based on the first matching condition. Arrange your access list conditions carefully because the controller stops checking once it finds a match. If you do not set any restrictions, the controller forwards the packet. If you set restrictions and none are matched, the controller drops the packet. The controller can use ACLs on all packets it forwards . There is an implicit "deny any host" rule.

Configure access list

Configure access lists on the controller to provide basic security for your network. If you do not configure ACLs, the switch might allow all packets onto every part of your network.

Control access and traffic types

You can use ACLs to control which hosts access various parts of your network and to decide which types of traffic are forwarded or blocked at router interfaces. For example, you can allow email traffic but block Telnet traffic.


Note


EWC does not support ACLs on the Gi0 port because it does not support interface or port ACLs.


Access control entries

An access control entry (ACE) is a rule component that

  • specifies a permit or deny action for network packets

  • defines conditions such as source or destination IP, protocol, or port that packets must meet to match the rule, and

  • determines packet handling within an ordered ACL.

The meaning of permit or deny depends on the context in which the ACL is used.


Note


The maximum number of ACEs that can be applied under an access policy (ACL) for central switching is 256 ACEs. For Flex Mode Local Switching, the maximum is 64 ACEs.

ACL supported types

The switch supports IP ACLs and Ethernet (MAC) ACLs:

  • IP ACLs filter IPv4 traffic, including TCP, user datagram protocol (UDP), internet group management protocol (IGMP), and internet control message protocol (ICMP).

  • Ethernet ACLs filter non-IP traffic.

This switch also supports quality of service (QoS) classification ACLs.

ACEs and fragmented and unfragmented traffic

A fragmented or unfragmented packet is a type of network traffic that

  • may be divided into multiple fragments as it traverses a network

  • only includes Layer 4 information in the first fragment (such as TCP/UDP port, ICMP type/code), and

  • requires specific ACE matching behavior depending on the presence or absence of Layer 4 information in its fragments.

IP packets can be fragmented as they cross the network. The first fragment, which contains the beginning of the packet, includes Layer 4 information such as TCP or UDP port numbers, or ICMP type and code. All other fragments lack Layer 4 information.

Some access control entries (ACEs) do not check Layer 4 information, so they can be applied to all packet fragments. ACEs that test Layer 4 information cannot be applied to most fragments in a fragmented IP packet. If a fragment contains no Layer 4 information and the ACE tests Layer 4 information, matching rules are modified.

  • Permit ACEs that check Layer 3 information in the fragment, including protocol type such as TCP or UDP, match the fragment regardless of missing Layer 4 details.


    Note


    For TCP ACEs with Layer 4 options, fragmented packets are dropped in accordance with RFC 1858.


  • Deny ACEs that check Layer 4 information match a fragment only if the fragment contains Layer 4 information.

ACEs and fragmented and unfragmented traffic examples

Consider access list 102, configured with these commands, applied to three fragmented packets:


Device(config)# access-list 102 permit tcp any host 10.1.1.1 eq smtp
Device(config)# access-list 102 deny tcp any host 10.1.1.2 eq telnet
Device(config)# access-list 102 permit tcp any host 10.1.1.2
Device(config)# access-list 102 deny tcp any any

Note


In the first and second ACEs, the eq keyword after the destination address checks if the TCP destination port matches the well-known port numbers for Simple Mail Transfer Protocol (SMTP) or Telnet.


  • Packet A is a TCP packet from host 10.2.2.2, port 65000, sent to host 10.1.1.1 on the SMTP port. If the packet is fragmented, the first fragment matches the first ACE (a permit) because all Layer 4 information is included. The remaining fragments also match the first ACE, even if they do not include the SMTP port information, because the first ACE checks only Layer 3 information when applied to fragments. In this example, the fragment is a TCP packet sent to 10.1.1.1.

  • Packet B is sent from host 10.2.2.2, port 65001, to host 10.1.1.2 on the Telnet port. If the packet is fragmented, the first fragment matches the second ACE (a deny) because it includes all Layer 3 and Layer 4 information. The remaining fragments in the packet do not match the second ACE because they are missing Layer 4 information. Instead, they match the third ACE (a permit).

    Because the first fragment was denied, host 10.1.1.2 cannot reassemble a complete packet. As a result, packet B cannot be reassembled on host 10.1.1.2. Permitted fragments still use network bandwidth and resources on host 10.1.1.2 during the attempted reassembly.

  • Packet C is sent from host 10.2.2.2, port 65001, to host 10.1.1.3 on the FTP port. This packet is fragmented. If this packet is fragmented, the first fragment matches the fourth ACE (a deny). All other fragments also match the fourth ACE because it does not check Layer 4 information. Layer 3 information in each fragment shows they are sent to host 10.1.1.3, while previous permit ACEs check different hosts.

Standard and extended IPv4 ACLs

An IPv4 access control list (ACL) is a packet-filtering feature that

  • sequentially compares packets against a set of permit or deny conditions

  • determines packet acceptance or rejection based on the first match, and

  • enforces traffic control policies on network interfaces.

The switch stops testing after the first match. The order of the conditions is critical. If no conditions match, the switch denies the packet.

The software supports two types of ACLs for IPv4:

  • Standard IP access lists use source addresses for matching operations.

  • Extended IP access lists use source and destination addresses for matching operations and can include protocol-type information for more granular control.


Note


Only extended ACLs are supported; standard ACLs are not supported.


IPv4 ACL switch unsupported features

Configuring IPv4 ACLs on this switch is similar to configuring IPv4 ACLs on other Cisco switches and routers.

The switch does not support the following ACL-related features:

  • Non-IP protocol ACLs or bridge-group ACLs.

  • IP accounting.

  • Inbound and outbound rate limiting (except with QoS ACLs).

  • Reflexive ACLs, URL redirect ACLs and dynamic ACLs are not supported. (except for some specialized dynamic ACLs used by the switch clustering feature).

  • ACL logging for port ACLs and VLAN maps.

Access list numbers

The ACL number determines the type of access list you create.

This lists the access-list number and corresponding access list type and shows whether or not they are supported in the switch. The switch supports IPv4 standard and extended access lists, numbers 1 to 199 and 1300 to 2699.

Table 1. Access List Numbers

Access List Number

Type

Supported

1–99

IP standard access list

Yes

100–199

IP extended access list

Yes

200–299

Protocol type-code access list

No

300–399

DECnet access list

No

400–499

XNS standard access list

No

500–599

XNS extended access list

No

600–699

AppleTalk access list

No

700–799

48-bit MAC address access list

No

800–899

IPX standard access list

No

900–999

IPX extended access list

No

1000–1099

IPX SAP access list

No

1100–1199

Extended 48-bit MAC address access list

No

1200–1299

IPX summary address access list

No

1300–1999

IP standard access list (expanded range)

Yes

2000–2699

IP extended access list (expanded range)

Yes

In addition to numbered standard and extended ACLs, you can create standard and extended named IP ACLs with the supported numbers. For example, you can name standard IP ACLs with numbers from 1 to 99, and extended IP ACLs with numbers from 100 to 199. With named ACLs, you can delete individual entries, but with numbered lists, you cannot.

Numbered standard IPv4 ACLs

When you create an ACL, an implicit deny statement is automatically present at the end. Any packet that does not match an earlier entry in the ACL is denied by this statement. For standard access lists, if you omit the mask in an IP host address ACL entry, the switch assumes a mask of 0.0.0.0.

  • The switch rewrites standard access lists to move host match entries and entries with a don’t care mask of 0.0.0.0 to the top of the list. Entries with non-zero don’t care masks are placed below them. As a result, the ACEs may appear in a different order in show command output and in the configuration file than the order in which you entered them.

  • After you create a numbered standard IPv4 ACL, you can apply it to VLANs, feature-id terminal lines (virtual teletype (VTY) lines), or interfaces.

Numbered extended IPv4 ACLs

A numbered extended IPv4 ACL is an access control mechanism that

  • matches IPv4 traffic using both source and destination addresses

  • optionally uses protocol type information for greater refinement, and

  • requires that Access Control Entries (ACEs) be appended to the list since reordering or selective removal is unsupported.

When you are creating ACEs in numbered extended access lists, remember that after you create the ACL, any additions are placed at the end of the list.

The switch does not support dynamic or reflexive access lists. It also does not support filtering based on the type of service (ToS) minimize-monetary-cost bit.

Some protocols also have specific parameters and keywords that apply to that protocol.

You can define an extended TCP, UDP, ICMP, IGMP, or other IP ACL. The switch also supports these IP protocols:

  • Authentication Header Protocol ( ahp )

  • Encapsulation Security Payload ( esp )

  • Enhanced Interior Gateway Routing Protocol ( eigrp )

  • generic routing encapsulation ( gre )

  • Internet Control Message Protocol ( icmp ) and Open Shortest Path First routing ( ospf )

  • Internet Group Management Protocol ( igmp ) and Payload Compression Protocol ( pcp )

  • any Interior Protocol ( ip ) and Protocol-Independent Multicast ( pim )

  • IP in IP tunneling ( ipinip ) and Transmission Control Protocol ( tcp )

  • KA9Q NOS-compatible IP over IP tunneling ( nos ) and User Datagram Protocol ( udp )

Named IPv4 ACLs

You can identify IPv4 ACLs with an alphanumeric string (a name) rather than a number. You can use named ACLs to configure more IPv4 access lists in a router than if you were to use numbered access lists. If you identify your access list with a name rather than a number, the mode and command syntax are slightly different. However, at times, not all commands that use IP access lists accept a named access list.

Consider these guidelines before configuring named ACLs:

  • Numbered ACLs are also available.

  • A standard ACL and an extended ACL cannot have the same name.

  • VLAN ACLs or VLAN maps are not supported.

  • You can use standard or extended ACLs whether named or numbered, in VLAN maps.

  • With IPv4 QoS ACLs, if you enter the class-map { match-all | match-any} class-map-name global configuration command, you can enter these match commands:

    1. match access-group acl-name


      Note


      The ACL must be an extended named ACL.


    2. match input-interface interface-id-list

    3. match ip dscp dscp-list

    4. match ip precedence ip-precedence-list


      Note


      You cannot enter the match access-group acl-index command.


ACL logging

ACL logging is a router logging feature that

  • generates informational messages about packets permitted or denied by a standard IP access control list (ACL)

  • records each message with details such as the action taken, the source IP address, and the access list number, and

  • supports logging only for router ACLs (RACLs), not for ACLs used with Unicast Reverse Path Forwarding (uRPF).

The controller software can provide logging messages about packets permitted or denied by a standard IP access list. The level of messages logged to the console is controlled by the logging console commands, which control the syslog messages.


Note


Because routing is done in hardware and logging is done in software, if a large number of packets match a permit or deny ACE containing a log keyword, the software might not be able to match the hardware processing rate, and not all packets will be logged.


The first packet that triggers the ACL generates a logging message immediately. Subsequent packets are collected over 5-minute intervals before they are logged. The logging message includes the access list number, an indication of whether the packet was permitted or denied, the source IP address, and the number of packets from that source permitted or denied during the prior 5-minute interval.


Note


The logging facility might drop some message packets if there are too many to handle, or if more than one logging message must be processed in a second. This behavior prevents the router from crashing due to too many logging packets. Therefore, do not use the logging facility as a billing tool or as an accurate source for the number of matches to an access list.

Hardware and software treatment of IP ACLs

ACL processing is performed in hardware. If the hardware reaches its capacity to store ACL configurations, all packets on that interface are dropped.

The ACL scale for controllers is as follows:

  • Cisco Catalyst 9800-40 wireless controller, Cisco Catalyst 9800-L wireless controller, Cisco Catalyst 9800-CL wireless controller (small and medium) support 128 ACLs with 128 access list entries (ACEs).

  • Cisco Catalyst 9800-80 wireless controller and Cisco Catalyst 9800-CL wireless controller (large) support 256 ACLs and 256 ACEs.

  • FlexConnect and Fabric mode APs support 96 ACLs.


Note


If an ACL configuration cannot be implemented in the hardware due to an out-of-resource condition on the controller, then only the traffic in that VLAN arriving on that controller is affected. Software forwarding of packets might adversely impact the performance of the switch or switch stack, depending on the number of CPU cycles that this consumes.


For router ACLs, other factors can cause packets to be sent to the CPU:

  • Using the log keyword

  • Generating ICMP unreachable messages

When traffic flows are both logged and forwarded, forwarding is done by hardware, but logging must be done by software. Because of the difference in packet handling capacity between hardware and software, if the sum of all flows being logged (both permitted flows and denied flows) is of great enough bandwidth, not all of the packets that are forwarded can be logged.

If a router ACL configuration cannot be applied in hardware, packets that arrive in a VLAN and must be routed are processed in software. However, packets are bridged in hardware. If ACLs cause large numbers of packets to be sent to the CPU, the switch performance can be negatively affected.

When you enter the show ip access-lists privileged EXEC command, the match count displayed does not account for packets that are access controlled in hardware. Use the show access-lists hardware counters and show platform acl counters hardware privileged EXEC commands to obtain basic hardware ACL statistics for switched and routed packets.

Router ACLs operate in this way:

  • The hardware controls permit and deny actions of standard and extended ACLs (input and output) for security access control.

  • If log has not been specified, and if ip unreachables is disabled, the hardware drops flows that match a deny statement in a security ACL. The flows matching a permit statement are switched in hardware.

  • Adding the log keyword to an ACE in a router ACL causes a copy of the packet to be sent to the CPU for logging only. If the ACE is a permit statement, the packet is switched and routed in hardware.

IPv4 ACL interface considerations

When you apply the ip access-group interface configuration command to a Layer 3 interface (an SVI, a Layer 3 EtherChannel, or a routed port), the interface must have been configured with an IP address. Layer 3 access groups filter packets that are routed and packets that are received by Layer 3 processes on the CPU. They do not affect packets bridged within a VLAN.

  • For inbound ACLs, after receiving a packet, the controller checks the packet against the ACL. If the ACL permits the packet, the controller continues to process the packet. If the ACL rejects the packet, the controller discards the packet.

  • For outbound ACLs, after receiving and routing a packet to a controlled interface, the controller checks the packet against the ACL. If the ACL permits the packet, the controller sends the packet. If the ACL rejects the packet, the controller discards the packet.

If an undefined ACL has nothing listed in it, it is an empty access list.

By default, the input interface sends ICMP Unreachable messages whenever a packet is discarded, regardless of whether the packet was discarded because of an ACL on the input interface or because of an ACL on the output interface. ICMP Unreachables are normally limited to no more than one every half second per input interface. You can change this by using the ip icmp rate-limit unreachable global configuration command.

Restrictions for configuring IPv4 access control lists

General Network Security

These are restrictions for configuring network security with ACLs:
  • A standard ACL and an extended ACL cannot have the same name.

  • AppleTalk appears in the command-line help strings but is not supported as a matching condition for the deny and permit MAC access-list configuration mode commands.

  • DNS traffic is permitted by default for clients that are awaiting web authentication, regardless of ACL entries.

IPv4 ACL Network Interfaces

These restrictions apply to IPv4 ACLs to network interfaces:

  • When controlling access to an interface, you can use a named or numbered ACL.

  • You do not have to enable routing to apply ACLs to Layer 2 interfaces.

IP Access List Entry Sequence Numbering

  • This feature does not support dynamic, reflexive, or firewall access lists.

How to configure ACLs

Configure IPv4 ACLs (GUI)

Define and apply IPv4 ACL rules for traffic management and security.

Procedure


Step 1

Choose Configuration > Security > ACL.

Step 2

Click Add.

Step 3

In the Add ACL Setup dialog box, enter the details for these parameters.

  • ACL Name: Enter the name for the ACL.

  • ACL Type: IPv4 Standard.

  • Sequence: Enter the sequence number.

  • Action: Select Permit or Deny the packet flow from the drop-down list.

  • Source Type: Choose any, Host or Network from which the packet is sent.

  • Log: Enable or disable logging.

Step 4

Click Add.

Step 5

Add the rest of the rules and click Apply to Device.


Configure IPv4 ACLs

Follow the procedure given below to use IP ACLs on the switch:

Procedure


Step 1

Create an ACL by specifying an access list number or name and the access conditions.

Step 2

Apply the ACL to interfaces or terminal lines. .


Create a numbered standard ACL (GUI)

Define and apply a numbered standard ACL using the device’s web interface using GUI.

Procedure


Step 1

Choose Configuration > Security > ACL.

Step 2

On the ACL page, click Add.

Step 3

In the Add ACL Setup window, enter the details for these parameters.

  • ACL Name: Enter the name for the ACL.

  • ACL Type: IPv4 Standard.

  • Sequence: Enter the sequence number.

  • Action: Select Permit or Deny access from the drop-down list.

  • Source Type: Choose any , Host or Network.

  • Log: Enable or disable logging, this is limited to ACLs associated to Layer 3 interface only.

Step 4

Click Add.

Step 5

Click Save & Apply to Device.


Create a numbered standard ACL (CLI)

Follow the procedure given below to create a numbered standard ACL using commands:

Procedure


Step 1

Enable the privileged EXEC mode and enter your password if prompted.

Example:

Device# enable

Step 2

Enter the global configuration mode.

Example:

Device# configure terminal

Step 3

Define a standard IPv4 access list by using a source address and wildcard.

Example:

Device(config)# access-list 2 {deny | permit} source source-wildcard your_host 

The access-list-number is a decimal number from 1 to 99 or 1300 to 1999.

Enter deny or permit to specify whether to deny or permit access if conditions are matched.

The source is the source address of the network or host from which the packet is being sent. Specify the source as:

  • The 32-bit quantity in dotted-decimal format.

  • The keyword any abbreviates for source and source-wildcard as 0.0.0.0 255.255.255.255. You do not need to enter a source-wildcard.

  • The keyword host abbreviates source and source-wildcard as source 0.0.0.0.

The source-wildcard applies wildcard bits to the source address.

Note

 

Logging is supported only on ACLs attached to Layer 3 interfaces.

Step 4

Return to privileged EXEC mode.

Example:

Device(config)# end

Step 5

Verify your entries.

Example:

Device# show running-config

Step 6

(Optional) Save your entries in the configuration file.

Example:

Device# copy running-config startup-config

Create a numbered extended ACL (GUI)

Set up a numbered extended ACL to control network traffic based on source, destination, and protocol using the GUI.

Procedure


Step 1

Choose Configuration > Security > ACL.

Step 2

On the ACL page, click Add.

Step 3

In the Add ACL Setup window, enter the details for these parameters.

  • ACL Name: Enter the name for the ACL.

  • ACL Type: IPv4 Extended.

  • Sequence: Enter the sequence number.

  • Action: Select Permit or Deny the packet flow from the drop-down list.

  • Source Type: Choose any , Host or Network from which the packet is sent.

  • Destination Type: Choose any , Host or Network to which the packet is sent.

  • Protocol: Select a protocol from the drop-down list.

  • Log: Enable or disable logging.

  • DSCP: Enter to match packets with the DSCP value.

Step 4

Click Add.

Step 5

Click Save & Apply to Device.


Create a numbered extended ACL (CLI)

Follow the procedure given below to create a numbered extended ACL using commands:

Procedure


Step 1

Enters global configuration mode.

Example:

Device# configure terminal

Step 2

Defines an extended IPv4 access list and the access conditions.

Example:

Device# access-list 101 {deny | permit} ip host 10.1.1.2 any [precedence 0] [tos 0] [fragments] log [log-input | smartlog] [time-range time-range-name] [dscp dscp]

The access-list-number is a decimal number from 100 to 199 or 2000 to 2699.

Enter deny or permit to specify whether to deny or permit the packet if conditions are matched.

For protocol , enter the name or number of an P protocol: ahp , eigrp , esp , gre , icmp , igmp , igrp , ip , ipinip , nos , ospf , pcp , pim , tcp , or udp , or an integer in the range 0 to 255 representing an IP protocol number. To match any Internet protocol (including ICMP, TCP, and UDP), use the keyword ip .

Note

 
This step includes options for most IP protocols. For additional specific parameters for TCP, UDP, ICMP, and IGMP, see the following steps.

The source is the number of the network or host from which the packet is sent.

The source-wildcard applies wildcard bits to the source.

The destination is the network or host number to which the packet is sent.

The destination-wildcard applies wildcard bits to the destination.

Source, source-wildcard, destination, and destination-wildcard can be specified as:

  • The 32-bit quantity in dotted-decimal format.

  • The keyword any for 0.0.0.0 255.255.255.255 (any host).

  • The keyword host for a single host 0.0.0.0.

The other keywords are optional and have these meanings:

  • precedence : Enter to match packets with a precedence level specified as a number from 0 to 7 or by name: routine (0), priority (1), immediate (2), flash (3), flash-override (4), critical (5), internet (6), network (7).

  • fragments : Enter to check non-initial fragments.

  • tos : Enter to match by type of service level, specified by a number from 0 to 15 or a name: normal (0), max-reliability (2), max-throughput (4), min-delay (8).

  • time-range : Specify the time-range name.

  • dscp : Enter to match packets with the DSCP value specified by a number from 0 to 63, or use the question mark (?) to see a list of available values.

    Note

     

    Your embedded controller must support the ability to:

Note

 

If you enter a dscp value, you cannot enter tos or precedence . You can enter both a tos and a precedence value with no dscp .

Step 3

Define an extended TCP access list and the access conditions.

Example:

Device(config)# access-list 101 {deny | permit} tcp source source-wildcard [operator-port] destination destination-wildcard 500 [established] [precedence 0] [tos 0] [fragments] log [log-input | smartlog] [time-range time-range-name] [dscp dscp] [flag]

The parameters are the same as those described for an extended IPv4 ACL, with these exceptions:

Enter an operator and port to compare source (if positioned after source source-wildcard ) or destination (if positioned after destination destination-wildcard ) port. Possible operators include eq (equal), gt (greater than), lt (less than), neq (not equal), and range (inclusive range). Operators require a port number (range requires two port numbers separated by a space).

Enter the port number as a decimal number (from 0 to 65535) or the name of a TCP port. Use only TCP port numbers or names when filtering TCP.

The other optional keywords have these meanings:

  • flag : Enter one of these flags to match by the specified TCP header bits: ack (acknowledge), fin (finish), psh (push), rst (reset), syn (synchronize), or urg (urgent).

Step 4

Define an extended UDP access list and the access conditions.

Example:

Device(config)# access-list 101 {deny | permit} udp source source-wildcard [operator port] destination destination-wildcard 100 precedence 0] [tos 0] [fragments] log [log-input | smartlog] [time-range time-range-name] [dscp dscp

The UDP parameters are the same as those described for TCP except that the [operator [port]] port number or name must be a UDP port number or name, and the flag not valid for UDP.

Step 5

Define an extended ICMP access list and the access conditions.

Example:

Device(config)# access-list 101 {deny | permit} icmp source source-wildcard destination destination-wildcard [ icmp-type | [[ icmp-type icmp-code ] | [ icmp-message ]] precedence 0] [tos 0] [fragments] log [log-input | smartlog] [time-range time-range-name] [dscp dscp]

The ICMP parameters are the same as those described for most IP protocols in an extended IPv4 ACL, with the addition of the ICMP message type and code parameters. These optional keywords have these meanings:

  • icmp-type: Enter to filter by ICMP message type, a number from 0 to 255.

  • icmp-code: Enter to filter ICMP packets that are filtered by the ICMP message code type, a number from 0 to 255.

  • icmp-message: Enter to filter ICMP packets by the ICMP message type name or the ICMP message type and code name.

Step 6

(Optional) Define an extended IGMP access list and the access conditions.

Example:

Device(config)# access-list 101 {deny | permit} igmp source source-wildcard destination destination-wildcard [ igmp-type ] precedence 0] [tos 0] [fragments] log [log-input | smartlog] [time-range time-range-name] [dscp dscp]

The IGMP parameters are the same as those described for most IP protocols in an extended IPv4 ACL, with this optional parameter.

igmp-type: To match IGMP message type, enter a number from 0 to 15, or enter the message name: dvmrp , host-query , host-report , pim , or trace .

Step 7

Return to privileged EXEC mode.

Example:

Device(config)# end

Step 8

(Optional) Save your entries in the configuration file.

Example:

Device# copy running-config startup-config

Create named standard ACLs (GUI)

Use this procedure to set up and apply ACLs for network security management within the device’s GUI.

Procedure


Step 1

Click Configuration > Security > ACL.

Step 2

Click Add to create a new ACL setup.

Step 3

In the Add ACL Setup window, enter these parameters:

  • ACL Name: Enter the name for the ACL.

  • ACL Type: IPv4 Standard.

  • Sequence: The valid range is between 1 and 99 or 1300 and 1999.

  • Action: Select Permit or Deny access from the drop-down list.

  • Source Type: Choose any, Host or Network.

  • Log: Enable or disable logging, this is limited to ACLs associated to Layer 3 interface only.

Step 4

Click Add to add the rule.

Step 5

Click Save & Apply to Device.


Create named standard ACLs (CLI)

Define and apply named standard ACLs to permit or deny traffic from specified IPv4 source addresses using commands.

Procedure


Step 1

Enter the privileged EXEC mode.

Example:

Device# enable

Step 2

Enter the global configuration mode.

Example:

Device# configure terminal

Step 3

Define a standard IPv4 access list using a name, and enter the access-list configuration mode.

Example:

Device(config)# ip access-list standard 20

The name can be a number from 1 to 99.

Step 4

Specify one or more conditions denied or permitted to decide if the packet is forwarded or dropped in access-list configuration mode. Use one of the these:

  • deny { source [ source-wildcard ] | host source | any } [ log ]
  • permit { source [ source-wildcard ] | host source | any } [ log ]

Example:

Device(config-std-nacl)# deny 192.168.0.0 0.0.255.255 255.255.0.0 0.0.255.255

or

Device(config-std-nacl)# permit 10.108.0.0 0.0.0.0 255.255.255.0 0.0.0.0
  • host source : A source and source wildcard of source 0.0.0.0.

  • any : A source and source wildcard of 0.0.0.0 255.255.255.255.

Step 5

Returns to privileged EXEC mode.

Example:

Device(config-std-nacl)# end

Step 6

Verify your entries.

Example:

Device# show running-config

Step 7

(Optional) Save your entries in the configuration file.

Example:

Device# copy running-config startup-config

Create extended named ACLs (GUI)

Follow these steps to filter traffic based on granular criteria, such as source/destination, protocol, or DSCP using the GUI.

Procedure


Step 1

Choose Configuration > Security > ACL.

Step 2

Click Add.

Step 3

In the Add ACL Setup window, enter these parameters.

  • ACL Name: Enter the name for the ACL.

  • ACL Type: IPv4 Extended.

  • Sequence: Enter the sequence number.

  • Action: Select Permit or Deny the packet flow from the drop-down list.

  • Source Type: Choose any, Host or Network from which the packet is sent.

  • Destination Type: Choose any, Host or Network to which the packet is sent.

  • Protocol: Select a protocol from the drop-down list.

  • Log: Enable or disable logging.

  • DSCP: Enter to match packets with the DSCP value.

Step 4

Click Add.

Step 5

Add the rest of the rules and click Apply to Device.


Create extended named ACLs (CLI)

Use this procedure to create extended named access control lists (ACLs) using CLI commands.

Procedure


Step 1

Enable the privileged EXEC mode and enter your password if prompted.

Example:

Device# enable

Step 2

Enter the global configuration mode.

Example:

Device# configure terminal

Step 3

Define an extended IPv4 access list using a name, and enter the access-list configuration mode.

Example:

Device(config)# ip access-list extended 150

The name can be a number from 100 to 199.

Step 4

Specify the conditions allowed or denied in access-list configuration mode { deny | permit } protocol { source [ source-wildcard ] | host source | any } { destination [ destination-wildcard ] | host destination | any } [ precedence precedence ] [ tostos ] [ log ] [ time-range time-range-name ]

Example:

Device(config-ext-nacl)# permit 0 any any

Use the log keyword to get access list logging messages, including violations.

  • host source : A source and source wildcard of source 0.0.0.0.

  • host destintation : A destination and destination wildcard of destination 0.0.0.0.

  • any : A source and source wildcard or destination and destination wildcard of 0.0.0.0 255.255.255.255.

Step 5

Return to the privileged EXEC mode.

Example:

Device(config-ext-nacl)# end

Step 6

Verifiy your entries.

Example:

Device# show running-config

Step 7

(Optional) Save your entries in the configuration file.

Example:

Device# copy running-config startup-config

When you create extended ACLs, an implicit deny statement is added by default at the end of the ACL. If no match occurs before reaching the end, all traffic is denied. For standard ACLs, omitting the mask from an IP host address access list specification causes the system to use 0.0.0.0 as the mask.

New entries are always placed at the end of the ACL after you create it. You cannot add ACL entries at specific positions within an ACL. However, you can remove entries from a named ACL using the no permit and no deny access-list configuration mode commands.

Being able to selectively remove lines from a named ACL is one reason you might use named ACLs instead of numbered ACLs.

What to do next

After you create a named ACL, apply it to interfaces or to VLANs .