キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
1669
閲覧回数
0
いいね!
0
コメント
DCNhowtoAdmin
Level 2
Level 2

本ページではPBRを利用するService Graphの構成自体については説明していません。合わせて以下のACI How To各ページや、White Paper等をご参照下さい。

 

 

基本的な環境は、上記のUnmanaged Mode Service Graph (サンプル例はASAvを使用)とほぼ同様の環境を利用しています。

 

ただし、本例ではCLI取得先を切り替えてわかりづらくなることを防止するため、送信元Endpoint、送信先Endpoint、Service Nodeを全て同一Leaf配下の同一ESXi上のVMで構成しています。このような構成は第2世代Leafを使用の場合は特に問題はありませんが、第1世代Leafを使用している場合には送信元・送信先EndpointとService Nodeは別のLeaf配下にする必要がありますのでご注意下さい。

01.png

02.png

 

 

VRF

 

Leaf1-2# show vrf
VRF-Name                          VRF-ID State    Reason
black-hole                              3 Up      --
management                              2 Up      --
 overlay-1                              4 Up      --
 tsetaka1:VRF                          13 Up      --

 

 

本ページでは、6行目のVRF [tsetaka1:VRF] を対象とします。

 

VRFに紐づくEndpoint

 

Leaf1-2# show endpoint vrf tsetaka1:VRF
Legend:
s - arp              H - vtep            V - vpc-attached    p - peer-aged
R - peer-attached-rl B - bounce          S - static          M - span
D - bounce-to-proxy  O - peer-attached    a - local-aged      m - svc-mgr
L - local            E - shared-service
+-----------------------------------+---------------+-----------------+--------------+-------------+
      VLAN/                          Encap          MAC Address      MAC Info/      Interface
      Domain                          VLAN            IP Address        IP Info
+-----------------------------------+---------------+-----------------+--------------+-------------+
23                                        vlan-234    0050.568a.7c44 L                    eth1/11
tsetaka1:VRF                              vlan-234      192.168.1.1 L                    eth1/11
25                                        vlan-202    0050.568a.ead5 L                    eth1/11
tsetaka1:VRF                              vlan-202      192.168.2.1 L                    eth1/11

+------------------------------------------------------------------------------+
                            Endpoint Summary
+------------------------------------------------------------------------------+
Total number of Local Endpoints    : 2
Total number of Remote Endpoints    : 0
Total number of Peer Endpoints      : 0
Total number of Peer Rl Endpoints  : 0
Total number of vPC Endpoints      : 0
Total number of non-vPC Endpoints  : 2
Total number of MACs                : 2
Total number of VTEPs              : 0
Total number of Local IPs          : 2
Total number of Remote IPs          : 0
Total number All EPs                : 2

 

 

VRF [tsetaka1:VRF]には、Endpointが2台だけ紐付いています。

 

1台目はクライアント側の役割となるVM-Aで、Endpoint情報としては11-12行目が該当します。IPアドレスは 192.168.1.1、MACアドレスは 00:50:56:8a:7c:44 であり、eth1/11ポートの先にあるESXiホスト上に配置されています。VMM Domain連携した分散仮想スイッチに構成されたPort Groupに紐付いており、VLAN 234を通じて通信しています。

 

2台目はサーバ側の役割となるVM-Bで、Endpoint情報としては13-14行目が該当します。IPアドレスは 192.168.2.1、MACアドレスは 00:50:56:8a:ea:d5 であり、eth1/11ポートの先にあるESXiホスト上に配置されています。VMM Domain連携した分散仮想スイッチに構成されたPort Groupに紐付いており、VLAN 202を通じて通信しています。

 

VLANとの紐付け

 

Leaf1-2# show vlan extend
VLAN Name                            Encap            Ports
---- -------------------------------- ---------------- ------------------------
22  tsetaka1:BD1                    vxlan-15859678  Eth1/11
23  tsetaka1:AP1:EPG1-1              vlan-234        Eth1/11
24  tsetaka1:BD2                    vxlan-16121791  Eth1/11
25  tsetaka1:AP1:EPG2-1              vlan-202        Eth1/11

 

 

