NX-OS スタイルの CLI を使用したテナント ネットワークのレイヤ 3 Outside の設定
次の手順では、テナント ネットワークのネットワークの外部レイヤ 3 を設定する方法について説明します。次に、NX-OS CLI を使用してテナント VRF 外部 L3 接続にノードと L3 ポートを配備する例を示します。
この例は、わかりやすくするための手順に分割されます。マージされた例については、NX-OS スタイル CLI の例:L3Out を参照してください。
始める前に
-
ノード、ポート、機能プロファイル、AEP、レイヤ 3 ドメインを設定します。
-
使用して VLAN ドメイン設定、 vlan ドメイン ドメイン および vlan vlan 範囲 コマンド。
-
BGP ルート リフレクタ ポリシーを設定し、ファブリック内でルーテッドを伝達します。
コマンドを使用して、これらの前提条件の例を参照してください。 NX-OS スタイル CLI の例: L3Out の前提条件 。
手順
ステップ 1 |
テナントおよび VRF を設定します。 この例では VRF 例:
|
ステップ 2 |
L3Out のノードとインターフェイスを設定します。 この例では設定 VRF 例:
|
ステップ 3 |
ルーティング プロトコルを設定します。 この例では、BGP ピアのアドレスを使用して、プライマリのルーティング プロトコルとして BGP を設定 例:
|
ステップ 4 |
オプション。接続ルーティング プロトコルを設定します。 この例では、定期的なエリア ID と、通信プロトコルとして OSPF を設定 例:
|
ステップ 5 |
ノード 103 上に外部 EPG を設定します。 この例では、ネットワークで 例:
|
ステップ 6 |
オプション。アドバタイズ ホスト ルートを設定します。 例:
|
ステップ 7 |
オプション。ルート マップを設定します。 この例では、ルート マップ設定 例:
|
ステップ 8 |
ブリッジ ドメインを追加します。 例:
|
ステップ 9 |
ノード 101 で EPG アプリケーションを作成します。 例:
|
ステップ 10 |
フィルタ (アクセス リスト) と契約を作成します。 例:
|
ステップ 11 |
契約を設定し、Epg に関連付けます。 例:
|
NX-OS スタイル CLI の例: L3Out の前提条件
L3Out を設定する前に、次の手順を実行します。
-
VLAN ドメインを設定します。
apic1# configure apic1(config)# vlan-domain dom1 apic1(config-vlan)# vlan 1024-2048 apic1(config-vlan)# exit
-
BGP ルート リフレクタを設定します:
apic1(config)# bgp-fabric apic1(config-bgp-fabric)# asn 100 apic1(config-bgp-fabric)# route-reflector spine 104,105
NX-OS スタイル CLI の例:L3Out
次の例は、L3Out を設定する手順のマージ バージョン NX-OS スタイル CLI を使用します。L3Out を設定する前に、次の前提条件を設定します。
apic1# configure
apic1(config)# tenant t1
apic1(config-tenant)# vrf context v1
apic1(config-tenant-vrf)# exit
apic1(config-tenant)# exit
apic1(config)# leaf 103
apic1(config-leaf)# vrf context tenant t1 vrf v1
apic1(config-leaf-vrf)# router-id 11.11.11.103
apic1(config-leaf-vrf)# exit
apic1(config-leaf)# interface ethernet 1/3
apic1(config-leaf-if)# vlan-domain member dom1
apic1(config-leaf-if)# no switchport
apic1(config-leaf-if)# vrf member tenant t1 vrf v1
apic1(config-leaf-if)# ip address 12.12.12.3/24
apic1(config-leaf-if)# exit
apic1(config-leaf)# router bgp 100
apic1(config-leaf-bgp)# vrf member tenant t1 vrf v1
apic1(config-leaf-bgp-vrf)# neighbor 15.15.15.2
apic1(config-leaf-bgp-vrf-neighbor)# exit
apic1(config-leaf-bgp-vrf)# exit
apic1(config-leaf-bgp)# exit
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.0 loopback 30.30.30.0
apic1(config-leaf-ospf-vrf)# exit
apic1(config-leaf-ospf)# exit
apic1(config-leaf)# exit
apic1(config)# tenant t1
apic1(config-tenant)# external-l3 epg extnw1
apic1(config-tenant-l3ext-epg)# vrf member v1
apic1(config-tenant-l3ext-epg)# match ip 20.20.20.0/24
apic1(config-tenant-l3ext-epg)# exit
apic1(config-tenant)# exit
apic1(config)# leaf 103
apic1(config-leaf)# vrf context tenant t1 vrf v1
apic1(config-leaf-vrf)# external-l3 epg extnw1
apic(config-leaf-vrf)# exit
apic1(config-leaf)# template route group match-rule1 tenant t1
apic1(config-route-group)# ip prefix permit 200.3.2.0/24
apic1(config-route-group)# exit
apic1(config-leaf)# vrf context tenant t1 vrf v1
apic1(config-leaf-vrf)# route-map rp1
apic1(config-leaf-vrf-route-map)# match route group match-rule1 order 0
apic1(config-leaf-vrf-route-map-match)# exit
apic1(config-leaf-vrf-route-map)# exit
apic1(config-leaf-vrf)# exit
apic1(config-leaf)# router bgp 100
apic1(config-leaf-bgp)# vrf member tenant t1 vrf v1
apic1(config-leaf-bgp-vrf)# neighbor 15.15.15.2
apic1(config-leaf-bgp-vrf-neighbor)# route-map rp1 in
apic1(config-leaf-bgp-vrf-neighbor)#exit
apic1(config-leaf-bgp-vrf)# exit
apic1(config-leaf-bgp)# exit
apic1(config-leaf)# exit
apic1(config)# tenant t1
apic1(config-tenant)# bridge-domain bd1
apic1(config-tenant-bd)# vrf member v1
apic1(config-tenant-bd)# exit
apic1(config-tenant)# interface bridge-domain bd1
apic1(config-tenant-interface)# ip address 44.44.44.1/24 scope public
apic1(config-tenant-interface)# exit
apic1(config-tenant)# exit
apic1(config)# leaf 101
apic1(config-leaf)# vrf context tenant t1 vrf v1
apic1(config-leaf-vrf)# route-map map1
apic1(config-leaf-vrf-route-map)# match bridge-domain bd1 tenant t1
apic1(config-leaf-vrf-route-map-match)# exit
apic1(config-leaf-vrf-route-map)# exit
apic1(config-leaf-vrf)# exit
apic1(config-leaf)# exit
apic1(config)# tenant t1
apic1(config-tenant)# application app1
apic1(config-tenant-app)# epg epg1
apic1(config-tenant-app-epg)# bridge-domain member bd1
apic1(config-tenant-app-epg)# exit
apic1(config-tenant-app)# exit
apic1(config-tenant)# exit
apic1(config)# leaf 101
apic1(config-leaf)# interface ethernet 1/3
apic1(config-leaf-if)# vlan-domain member dom1
apic1(config-leaf-if)# switchport trunk allowed vlan 2011 tenant t1 application app1 epg epg1
apic1(config-leaf-if)# exit
apic1(config-leaf)# exit
apic1(config)# tenant t1
apic1(config-tenant)# access-list http-filter
apic1(config-tenant-acl)# match ip
apic1(config-tenant-acl)# match tcp dest 80
apic1(config-tenant-acl)# exit
apic1(config-tenant)# contract httpCtrct
apic1(config-tenant-contract)# scope vrf
apic1(config-tenant-contract)# subject subj1
apic1(config-tenant-contract-subj)# access-group http-filter both
apic1(config-tenant-contract-subj)# exit
apic1(config-tenant-contract)# exit
apic1(config-tenant)# external-l3 epg extnw1
apic1(config-tenant-l3ext-epg)# vrf member v1
apic1(config-tenant-l3ext-epg)# contract provider httpCtrct
apic1(config-tenant-l3ext-epg)# exit
apic1(config-tenant)# application app1
apic1(config-tenant-app)# epg epg1
apic1(config-tenant-app-epg)# contract consumer httpCtrct
apic1(config-tenant-app-epg)# exit
apic1(config-tenant-app)# exit
apic1(config-tenant)# exit
apic1(config)#