3-3
Cisco CRS-1 Series Carrier Routing System Getting Started Guide
Chapter 3 CLI Tips, Techniques, and Shortcuts
CLI Tips and Shortcuts
The following example adds an entry to access list 99. The added entry denies access to all hosts on
subnet 172.0.0.0and ignores bits for IPv4 addresses that start within the range of 0 to 255. The following
steps provide an example of on-screen command help:
Step 1 Enter the access-list command, followed by a space and a question mark, to list the available options for
the command:
RP/0/RP0/CPU0:router(config)# access-list ?
<1-199> IP Access list
<1300-2699> IP Access list
Note The number ranges (within the angle brackets) are inclusive ranges.
Step 2 Enter the access list number 99, followed by a space and another question mark, to display the arguments
that apply to the keyword and brief explanations:
RP/0/RP0/CPU0:router(config)# access-list 99 ?
<1-2147483647> Sequence number for this entry
deny Specifies packets to reject
permit Specifies packets to forward
remark Comment for access list
<cr>
RP/0/RP0/CPU0:router(config)# access-list 99 deny ?
A.B.C.D Address to match
Step 3 Generally, uppercase letters represent variables (arguments). Enter the IP address, followed by a space
and a question mark (?), to list additional options:
RP/0/RP0/CPU0:router(config)# access-list 99 deny 172.31.134.0 ?
A.B.C.D Mask of bits to ignore
<cr>
In this output, A.B.C.D indicates that use of a mask is allowed. The mask is a method for matching IP
addresses or ranges of IP addresses.
For example, a mask of 255.0.0.0 matches any number in the range from 0 to 255 that appears in the first
octet of an IP address. Enter the mask, followed by a space and a question mark (?) to list further options.
RP/0/RP0/CPU0:router(config)# access-list 99 deny 172.31.134.0 255.0.0.0 ?
<cr>
Step 4 The <cr> symbol by itself indicates that there are no more keywords or arguments. Press Return to
execute the command:
RP/0/RP0/CPU0:router(config)# access-list 99 deny 172.31.134.0 255.0.0.0
Note The configuration does not become active until you enter the commit command to add the target
configuration to the running configuration.