![]() |
Security Configuration Guide: Access Control Lists, Cisco IOS XE Release 3S (Cisco ASR 1000)
|
||||||||||||
IP Access List Entry Sequence Numbering
![]() |
|||||||||||||
|
Contents
IP Access List Entry Sequence NumberingLast Updated: August 22, 2012
The IP Access List Entry Sequence Numbering feature allows you to apply sequence numbers to permit or deny statements as well as reorder, add, or remove such statements from a named IP access list. The IP Access List Entry Sequence Numbering feature makes revising IP access lists much easier. Prior to this feature, you could add access list entries to the end of an access list only; therefore, needing to add statements anywhere except at the end of a named IP access list required reconfiguring the entire access list.
Finding Feature InformationYour 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. Restrictions for IP Access List Entry Sequence Numbering
Information About IP Access List Entry Sequence Numbering
Purpose of IP Access ListsAccess lists perform packet filtering to control which packets move through the network and where. Such control can help limit network traffic and restrict the access of users and devices to the network. Access lists have many uses, and therefore many commands accept a reference to an access list in their command syntax. Access lists can be used to do the following:
How an IP Access List WorksAn access list is a sequential list consisting of a permit statement and a deny statement that apply to IP addresses and possibly upper-layer IP protocols. The access list has a name by which it is referenced. Many software commands accept an access list as part of their syntax. An access list can be configured and named, but it is not in effect until the access list is referenced by a command that accepts an access list. Multiple commands can reference the same access list. An access list can control traffic arriving at the device or leaving the device, but not traffic originating at the device. IP Access List Process and Rules
Helpful Hints for Creating IP Access Lists
Source and Destination AddressesSource and destination address fields in an IP packet are two typical fields on which to base an access list. Specify source addresses to control the packets being sent from certain networking devices or hosts. Specify destination addresses to control the packets being sent to certain networking devices or hosts. Wildcard Mask and Implicit Wildcard MaskWhen comparing the address bits in an access list entry to a packet being submitted to the access list, address filtering uses wildcard masking to determine whether to check or ignore the corresponding IP address bits. By carefully setting wildcard masks, an administrator can select one or more IP addresses for permit or deny tests. Wildcard masking for IP address bits uses the number 1 and the number 0 to specify how the software treats the corresponding IP address bits. A wildcard mask is sometimes referred to as an inverted mask because a 1 and 0 mean the opposite of what they mean in a subnet (network) mask.
If you do not supply a wildcard mask with a source or destination address in an access list statement, the software assumes a default wildcard mask of 0.0.0.0. Unlike subnet masks, which require contiguous bits indicating network and subnet to be ones, wildcard masks allow noncontiguous bits in the mask. Transport Layer InformationYou can filter packets based on transport layer information, such as whether the packet is a TCP, UDP, Internet Control Message Protocol (ICMP) or Internet Group Management Protocol (IGMP) packet. Benefits IP Access List Entry Sequence NumberingThe ability to apply sequence numbers to IP access list entries simplifies access list changes. Prior to the IP Access List Entry Sequence Numbering feature, there was no way to specify the position of an entry within an access list. If you wanted to insert an entry (statement) in the middle of an existing list, all of the entries after the desired position had to be removed. Then, once you added the new entry, you needed to reenter all of the entries you removed earlier. This method was cumbersome and error prone. The IP Access List Entry Sequence Numbering feature allows you to add sequence numbers to access list entries and resequence them. When you add a new entry, you can choose the sequence number so that the entry is in a desired position in the access list. If necessary, entries currently in the access list can be resequenced (reordered) to create room to insert the new entry. Sequence Numbering Behavior
Exceeded maximum sequence number.
Duplicate sequence number.
How to Use Sequence Numbers in an IP Access ListSequencing Access-List Entries and Revising the Access ListThis task shows how to assign sequence numbers to entries in a named IP access list and how to add or delete an entry to or from an access list. When completing this task, keep the following points in mind:
DETAILED STEPS ExamplesReview the output of the show ip access-lists command to see that the access list includes the new entries:
Device# show ip access-lists kmd1
Standard IP access list kmd1
100 permit 10.4.4.0, wildcard bits 0.0.0.255
105 permit 10.5.5.0, wildcard bits 0.0.0.255
115 permit 10.0.0.0, wildcard bits 0.0.0.255
130 permit 10.5.5.0, wildcard bits 0.0.0.255
145 permit 10.0.0.0, wildcard bits 0.0.0.255
Configuration Examples for IP Access List Entry Sequence Numbering
Example: Resequencing Entries in an Access ListThe following example shows access list resequencing. The starting value is 1, and increment value is 2. The subsequent entries are ordered based on the increment values specified, and the range is from 1 to 2147483647. When an entry with no sequence number is entered, by default the entry has a sequence number of 10 more than the last entry in the access list. Device# show access-list 150 Extended IP access list 150 10 permit ip host 10.3.3.3 host 172.16.5.34 20 permit icmp any any 30 permit tcp any host 10.3.3.3 40 permit ip host 10.4.4.4 any 50 Dynamic test permit ip any any 60 permit ip host 172.16.2.2 host 10.3.3.12 70 permit ip host 10.3.3.3 any log 80 permit tcp host 10.3.3.3 host 10.1.2.2 90 permit ip host 10.3.3.3 any 100 permit ip any any Device(config)# ip access-list extended 150 Device(config)# ip access-list resequence 150 1 2 Device(config)# exit Device# show access-list 150 Extended IP access list 150 1 permit ip host 10.3.3.3 host 172.16.5.34 3 permit icmp any any 5 permit tcp any host 10.3.3.3 7 permit ip host 10.4.4.4 any 9 Dynamic test permit ip any any 11 permit ip host 172.16.2.2 host 10.3.3.12 13 permit ip host 10.3.3.3 any log 15 permit tcp host 10.3.3.3 host 10.1.2.2 17 permit ip host 10.3.3.3 any 19 permit ip any any Example: Adding Entries with Sequence NumbersIn the following example, an new entry is added to a specified access list: Device# show ip access-list Standard IP access list tryon 2 permit 10.4.4.2, wildcard bits 0.0.255.255 5 permit 10.0.0.44, wildcard bits 0.0.0.255 10 permit 10.0.0.1, wildcard bits 0.0.0.255 20 permit 10.0.0.2, wildcard bits 0.0.0.255 Device(config)# ip access-list standard tryon Device(config-std-nacl)# 15 permit 10.5.5.5 0.0.0.255 Device(config-std-nacl)# exit Device(config)# exit Device# show ip access-list Standard IP access list tryon 2 permit 10.4.0.0, wildcard bits 0.0.255.255 5 permit 10.0.0.0, wildcard bits 0.0.0.255 10 permit 10.0.0.0, wildcard bits 0.0.0.255 15 permit 10.5.5.0, wildcard bits 0.0.0.255 20 permit 10.0.0.0, wildcard bits 0.0.0.255 Example: Entry Without Sequence NumberThe following example shows how an entry with no specified sequence number is added to the end of an access list. When an entry is added without a sequence number, it is automatically given a sequence number that puts it at the end of the access list. Because the default increment is 10, the entry will have a sequence number 10 higher than the last entry in the existing access list. Device(config)# ip access-list standard 1 Device(config-std-nacl)# permit 10.1.1.1 0.0.0.255 Device(config-std-nacl)# permit 10.2.2.2 0.0.0.255 Device(config-std-nacl)# permit 10.3.3.3 0.0.0.255 Device(config-std-nacl)## exit Device# show access-list Standard IP access list 1 10 permit 0.0.0.0, wildcard bits 0.0.0.255 20 permit 0.0.0.0, wildcard bits 0.0.0.255 30 permit 0.0.0.0, wildcard bits 0.0.0.255 Device(config)# ip access-list standard 1 Device(config-std-nacl)# permit 10.4.4.4 0.0.0.255 Device(config-std-nacl)# end Device(config-std-nacl)## exit Device# show access-list Standard IP access list 1 10 permit 0.0.0.0, wildcard bits 0.0.0.255 20 permit 0.0.0.0, wildcard bits 0.0.0.255 30 permit 0.0.0.0, wildcard bits 0.0.0.255 40 permit 0.0.0.0, wildcard bits 0.0.0.255 Additional ReferencesRelated DocumentsTechnical Assistance
Feature Information for IP Access List Entry Sequence NumberingThe 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.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2012 Cisco Systems, Inc. All rights reserved.
|
||||||||||||
|
|