VM-Aが接続しているEPG1-1はBD1に紐付いており、GWとして192.168.1.254/24が構成されています。

VM-Bが接続しているEPG2-1はBD2に紐付いており、GWとして192.168.2.254/24が構成されています。

 

このLeafスイッチではEth1/11ポートからVLAN 234で入ってくる通信をEPG1-1に紐づけているわけですが、それはこのLeafローカルでのみ利用されるPI-VLANとしてはVLAN 23として区分されています。同様に、同ポートからVLAN 202で入ってくる通信であるEPG2-1は、PI-VLAN 25にマッピングされています。

 

各Endpointの詳細

 

VM-A

Leaf1-2# show system internal epm endpoint ip 192.168.1.1
MAC : 0050.568a.7c44 ::: Num IPs : 1
IP# 0 : 192.168.1.1 ::: IP# 0 flags :  ::: l3-sw-hit: No
Vlan id : 23 ::: Vlan vnid : 8826 ::: VRF name : tsetaka1:VRF
BD vnid : 15859678 ::: VRF vnid : 2195456
Phy If : 0x1a00a000 ::: Tunnel If : 0
Interface : Ethernet1/11
Flags : 0x80005c04 ::: sclass : 32772 ::: Ref count : 5
EP Create Timestamp : 09/11/2019 17:13:25.460961
EP Update Timestamp : 09/12/2019 11:28:02.238201
EP Flags : local|IP|MAC|host-tracked|sclass|timer|
::::

 

 

VM-B

Leaf1-2# show system internal epm endpoint ip 192.168.2.1
MAC : 0050.568a.ead5 ::: Num IPs : 1
IP# 0 : 192.168.2.1 ::: IP# 0 flags :  ::: l3-sw-hit: No
Vlan id : 25 ::: Vlan vnid : 8794 ::: VRF name : tsetaka1:VRF
BD vnid : 16121791 ::: VRF vnid : 2195456
Phy If : 0x1a00a000 ::: Tunnel If : 0
Interface : Ethernet1/11
Flags : 0x80005c04 ::: sclass : 49154 ::: Ref count : 5
EP Create Timestamp : 09/11/2019 17:13:48.060847
EP Update Timestamp : 09/12/2019 11:28:02.238301
EP Flags : local|IP|MAC|host-tracked|sclass|timer|
::::

 

 

EndpointのIPアドレスをキーとして当該Endpointの詳細を確認しています(同一IPを持つEndpointが複数同一Leaf配下に存在する場合もありえます)。

この出力から、以下の情報を確認することができます。

 

項目 VM-A VM-B
MACアドレス 00:50:56:8a:7c:44 00:50:56:8a:ea:d5
IPアドレス 192.168.1.1 192.168.2.1
紐付いているPI-VLAN 23 25
VRF tsetaka1:VRF tsetaka1:VRF
BDのVNID 15859678 16121791
VRFのVNID 2195456 2195456
pcTag (sclass) 32772 49154

 

Contractを反映したzoning-ruleの状態

 

