cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
348
Views
1
Helpful
1
Replies

how to use “include" in ACI cli show commands?

Herman2018
Level 3
Level 3

Hi, I want to use the following command to find out the bridge domain name based on end point IP address, but encounter the syntax error. 

show tenant MyTenant ip interface bridge-domain | include 10.0.1.1 

Don't know how to use the option "include". 

Tried the command "show contract <contract-name> | include fvAp " , also failed with syntax error. 

Can someone please advise, thanks in advance!

1 Reply 1

RedNectar
VIP Alumni
VIP Alumni

Hi @Herman2018 ,

The ACI CLI is based on linux, so you use grep or egrep instead of include.  The command you may want is:

apic1# show tenant MyTenant ip interface bridge-domain | grep 10.0.1.1

For which the expected output is totally useless:

apic1# show tenant MyTenant ip interface bridge-domain | grep 10.0.1.1
IP Addresses : 10.0.1.1/24

You can manipulate grep of course <Here I exit ACI lesson and start Linux class>

apic1# show tenant MyTenant ip interface bridge-domain | grep -B3 10.0.1.1
Tenant : MyTenant
Interface : MyBD
VRF Member : MyVRF
IP Addresses : 10.0.1.1/24

But of course, it depends what you are looking for - if for instance you wanted to know which leaf switches had instantiated that IP, you might use (if your leaf switches were numbered 1201 through to 1202 like my lab):

apic1# fabric 1201-1202 show ip interface 10.0.1.1
----------------------------------------------------------------
 Node 1201 (Leaf1201)
----------------------------------------------------------------
IP Interface Status for VRF "MyTenant:MyVRF"
vlan14, Interface status: protocol-up/link-up/admin-up, iod: 141, mode: pervasive
  IP address: 10.0.1.1, IP subnet: 10.0.1.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0


----------------------------------------------------------------
 Node 1202 (Leaf1202)
----------------------------------------------------------------
10.0.1.1 is not a locally assigned IP address

which tells you that the IP exists on Leaf1201, but NOT on Leaf1202

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License