cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1046
Views
0
Helpful
2
Replies

Searching for ip address in object-group

smatta
Level 1
Level 1

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

 

2 Replies 2

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.

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?

Review Cisco Networking for a $25 gift card