Leaf1-2# show zoning-rule scope 2195456
+---------+--------+--------+----------+----------------+---------+---------+--------------+----------+----------------------+
| Rule ID | SrcEPG | DstEPG | FilterID |      Dir      |  operSt |  Scope  |    Name    |  Action  |      Priority      |
+---------+--------+--------+----------+----------------+---------+---------+--------------+----------+----------------------+
|  4114  |  0    |  0    | implicit |    uni-dir    | enabled | 2195456 |              | deny,log |  any_any_any(21)    |
|  4112  |  0    |  0    | implarp  |    uni-dir    | enabled | 2195456 |              |  permit  |  any_any_filter(17)  |
|  4127  |  0    |  15  | implicit |    uni-dir    | enabled | 2195456 |              | deny,log | any_vrf_any_deny(22) |
|  4116  |  0    | 49153  | implicit |    uni-dir    | enabled | 2195456 |              |  permit  |  any_dest_any(16)  |
|  4117  |  0    | 32771  | implicit |    uni-dir    | enabled | 2195456 |              |  permit  |  any_dest_any(16)  |
|  4133  | 32772  | 49154  | default  |    bi-dir    | enabled | 2195456 | No-Filtering |  permit  |    src_dst_any(9)    |
|  4123  | 49154  | 32772  | default  | uni-dir-ignore | enabled | 2195456 | No-Filtering |  permit  |    src_dst_any(9)    |
+---------+--------+--------+----------+----------------+---------+---------+--------------+----------+----------------------+

Contractとして構成した通信ルールは各Leafスイッチにおいてはzoning-ruleとしてプログラムされます。一般的にはデフォルトのScopeであるVRFのVNIDで絞り込んで表示させることが有用です。

 

上記例では "No-Filtering" と名付けた10-11行目の zoning-rule のみが管理者によって適用されたContractを反映して適用されたzoning-ruleで、それ以外はACIがデフォルトで備えるセキュリティ(Contractで許可された通信のみが可能)を実現する「裏側の仕組み」の実体です。上記例の場合、Unspecifiedで特に絞り込みを一切行わないFilterが紐付いたContractのため、Priortyとしては "src_dst_any(9)" が適用されています。また、FilterIDも "default" となっておりリソース効率の最適化が図られています。

 

FilterID "default" のFilterの内容はzoning-filterとして確認することが可能です。

 

Leaf1-2# show zoning-filter filter default
+----------+------+-------------+-------------+-------------+-------------+----------+-------------+-------------+-------------+-------------+------+-------------+-------------+----------+
| FilterId | Name |    EtherT  |    ArpOpc  |    Prot    | ApplyToFrag | Stateful |  SFromPort  |  SToPort  |  DFromPort  |  DToPort  | Prio |  Icmpv4T  |  Icmpv6T  | TcpRules |
+----------+------+-------------+-------------+-------------+-------------+----------+-------------+-------------+-------------+-------------+------+-------------+-------------+----------+
| default  | any  | unspecified | unspecified | unspecified |      no    |    no    | unspecified | unspecified | unspecified | unspecified | def  | unspecified | unspecified |          |
+----------+------+-------------+-------------+-------------+-------------+----------+-------------+-------------+-------------+-------------+------+-------------+-------------+----------+
 

 

特定EPG間のzoning-ruleのみを表示させたい場合は、VRFのVNIDを指定したscopeに加えて src-epg と dst-epg をそれぞれ pcTag (sclass) で指定することにより絞り込むことが可能です。

 

Leaf1-2# show zoning-rule scope 2195456 src-epg 32772 dst-epg 49154
+---------+--------+--------+----------+--------+---------+---------+--------------+--------+----------------+
| Rule ID | SrcEPG | DstEPG | FilterID |  Dir  |  operSt |  Scope  |    Name    | Action |    Priority    |
+---------+--------+--------+----------+--------+---------+---------+--------------+--------+----------------+
|  4133  | 32772  | 49154  | default  | bi-dir | enabled | 2195456 | No-Filtering | permit | src_dst_any(9) |
+---------+--------+--------+----------+--------+---------+---------+--------------+--------+----------------+

カスタマイズされたFilterが紐付けられたContractには、それぞれのFilter内容に紐付いたFilterIDが紐付けられます。

 

