简介
本文档介绍确定枝叶上的隐式合同(如覆盖规则)的准则。
先决条件
要求
使用的组件
本文档不限于特定的软件和硬件版本。
使用的设备:
- 运行版本5.3(2)的思科ACI
- ELAM助理/CLI ELAM
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
pcTag是一个数字ID,用于在ACI中内部表示终端策略组(EPG)。分配给源EPG的pcTag称为SCLASS,而分配给目标EPG的pcTag称为DCLASS。
Shared services Consumer使用保留的PcTag 14。
System — 这些是范围为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命令识别合同。
Rule Identifier可用于分区规则以审核合同。对于覆盖规则,合同名称将为空:
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
参考
Cisco Bug ID |
Bug标题 |
增强功能添加版本 |
Cisco Bug ID CSCwk84663 |
已添加规则的可见性。当配置设置正确时,此覆盖规则出现在分区规则中,但分区规则中并未明确提及名称。 |
版本5.X |
相关信息
验证ACI共享服务 — Shared Service Consumer PcTag 14