簡介
本文檔介紹在枝葉上標識隱式合約(如覆蓋規則)的准則。
必要條件
需求
採用元件
本文件所述內容不限於特定軟體和硬體版本。
使用的裝置:
- 運行版本5.3(2)的Cisco ACI
- ELAM助理/CLI ELAM
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
pcTag是一個數字ID,用於在ACI中表示終端策略組(EPG)。分配給源EPG的pcTag稱為SCLASS,而分配給目標EPG的pcTag稱為DCLASS。
Shared services Consumer使用保留的PcTag 14。
系統 — 這些是範圍1-15的內部系統標籤。
全域性 — 範圍16-16385保留供全域性使用。
Drop EPG使用保留的PcTag 13。
Shared services Consumer使用保留的PcTag 14。
帶0.0.0.0/0的l3out使用保留的PcTag 15。
本地 — pcTag的預設範圍是VRF的本地範圍,可以跨VRF重複使用。其值範圍為16386-65535。
解決合約的步驟
ELAM用於這些方案。這些命令用於CLI ELAM並可用作參考:
vsh_lc
debug platform internal elam asic
trigger reset
trigger init in-select out-select 0
set outer ipv4 src_ip dst_ip < destination ip address>
start
status
步驟1. ELAM觸發器
首先,從ELAM收集幾個方面:源類11060、目標類14和統計資訊索引:51983.
對於provider中的shared services > consumer subnet,使用類id 14。
這用於具有無法與這些子網通訊的本地類的提供程式VRF中的EPG。
IP Protocol : ICMP( 0x1 )
L4 Src Port : 2048( 0x800 )
L4 Dst Port : 56951( 0xDE77 )
sclass (src pcTag) : 11060( 0x2B34 )
dclass (dst pcTag) : 14( 0xE )
------------------------------------------------------------------------------------------------------------------------------------------------------
Contract Result
------------------------------------------------------------------------------------------------------------------------------------------------------
Contract Drop : no
Contract Logging : no
Contract Applied : no
Contract Hit : yes
Contract Aclqos Stats Index : 51983
( show sys int aclqos zoning-rules | grep -B 9 "Idx: 51983 )
步驟2.基於硬體規則匹配的分割槽規則驗證
使用match contract 51983的硬體索引解析規則識別符號。
module-1# show sys int aclqos zoning-rules | grep -B 9 "Idx: 51983"
===========================================
Rule ID: 8640 Scope 20 Src EPG: 11060 Dst EPG: 14 Filter 65534
unit_id: 0
=== Region priority: 2466 (rule prio: 9 entry: 162)===
sw_index = 13310 | hw_index = 29937 | stats_idx = 51983
Curr TCAM resource:
=============================
=== SDK Info ===
Result/Stats Idx: 51983
附註:在4.X版本上,規則無法顯示。使用show system internal aclqos zoning-rules implicit命令標識合約。
可在分割槽規則上使用規則識別符號來檢查合約。對於覆蓋規則,合約名稱將為空:
S2-LF101# show zoning-rule rule-id 8640
Config State
============
| Rule ID | SrcEPG | DstEPG | FilterID | Dir | operSt | Scope | Name | Action | Priority | Intent |
|---------|--------|--------|----------|-----|--------|-------|------|--------|---------|--------|
| 8640 | 11060 | 14 | implicit | uni-dir | enabled | 2424832 | | permit_override | src_dst_any(9) | install |
Install State
==============
| Rule ID | SrcEPG | DstEPG | FilterID | Dir | Scope | Name | Action | Priority |
|---------|--------|--------|----------|-----|-------|------|--------|---------|
| 8640 | 11060 | 14 | implicit | uni-dir | 2424832 | | permit_override | src_dst_any(9) |
步驟 3a.使用Object actrlRule驗證以檢視是否存在合約名稱
actrlRule模型可用於帶有過濾器的枝葉:
moquery -c actrlRule -f 'actrl.Rule.rn*"s--d-"' | grep ctrctName
例如,這是正在建立覆蓋策略的合約:
moquery -c actrlRule -f 'actrl.Rule.rn*"s-11060-d-14"' | grep ctrctName
ctrctName : common:Common-Global
此欄位的ctrctName可以為空。如果是這種情況,則有另一個對象可用。
步驟 3b.使用Object actrlRule驗證以檢視是否存在合約名稱
可以在枝葉上使用vzRuleOwner moquery:
moquery -c vzRuleOwner -f 'vz.RuleOwner.dn*"11060.*14"'
對於vzRuleOwner示例,這是正在建立覆蓋策略的合約:
MXS2-LF101# moquery -c vzRuleOwner -f 'vz.RuleOwner.dn*"11060.*14"'
Total Objects shown: 1
# vz.RuleOwner
creatorDn : cdef-[uni/tn-common/brc-Common-Global]/epgCont-[uni/tn-common/out-L3OUT-External/instP-External/]-fr-[uni/tn-common/brc-Common-Global/dirass/prov-[uni/tn-common/out-L3OUT-External/instP-External-]-any-no]/to-[uni/tn-common/brc-Common-Global/dirass/cons-[uni/tn-test/ap-ap-test/epg-epg-test]-any-no]
tag : to-epg
action : permit_override
childAction :
ctrctName :
direction : uni-dir
dn : sys/actrl/scope-2424832/rule-2424832-s-11060-d-14-f-implicit/own-[cdef-[uni/tn-common/brc-Common-contract]/epgCont-[uni/tn-common/out-L3OUT/instP-External]/fr-[uni/tn-common/brc-Common-contract/dirass/prov-[uni/tn-common/out-L3OUT/instP-External]-any-no]/to-[uni/tn-common/brc-Common-contract/dirass/cons-[uni/tn-test/ap-ap-test/epg-epg-test]-any-no]]-tag-to-epg
intent : install
lcOwn : local
markDscp : unspecified
modTs : 2024-08-07T06:16:42.241+00:00
monitorDn : uni/tn-common/monepg-default
name :
nameAlias :
prio : src_dst_any
qosGrp : unspecified
rn : own-[cdef-[uni/tn-common/brc-Common-Global]/epgCont-[uni/tn-common/out-L3OUT-External/instP-External-]/fr-[uni/tn-common/brc-Common-Global/dirass/prov-[uni/tn-common/out-L3OUT-External/instP-External-]-any-no]/to-[uni/tn-common/brc-Common-Global/dirass/cons-[uni/tn-test/ap-ap-test/epg-epg-test]-any-no]]-tag-to-epg
status :
type : tenant
在DN上,在brc之後,它將成為合約名稱。
RN/DN:brc-<contract name>
舉例來說:
brc-Common-contract
參考
思科錯誤 ID |
錯誤標題 |
增強功能新增版本 |
思科錯誤ID CSCwk84663 |
已新增規則的可見性。如果配置設定正確,此覆蓋規則將出現在分割槽規則中,但分割槽規則中不會明確提到名稱。 |
版本5.X |
相關資訊
驗證ACI Shared Services - Shared Service Consumer PcTag 14