2

Let's say I have a access-list 1 with 5 permits. And I would like to delete the third permit listing. I know that I can simply do "no 30"

However, can I confirm that I can no access-list 1 permit host 192.168.1.1 command in global configuration mode. Or no access-list 1 global configuration command, and then re-enter the other 4 access-list?

3
  • Check out "ip access list expanded ..." - this will allow you to delete individual lines as well as insert new ones and re-sequence. – rnxrx Oct 9 '17 at 20:56
  • Please let me know if my answer below is helpful and correct? – Hung Tran Oct 14 '17 at 9:14
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 19:36
3

As you know how to remove a single line from the ACL (using no sequence_number form), I would focus on your two commands:

  • no access-list 1 permit host 192.168.1.1 command indeed deletes your ENTIRE ACL, thus NEVER use this kind of command.
  • no access-list 1 command obviously deletes your ENTIRE ACL, you then re-apply other 4 lines, thus it is technically correct, but remember to remove the ACL from an interface before removing or adding the ACL.

And always remember to remove the ACL from an interface before removing or adding the ACL.

2
  • I have doubts on "no access-list 1 permit host 192.168.1.1 command indeed deletes your ENTIRE ACL, thus NEVER use this kind of command." Do remember this is global configuration mode...and shouldnt only that particular line belonging to list 1 gets deleted??????? – user2947950 Oct 9 '17 at 23:10
  • 1
    @user2947950 It will delete the whole access-list 1, please read here for further information. To clear your doubts, the best way is to give it a try on GNS3 or on a redundant/backup/non-production router. And as I said before, always remove the ACL from an interface before removing or adding the ACL. – Hung Tran Oct 10 '17 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.