- ACL Support for Filtering IP Options
- ACL Syslog Correlation
- Commented IP Access List Entries
- Configuring an FQDN ACL
- Creating an IP Access List to Filter TCP Flags
- IPv6 ACL Extensions for Hop by Hop Filtering
- IP Access List Entry Sequence Numbering
- IP Named Access Control Lists
- IPv6 PACL Support
- Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Finding Feature Information
- Prerequisites for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Information About Named ACL Support for Noncontiguous Ports on an Access Control Entry
- How to Configure Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Configuration Examples for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Additional References for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Feature Information for Named ACL Support for Noncontiguous Ports on an Access Control Entry
Named ACL Support for Noncontiguous Ports on an Access Control Entry
The Named ACL Support for Noncontiguous Ports on an Access Control Entry feature allows you to specify noncontiguous ports in a single access control entry, which greatly reduces the number of entries required in an access control list when several entries have the same source address, destination address, and protocol, but differ only in the ports.
- Finding Feature Information
- Prerequisites for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Information About Named ACL Support for Noncontiguous Ports on an Access Control Entry
- How to Configure Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Configuration Examples for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Additional References for Named ACL Support for Noncontiguous Ports on an Access Control Entry
- Feature Information for Named ACL Support for Noncontiguous Ports on an Access Control Entry
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Named ACL Support for Noncontiguous Ports on an Access Control Entry
Information About Named ACL Support for Noncontiguous Ports on an Access Control Entry
Benefits of Using the Named ACL Support for Noncontiguous Ports on an Access Control Entry Feature
This feature greatly reduces the number of access control entries (ACEs) required in an access control list to handle multiple entries for the same source address, destination address, and protocol. If you maintain large numbers of ACEs, use this feature to consolidate existing groups of access list entries wherever it is possible and when you create new access list entries. When you configure access list entries with noncontiguous ports, you will have fewer access list entries to maintain.
How to Configure Named ACL Support for Noncontiguous Ports on an Access Control Entry
Configuring an Access Control Entry with Noncontiguous Ports
Perform this task to create access list entries that use noncontiguous TCP or UDP port numbers. Although this task uses TCP ports, you could use the UDP syntax of the permit and deny commands to filter noncontiguous UDP ports.
Although this task uses a permit command first, use the permit and deny commands in the order that achieves your filtering goals.
Note | The ACL—Named ACL Support for Noncontiguous Ports on an Access Control Entry feature can be used only with named, extended ACLs. |
1.
enable
2.
configure
terminal
3.
ip
access-list
extended
access-list-name
4. [sequence-number] permit tcp source source-wildcard [operator port [port]] destination destination-wildcard [operator [port]] [established {match-any | match-all} {+ | -} flag-name] [precedence precedence] [tos tos] [log] [time-range time-range-name] [fragments]
5. [sequence-number] deny tcp source source-wildcard [operator port [port]] destination destination-wildcard [operator [port]] [established {match-any | match-all} {+ | -} flag-name] [precedence precedence] [tos tos] [log] [time-range time-range-name] [fragments]
6. Repeat Step 4 or Step 5 as necessary, adding statements by sequence number where you planned. Use the no sequence-number command to delete an entry.
7.
end
8.
show
ip
access-lists
access-list-name
DETAILED STEPS
Consolidating Access List Entries with Noncontiguous Ports into One Access List Entry
Perform this task to consolidate a group of access list entries with noncontiguous ports into one access list entry.
Although this task uses TCP ports, you could use the UDP syntax of the permit and deny commands to filter noncontiguous UDP ports.
Although this task uses a permit command first, use the permit and deny commands in the order that achieves your filtering goals.
1.
enable
2.
show
ip
access-lists
access-list-name
3.
configure
terminal
4.
ip
access-list
extended
access-list-name
5.
no
[sequence-number]
permit
protocol
source
source-wildcard
destination
destination-wildcard[option
option-name] [precedence
precedence][tos
tos] [log] [time-range
time-range-name] [fragments]
6. [sequence-number] permit protocol source source-wildcard[operator port[port]] destination destination-wildcard[operator port[port]] [option option-name] [precedence precedence][tos tos] [log] [time-range time-range-name] [fragments]
7. Repeat Steps 5 and 6 as necessary, adding permit or deny statements to consolidate access list entries where possible. Use the no sequence-number command to delete an entry.
8.
end
9.
show
ip
access-lists
access-list-name
DETAILED STEPS
Configuration Examples for Named ACL Support for Noncontiguous Ports on an Access Control Entry
Example: Creating an Access List Entry with Noncontiguous Ports
The following access list entry can be created because up to ten ports can be entered after the eq and neq operators:
ip access-list extended aaa permit tcp any eq telnet ftp any eq 23 45 34 end
Enter the show access-lists command to display the newly created access list entry.
Device# show access-lists aaa Extended IP access list aaa 10 permit tcp any eq telnet ftp any eq 23 45 34
Example: Consolidating Some Existing Access List Entries into One Access List Entry with Noncontiguous Ports
The show access-lists command is used to display a group of access list entries for the access list named abc:
Device# show access-lists abc Extended IP access list abc 10 permit tcp any eq telnet any eq 450 20 permit tcp any eq telnet any eq 679 30 permit tcp any eq ftp any eq 450 40 permit tcp any eq ftp any eq 679
Because the entries are all for the same permit statement and simply show different ports, they can be consolidated into one new access list entry. The following example shows the removal of the redundant access list entries and the creation of a new access list entry that consolidates the previously displayed group of access list entries:
ip access-list extended abc no 10 no 20 no 30 no 40 permit tcp any eq telnet ftp any eq 450 679 end
When the show access-lists command is reentered, the consolidated access list entry is displayed:
Device# show access-lists abc Extended IP access list abc 10 permit tcp any eq telnet ftp any eq 450 679
Additional References for Named ACL Support for Noncontiguous Ports on an Access Control Entry
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Security commands |
|
Overview information about access lists |
"IP Access List Overview" |
Standards/RFCs |
Title |
---|---|
RFC 791 |
Internet Protocol |
RFC 793 |
Transmission Control Protocol |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for Named ACL Support for Noncontiguous Ports on an Access Control Entry
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
Named ACL Support for Noncontiguous Ports on an Access Control Entry |
Cisco IOS 15.2(2)E |
The Named ACL Support for Noncontiguous Ports on an Access Control Entry feature allows you to specify noncontiguous ports in a single access control entry, which greatly reduces the number of entries required in an access control list when several entries have the same source address, destination address, and protocol, but differ only in the ports. |