VXLAN ファブリックのサービス リダイレクション

この章は、次の内容で構成されています。

VXLAN EVPN ファブリックのサービス リダイレクト

今日では、データセンター内のアプリケーションを保護および最適化するために、ファイアウォール、ロードバランサなどのサービス アプライアンス(サービス ノードまたはサービス エンドポイントとも呼ばれる)の挿入が必要です。このセクションでは、VXLAN EVPN ファブリックで提供されるレイヤ 4 ~ レイヤ 7 サービスの挿入およびリダイレクト機能について説明します。これらのサービスにトラフィックをオンボードして選択的にリダイレクトする高度なメカニズムを提供します。

ポリシーベースのリダイレクトの注意事項と制約事項

PBR over VXLAN には、次の注意事項と制限事項が適用されます。

  • 次のプラットフォームは、PBR over VXLAN をサポートしています。

    • Cisco Nexus 9332C および 9364C スイッチ

    • Cisco Nexus 9300-EX スイッチ

    • Cisco Nexus 9300-FX/FX2/FX3 スイッチ

    • Cisco Nexus 9300-GX スイッチ

    • -EX/FX ライン カードを搭載した Cisco Nexus 9504 および 9508 スイッチ

  • PBR over VXLAN は、set {ip | ipv6} next-hopip-address コマンドの VTEP ECMP、およびload-share キーワードをサポートしていません。

  • bestpath as-path multipath-relax を構成すると、BGP は IPv4 のすべてのマルチパスをパスの中で最小の使用可能メトリック の URIB をベストパスとしてインストールします。

  • bestpath as-path multipath-relax を構成する時、BGP は、U6RIB 内で IPv6 を全てのマルチパスをベストパスとしてインストールしません。これらのパスで使用可能な個々のメトリックは引き続き使用できます。

ポリシーベース リダイレクト機能のイネーブル化

高度な(および推奨される)ePBR 機能が展開されていない場合に基本的な PBR を構成するには、次のセクションを参照してください。

始める前に

ルート ポリシーを設定するには、あらかじめポリシーベース リダイレクト機能をイネーブル化しておく必要があります。

手順の概要

  1. configure terminal
  2. [no] feature pbr
  3. (任意) show feature
  4. (任意) copy running-config startup-config

手順の詳細

  コマンドまたはアクション 目的

ステップ 1

configure terminal

例:

switch# configure terminal

グローバル コンフィギュレーション モードを開始します。

ステップ 2

[no] feature pbr

例:

switch(config)# feature pbr

ポリシーベース ルーティング機能をイネーブルにします。

ステップ 3

(任意) show feature

例:

switch(config)# show feature
(任意)

有効および無効にされた機能を表示します。

ステップ 4

(任意) copy running-config startup-config

例:

switch(config)# copy running-config startup-config
(任意)

この設定変更を保存します。

ルート ポリシーの設定

ポリシーベース ルーティングでルート マップを使用すると、着信インターフェイスにルーティング ポリシーを割り当てることができます。Cisco NX-OS はネクスト ホップおよびインターフェイスを検出するときに、パケットをルーティングします。


(注)  


スイッチには、IPv4 トラフィック用の RACL TCAM リージョンがデフォルトで用意されています。


始める前に

ポリシーベース ルーティング ポリシーを適用するには、あらかじめ RACL TCAM リージョンを(TCAM カービングを使用して)設定する必要があります。詳細については『Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.2(x)』の「Configuring ACL TCAM Region Sizes」の項を参照してください。

手順の概要

  1. configure terminal
  2. interface type slot/port
  3. {ip | ipv6} policy route-map map-name
  4. route-map map-name [permit | deny] [seq]
  5. match {ip | ipv6} address access-list-name name [name...]
  6. set ip next-hop address1
  7. set ipv6 next-hop address1
  8. (任意) set interface null0
  9. (任意) copy running-config startup-config

手順の詳細

  コマンドまたはアクション 目的

ステップ 1

configure terminal

例:

switch# configure terminal

グローバル コンフィギュレーション モードを開始します。

ステップ 2

interface type slot/port

例:

switch(config)# interface ethernet 1/2 

インターフェイス設定モードを開始します。

ステップ 3

{ip | ipv6} policy route-map map-name

例:

switch(config-inf)# ip policy route-map Testmap

IPv4 または IPv6 ポリシーベース ルーティング用のルート マップをインターフェイスに割り当てます。

ステップ 4

route-map map-name [permit | deny] [seq]

例:

switch(config-inf)# route-map Testmap

ルート マップを作成するか、または既存のルート マップに対応するルート マップ設定モードを開始します。ルート マップのエントリを順序付けるには、seq を使用します。

ステップ 5

match {ip | ipv6} address access-list-name name [name...]

例:

switch(config-route-map)# match ip address access-list-name ACL1

1 つまたは複数の IPv4 または IPv6 アクセス コントロール リスト(ACL)に対して IPv4 または IPv6 アドレスを照合します。このコマンドはポリシーベース ルーティング用であり、ルート フィルタリングまたは再配布では無視されます。