Leaf1-2# show zoning-rule scope 2195456
+---------+--------+--------+----------+----------------+---------+---------+-----------------+----------+----------------------+
| Rule ID | SrcEPG | DstEPG | FilterID |      Dir      |  operSt |  Scope  |      Name      |  Action  |      Priority      |
+---------+--------+--------+----------+----------------+---------+---------+-----------------+----------+----------------------+
|  4114  |  0    |  0    | implicit |    uni-dir    | enabled | 2195456 |                | deny,log |  any_any_any(21)    |
|  4112  |  0    |  0    | implarp  |    uni-dir    | enabled | 2195456 |                |  permit  |  any_any_filter(17)  |
|  4127  |  0    |  15  | implicit |    uni-dir    | enabled | 2195456 |                | deny,log | any_vrf_any_deny(22) |
|  4116  |  0    | 49153  | implicit |    uni-dir    | enabled | 2195456 |                |  permit  |  any_dest_any(16)  |
|  4117  |  0    | 32771  | implicit |    uni-dir    | enabled | 2195456 |                |  permit  |  any_dest_any(16)  |
|  4133  | 49154  | 32772  |    18    | uni-dir-ignore | enabled | 2195456 | Only-Web-Access |  permit  |    fully_qual(7)    |
|  4123  | 32772  | 49154  |    17    |    bi-dir    | enabled | 2195456 | Only-Web-Access |  permit  |    fully_qual(7)    |
+---------+--------+--------+----------+----------------+---------+---------+-----------------+----------+----------------------+

FilterIDをキーとしてFilterの内容を確認すると、行きの通信と戻りの通信のそれぞれに紐づくフィルタルールが定義されていることが確認できます。

 

Leaf1-2# show zoning-filter filter 18
+----------+------+--------+-------------+------+-------------+----------+-----------+---------+-------------+-------------+-------+-------------+-------------+----------+
| FilterId | Name | EtherT |    ArpOpc  | Prot | ApplyToFrag | Stateful | SFromPort | SToPort |  DFromPort  |  DToPort  |  Prio |  Icmpv4T  |  Icmpv6T  | TcpRules |
+----------+------+--------+-------------+------+-------------+----------+-----------+---------+-------------+-------------+-------+-------------+-------------+----------+
|    18    | 18_1 |  ip  | unspecified | tcp  |      no    |    no    |    http  |  http  | unspecified | unspecified | sport | unspecified | unspecified |          |
|    18    | 18_0 |  ip  | unspecified | tcp  |      no    |    no    |  https  |  https  | unspecified | unspecified | sport | unspecified | unspecified |          |
+----------+------+--------+-------------+------+-------------+----------+-----------+---------+-------------+-------------+-------+-------------+-------------+----------+
Leaf1-2# show zoning-filter filter 17
+----------+------+--------+-------------+------+-------------+----------+-------------+-------------+-----------+---------+-------+-------------+-------------+----------+
| FilterId | Name | EtherT |    ArpOpc  | Prot | ApplyToFrag | Stateful |  SFromPort  |  SToPort  | DFromPort | DToPort |  Prio |  Icmpv4T  |  Icmpv6T  | TcpRules |
+----------+------+--------+-------------+------+-------------+----------+-------------+-------------+-----------+---------+-------+-------------+-------------+----------+
|    17    | 17_1 |  ip  | unspecified | tcp  |      no    |    no    | unspecified | unspecified |  https  |  https  | dport | unspecified | unspecified |          |
|    17    | 17_0 |  ip  | unspecified | tcp  |      no    |    no    | unspecified | unspecified |    http  |  http  | dport | unspecified | unspecified |          |
+----------+------+--------+-------------+------+-------------+----------+-------------+-------------+-----------+---------+-------+-------------+-------------+----------+

 

PBRを反映したService Redirect構成の状態

03.png

 

PBR動作が定義されたService GraphをContractに紐付けると、自動的にzoning-ruleの書き換えが行われます。

 

