1

For example, if I do a sh access-list

Lets say I have a rule on line 2 that has one object-group to another object-group connected on X ports. Well, there may be 30 lines below that, that all say line 2 and shows the specific details of each individual ip from the first group to the second group.

How do I only show that first main rule and is this even possible? The first one with the group info only, not the drilled down detailed info. I want to do this for the whole access list however. Basically... show me all the main rules in an access-list with line numbers. This would make it easier to find rules to remove or add remarks to.

Any help would be much appreciated! Hopefully I explained it well.

access-list INNERin line 2 extended permit tcp object-group Group1 object-group Group2 object-group Group-Ports-TCP

access-list INNERin line2 extended permit tcp 192.168.1.1 255.255.255.0 192.168.2.1 255.255.255.0 eq 443

access-list INNERin line2 extended permit tcp 192.168.1.1 255.255.255.0 192.168.2.1 255.255.255.0 eq 80

access-list INNERin line2 extended permit tcp 192.168.3.1 255.255.255.0 192.168.2.1 255.255.255.0 eq 443

access-list INNERin line2 extended permit tcp 192.168.3.1 255.255.255.0 192.168.2.1 255.255.255.0 eq 80

etc
Patrick
  • 401
  • 3
  • 5
  • 15

1 Answers1

1

show access-list INNERin | exclude ^[ ]

Exclude lines which start with a space.

The square brackets are not really necessary, as long as you have a space after the "^". You can also abbreviate "exclude" as "e".