ステップ 6

set ip next-hop address1

例:

switch(config-route-map)# set ip next-hop 192.0.2.1

ポリシーベース ルーティング用の IPv4 ネクストホップ アドレスを設定します。

ステップ 7

set ipv6 next-hop address1

例:

switch(config-route-map)# set ipv6 next-hop 2001:0DB8::1 

ポリシーベース ルーティング用の IPv6 ネクストホップ アドレスを設定します。

ステップ 8

(任意) set interface null0

例:

switch(config-route-map)# set interface null0
(任意)

ルーティングに使用するインターフェイスを設定します。パケットをドロップするには null0 インターフェイスを使用します。

ステップ 9

(任意) copy running-config startup-config

例:

switch(config-route-map)# copy running-config startup-config
(任意)

この設定変更を保存します。

ポリシーベース リダイレクトの設定の確認

ポリシーベース リダイレクト設定情報を表示するには、次の作業のいずれかを行います。

コマンド

目的

show [ip | ipv6] policy [name]

IPv4 または IPv6 ポリシーに関する情報を表示します。

show route-map [name] pbr-statistics

ポリシー統計情報を表示します。

route-map map-name pbr-statistics コマンドを使用してポリシーを有効にします。clear route-map map-name pbr-statistics コマンドを使用してこれらのポリシーをクリアします。

ポリシー ベース リダイレクトの設定例

サービス VTEP を除くすべてのテナント VTEP で次の設定を実行します。

feature pbr

ipv6 access-list IPV6_App_group_1
10 permit ipv6 any 2001:10:1:1::0/64

ip access-list IPV4_App_group_1
10 permit ip any 10.1.1.0/24

ipv6 access-list IPV6_App_group_2
10 permit ipv6 any 2001:20:1:1::0/64

ip access-list IPV4_App_group_2
10 permit ip any 20.1.1.0/24

route-map IPV6_PBR_Appgroup1 permit 10
  match ipv6 address IPV6_App_group_2
  set ipv6 next-hop 2001:100:1:1::20  (next hop is that of the firewall)

route-map IPV4_ PBR_Appgroup1 permit 10
  match ip address IPV4_App_group_2
  set ip next-hop 10.100.1.20 (next hop is that of the firewall)

route-map IPV6_PBR_Appgroup2 permit 10
  match ipv6 address IPV6_App_group1
  set ipv6 next-hop 2001:100:1:1::20  (next hop is that of the firewall)

route-map IPV4_ PBR_Appgroup2 permit 10
  match ip address IPV4_App_group_1
  set ip next-hop 10.100.1.20 (next hop is that of the firewall)


interface Vlan10
! tenant SVI appgroup 1
vrf member appgroup
 ip address 10.1.1.1/24
 no ip redirect
 ipv6 address 2001:10:1:1::1/64
 no ipv6 redirects
 fabric forwarding mode anycast-gateway
ip policy route-map IPV4_ PBR_Appgroup1 
ipv6 policy route-map IPV6_PBR_Appgroup1
interface Vlan20
! tenant SVI appgroup 2
vrf member appgroup
 ip address 20.1.1.1/24
 no ip redirect
 ipv6 address 2001:20:1:1::1/64
 no ipv6 redirects
 fabric forwarding mode anycast-gateway
ip policy route-map IPV4_ PBR_Appgroup2
ipv6 policy route-map IPV6_PBR_Appgroup2

On the service VTEP, the PBR policy is applied on the tenant VRF SVI. This ensures the traffic post decapsulation will be redirected to firewall. 
feature pbr

ipv6 access-list IPV6_App_group_1
10 permit ipv6 any 2001:10:1:1::0/64

ip access-list IPV4_App_group_1
10 permit ip any 10.1.1.0/24

ipv6 access-list IPV6_App_group_2
10 permit ipv6 any 2001:20:1:1::0/64

ip access-list IPV4_App_group_2
10 permit ip any 20.1.1.0/24

route-map IPV6_PBR_Appgroup1 permit 10
  match ipv6 address IPV6_App_group_2
  set ipv6 next-hop 2001:100:1:1::20  (next hop is that of the firewall)

route-map IPV6_PBR_Appgroup permit 20
  match ipv6 address IPV6_App_group1
  set ipv6 next-hop 2001:100:1:1::20  (next hop is that of the firewall)

route-map IPV4_ PBR_Appgroup permit 10
  match ip address IPV4_App_group_2
  set ip next-hop 10.100.1.20 (next hop is that of the firewall)

route-map IPV4_ PBR_Appgroup permit 20
  match ip address IPV4_App_group_1
  set ip next-hop 10.100.1.20 (next hop is that of the firewall)


interface vlan1000
!L3VNI SVI for Tenant VRF
vrf member appgroup
ip forward
ipv6 forward
ipv6 ipv6 address use-link-local-only
ip policy route-map IPV4_ PBR_Appgroup
ipv6 policy route-map IPV6_PBR_Appgroup