02-07-2019 12:46 PM - edited 02-21-2020 08:46 AM
Hello all,
I'm new to writing with Cisco devices and having some trouble. I'm working with an ASA version 9.4(4)20 Device Manager Version 7.1(3).
Ok so I'm struggling to search if IP address exists in an object group and at and fine see what else is on that group at a glance. I know the command
show run object-group | inc object-group network
gives me then all; however, I tried to add another pipe to include the IP address I wanted and didn't get what I need
show run object-group | inc object-group network | inc X.X.X.X
I also know that using
show run object-group id ABCD
Will list out the contents of that object group, which is also what I need. Is there some way to search for what object-group IP address is part of (if any) and display the lines underneath that group that contains it? Apologies if format is funky I'm mobile.
Thanks,
Steve
02-07-2019 01:44 PM
just skip the second "include" in your command:
show run object-group | include object-group|192.0.2.0
The second "|" is the local "or" here.
02-12-2019 09:28 AM
thanks for the swift response. I attempted the information provided; however, I am getting results of just the line with object-group. I see the service object groups included as well and see network ones that I know don't include this IP address. To clarify in case I may have been unclear and apologies my desired output is something along the lines of this:
object-group network ABCD
network-object host(or for a subnet) X.X.X.X
If there are other hosts in that object group it would be nice to see those too but not completely necessary. I was also looking at regex but I am having trouble learning that and if that even applies?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide