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

Command to show interface and ip address in ACI

interfacedy
Spotlight
Spotlight

Hi What command can show interface status and its ip address? I got some ACI commands from Cisco website. but it cannot work. Please see the below

 

1.PNG

1 Accepted Solution

Accepted Solutions

RedNectar
VIP
VIP

Hi @interfacedy ,

Possibly the command you are looking for is 

apic1# show ip interface bridge-domain

But you may NOT get the result you are really looking for, because are querying the APIC - and the APIC is really just the database repository of what IP addresses are to be dynamically configured on the Leaf switches when required.  For instance:

apic1# show ip interface bridge-domain SharedServices_BD
----- IPv4 Bridge-Domain Information: -----
Tenant       : common
Interface    : SharedServices_BD
VRF Member   : SharedServices_VRF
IP Addresses : 10.200.0.1/24,secondary


IGMP Snooping Policy Info:
  IGMP Snooping Policy Name Applied : uni/tn-common/snPol-default
  Flags                             :
  Admin State                       : enabled
  Last Memeber Query Interval       : 1
  Query Interval                    : 125
  Query Max Response Time           : 10
  Start Query Count                 : 2
  Start Query Interval              : 31

Tells me that I have configured an IP address of 10.200.0.1/24 in the common Tenant, but doesn't tell me if the IP address has been pushed to any switch yet.  To determine that, I need to query each switch, and fortunately I can do that in a single command from the APIC.  I only have two leaves (2201 and 2202) and to restrict the output, I'll specify the common tenant's VRF that I know the IP address above is assigned to.

apic1# fabric 2201-2202 show ip interface vrf common:SharedServices_VRF
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------
IP Interface Status for VRF "common:SharedServices_VRF"
vlan83, Interface status: protocol-up/link-up/admin-up, iod: 127, mode: pervasive
  IP address: 10.200.0.1, IP subnet: 10.200.0.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0


----------------------------------------------------------------
 Node 2202 (Leaf2202)
----------------------------------------------------------------
Bad context entered

From the output above, I can now tell that the 10.200.0.1/24 IP address exists on leaf 2201, is up (protocol-up/link-up/admin-up) and has been allocated to vlan83 