Leaf1-2# show zoning-rule scope 2195456
+---------+--------+--------+----------+----------------+---------+---------+------+------------------+----------------------+
| Rule ID | SrcEPG | DstEPG | FilterID |      Dir      |  operSt |  Scope  | Name |      Action      |      Priority      |
+---------+--------+--------+----------+----------------+---------+---------+------+------------------+----------------------+
|  4114  |  0    |  0    | implicit |    uni-dir    | enabled | 2195456 |      |    deny,log    |  any_any_any(21)    |
|  4112  |  0    |  0    | implarp  |    uni-dir    | enabled | 2195456 |      |      permit      |  any_any_filter(17)  |
|  4127  |  0    |  15  | implicit |    uni-dir    | enabled | 2195456 |      |    deny,log    | any_vrf_any_deny(22) |
|  4116  |  0    | 49153  | implicit |    uni-dir    | enabled | 2195456 |      |      permit      |  any_dest_any(16)  |
|  4117  |  0    | 32771  | implicit |    uni-dir    | enabled | 2195456 |      |      permit      |  any_dest_any(16)  |
|  4133  | 49154  | 32772  | default  | uni-dir-ignore | enabled | 2195456 |      | redir(destgrp-7) |    src_dst_any(9)    |
|  4123  | 16388  | 32772  | default  |    uni-dir    | enabled | 2195456 |      |      permit      |    src_dst_any(9)    |
|  4135  | 32772  | 49154  | default  |    bi-dir    | enabled | 2195456 |      | redir(destgrp-8) |    src_dst_any(9)    |
|  4138  | 49155  | 49154  | default  |    uni-dir    | enabled | 2195456 |      |      permit      |    src_dst_any(9)    |
+---------+--------+--------+----------+----------------+---------+---------+------+------------------+----------------------+

この例では10行目と12行目の Action として redir が指定された zoning-rule が PBR Service Graph を実現している定義となります。

元々、送信元EPGのpcTagは 32772、送信先EPGのpcTagは 49154で、その間で直接zoning-ruleによる通信許可が定義されていましたが、11行目と13行目の様に その間に 16388 と 49155 の2つの pcTag が追加されていることがわかります。これらはGUIには表示されませんがService Nodeを接続するために用意された Shadow EPG となります。

 

これらの設定がService Graphのアタッチに伴って自動的に構成されることによって、EPG1-1 (pcTag 32772) から EPG2-1 (pcTag 49154) 宛の通信はリダイレクトによってService Nodeに送られ、Service NodeのProvider側のインターフェイスが紐づくShadow EPG (pcTag 49155) から元々の宛先である EPG2-1に到達、戻りについてもリダイレクトされ、Consumer側のService Nodeインターフェイスが紐づくShadow EPG (pcTag 16388)から元々の送信元であるEPG1-1に戻ってくるというService Graph / PBR 動作が成立します。

 

PBRを反映したService Redirect構成の状態

04.png

 

Service Graphによるリダイレクトの構成についてもCLIで確認することが可能です。番号はzoning-ruleのActionの番号と紐付いています。以下はService NodeのProvider側のインターフェイスとして指定された IP 192.168.2.200 へ転送されていることが確認できます。

Leaf1-2# show service redir info group 7
============================================================================================
LEGEND
TL: Threshold(Low)   |     TH: Threshold(High)   |   HP: HashProfile     |     HG: HealthGrp
============================================================================================
GrpID Name            destination                                                    HG-name                        operSt     operStQual      TL   TH    HP         Tracking
===== ====            ===========                                                    ==============                 =======    ============    ===  ====  ========   ========
7     destgrp-7       dest-[192.168.2.200]-[vxlan-2195456]                           Not attached                   enabled    no-oper-grp     0    0     symmetric  no

 

 

宛先Service Nodeの詳細についても以下のように確認することが可能です。

Leaf1-2# show service redir info destination ip 192.168.2.200 vnid 2195456
============================================================================================
LEGEND
TL: Threshold(Low)   |     TH: Threshold(High)   |   HP: HashProfile     |     HG: HealthGrp
============================================================================================
Name                                                           bdVnid          vMac                 vrf                       operSt     operStQual      HG-name
====                                                           ======          ====                 ====                      =====      =========       =======
dest-[192.168.2.200]-[vxlan-2195456]                           vxlan-16121791  00:50:56:8A:AA:F8    tsetaka1:VRF              enabled    no-oper-dest    Not attached

