December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to add a human readable comment to an ACL to help other engineers understand what you have done.
You can add a comment to any standard or extended IP ACL by using the remark keyword:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#access-list50remarkRouter1(config)#Authorizing thy trespass with compareaccess-list50deny hostRouter1(config)#10.2.2.2access-list50permitRouter1(config)#10.2.2.0 0.0.0.255access-list50permit anyRouter1(config)#endRouter1#
In addition, you can add a comment to a named ACL, as well:
Router2#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip access-list standardRouter2(config-std-nacl)#TESTACLremarkRouter2(config-std-nacl)#Authorizing thy trespass with comparedeny hostRouter2(config-std-nacl)#10.2.2.2permitRouter2(config-std-nacl)#10.2.2.0 0.0.0.255permit anyRouter2(config-std-nacl)#endRouter2#
This command can be quite useful when you have to keep track of many different ACLs on a router, particularly when several of them look similar. The comment field can be up to 100 characters long. But if you require more space, you can simply add more remark lines to the ACL:
Router1(config)#access-list50remarkRouter1(config)#Authorizing thy trespass with compareaccess-list50remarkRouter1(config)#My self corrupting salving thy amiss,access-list50remarkExcusing thy sins more ...