I can also tell that it has NOT been pushed to Leaf2202 (even if the Bad context entered error message is a bit obscure - this is a hang-over from the days when VRFs were called contexts, so read the message as  Bad VRF entered - in other words the VRF I specified does not exist on Leaf2202.

Note that in ACI, IP addresses are NEVER allocated to ports unless creating a L3 ROUTER interface - just like when configuring a switch. So if you want to know which physical interfaces are in vlan83 on leaf 2201, then:

apic1# fabric 2201 show vlan id 83
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------

 VLAN Name                             Status    Ports
 ---- -------------------------------- --------- -------------------------------
 83   common:SharedServices_BD         active    Eth1/9

 VLAN Type  Vlan-mode
 ---- ----- ----------
 83   enet  CE

Note that it is quite possible for an IP address to exist on more than one switch, and in each case will be allocated a different internal VLAN.  In this example,  IP address 10.201.11.1/24 has been allocated to vlan27 on leaf2201 and vlan25 on leaf2202

apic1# fabric 2201-2202 show ip interface vrf Tenant01:Production_VRF
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------
IP Interface Status for VRF "Tenant01:Production_VRF"
vlan27, Interface status: protocol-up/link-up/admin-up, iod: 96, mode: pervasive
  IP address: 10.201.11.1, IP subnet: 10.201.11.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan34, Interface status: protocol-up/link-up/admin-up, iod: 95, mode: pervasive
  IP address: 10.201.12.1, IP subnet: 10.201.12.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan50, Interface status: protocol-up/link-up/admin-up, iod: 109, mode: external
  IP address: 10.201.1.201, IP subnet: 10.201.1.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
lo8, Interface status: protocol-up/link-up/admin-up, iod: 106, mode: unspecified
  IP address: 10.201.0.201, IP subnet: 10.201.0.201/32
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0


----------------------------------------------------------------
 Node 2202 (Leaf2202)
----------------------------------------------------------------
IP Interface Status for VRF "Tenant01:Production_VRF"
eth1/10.37, Interface status: protocol-up/link-up/admin-up, iod: 104, mode: external
  IP address: 10.201.3.202, IP subnet: 10.201.3.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan25, Interface status: protocol-up/link-up/admin-up, iod: 100, mode: pervasive
  IP address: 10.201.11.1, IP subnet: 10.201.11.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan33, Interface status: protocol-up/link-up/admin-up, iod: 101, mode: pervasive
  IP address: 10.201.12.1, IP subnet: 10.201.12.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
lo2, Interface status: protocol-up/link-up/admin-up, iod: 102, mode: unspecified
  IP address: 10.201.0.202, IP subnet: 10.201.0.202/32
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0

 Note also in the example above a case where are L3 address has been allocated to a port - interface eth1/10.37 which has been configured in a L3Out.  Similarly, the IP addresses assigned to the loopback interfaces were also configured in the L3Out.

 

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.

View solution in original post

2 Replies 2

RedNectar
VIP
VIP

Hi @interfacedy ,

Possibly the command you are looking for is 

apic1# show ip interface bridge-domain

But you may NOT get the result you are really looking for, because are querying the APIC - and the APIC is really just the database repository of what IP addresses are to be dynamically configured on the Leaf switches when required.  For instance:

apic1# show ip interface bridge-domain SharedServices_BD
----- IPv4 Bridge-Domain Information: -----
Tenant       : common
Interface    : SharedServices_BD
VRF Member   : SharedServices_VRF
IP Addresses : 10.200.0.1/24,secondary


IGMP Snooping Policy Info:
  IGMP Snooping Policy Name Applied : uni/tn-common/snPol-default
  Flags                             :
  Admin State                       : enabled
  Last Memeber Query Interval       : 1
  Query Interval                    : 125
  Query Max Response Time           : 10
  Start Query Count                 : 2
  Start Query Interval              : 31

Tells me that I have configured an IP address of 10.200.0.1/24 in the common Tenant, but doesn't tell me if the IP address has been pushed to any switch yet.  To determine that, I need to query each switch, and fortunately I can do that in a single command from the APIC.  I only have two leaves (2201 and 2202) and to restrict the output, I'll specify the common tenant's VRF that I know the IP address above is assigned to.

apic1# fabric 2201-2202 show ip interface vrf common:SharedServices_VRF
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------
IP Interface Status for VRF "common:SharedServices_VRF"
vlan83, Interface status: protocol-up/link-up/admin-up, iod: 127, mode: pervasive
  IP address: 10.200.0.1, IP subnet: 10.200.0.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0


----------------------------------------------------------------
 Node 2202 (Leaf2202)
----------------------------------------------------------------
Bad context entered

From the output above, I can now tell that the 10.200.0.1/24 IP address exists on leaf 2201, is up (protocol-up/link-up/admin-up) and has been allocated to vlan83 

I can also tell that it has NOT been pushed to Leaf2202 (even if the Bad context entered error message is a bit obscure - this is a hang-over from the days when VRFs were called contexts, so read the message as  Bad VRF entered - in other words the VRF I specified does not exist on Leaf2202.

Note that in ACI, IP addresses are NEVER allocated to ports unless creating a L3 ROUTER interface - just like when configuring a switch. So if you want to know which physical interfaces are in vlan83 on leaf 2201, then:

apic1# fabric 2201 show vlan id 83
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------

 VLAN Name                             Status    Ports
 ---- -------------------------------- --------- -------------------------------
 83   common:SharedServices_BD         active    Eth1/9

 VLAN Type  Vlan-mode
 ---- ----- ----------
 83   enet  CE

Note that it is quite possible for an IP address to exist on more than one switch, and in each case will be allocated a different internal VLAN.  In this example,  IP address 10.201.11.1/24 has been allocated to vlan27 on leaf2201 and vlan25 on leaf2202

apic1# fabric 2201-2202 show ip interface vrf Tenant01:Production_VRF
----------------------------------------------------------------
 Node 2201 (Leaf2201)
----------------------------------------------------------------
IP Interface Status for VRF "Tenant01:Production_VRF"
vlan27, Interface status: protocol-up/link-up/admin-up, iod: 96, mode: pervasive
  IP address: 10.201.11.1, IP subnet: 10.201.11.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan34, Interface status: protocol-up/link-up/admin-up, iod: 95, mode: pervasive
  IP address: 10.201.12.1, IP subnet: 10.201.12.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan50, Interface status: protocol-up/link-up/admin-up, iod: 109, mode: external
  IP address: 10.201.1.201, IP subnet: 10.201.1.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
lo8, Interface status: protocol-up/link-up/admin-up, iod: 106, mode: unspecified
  IP address: 10.201.0.201, IP subnet: 10.201.0.201/32
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0


----------------------------------------------------------------
 Node 2202 (Leaf2202)
----------------------------------------------------------------
IP Interface Status for VRF "Tenant01:Production_VRF"
eth1/10.37, Interface status: protocol-up/link-up/admin-up, iod: 104, mode: external
  IP address: 10.201.3.202, IP subnet: 10.201.3.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan25, Interface status: protocol-up/link-up/admin-up, iod: 100, mode: pervasive
  IP address: 10.201.11.1, IP subnet: 10.201.11.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
vlan33, Interface status: protocol-up/link-up/admin-up, iod: 101, mode: pervasive
  IP address: 10.201.12.1, IP subnet: 10.201.12.0/24
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0
lo2, Interface status: protocol-up/link-up/admin-up, iod: 102, mode: unspecified
  IP address: 10.201.0.202, IP subnet: 10.201.0.202/32
  IP broadcast address: 255.255.255.255
  IP primary address route-preference: 0, tag: 0

 Note also in the example above a case where are L3 address has been allocated to a port - interface eth1/10.37 which has been configured in a L3Out.  Similarly, the IP addresses assigned to the loopback interfaces were also configured in the L3Out.

 

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.

interfacedy
Spotlight
Spotlight

Thank you RedNectar for your reply! 

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