上記と同じ様に、Consumer側についても同様に確認できます。

Leaf1-2# show service redir info group 8
============================================================================================
LEGEND
TL: Threshold(Low)   |     TH: Threshold(High)   |   HP: HashProfile     |     HG: HealthGrp
============================================================================================
GrpID Name            destination                                                    HG-name                        operSt     operStQual      TL   TH    HP         Tracking
===== ====            ===========                                                    ==============                 =======    ============    ===  ====  ========   ========
8     destgrp-8       dest-[192.168.1.200]-[vxlan-2195456]                           Not attached                   enabled    no-oper-grp     0    0     symmetric  no
Leaf1-2# show service redir info destination ip 192.168.1.200 vnid 2195456
============================================================================================
LEGEND
TL: Threshold(Low)   |     TH: Threshold(High)   |   HP: HashProfile     |     HG: HealthGrp
============================================================================================
Name                                                           bdVnid          vMac                 vrf                       operSt     operStQual      HG-name
====                                                           ======          ====                 ====                      =====      =========       =======
dest-[192.168.1.200]-[vxlan-2195456]                           vxlan-15859678  00:50:56:8A:6B:C8    tsetaka1:VRF              enabled    no-oper-dest    Not attached

 

 

Shadow EPGに紐付いたService DeviceのEndpointとしての状態

 

Service NodeのためにShadow EPGが作られることからも分かる通り、Service Graphによって実際にContractに紐付けられたService Nodeは割り当てられている間は1つのEndpointとして内部的には扱われています。下記のように show endpoint コマンドによっても存在を確認することが可能です。

Leaf1-2# show endpoint ip 192.168.1.200
Legend:
s - arp              H - vtep             V - vpc-attached     p - peer-aged
R - peer-attached-rl B - bounce           S - static           M - span
D - bounce-to-proxy  O - peer-attached    a - local-aged       m - svc-mgr
L - local            E - shared-service
+-----------------------------------+---------------+-----------------+--------------+-------------+
      VLAN/                           Encap           MAC Address       MAC Info/       Interface
      Domain                          VLAN            IP Address        IP Info
+-----------------------------------+---------------+-----------------+--------------+-------------+
11                                         vlan-237    0050.568a.6bc8 L                     eth1/11
tsetaka1:VRF                               vlan-237     192.168.1.200 L                     eth1/11

Leaf1-2# show endpoint ip 192.168.2.200
Legend:
s - arp              H - vtep             V - vpc-attached     p - peer-aged
R - peer-attached-rl B - bounce           S - static           M - span
D - bounce-to-proxy  O - peer-attached    a - local-aged       m - svc-mgr
L - local            E - shared-service
+-----------------------------------+---------------+-----------------+--------------+-------------+
      VLAN/                           Encap           MAC Address       MAC Info/       Interface
      Domain                          VLAN            IP Address        IP Info
+-----------------------------------+---------------+-----------------+--------------+-------------+
8                                          vlan-236    0050.568a.aaf8 L                     eth1/11
tsetaka1:VRF                               vlan-236     192.168.2.200 L                     eth1/11
 

 

今回の例ではService Nodeも仮想アプライアンスを利用しているため、Service Nodeの実体である仮想マシンの仮想ネットワークインターフェイスに紐付けるPort Groupが自動的に構成されているわけですが、そこに紐付けられたVLANもここから確認することができます(本例ではConsumer側接続がVLAN 237、Provider側接続がVLAN 236)。

 

今回はService NodeのConsumer側・Provider側それぞれのインターフェイスを送信元・送信先の各EPGが紐づくBDと同じとして同一Subnetで構成してみましたが、このように同一SubnetであってもEPGが異なれば紐づくVLANも異なるということがここからもわかります。

 

 

 

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします