簡介
本文檔介紹在ACI上啟用域驗證功能時,從枝葉交換機的APIC CLI刪除所有靜態埠繫結所產生的影響。
必要條件
基本瞭解以應用為中心的基礎設施(ACI)配置和域驗證功能。
有關ACI中的域驗證功能的詳細資訊,請訪問:
https://www.cisco.com/c/en/us/support/docs/software/aci-data-center/221206-understand-aci-enforce-domain-validation.html#:~:text=13%201%2C19-,Enforce%20Domain%20Validation%3A%20Enabled,NOT%20programmed%20on%20the%20interface。
設定和拓撲
在此設定中,您將使用兩種不同的方法對ACI枝葉交換機介面上的Vlan進行程式設計
- 連線到Leaf01埠介面策略組(IPG)的可連線訪問實體配置檔案(AAEP)已配置了終端策略組(EPG)對映。
- 連線到Leaf04埠IPG的AAEP沒有任何EPG對映,但透過CLI執行「靜態埠繫結」以推送Vlan。
兩片枝葉- 01和04 ,
型號:N9K-C93180YC-FX
- IPG策略:ipg_1
- aaep1(用於枝葉01)
- 支援系統cdp
- 系統lldp
- IPG策略:ipg_2
- aaep_static(用於Leaf04)
- 支援系統cdp
- 系統lldp
- 枝葉介面選擇器:Leaf_101_interface_profile
- 枝葉介面選擇器:Leaf_104_interface_profile
- 租戶:abc-tn,應用配置檔案:abc-ap,EPG:epg-1,BD:bd-1
- 物理域:abc-dom,Vlan池:靜態:abc-vlan-pool(150-152)

個案研究
在本實驗中,您將觀察從NXOS® CLI刪除靜態埠繫結的影響。本文檔中的行為將顯示為「當您從NXOS® CLI(僅CLI)刪除所有靜態埠對映時,APIC將從EPG中刪除物理域」。根據當前CLI設計,在刪除最後一個靜態埠時,會清除物理域與EPG之間的關聯。這是為了在某些情況下維持最佳組態並避免重疊vlan。這與透過GUI/API完成的配置無關。
此行為僅會影響ACI交換矩陣,因為配置設計涉及在同一EPG下混合部署靜態埠附件和EPG到AEP關聯,這種情況並不常見。
如果物理域從EPG中刪除,並且交換矩陣中啟用了域驗證功能,APIC將從EPG介面中刪除所有vlan。
此問題已在思科漏洞ID CSCwj74262 對CLI配置下有關配置清理的當前預期行為的更改中解決)
涉及的步驟
步驟 1.確定已啟用網域驗證。
apic1# moquery -c infraSetPol | egrep "domainValidation"
domainValidation : yes
如果在此場景中停用了域驗證,則不會造成任何影響,即從EPG中刪除物理域關聯,而且這不會導致從枝葉介面刪除VLAN。
步驟2.由於AAEP到EPG的對映,在枝葉101上對VLAN進行了程式設計。
apic1# fabric 101 show vlan encap-id 151
----------------------------------------------------------------
Node 101 (bgl-aci07-leaf01)
----------------------------------------------------------------
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
14 abc-tn:abc-ap:epg-1 active Eth1/8, Eth1/9
VLAN Type Vlan-mode
---- ----- ----------
14 enet CE
步驟3.未對枝葉104程式設計VLAN,因為未完成靜態對映。
apic1# fabric 104 show vlan encap-id 151
----------------------------------------------------------------
Node 104 (leaf04)
----------------------------------------------------------------
++ No vlan programmed
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
VLAN Type Vlan-mode
---- ----- ----------
步驟3.從APIC CLI對枝葉104執行NXOS®樣式配置
apic1(config)# leaf 104
apic1(config-leaf)# interface eth 1/8-9
apic1(config-leaf-if)# switchport trunk allowed vlan 151 tenant abc-tn application abc-ap epg epg-1 <<== add static path binding
步驟4.在APIC fvIfConn MO上驗證
apic1# moquery -c fvIfConn | grep dn | grep abc
dn : uni/epp/fv-[uni/tn-abc-tn/ap-abc-ap/epg-epg-1]/node-101/attEntitypathatt-[abc-aaep]/conndef/conn-[vlan-151]-[0.0.0.0] <<<=== MO created due to EPG to AAEP Mapping
dn : uni/epp/fv-[uni/tn-abc-tn/ap-abc-ap/epg-epg-1]/node-104/stpathatt-[eth1/8]/conndef/conn-[vlan-151]-[0.0.0.0] <<<==== MO created due to static port binding in step 3
dn : uni/epp/fv-[uni/tn-abc-tn/ap-abc-ap/epg-epg-1]/node-104/stpathatt-[eth1/9]/conndef/conn-[vlan-151]-[0.0.0.0]
步驟5.已從節點104刪除配置
apic1(config-leaf)# interface eth 1/8-9
apic1(config-leaf-if)# no switchport trunk allowed vlan 151 tenant abc-tn application abc-ap epg epg-1 <<== Delete static path binding
apic1(config-leaf-if)#
步驟6.由於透過CLI刪除配置時在後端觸發的清除指令碼,已刪除域。

步驟7.由於強制驗證功能,已刪除VLAN程式設計(由於域未與EPG關聯,因此VLAN不會被程式設計)
apic1# fabric 101 show vlan encap-id 151
----------------------------------------------------------------
Node 101 (leaf01)
----------------------------------------------------------------
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
++ vlan got removed
VLAN Type Vlan-mode
---- ----- ----------