この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
通常、APIC ファブリックは、テナント ネットワーク内の Three-Tier アプリケーションをホストします。この例では、アプリケーションは 3 台のサーバ(Web サーバ、アプリケーション サーバ、およびデータベース サーバ)を使用して実行されます。Three-Tier アプリケーションの例については、次の図を参照してください。
Web サーバには HTTP フィルタがあり、アプリケーション サーバには Remote Method Invocation(RMI)フィルタがあり、データベース サーバには Structured Query Language(SQL)フィルタがあります。アプリケーション サーバは、SQL コントラクトを消費してデータベース サーバと通信します。Web サーバは、RMI コントラクトを消費して、アプリケーション サーバと通信します。トラフィックは Web サーバから入り、アプリケーション サーバと通信します。アプリケーション サーバはその後、データベース サーバと通信し、トラフィックは外部に通信することもできます。
Three-Tier アプリケーションを展開するには、必要な EPG、フィルタ、およびコントラクトを作成する必要があります。
フィルタは、フィルタを含むコントラクトにより許可または拒否されるデータ プロトコルを指定します。コントラクトには、複数のサブジェクトを含めることができます。サブジェクトは、単方向または双方向のフィルタを実現するために使用できます。単方向フィルタは、コンシューマからプロバイダー(IN)のフィルタまたはプロバイダーからコンシューマ(OUT)のフィルタのどちらか一方向に使用されるフィルタです。双方向フィルタは、両方の方向で使用される同一フィルタです。これは、再帰的ではありません。
コントラクトは、エンドポイント グループ間(EPG 間)の通信をイネーブルにするポリシーです。これらのポリシーは、アプリケーション層間の通信を指定するルールです。コントラクトが EPG に付属していない場合、EPG 間の通信はデフォルトでディセーブルになります。EPG 内の通信は常に許可されているので、EPG 内の通信にはコントラクトは必要ありません。
トランジット ルーティングは、他のルーティング ドメインとの双方向の再配送を行うために境界ルータを有効にします。双方向の再配布により、あるルーティング ドメインから別のルーティング ドメインへルーティング情報が渡されます。そのような再配布により、ACI ファブリックはさまざまなルーティング ドメイン間の完全な IP 接続を提供します。これにより、ルーティング ドメイン間のバックアップ パスを有効にすることで冗長接続を提供することもできます。詳細については、『Cisco ACI Fundamentals Guide』の「ACI Transit Routing」を参照してください。
テナント VRF およびブリッジ ドメインを設定します。
apic1(config)# tenant t1 apic1(config-tenant)# vrf context v1 apic1(config-tenant-vrf)# contract enforce apic1(config-tenant)# bridge-domain b1 apic1(config-tenant-bd)# vrf member v1 apic1(config-tenant)# interface bridge-domain b1 apic1(config-tenant-interface)# ip address 159.10.10.1/24 scope public apic1(config-tenant-interface)# exit
Web、アプリケーション、データベースの 3 つの EPG を設定します。
apic1(config-tenant)# application retail apic1(config-tenant-app)# epg web apic1(config-tenant-app-epg)# bridge-domain member b1 apic1(config-tenant-app-epg)# contract provider web apic1(config-tenant-app-epg)# contract consumer app apic1(config-tenant-app)# epg app apic1(config-tenant-app-epg)# bridge-domain member b1 apic1(config-tenant-app-epg)# contract provider app apic1(config-tenant-app-epg)# contract consumer db apic1(config-tenant-app)# epg db apic1(config-tenant-app-epg)# bridge-domain member b1 apic1(config-tenant-app-epg)# contract provider db
VLAN ドメインを設定します。
apic1(config)# vlan-domain dom100 apic1(config-vlan)# vlan 100-200
ポート チャネルを作成し、Web EPG を展開します。
apic1(config)# leaf 101 apic1(config-leaf)# interface ethernet 1/2-5 apic1(config-leaf-if)# channel-group po1 apic1(config-leaf)# interface port-channel po1 apic1(config-leaf-if)# vlan-domain member dom100 apic1(config-leaf-if)# switchport trunk allowed vlan 101 tenant t1 application retail epg web
vPC を作成し、アプリケーションとデータベース EPG を展開します。
apic1(config)# leaf 101,102 apic1(config-leaf)# interface ethernet 1/6,1/7 apic1(config-leaf-if)# channel-group vpc1 vpc apic1(config)# vpc domain explicit 100 leaf 101 102 apic1(config)# vpc context leaf 101 102 apic1(config-vpc)# interface vpc vpc1 apic1(config-vpc-if)# vlan-domain member dom100 apic1(config-vpc-if)# switchport trunk allowed vlan 102 tenant t1 application retail epg app apic1(config-vpc-if)# switchport trunk allowed vlan 103 tenant t1 application retail epg db
MP-BGP を設定します。
apic1(config)# pod 1 apic1(config-pod)# bgp fabric apic1(config-pod-bgp)# asn 100 apic1(config-pod-bgp)# route-reflector spine 104,105
外部 L3 EPG を設定します。
apic1(config-tenant)# external-l3 epg l3epg1 apic1(config-tenant-l3ext-epg)# vrf member v1 apic1(config-tenant-l3ext-epg)# match ip 173.10.1.0/24 apic1(config-tenant-l3ext-epg)# contract consumer web
リーフ、ルート マップ上で VRF を設定し、外部 L3 EPG を展開します。
apic1(config)# leaf 103 apic1(config-leaf)# vrf context tenant t1 vrf v1 apic1(config-leaf-vrf)# external-l3 epg l3epg1 apic1(config-leaf-vrf)# route-map map1 apic1(config-leaf-vrf-route-map)# match bridge-domain b1
サブインターフェイス上で OSPF エリアを設定します。
apic1(config-leaf)# router ospf default apic1(config-leaf-ospf)# vrf member tenant t1 vrf v1 apic1(config-leaf-ospf-vrf)# area 0.0.0.1 route-map map1 out apic1(config-leaf)# interface ethernet 1/2 apic1(config-leaf-if)# no switchport apic1(config-leaf-if)# vlan-domain member dom1 apic1(config-leaf)# interface ethernet 1/2.150 apic1(config-leaf-if)# vrf member tenant t1 vrf v1 apic1(config-leaf-if)# ip address 169.10.10.1/24 apic1(config-leaf-if)# ip router ospf default area 0.0.0.1
フィルタを設定します。
apic1(config-tenant)# access-list http apic1(config-tenant-acl)# match tcp dest 80 apic1(config-tenant-acl)# match tcp dest 443 apic1(config-tenant)# access-list rmi apic1(config-tenant-acl)# match tcp dest 1099 apic1(config-tenant)# access-list sql apic1(config-tenant-acl)# match tcp dest 1521
コントラクトを設定します。
apic1(config-tenant)# contract rmi apic1(config-tenant-contract)# subject rmi apic1(config-tenant-contract-subj)# access-group rmi both apic1(config-tenant)# contract web apic1(config-tenant-contract)# subject web apic1(config-tenant-contract-subj)# access-group http both apic1(config-tenant)# contract db apic1(config-tenant-contract)# subject sql apic1(config-tenant-contract-subj)# access-group sql both
この手順は、この章の Three-Tier アプリケーションの展開で説明されている Three-Tier アプリケーションの Site1 と Site2 との間のトランジット ルーティングを設定します。
Site2 の外部 L3 EPG(l3epg2)を設定します。
apic1(config-tenant)# external-l3 epg l3epg2 apic1(config-tenant-l3ext-epg)# vrf member v1 apic1(config-tenant-l3ext-epg)# match ip 174.10.1.0/24 apic1(config-tenant-l3ext-epg)# contract consumer transit apic1(config)# leaf 102 apic1(config-leaf)# vrf context tenant t1 vrf v1 apic1(config-leaf-vrf)# external-l3 epg l3epg2
Site1 に対応する外部 SVI およびエクスポート ルート上に BGP 接続を設定します。
apic1(config)# leaf 102 apic1(config-leaf-vrf)# route-map map200 apic1(config-leaf-vrf-route-map)# ip prefix-list p1 match 173.10.1.0/24 apic1(config-leaf-vrf-route-map)# match prefix-list p1 apic1(config-leaf-vrf-route-map-match)# set community extended 200:1 replace apic1(config-leaf)# interface vlan 160 apic1(config-leaf-if)# vrf member tenant t1 vrf v1 apic1(config-leaf-if)# ip address 208.1.1.2/24 apic1(config-leaf)# interface ethernet 1/11 apic1(config-leaf-if)# vlan-domain member dom1 apic1(config-leaf-if)# switchport trunk allowed vlan 160 tenant t1 external-svi apic1(config-leaf)# router bgp 100 apic1(config-bgp)# vrf member tenant t1 vrf v1 apic1(config-leaf-bgp-vrf)# neighbor 208.1.1.1 apic1(config-leaf-bgp-vrf-neighbor)# remote-as 200 apic1(config-leaf-bgp-vrf-neighbor)# update-source vlan 160 apic1(config-leaf-bgp-vrf-neighbor)# route-map map200 out
l3epg2(Site2)との接続を確立するために l3epg1(Site1)にコントラクト プロバイダーを設定します。
apic1(config-tenant)# external-l3 epg l3epg1 apic1(config-tenant-l3ext-epg)# contract provider transit
Site2 に対応するルートをエクスポートするために Site1 にルート マップを設定します。
apic1(config)# leaf 103 apic1(config-leaf-vrf)# route-map map1 apic1(config-leaf-vrf-route-map)# ip prefix-list p1 match 174.10.1.0/24 apic1(config-leaf-vrf-route-map)# match prefix-list p1 apic1(config-leaf-vrf-route-map-match)# set metric 100
トランジット ルーティングの ACL とコントラクトを設定します。
apic1(config)# tenant t1 apic1(config-tenant)# access-list acl1 apic1(config-tenant-acl)# match ip apic1(config-tenant)# contract transit apic1(config-tenant-contract)# subject ip apic1(config-tenant-contract-subj)# access-group acl1 both